Merge pull request #93185 from stigtsp/package/perl-www-curl-fix

perlPackages.WWWCurl: fix build
This commit is contained in:
Dmitry Kalinkin 2020-07-17 00:33:50 -04:00 committed by GitHub
commit a9ddda95d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 42 deletions

View File

@ -1,34 +0,0 @@
From 0be0223422e6e5f4091c6e4e058d213623eed105 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Mon, 12 Sep 2016 14:40:44 +0200
Subject: [PATCH] Skip preprocessor symbol only CURL_STRICTER
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
CURL_STRICTER leaked into curl-constants.c when building against
curl-7.50.2. This is a preprocessor only macro without a value.
CPAN RT#117793
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
Makefile.PL | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.PL b/Makefile.PL
index f9170bb..ad2bd3d 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -127,7 +127,7 @@ if (!defined($curl_h)) {
close H;
for my $e (sort @syms) {
- if($e =~ /(OBSOLETE|^CURL_EXTERN|_LAST\z|_LASTENTRY\z)/) {
+ if($e =~ /(OBSOLETE|^CURL_EXTERN|^CURL_STRICTER\z|_LAST\z|_LASTENTRY\z)/) {
next;
}
my ($group) = $e =~ m/^([^_]+_)/;
--
2.7.4

View File

@ -21324,16 +21324,16 @@ let
url = "mirror://cpan/authors/id/S/SZ/SZBALINT/WWW-Curl-4.17.tar.gz";
sha256 = "1fmp9aib1kaps9vhs4dwxn7b15kgnlz9f714bxvqsd1j1q8spzsj";
};
patches = [ ../development/perl-modules/WWW-Curl-4.17-Skip-preprocessor-symbol-only-CURL_STRICTER.patch ];
patches = [
(fetchpatch {
url = "https://aur.archlinux.org/cgit/aur.git/plain/curl-7.71.0.patch?h=perl-www-curl&id=261d84887d736cc097abef61164339216fb79180";
sha256 = "1hiw5lkflfa93z5d6k8fnnml0r08c653bbvvb8zx6gcrlbrdalfs";
name = "WWWCurl-curl-7.71.0.patch";
})
];
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-return-type";
buildInputs = [ pkgs.curl ];
preConfigure =
''
substituteInPlace Makefile.PL --replace '"cpp"' '"gcc -E"'
substituteInPlace Makefile.PL --replace '_LASTENTRY\z' '_LASTENTRY\z|CURL_DID_MEMORY_FUNC_TYPEDEFS\z'
'';
NIX_CFLAGS_COMPILE = "-DCURL_STRICTER";
doCheck = false; # performs network access
meta.broken = stdenv.lib.versionAtLeast (stdenv.lib.getVersion pkgs.curl) "7.66"; # broken since "curl: 7.65.3 -> 7.66.0"
};
WWWFormUrlEncoded = buildPerlModule {