mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
parent
0da615ae5c
commit
49b9b19249
3 changed files with 144 additions and 2 deletions
|
@ -0,0 +1,43 @@
|
||||||
|
Force destruction of downloader before curl_global_cleanup
|
||||||
|
See: https://github.com/Sude-/lgogdownloader/commit/6ce6aeb1dc06f8af1508c5ce6ee71775b8d188b3
|
||||||
|
Index: LGOGDownloader-3.9/main.cpp
|
||||||
|
===================================================================
|
||||||
|
--- LGOGDownloader-3.9.orig/main.cpp
|
||||||
|
+++ LGOGDownloader-3.9/main.cpp
|
||||||
|
@@ -607,9 +607,10 @@ int main(int argc, char *argv[])
|
||||||
|
std::cerr << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ int res = 0;
|
||||||
|
// Init curl globally
|
||||||
|
curl_global_init(CURL_GLOBAL_ALL);
|
||||||
|
-
|
||||||
|
+ {
|
||||||
|
Downloader downloader;
|
||||||
|
|
||||||
|
int iLoginTries = 0;
|
||||||
|
@@ -733,12 +734,10 @@ int main(int argc, char *argv[])
|
||||||
|
bool bInitOK = downloader.init();
|
||||||
|
if (!bInitOK)
|
||||||
|
{
|
||||||
|
- curl_global_cleanup();
|
||||||
|
- return 1;
|
||||||
|
+ res = 1;
|
||||||
|
+ goto end;
|
||||||
|
}
|
||||||
|
|
||||||
|
- int res = 0;
|
||||||
|
-
|
||||||
|
if (Globals::globalConfig.bShowWishlist)
|
||||||
|
downloader.showWishlist();
|
||||||
|
else if (Globals::globalConfig.bUpdateCache)
|
||||||
|
@@ -801,7 +800,8 @@ int main(int argc, char *argv[])
|
||||||
|
// Orphan check was called at the same time as download. Perform it after download has finished
|
||||||
|
if (!Globals::globalConfig.sOrphanRegex.empty() && Globals::globalConfig.bDownload)
|
||||||
|
downloader.checkOrphans();
|
||||||
|
-
|
||||||
|
+ }
|
||||||
|
+end:
|
||||||
|
curl_global_cleanup();
|
||||||
|
|
||||||
|
return res;
|
90
srcpkgs/LGOGDownloader/patches/curl-7.87.patch
Normal file
90
srcpkgs/LGOGDownloader/patches/curl-7.87.patch
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
Force destruction of downloader before curl_global_cleanup
|
||||||
|
See: https://github.com/Sude-/lgogdownloader/commit/6ce6aeb1dc06f8af1508c5ce6ee71775b8d188b3
|
||||||
|
Index: LGOGDownloader-3.9/main.cpp
|
||||||
|
===================================================================
|
||||||
|
--- LGOGDownloader-3.9.orig/main.cpp
|
||||||
|
+++ LGOGDownloader-3.9/main.cpp
|
||||||
|
@@ -607,9 +607,10 @@ int main(int argc, char *argv[])
|
||||||
|
std::cerr << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ int res = 0;
|
||||||
|
// Init curl globally
|
||||||
|
curl_global_init(CURL_GLOBAL_ALL);
|
||||||
|
-
|
||||||
|
+ {
|
||||||
|
Downloader downloader;
|
||||||
|
|
||||||
|
int iLoginTries = 0;
|
||||||
|
@@ -636,8 +637,8 @@ int main(int argc, char *argv[])
|
||||||
|
// Login failed, cleanup
|
||||||
|
if (!bLoginOK && !bIsLoggedin)
|
||||||
|
{
|
||||||
|
- curl_global_cleanup();
|
||||||
|
- return 1;
|
||||||
|
+ res = 1;
|
||||||
|
+ goto end;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make sure that config file and cookie file are only readable/writable by owner
|
||||||
|
@@ -699,15 +700,14 @@ int main(int argc, char *argv[])
|
||||||
|
Util::setFilePermissions(Globals::globalConfig.sConfigFilePath, boost::filesystem::owner_read | boost::filesystem::owner_write);
|
||||||
|
if (Globals::globalConfig.bSaveConfig)
|
||||||
|
{
|
||||||
|
- curl_global_cleanup();
|
||||||
|
- return 0;
|
||||||
|
+ goto end;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cerr << "Failed to create config: " << Globals::globalConfig.sConfigFilePath << std::endl;
|
||||||
|
- curl_global_cleanup();
|
||||||
|
- return 1;
|
||||||
|
+ res = 1;
|
||||||
|
+ goto end;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (Globals::globalConfig.bResetConfig)
|
||||||
|
@@ -719,26 +719,23 @@ int main(int argc, char *argv[])
|
||||||
|
if (!Globals::globalConfig.bRespectUmask)
|
||||||
|
Util::setFilePermissions(Globals::globalConfig.sConfigFilePath, boost::filesystem::owner_read | boost::filesystem::owner_write);
|
||||||
|
|
||||||
|
- curl_global_cleanup();
|
||||||
|
- return 0;
|
||||||
|
+ goto end;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cerr << "Failed to create config: " << Globals::globalConfig.sConfigFilePath << std::endl;
|
||||||
|
- curl_global_cleanup();
|
||||||
|
- return 1;
|
||||||
|
+ res = 1;
|
||||||
|
+ goto end;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool bInitOK = downloader.init();
|
||||||
|
if (!bInitOK)
|
||||||
|
{
|
||||||
|
- curl_global_cleanup();
|
||||||
|
- return 1;
|
||||||
|
+ res = 1;
|
||||||
|
+ goto end;
|
||||||
|
}
|
||||||
|
|
||||||
|
- int res = 0;
|
||||||
|
-
|
||||||
|
if (Globals::globalConfig.bShowWishlist)
|
||||||
|
downloader.showWishlist();
|
||||||
|
else if (Globals::globalConfig.bUpdateCache)
|
||||||
|
@@ -801,7 +798,8 @@ int main(int argc, char *argv[])
|
||||||
|
// Orphan check was called at the same time as download. Perform it after download has finished
|
||||||
|
if (!Globals::globalConfig.sOrphanRegex.empty() && Globals::globalConfig.bDownload)
|
||||||
|
downloader.checkOrphans();
|
||||||
|
-
|
||||||
|
+ }
|
||||||
|
+end:
|
||||||
|
curl_global_cleanup();
|
||||||
|
|
||||||
|
return res;
|
|
@ -1,11 +1,14 @@
|
||||||
# Template file for 'LGOGDownloader'
|
# Template file for 'LGOGDownloader'
|
||||||
pkgname=LGOGDownloader
|
pkgname=LGOGDownloader
|
||||||
version=3.9
|
version=3.9
|
||||||
revision=3
|
revision=4
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
|
configure_args="$(vopt_bool qt USE_QT_GUI)"
|
||||||
hostmakedepends="pkg-config"
|
hostmakedepends="pkg-config"
|
||||||
makedepends="htmlcxx-devel tinyxml2-devel libcurl-devel rhash-devel
|
makedepends="htmlcxx-devel tinyxml2-devel libcurl-devel rhash-devel
|
||||||
jsoncpp-devel boost-devel openssl-devel zlib-devel"
|
jsoncpp-devel boost-devel openssl-devel zlib-devel
|
||||||
|
$(vopt_if qt "qt5-webengine-devel qt5-declarative-devel
|
||||||
|
qt5-webchannel-devel qt5-location-devel")"
|
||||||
short_desc="Open source downloader for GOG.com games that uses the GOG.com API"
|
short_desc="Open source downloader for GOG.com games that uses the GOG.com API"
|
||||||
maintainer="RunningDroid <runningdroid@zoho.com>"
|
maintainer="RunningDroid <runningdroid@zoho.com>"
|
||||||
license="WTFPL"
|
license="WTFPL"
|
||||||
|
@ -13,7 +16,13 @@ homepage="https://github.com/Sude-/lgogdownloader"
|
||||||
distfiles="https://github.com/Sude-/lgogdownloader/archive/v${version}.tar.gz"
|
distfiles="https://github.com/Sude-/lgogdownloader/archive/v${version}.tar.gz"
|
||||||
checksum=4ab9fe89b47bde7744d5100663c7822de74bb161e2790baddede8146056430b1
|
checksum=4ab9fe89b47bde7744d5100663c7822de74bb161e2790baddede8146056430b1
|
||||||
|
|
||||||
|
build_options="qt"
|
||||||
|
desc_option_qt="Include QT WebEngine to support solving captchas"
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
||||||
makedepends+=" libatomic-devel"
|
makedepends+=" libatomic-devel"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$CROSS_BUILD" ]; then
|
||||||
|
hostmakedepends+=" help2man"
|
||||||
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue