summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2016-09-17 18:01:25 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2016-09-17 18:01:35 +0100
commit8f83390e0093466b4f998d92ba15d9f5ea5a4a0b (patch)
tree4d12c193de47ca66fcb15ea54967f134d2ad68d6 /dev-perl/WWW-Curl/files
parentapp-crypt/kbfs: New package (diff)
downloadgentoo-8f83390e0093466b4f998d92ba15d9f5ea5a4a0b.tar.gz
gentoo-8f83390e0093466b4f998d92ba15d9f5ea5a4a0b.tar.bz2
gentoo-8f83390e0093466b4f998d92ba15d9f5ea5a4a0b.zip
dev-perl/WWW-Curl: fix build failure against curl-7.50.2 and upper, bug #593280
Reported-by: Toralf Förster Bug: https://bugs.gentoo.org/593280 Package-Manager: portage-2.3.0
Diffstat (limited to 'dev-perl/WWW-Curl/files')
-rw-r--r--dev-perl/WWW-Curl/files/WWW-Curl-4.150.0-curl-7.50.2.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/dev-perl/WWW-Curl/files/WWW-Curl-4.150.0-curl-7.50.2.patch b/dev-perl/WWW-Curl/files/WWW-Curl-4.150.0-curl-7.50.2.patch
new file mode 100644
index 000000000000..2fecfce621a8
--- /dev/null
+++ b/dev-perl/WWW-Curl/files/WWW-Curl-4.150.0-curl-7.50.2.patch
@@ -0,0 +1,40 @@
+curl-7.50.2 introduced a #define without integer value:
+
+ #ifdef CURL_NO_OLDIES
+ #define CURL_STRICTER
+ #endif
+
+Heuristics in 'Makefile.PL' assumes all defines in form of
+ #define CURL_<something> <an-expression>
+and generates a symbol lookup table in 'curlopt-constants.c'
+as:
+
+ static int
+ constant(const char *name)
+ {
+ errno = 0;
+
+ if (strncmp(name, "CURL_", 5) == 0) {
+ name += 5;
+ switch (*name) {
+ ...
+ case 'S':
+ if (strEQ(name, "STRICTER")) return CURL_STRICTER;
+Which is not valid C:
+ curlopt-constants.c:128:49: error: ‘CURL_STRICTER’ undeclared (first use in this function)
+ if (strEQ(name, "STRICTER")) return CURL_STRICTER;
+ ^~~~~~~~~~~~~
+diff --git a/Makefile.PL b/Makefile.PL
+index f9170bb..fc1a55a 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -122,2 +122,9 @@ if (!defined($curl_h)) {
+ while(<H>) {
++ # Skip defines without values like:
++ # #define CURL_STRICTER
++ if (/^#define (CURL[A-Za-z0-9_]*)$/) {
++ chomp;
++ warn "Skipping '$_': does not define a symbol";
++ next;
++ }
+ if (/^#define (CURL[A-Za-z0-9_]*)/) {