From 0c8e98aeecebe8785e501222f52f619ce56eb533 Mon Sep 17 00:00:00 2001 From: Willy Sudiarto Raharjo Date: Thu, 13 Oct 2016 13:08:30 +0700 Subject: perl/perl-WWW-Curl: Fix Build. Signed-off-by: Willy Sudiarto Raharjo --- .../WWW-Curl-4.150.0-curl-7.50.2.patch | 40 ++++++++++++++++++++++ perl/perl-WWW-Curl/perl-WWW-Curl.SlackBuild | 10 +++--- 2 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 perl/perl-WWW-Curl/WWW-Curl-4.150.0-curl-7.50.2.patch (limited to 'perl/perl-WWW-Curl') diff --git a/perl/perl-WWW-Curl/WWW-Curl-4.150.0-curl-7.50.2.patch b/perl/perl-WWW-Curl/WWW-Curl-4.150.0-curl-7.50.2.patch new file mode 100644 index 0000000000..2fecfce621 --- /dev/null +++ b/perl/perl-WWW-Curl/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_ +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() { ++ # 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_]*)/) { diff --git a/perl/perl-WWW-Curl/perl-WWW-Curl.SlackBuild b/perl/perl-WWW-Curl/perl-WWW-Curl.SlackBuild index df5b95b16a..c74feb165b 100644 --- a/perl/perl-WWW-Curl/perl-WWW-Curl.SlackBuild +++ b/perl/perl-WWW-Curl/perl-WWW-Curl.SlackBuild @@ -5,14 +5,14 @@ PRGNAM=perl-WWW-Curl VERSION=${VERSION:-4.17} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} SRCNAM=$(echo $PRGNAM | cut -f2- -d-) if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -23,8 +23,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -52,6 +52,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +patch -p1 < $CWD/WWW-Curl-4.150.0-curl-7.50.2.patch + perl Makefile.PL \ PREFIX=/usr \ INSTALLDIRS=vendor \ -- cgit v1.2.3