1 |
|
# Copyright 1999-2021 Gentoo Authors
|
|
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
4 |
EAPI=8
|
... | ... | |
17 |
17 |
DEPEND="${RDEPEND}"
|
18 |
18 |
BDEPEND="${RDEPEND}"
|
19 |
19 |
|
|
20 |
# https://rt.cpan.org/Public/Bug/Display.html?id=145992
|
|
21 |
SRC_URI+="
|
|
22 |
https://rt.cpan.org/Public/Ticket/Attachment/2423633/1093328/WWW-Curl-4.17-Work-around-a-macro-bug-in-curl-7.87.0.patch
|
|
23 |
"
|
|
24 |
|
20 |
25 |
PATCHES=(
|
21 |
26 |
"${FILESDIR}"/${PN}-4.150.0-curl-7.50.2.patch
|
22 |
27 |
"${FILESDIR}"/${PN}-4.17-dotinc.patch
|
... | ... | |
24 |
29 |
"${FILESDIR}"/${PN}-4.17-RT117793.patch
|
25 |
30 |
"${FILESDIR}"/${PN}-4.17-RT130591.patch
|
26 |
31 |
"${FILESDIR}"/${PN}-4.17-RT132197.patch
|
|
32 |
"${DISTDIR}/WWW-Curl-4.17-Work-around-a-macro-bug-in-curl-7.87.0.patch"
|
27 |
33 |
)
|
28 |
34 |
|
|
35 |
src_prepare() {
|
|
36 |
perl-module_src_prepare
|
|
37 |
# Makefile.PL does some creative things parsing macros vs defines from curl
|
|
38 |
# build system
|
|
39 |
#
|
|
40 |
# However, it tends to be very fragile and needs lots of patching, so
|
|
41 |
# instead of multiple patches, make it a variable and hoist it to the
|
|
42 |
# ebuild.
|
|
43 |
#
|
|
44 |
# Use the modifier flags aax means we can write an easier to manage regex as well.
|
|
45 |
sed -i -r \
|
|
46 |
-e '/if.*=~.*(OBSOLETE|CURL_EXTERN|CURL_STRICTER)/s,/[^/]+/,/($ENV{_CURL_BUILD_SYM_EXCLUDE})/aax,g' \
|
|
47 |
"${S}/Makefile.PL"
|
|
48 |
}
|
|
49 |
|
|
50 |
# https://src.fedoraproject.org/rpms/perl-WWW-Curl/blob/rawhide/f/WWW-Curl-4.17-Skip-preprocessor-symbol-only-CURL_STRICTER.patch
|
|
51 |
# /(OBSOLETE|^CURL_EXTERN|^CURL_STRICTER\z|_LAST\z|_LASTENTRY\z)/
|
|
52 |
#
|
|
53 |
# files/WWW-Curl-4.17-RT117793.patch
|
|
54 |
# /(OBSOLETE|^CURL_EXTERN|^CURL_STRICTER\z|^CURL_DID_MEMORY_FUNC_TYPEDEFS\z|_LAST\z|_LASTENTRY\z)/)
|
|
55 |
#
|
|
56 |
# files/WWW-Curl-4.17-RT130591.patch
|
|
57 |
# /(OBSOLETE|^CURL_EXTERN|^CURL_STRICTER\z|^CURL_DID_MEMORY_FUNC_TYPEDEFS\z|_LAST\z|_LASTENTRY\z|^CURLINC_)/
|
|
58 |
#
|
|
59 |
# https://rt.cpan.org/Public/Bug/Display.html?id=132197
|
|
60 |
# /(OBSOLETE|^CURL_EXTERN|^CURL_STRICTER\z|^CURL_DID_MEMORY_FUNC_TYPEDEFS\z|_LAST\z|_LASTENTRY\z|^CURLINC_|^CURL_WIN32\z|^CURLOPT\z)/
|
|
61 |
#
|
|
62 |
# https://src.fedoraproject.org/rpms/perl-WWW-Curl/blob/rawhide/f/WWW-Curl-4.17-Adapt-to-curl-7.87.0.patch
|
|
63 |
# /(OBSOLETE|^CURL_DEPRECATED\z|^CURL_EXTERN|^CURL_IGNORE_DEPRECATION\z|^CURL_STRICTER\z|^CURL_WIN32\z|^CURLOPT\z|^CURLOPTDEPRECATED\z|_LAST\z|_LASTENTRY\z)
|
|
64 |
#
|
|
65 |
# If you change this variable, you should probably be bumping the ebuild rev!
|
|
66 |
export _CURL_BUILD_SYM_EXCLUDE='
|
|
67 |
__000FORPATCH_WITH_LEADING_SPACE
|
|
68 |
|^CURL_DEPRECATED\z
|
|
69 |
|^CURL_DID_MEMORY_FUNC_TYPEDEFS\z
|
|
70 |
|^CURL_EXTERN
|
|
71 |
|^CURL_IGNORE_DEPRECATION\z
|
|
72 |
|^CURLINC_
|
|
73 |
|^CURLOPTDEPRECATED\z
|
|
74 |
|^CURLOPT\z
|
|
75 |
|^CURL_STRICTER\z
|
|
76 |
|^CURL_WIN32\z
|
|
77 |
|_LASTENTRY\z
|
|
78 |
|_LAST\z
|
|
79 |
|OBSOLETE
|
|
80 |
'
|
|
81 |
|
29 |
82 |
PERL_RM_FILES=("t/meta.t" "t/pod-coverage.t" "t/pod.t")
|