From 7f6a1b771e4b2057302fff7889425f8d25067f9a Mon Sep 17 00:00:00 2001 From: Peter Pentchev Date: Tue, 20 Apr 2004 12:07:57 +0000 Subject: Work around the removal of the CURLOPT_PASSWDFUNCTION and CURLOPT_PASSWDDATA options which have been deprecated since curl-7.10.8. Reported by: dosirak via kris --- www/p5-WWW-Curl/Makefile | 1 + www/p5-WWW-Curl/files/patch-Curl.xs | 61 +++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 www/p5-WWW-Curl/files/patch-Curl.xs (limited to 'www/p5-WWW-Curl') diff --git a/www/p5-WWW-Curl/Makefile b/www/p5-WWW-Curl/Makefile index b11098e18db7..aa20f5c519f4 100644 --- a/www/p5-WWW-Curl/Makefile +++ b/www/p5-WWW-Curl/Makefile @@ -7,6 +7,7 @@ PORTNAME= WWW-Curl PORTVERSION= 2.0 +PORTREVISION= 1 CATEGORIES= www ftp perl5 MASTER_SITES= ${MASTER_SITE_PERL_CPAN} \ http://curl.haxx.se/libcurl/perl/ diff --git a/www/p5-WWW-Curl/files/patch-Curl.xs b/www/p5-WWW-Curl/files/patch-Curl.xs new file mode 100644 index 000000000000..cb4da239bdbc --- /dev/null +++ b/www/p5-WWW-Curl/files/patch-Curl.xs @@ -0,0 +1,61 @@ +Index: Curl.xs +=================================================================== +RCS file: /home/cvs/ringlet/perl/contrib/net/WWW-Curl/Curl.xs,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -r1.1.1.1 -r1.2 +--- Curl.xs 20 Apr 2004 10:55:02 -0000 1.1.1.1 ++++ Curl.xs 20 Apr 2004 11:17:25 -0000 1.2 +@@ -66,6 +66,12 @@ + + } perl_curl_easy; + ++#if LIBCURL_VERSION_NUM >= 0x070b01 ++typedef struct { ++ struct curl_httppost * post; ++ struct curl_httppost * last; ++} perl_curl_form; ++#else + #if LIBCURL_VERSION_NUM >= 0x070900 + typedef struct { + struct HttpPost * post; +@@ -77,6 +83,7 @@ + void * last; + } perl_curl_form; + #endif ++#endif + + /* switch from curl option codes to the relevant callback index */ + static perl_curl_easy_callback_code callback_index(int option) { +@@ -101,9 +108,11 @@ + return CALLBACK_PROGRESS; + break; + ++#if (LIBCURL_VERSION_NUM<0x070b01) + case CURLOPT_PASSWDFUNCTION: + case CURLOPT_PASSWDDATA: + return CALLBACK_PASSWD; ++#endif + break; + } + croak("Bad callback index requested\n"); +@@ -617,7 +626,9 @@ + case CURLOPT_INFILE: + case CURLOPT_WRITEHEADER: + case CURLOPT_PROGRESSDATA: ++#if (LIBCURL_VERSION_NUM<0x070b01) + case CURLOPT_PASSWDDATA: ++#endif + perl_curl_easy_register_callback(self,&(self->callback_ctx[callback_index(option)]),value); + break; + +@@ -626,7 +637,9 @@ + case CURLOPT_READFUNCTION: + case CURLOPT_HEADERFUNCTION: + case CURLOPT_PROGRESSFUNCTION: ++#if (LIBCURL_VERSION_NUM<0x070b01) + case CURLOPT_PASSWDFUNCTION: ++#endif + perl_curl_easy_register_callback(self,&(self->callback[callback_index(option)]),value); + break; + -- cgit v1.2.3