[packages/perl-WWW-Curl] - added curl-7.87.0 patches from Fedora

qboosh qboosh at pld-linux.org
Sat Feb 4 09:07:18 CET 2023


commit 0b0a778716baa78a3224aa97167d46ba8a82a78f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Feb 4 09:08:41 2023 +0100

    - added curl-7.87.0 patches from Fedora

 WWW-Curl-Adapt-to-curl-7.87.0.patch                | 35 ++++++++++++++++++
 ...rl-Work-around-a-macro-bug-in-curl-7.87.0.patch | 43 ++++++++++++++++++++++
 perl-WWW-Curl.spec                                 |  4 ++
 3 files changed, 82 insertions(+)
---
diff --git a/perl-WWW-Curl.spec b/perl-WWW-Curl.spec
index e39533c..efdd9b3 100644
--- a/perl-WWW-Curl.spec
+++ b/perl-WWW-Curl.spec
@@ -16,6 +16,8 @@ Source0:	http://www.cpan.org/modules/by-authors/id/S/SZ/SZBALINT/%{pdir}-%{pnam}
 Patch0:		WWW-Curl-4.17-Skip-preprocessor-symbol-only-CURL_STRICTER.patch
 Patch1:		curl-7.66.0.patch
 Patch2:		curl-7.69.0.patch
+Patch3:		WWW-Curl-Adapt-to-curl-7.87.0.patch
+Patch4:		WWW-Curl-Work-around-a-macro-bug-in-curl-7.87.0.patch
 URL:		http://curl.haxx.se/libcurl/perl/
 BuildRequires:	curl-devel
 BuildRequires:	perl-devel >= 1:5.8.0
@@ -45,6 +47,8 @@ nazewnictwa.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
+%patch4 -p1
 
 %build
 %{__perl} Makefile.PL \
diff --git a/WWW-Curl-Adapt-to-curl-7.87.0.patch b/WWW-Curl-Adapt-to-curl-7.87.0.patch
new file mode 100644
index 0000000..f68a714
--- /dev/null
+++ b/WWW-Curl-Adapt-to-curl-7.87.0.patch
@@ -0,0 +1,35 @@
+From 4d8ca056c900cdb08556bbae2470ebb858369576 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Fri, 20 Jan 2023 14:26:50 +0100
+Subject: [PATCH] Adapt to curl-7.87.0
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+curl-7.87.0 added CURLOPTDEPRECATED and some other helping macros for
+hinting a compiler to produce deprecation warnings. Those are not
+constants for libcurl and clobbered generated curlopt-constants.c
+file:
+
+curlopt-constants.c:19:51: error: 'CURL_DEPRECATED' undeclared (first use in this function)
+   19 |             if (strEQ(name, "DEPRECATED")) return CURL_DEPRECATED;
+      |                                                   ^~~~~~~~~~~~~~~
+
+This patch adjusts curl.h parser in Makefile.PL to skip them.
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ Makefile.PL | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- WWW-Curl-4.17/Makefile.PL.orig	2023-02-04 09:03:58.232549376 +0100
++++ WWW-Curl-4.17/Makefile.PL	2023-02-04 09:06:35.355031504 +0100
+@@ -127,7 +127,7 @@ if (!defined($curl_h)) {
+     close H;
+ 
+     for my $e (sort @syms) {
+-       if($e =~ /(OBSOLETE|^CURL_EXTERN|^CURL_STRICTER\z|^CURL_WIN32\z|^CURLOPT\z|^CURL_DID_MEMORY_FUNC_TYPEDEFS\z|_LAST\z|_LASTENTRY\z|^CURLINC_)/) {
++       if($e =~ /(OBSOLETE|^CURL_DEPRECATED\z|^CURL_EXTERN|^CURL_IGNORE_DEPRECATION\z|^CURL_STRICTER\z|^CURL_WIN32\z|^CURLOPT\z|^CURLOPTDEPRECATED\z|^CURL_DID_MEMORY_FUNC_TYPEDEFS\z|_LAST\z|_LASTENTRY\z|^CURLINC_)/) {
+           next;
+        }
+        my ($group) = $e =~ m/^([^_]+_)/;
diff --git a/WWW-Curl-Work-around-a-macro-bug-in-curl-7.87.0.patch b/WWW-Curl-Work-around-a-macro-bug-in-curl-7.87.0.patch
new file mode 100644
index 0000000..4a9d8ea
--- /dev/null
+++ b/WWW-Curl-Work-around-a-macro-bug-in-curl-7.87.0.patch
@@ -0,0 +1,43 @@
+From 426744bbcbe0842f6d8c0cee08b03179b191738e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Fri, 20 Jan 2023 16:35:11 +0100
+Subject: [PATCH] Work around a macro bug in curl-7.87.0
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Compiling against curl-7.87.0 failed with:
+
+    In file included from /usr/include/curl/curl.h:3195:
+    Curl.xs:688:25: error: void value not ignored as it ought to be
+      688 |                         curl_easy_setopt(clone->curl, 10000 +
+    i, clone->strings[i]);
+	  |                         ^
+
+This was a bug in curl-7.87.0. It will be fixed in next curl release. This
+patch provides a workaround on WWW-Curl side.
+
+<https://github.com/curl/curl/pull/10149>
+CPAN RT#145992
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ Curl.xs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Curl.xs b/Curl.xs
+index a4f3afb..87180a9 100644
+--- a/Curl.xs
++++ b/Curl.xs
+@@ -685,7 +685,7 @@ curl_easy_duphandle(self)
+ 	for (i=0;i<=self->strings_index;i++) {
+ 		if (self->strings[i] != NULL) {
+ 			clone->strings[i] = savepv(self->strings[i]);
+-			curl_easy_setopt(clone->curl, 10000 + i, clone->strings[i]);
++			curl_easy_setopt(clone->curl, (10000 + i), clone->strings[i]);
+ 		}
+ 	}
+ 	clone->strings_index = self->strings_index;
+-- 
+2.39.1
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/perl-WWW-Curl.git/commitdiff/0b0a778716baa78a3224aa97167d46ba8a82a78f



More information about the pld-cvs-commit mailing list