diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD index e51f136..cc3dec7 100644 --- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -14,13 +14,23 @@ license=(LGPL3 GPL3) makedepends=(bzip2 curl gcc-libs libarchive libmicrohttpd sqlite xz zlib zstd) options=(staticlibs) source=(https://sourceware.org/$pkgbase/ftp/$pkgver/$pkgbase-$pkgver.tar.bz2{,.sig} - curl_7.85_compat.patch) + curl_7.85_compat-1.patch + curl_7.85_compat-2.patch + curl_7.85_compat-3.patch + curl_7.85_compat-4.patch + ) sha512sums=('585551b2d937d19d1becfc2f28935db1dd1a3d25571a62f322b70ac8da98c1a741a55d070327705df6c3e2ee026652e0b9a3c733b050a0b0ec5f2fc75d5b74b5' 'SKIP' - '8f731bf2451ffd195a7da939d469486272873fa9fd19c2dc03a5311814840d7a7242b82de42162efc36404bee9a4fb3a6b85e0eb9fbb81e3c15f989cdd288c37') + '5a8733bd760499855b3c499ad0e7bd8b04d44893929f7b0f634e6a7198e317af1d4a8cc07e3d870cd7cd0ee64883f5ab686e5cc403dfb6a1d9a4521943f56de0' + '9db0ddfdd52392d971528ec08983982d5d553e56bcec4767b3cb5c616970376041443718822a8ac19d42890fbefc4cac94b6b359a317a476a264394150edb0b8' + 'a9d87039f9f6d2ab14ea6ac971d4a86f90c0647b09596652dbcea091827174927f03bbf0e0d43df23041a65efcec7dfa2f511e9375b7a307c73a041324ac6a19' + '537602d24899c39bd4f7241d42f08a5d07f12dfe5a4905e1135444881834f34059cbfa6b7cd8f9b6d0cb7c01e44d7d939fae6c577b2f7707c8f03b6088caa9ad') b2sums=('6b0474f1436eaf6af73b735b9b2ddd5448ab9c03fbaa0be745a31c89ae8f15b0e21a651409c38643ca125794ce82c19d7b46db4a079f3e72cb919d643560e7a4' 'SKIP' - '92b92aefc011b4be7ed00baca28c3447003baa864be58482bf0c220dcd6ad75133c6e34731eaf7e3cc97dbb3e1f85d1fce88cb532c3da37b36802d2c6e7a9e36') + '95ae321e626fa8407617cb3410f0d16a390e6da07ec1dcb1cec5eb18c19d7f2bf4b1be0f0053a1d710ce421d7d75e03c6044dd12e0c87bb5edaea47805be4ad6' + 'ec7703bf1bc3dd4754eeb4cacbee79261eb231e8a832c43161955e8a6302e2d26d751f082ccd40dcbaaecc55845d16244e7e2767471d350a404d22d3987b3249' + 'c797e96955f59addbf9282905de3394aad03df757221a203a1255f6f51e15387dae3b50ca6b603a67072362f077ab0a61d0ec908455ac7fbf7b5051c15dfbdab' + '1fc9d950b5901dd0fbde0fb8f0cd3120702a31af5f59a9a406d6077d5b8c355ff7f85412a035337311e1822deae0b5757ef0f54e4ca661fa581e9801b3479766') validpgpkeys=( '47CC0331081B8BC6D0FD4DA08370665B57816A6A' # Mark J. Wielaard 'EC3CFE88F6CA0788774F5C1D1AA44BE649DE760A' # Mark Wielaard @@ -40,7 +50,10 @@ prepare() { cd $pkgbase-$pkgver # Use CURLOPT_PROTOCOLS_STR for libcurl >= 7.85.0 # https://sourceware.org/git/?p=elfutils.git;a=commit;h=6560fb26a62ef135a804357ef4f15a47de3e49b3 - patch -Np1 < ../curl_7.85_compat.patch + patch -Np1 < ../curl_7.85_compat-1.patch + patch -Np1 < ../curl_7.85_compat-2.patch + patch -Np1 < ../curl_7.85_compat-3.patch + patch -Np1 < ../curl_7.85_compat-4.patch cd .. # remove failing test due to missing glibc debug package during test: https://bugs.archlinux.org/task/74875 @@ -65,6 +78,7 @@ build() { ( # fat-lto-objects is required for non-mangled .a files in libelf CFLAGS+=" -ffat-lto-objects" + CFLAGS+=" -Wno-error=deprecated-declarations" cd $pkgbase-$pkgver ./configure "${configure_options[@]}" make @@ -75,6 +89,7 @@ build() { CFLAGS+=" -g" # fat-lto-objects is required for non-mangled .a files in libelf CFLAGS+=" -ffat-lto-objects" + CFLAGS+=" -Wno-error=deprecated-declarations" ./configure "${configure_options[@]}" make ) diff --git a/trunk/curl_7.85_compat-1.patch b/trunk/curl_7.85_compat-1.patch new file mode 100644 index 0000000..db4f16a --- /dev/null +++ b/trunk/curl_7.85_compat-1.patch @@ -0,0 +1,18 @@ +diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c +index a16165bd1..1ce456327 100644 +--- a/debuginfod/debuginfod-client.c ++++ b/debuginfod/debuginfod-client.c +@@ -1336,8 +1336,13 @@ debuginfod_query_server (debuginfod_client *c, + + /* Only allow http:// + https:// + file:// so we aren't being + redirected to some unsupported protocol. */ ++#if CURL_AT_LEAST_VERSION(7, 85, 0) ++ curl_easy_setopt_ck(data[i].handle, CURLOPT_PROTOCOLS_STR, ++ "http,https,file"); ++#else + curl_easy_setopt_ck(data[i].handle, CURLOPT_PROTOCOLS, + (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FILE)); ++#endif + curl_easy_setopt_ck(data[i].handle, CURLOPT_URL, data[i].url); + if (vfd >= 0) + curl_easy_setopt_ck(data[i].handle, CURLOPT_ERRORBUFFER, diff --git a/trunk/curl_7.85_compat-2.patch b/trunk/curl_7.85_compat-2.patch new file mode 100644 index 0000000..8bc07bc --- /dev/null +++ b/trunk/curl_7.85_compat-2.patch @@ -0,0 +1,12 @@ +index 8873fcc8c..692aeccec 100644 +--- a/debuginfod/debuginfod-client.c ++++ b/debuginfod/debuginfod-client.c +@@ -1456,7 +1456,7 @@ debuginfod_query_server (debuginfod_client *c, + deflate-compressing proxies, this number is likely to be + unavailable, so -1 may show. */ + CURLcode curl_res; +-#ifdef CURLINFO_CONTENT_LENGTH_DOWNLOAD_T ++#if CURL_AT_LEAST_VERSION(7, 55, 0) + curl_off_t cl; + curl_res = curl_easy_getinfo(target_handle, + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, diff --git a/trunk/curl_7.85_compat-3.patch b/trunk/curl_7.85_compat-3.patch new file mode 100644 index 0000000..6f7f53f --- /dev/null +++ b/trunk/curl_7.85_compat-3.patch @@ -0,0 +1,13 @@ +diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c +index 8873fcc8c..692aeccec 100644 +--- a/debuginfod/debuginfod-client.c ++++ b/debuginfod/debuginfod-client.c +@@ -1491,7 +1491,7 @@ debuginfod_query_server (debuginfod_client *c, + if (target_handle) /* we've committed to a server; report its download progress */ + { + CURLcode curl_res; +-#ifdef CURLINFO_SIZE_DOWNLOAD_T ++#if CURL_AT_LEAST_VERSION(7, 55, 0) + curl_off_t dl; + curl_res = curl_easy_getinfo(target_handle, + CURLINFO_SIZE_DOWNLOAD_T, diff --git a/trunk/curl_7.85_compat-4.patch b/trunk/curl_7.85_compat-4.patch new file mode 100644 index 0000000..bce9d10 --- /dev/null +++ b/trunk/curl_7.85_compat-4.patch @@ -0,0 +1,20 @@ +diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c +index 692aeccec..a16165bd1 100644 +--- a/debuginfod/debuginfod-client.c ++++ b/debuginfod/debuginfod-client.c +@@ -105,6 +105,13 @@ void debuginfod_end (debuginfod_client *c) { } + #include + #endif + ++/* Older curl.h don't define CURL_AT_LEAST_VERSION. */ ++#ifndef CURL_AT_LEAST_VERSION ++ #define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z)) ++ #define CURL_AT_LEAST_VERSION(x,y,z) \ ++ (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z)) ++#endif ++ + #include + + static pthread_once_t init_control = PTHREAD_ONCE_INIT; +-- +2.31.1 diff --git a/trunk/curl_7.85_compat.patch b/trunk/curl_7.85_compat.patch deleted file mode 100644 index 4167b9f..0000000 --- a/trunk/curl_7.85_compat.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c -index a16165bd1..1ce456327 100644 ---- a/debuginfod/debuginfod-client.c -+++ b/debuginfod/debuginfod-client.c -@@ -1336,8 +1336,13 @@ debuginfod_query_server (debuginfod_client *c, - - /* Only allow http:// + https:// + file:// so we aren't being - redirected to some unsupported protocol. */ -+#if CURL_AT_LEAST_VERSION(7, 85, 0) -+ curl_easy_setopt_ck(data[i].handle, CURLOPT_PROTOCOLS_STR, -+ "http,https,file"); -+#else - curl_easy_setopt_ck(data[i].handle, CURLOPT_PROTOCOLS, - (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FILE)); -+#endif - curl_easy_setopt_ck(data[i].handle, CURLOPT_URL, data[i].url); - if (vfd >= 0) - curl_easy_setopt_ck(data[i].handle, CURLOPT_ERRORBUFFER, -diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c -index 8873fcc8c..692aeccec 100644 ---- a/debuginfod/debuginfod-client.c -+++ b/debuginfod/debuginfod-client.c -@@ -1456,7 +1456,7 @@ debuginfod_query_server (debuginfod_client *c, - deflate-compressing proxies, this number is likely to be - unavailable, so -1 may show. */ - CURLcode curl_res; --#ifdef CURLINFO_CONTENT_LENGTH_DOWNLOAD_T -+#if CURL_AT_LEAST_VERSION(7, 55, 0) - curl_off_t cl; - curl_res = curl_easy_getinfo(target_handle, - CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, -@@ -1491,7 +1491,7 @@ debuginfod_query_server (debuginfod_client *c, - if (target_handle) /* we've committed to a server; report its download progress */ - { - CURLcode curl_res; --#ifdef CURLINFO_SIZE_DOWNLOAD_T -+#if CURL_AT_LEAST_VERSION(7, 55, 0) - curl_off_t dl; - curl_res = curl_easy_getinfo(target_handle, - CURLINFO_SIZE_DOWNLOAD_T, -diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c -index 692aeccec..a16165bd1 100644 ---- a/debuginfod/debuginfod-client.c -+++ b/debuginfod/debuginfod-client.c -@@ -105,6 +105,13 @@ void debuginfod_end (debuginfod_client *c) { } - #include - #endif - -+/* Older curl.h don't define CURL_AT_LEAST_VERSION. */ -+#ifndef CURL_AT_LEAST_VERSION -+ #define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z)) -+ #define CURL_AT_LEAST_VERSION(x,y,z) \ -+ (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z)) -+#endif -+ - #include - - static pthread_once_t init_control = PTHREAD_ONCE_INIT; --- -2.31.1