diff options
author | J0WI <J0WI@users.noreply.github.com> | 2020-02-01 18:32:02 +0100 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2020-02-01 18:48:45 +0100 |
commit | 27f199560ca285dd198f3a101c308c45be37753c (patch) | |
tree | 2bfb4b26c479ab31e1facccbedc0b9a92ac02cd1 /testing/perl-www-curl | |
parent | c0ff8a08f42ed4c52451d21ab997298b95563e5b (diff) | |
download | aports-27f199560ca285dd198f3a101c308c45be37753c.tar.bz2 aports-27f199560ca285dd198f3a101c308c45be37753c.tar.xz |
testing/perl-www-curl: fix build with current curl version
Diffstat (limited to 'testing/perl-www-curl')
-rw-r--r-- | testing/perl-www-curl/APKBUILD | 8 | ||||
-rw-r--r-- | testing/perl-www-curl/fix-curl.xs.patch | 163 |
2 files changed, 168 insertions, 3 deletions
diff --git a/testing/perl-www-curl/APKBUILD b/testing/perl-www-curl/APKBUILD index 4ede3d2ea9..9f0c201237 100644 --- a/testing/perl-www-curl/APKBUILD +++ b/testing/perl-www-curl/APKBUILD @@ -4,16 +4,17 @@ pkgname=perl-www-curl _pkgreal=WWW-Curl pkgver=4.17 -pkgrel=6 +pkgrel=7 pkgdesc="Perl extension interface for libcurl" url="https://metacpan.org/release/WWW-Curl" arch="all" license="MIT" makedepends="perl-dev curl-dev" subpackages="$pkgname-doc" -source="http://search.cpan.org/CPAN/authors/id/S/SZ/SZBALINT/$_pkgreal-$pkgver.tar.gz +source="https://cpan.metacpan.org/authors/id/S/SZ/SZBALINT/$_pkgreal-$pkgver.tar.gz WWW-Curl-4.17-RT117793.patch perl-5.26.patch + fix-curl.xs.patch " builddir="$srcdir/$_pkgreal-$pkgver" @@ -39,4 +40,5 @@ package() { sha512sums="bc7a75d0e23f5a77578fd7244b56a1e1b81d814993b90ac7132926f0d571232c4c95875bc615cb6239e424ae1d5481d27796efc5376bb0845d1da0ff1137c0d6 WWW-Curl-4.17.tar.gz d92cb37435d66867578818776f3ef64f4f6295515639d9bf860907ad28ca4109435c45174b49bdeb594a0cddafcc3f833c41d15d641eadfbbec598b77a1e90df WWW-Curl-4.17-RT117793.patch -a0e91afecc23df532c1256255b202152597d00fd6e677d25a473fb0ce5e6d2a0be978298fee9dd73343765a1ad925afea5c73be458ace4311c733a14d0f55bae perl-5.26.patch" +a0e91afecc23df532c1256255b202152597d00fd6e677d25a473fb0ce5e6d2a0be978298fee9dd73343765a1ad925afea5c73be458ace4311c733a14d0f55bae perl-5.26.patch +5bdd2fcdc235d28b811c9197bc24f80857476a2704212b63f762aa61252665ddbfc2fb3493952426d3760c76e1f3ea23298fc040770664de87deab4945d3bb36 fix-curl.xs.patch" diff --git a/testing/perl-www-curl/fix-curl.xs.patch b/testing/perl-www-curl/fix-curl.xs.patch new file mode 100644 index 0000000000..1ae3e8b46c --- /dev/null +++ b/testing/perl-www-curl/fix-curl.xs.patch @@ -0,0 +1,163 @@ +From 893518f6ed260b67fc86e344a9c6bb7626617b3a Mon Sep 17 00:00:00 2001 +From: Tuukka Pasanen <tuukka.pasanen@ilmi.fi> +Date: Mon, 16 Dec 2019 10:41:59 +0200 +Subject: [PATCH 1/3] For maximum backward compability define __CURL_MULTI_H if + it's not defined + +--- + Curl.xs | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/Curl.xs b/Curl.xs +index cfa282d..a98c255 100644 +--- a/Curl.xs ++++ b/Curl.xs +@@ -68,6 +68,12 @@ typedef struct { + struct curl_httppost * last; + } perl_curl_form; + ++/* To keep backward compability define __CURL_MULTI_H if it's not defined */ ++#ifdef CURLINC_MULTI_H ++# ifndef __CURL_MULTI_H ++# define __CURL_MULTI_H 1 ++# endif ++#endif + + typedef struct { + #ifdef __CURL_MULTI_H + +From 3e94be6ae245ca29ac21745cf273c7bd0ca9b178 Mon Sep 17 00:00:00 2001 +From: Tuukka Pasanen <tuukka.pasanen@ilmi.fi> +Date: Mon, 16 Dec 2019 10:53:25 +0200 +Subject: [PATCH 2/3] Remove -Wunused-but-set-variable warnings + +--- + Curl.xs | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/Curl.xs b/Curl.xs +index a98c255..828b4ec 100644 +--- a/Curl.xs ++++ b/Curl.xs +@@ -358,7 +358,6 @@ fwrite_wrapper2 ( + + if (call_function) { /* We are doing a callback to perl */ + int count, status; +- SV *sv; + + ENTER; + SAVETMPS; +@@ -608,6 +607,8 @@ curl_easy_init(...) + char *sclass = "WWW::Curl::Easy"; + + PPCODE: ++ /* Prevent ununsed variable warning */ ++ (void)(ix); + if (items>0 && !SvROK(ST(0))) { + STRLEN dummy; + sclass = SvPV(ST(0),dummy); +@@ -951,6 +952,8 @@ int + curl_easy_cleanup(self) + WWW::Curl::Easy self + CODE: ++ /* Prevent unused variable warning */ ++ (void)(self); + /* does nothing anymore - cleanup is automatic when a curl handle goes out of scope */ + RETVAL = 0; + OUTPUT: +@@ -968,6 +971,8 @@ curl_easy_strerror(self, errornum) + int errornum + CODE: + { ++ /* Prevent unused variable */ ++ (void)(self); + #if (LIBCURL_VERSION_NUM>=0x070C00) + const char * vchar = curl_easy_strerror(errornum); + #else +@@ -1186,6 +1191,8 @@ curl_multi_strerror(self, errornum) + int errornum + CODE: + { ++ /* Prevent unused variable warning */ ++ (void)(self); + #if (LIBCURL_VERSION_NUM>=0x070C00) + const char * vchar = curl_multi_strerror(errornum); + #else +@@ -1256,6 +1263,8 @@ curl_share_strerror(self, errornum) + int errornum + CODE: + { ++ /* Prevent unused variable */ ++ (void)(self); + #if (LIBCURL_VERSION_NUM>=0x070C00) + const char * vchar = curl_share_strerror(errornum); + #else + +From 968e410fcd6ddc4a122d787186eac6516bf982aa Mon Sep 17 00:00:00 2001 +From: Tuukka Pasanen <tuukka.pasanen@ilmi.fi> +Date: Mon, 16 Dec 2019 11:00:46 +0200 +Subject: [PATCH 3/3] Remove -Wattribute-warning warning messages with + typecasting + +--- + Curl.xs | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/Curl.xs b/Curl.xs +index 828b4ec..05eb71a 100644 +--- a/Curl.xs ++++ b/Curl.xs +@@ -667,7 +667,7 @@ curl_easy_duphandle(self) + } + + if (self->callback[callback_index(CURLOPT_DEBUGFUNCTION)] || self->callback_ctx[callback_index(CURLOPT_DEBUGDATA)]) { +- curl_easy_setopt(clone->curl, CURLOPT_DEBUGFUNCTION, debug_callback_func); ++ curl_easy_setopt(clone->curl, CURLOPT_DEBUGFUNCTION, (curl_debug_callback) debug_callback_func); + curl_easy_setopt(clone->curl, CURLOPT_DEBUGDATA, clone); + } + +@@ -722,7 +722,7 @@ curl_easy_setopt(self, option, value, push=0) + perl_curl_easy_register_callback(aTHX_ self,&(self->callback_ctx[callback_index(option)]), value); + break; + case CURLOPT_DEBUGDATA: +- curl_easy_setopt(self->curl, CURLOPT_DEBUGFUNCTION, SvOK(value) ? debug_callback_func : NULL); ++ curl_easy_setopt(self->curl, CURLOPT_DEBUGFUNCTION, (curl_debug_callback) (SvOK(value) ? debug_callback_func : NULL)); + curl_easy_setopt(self->curl, option, SvOK(value) ? self : NULL); + perl_curl_easy_register_callback(aTHX_ self,&(self->callback_ctx[callback_index(option)]), value); + break; +@@ -743,7 +743,7 @@ curl_easy_setopt(self, option, value, push=0) + perl_curl_easy_register_callback(aTHX_ self,&(self->callback[callback_index(option)]), value); + break; + case CURLOPT_DEBUGFUNCTION: +- curl_easy_setopt(self->curl, option, SvOK(value) ? debug_callback_func : NULL); ++ curl_easy_setopt(self->curl, option, (curl_debug_callback) (SvOK(value) ? debug_callback_func : NULL)); + curl_easy_setopt(self->curl, CURLOPT_DEBUGDATA, SvOK(value) ? self : NULL); + perl_curl_easy_register_callback(aTHX_ self,&(self->callback[callback_index(option)]), value); + break; +@@ -796,7 +796,7 @@ curl_easy_setopt(self, option, value, push=0) + + /* tell curl to redirect STDERR - value should be a glob */ + case CURLOPT_STDERR: +- RETVAL = curl_easy_setopt(self->curl, option, IoOFP(sv_2io(value)) ); ++ RETVAL = curl_easy_setopt(self->curl, option, (FILE *) IoOFP(sv_2io(value)) ); + break; + + /* not working yet... */ +@@ -817,7 +817,7 @@ curl_easy_setopt(self, option, value, push=0) + WWW__Curl__Share wrapper; + IV tmp = SvIV((SV*)SvRV(value)); + wrapper = INT2PTR(WWW__Curl__Share,tmp); +- RETVAL = curl_easy_setopt(self->curl, option, wrapper->curlsh); ++ RETVAL = curl_easy_setopt(self->curl, option, (CURLSH *) wrapper->curlsh); + } else + croak("value is not of type WWW::Curl::Share"); + break; +@@ -1096,7 +1096,7 @@ curl_multi_info_read(self) + }; + if (easy) { + curl_easy_getinfo(easy, CURLINFO_PRIVATE, &stashid); +- curl_easy_setopt(easy, CURLINFO_PRIVATE, NULL); ++ curl_easy_setopt(easy, CURLINFO_PRIVATE, (curl_off_t) NULL); + curl_multi_remove_handle(self->curlm, easy); + XPUSHs(sv_2mortal(newSVpv(stashid,0))); + XPUSHs(sv_2mortal(newSViv(res))); |