@@ -5,7 +5,7 @@ pkgbase=mingw-w64-${_realname}
55pkgname=(" ${MINGW_PACKAGE_PREFIX} -${_realname} "
66 " ${MINGW_PACKAGE_PREFIX} -${_realname} -gnutls"
77 " ${MINGW_PACKAGE_PREFIX} -${_realname} -winssl" )
8- pkgver=8.18 .0
8+ pkgver=8.19 .0
99pkgrel=1
1010pkgdesc=" Command line tool and library for transferring data with URLs (mingw-w64)"
1111arch=(' any' )
@@ -36,254 +36,9 @@ source=("https://github.com/curl/curl/releases/download/${_realname}-${pkgver//.
3636 " pathtools.h"
3737 " 0001-Make-cURL-relocatable.patch"
3838 " 0002-Hack-make-relocation-work-inside-libexec-git-core-an.patch" )
39- sha256sums=(' ffd671a3dad424fb68e113a5b9894c5d1b5e13a88c6bdf0d4af6645123b31faf '
39+ sha256sums=(' eba3230c1b659211a7afa0fbf475978cbf99c412e4d72d9aa92d020c460742d4 '
4040 ' SKIP'
4141 ' 08209cbf1633fa92eae7e5d28f95f8df9d6184cc20fa878c99aec4709bb257fd'
4242 ' 965d3921ec4fdeec94a2718bc2c85ce5e1a00ea0e499330a554074a7ae15dfc6'
4343 ' bb03c858d9322d005c414b2b6713200eb82df32ee00fb7507ed9896c026aab2a'
4444 ' 089a62a2e389c70dd40c5fdf80ee69d46f083b105101123b9f5a07dc24411bb4' )
45- validpgpkeys=(' 27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2' ) # Daniel Stenberg
46-
47- if test -z " $WITHOUT_ALTERNATES "
48- then
49- pkgname+=(" ${MINGW_PACKAGE_PREFIX} -${_realname} -openssl-alternate" )
50- pkgname+=(" ${MINGW_PACKAGE_PREFIX} -${_realname} -gnutls-alternate" )
51- pkgname+=(" ${MINGW_PACKAGE_PREFIX} -${_realname} -winssl-alternate" )
52- fi
53-
54- case " $WITHOUT_PDBS ,$MSYSTEM " in
55- ,CLANG* )
56- pkgname+=(" ${MINGW_PACKAGE_PREFIX} -${_realname} -pdb" )
57- pkgname+=(" ${MINGW_PACKAGE_PREFIX} -${_realname} -gnutls-pdb" )
58- pkgname+=(" ${MINGW_PACKAGE_PREFIX} -${_realname} -winssl-pdb" )
59- options+=(' !strip' )
60- STRIP=llvm-strip
61- STRIP_OPTS=--strip-debug
62- ;;
63- ,* )
64- pkgname+=(" ${MINGW_PACKAGE_PREFIX} -${_realname} -pdb" )
65- pkgname+=(" ${MINGW_PACKAGE_PREFIX} -${_realname} -gnutls-pdb" )
66- pkgname+=(" ${MINGW_PACKAGE_PREFIX} -${_realname} -winssl-pdb" )
67- makedepends+=(" ${MINGW_PACKAGE_PREFIX} -cv2pdb" )
68- options+=(' !strip' )
69- STRIP=cv2pdb
70- ;;
71- * )
72- options+=(' strip' )
73- esac
74-
75- apply_patch_with_msg () {
76- for _patch in " $@ "
77- do
78- msg2 " Applying ${_patch} "
79- patch -Nbp1 -i " ${srcdir} /${_patch} "
80- done
81- }
82-
83- prepare () {
84- test ! -d " ${startdir} /../mingw-w64-pathtools" || {
85- cmp " ${startdir} /../mingw-w64-pathtools/pathtools.c" " ${srcdir} /pathtools.c" &&
86- cmp " ${startdir} /../mingw-w64-pathtools/pathtools.h" " ${srcdir} /pathtools.h"
87- } || exit 1
88-
89- cd " ${srcdir} /${_realname} -${pkgver} "
90- cp -fHv " ${srcdir} " /pathtools.[ch] lib/
91-
92- apply_patch_with_msg \
93- 0001-Make-cURL-relocatable.patch \
94- 0002-Hack-make-relocation-work-inside-libexec-git-core-an.patch
95-
96- autoreconf -vfi
97- }
98-
99- do_build () {
100- _variant=$1
101- _destdir=" ${srcdir} /build-${MSYSTEM} "
102- if [ " ${_variant} " != " -openssl" ]; then
103- _destdir=" ${_destdir}${_variant} "
104- fi
105- local -a extra_config
106- if check_option " debug" " y" ; then
107- extra_config+=( --enable-debug )
108- else
109- extra_config+=( --disable-debug )
110- fi
111-
112- local -a _variant_config
113- if [ " ${_variant} " = " -winssl" ]; then
114- _variant_config+=(" --with-schannel" )
115- _variant_config+=(' --without-nghttp2' )
116- _variant_config+=(" --without-ca-bundle" )
117- _variant_config+=(" --without-ca-path" )
118- _variant_config+=(" --without-librtmp" )
119- elif [ " ${_variant} " = " -gnutls" ]; then
120- _variant_config+=(" --with-default-ssl-backend=gnutls" )
121- _variant_config+=(" --with-gnutls" )
122- _variant_config+=(" --with-schannel" )
123- _variant_config+=(' --without-nghttp2' )
124- _variant_config+=(" --with-ca-bundle=${MINGW_PREFIX} /etc/ssl/certs/ca-bundle.crt" )
125- _variant_config+=(" --with-librtmp" )
126- elif [ " ${_variant} " = " -openssl" ]; then
127- _variant_config+=(" --with-default-ssl-backend=openssl" )
128- _variant_config+=(" --with-openssl" )
129- _variant_config+=(" --with-schannel" )
130- _variant_config+=(" --with-ca-bundle=${MINGW_PREFIX} /etc/ssl/certs/ca-bundle.crt" )
131- _variant_config+=(" --with-nghttp2=${MINGW_PREFIX} " )
132- _variant_config+=(" --without-librtmp" )
133- fi
134-
135- case " $MSYSTEM " in CLANG* ) export LDFLAGS=" -Wl,-pdb=" ;; esac # Ensures that Clang generates PDB files
136-
137- msg2 " Building shared library"
138- mkdir -p " ${_destdir} -shared" && cd " ${_destdir} -shared"
139- ../${_realname} -${pkgver} /configure \
140- --prefix=${MINGW_PREFIX} \
141- --build=${MINGW_CHOST} \
142- --host=${MINGW_CHOST} \
143- --target=${MINGW_CHOST} \
144- --disable-pthreads \
145- --without-random \
146- --disable-static \
147- --enable-shared \
148- --enable-sspi \
149- --enable-ldap \
150- --enable-ldaps \
151- --with-brotli \
152- --with-ldap-lib=wldap32 \
153- --with-libssh2 \
154- --with-zstd \
155- " ${_variant_config[@]} " \
156- " ${extra_config[@]} "
157- # there's a bug with zsh completion generation script and Windows.
158- # curl has to be specified with the file extension.
159- sed -i " s|\/curl > \$ \@|\/curl\$ \{EXEEXT\} > \$ \@|" scripts/Makefile
160- make
161- case " ${pkgname[@]} "
162- in * pdb* )
163- $STRIP $STRIP_OPTS lib/.libs/libcurl-4.dll
164- $STRIP $STRIP_OPTS src/.libs/curl.exe
165- esac
166- }
167-
168- build () {
169- do_build -openssl
170- do_build -winssl
171- do_build -gnutls
172- }
173-
174- do_package () {
175- cd " ${srcdir} /build-${MSYSTEM} $1 -shared"
176-
177- test pdb ! = " $2 " || {
178- install -d -m 755 " ${pkgdir}${MINGW_PREFIX} /bin"
179- install -m 755 lib/.libs/libcurl-4.pdb " ${pkgdir}${MINGW_PREFIX} /bin"
180- install -m 755 src/.libs/curl.pdb " ${pkgdir}${MINGW_PREFIX} /bin"
181- return
182- }
183-
184- test alternate ! = " $2 " || {
185- install -d -m 755 " ${pkgdir}${MINGW_PREFIX} /bin"
186- infix=${1:- -openssl}
187- test -winssl ! = $infix || infix=-schannel # the name "winssl" was ill-considered ;-)
188- install -m 755 lib/.libs/libcurl-4.dll " ${pkgdir}${MINGW_PREFIX} /bin/libcurl$infix -4.dll"
189- return
190- }
191-
192- make DESTDIR=" ${pkgdir} " install
193-
194- local PREFIX_DEPS=$( cygpath -am ${MINGW_PREFIX} )
195- sed -s " s|${PREFIX_DEPS} |${MINGW_PREFIX} |g" -i ${pkgdir}${MINGW_PREFIX} /bin/curl-config
196- sed -s " s|${PREFIX_DEPS} |${MINGW_PREFIX} |g" -i ${pkgdir}${MINGW_PREFIX} /lib/pkgconfig/libcurl.pc
197-
198- install -Dm644 " ${srcdir} /${_realname} -${pkgver} /COPYING" " ${pkgdir}${MINGW_PREFIX} /share/licenses/${_realname} /LICENSE"
199- }
200-
201- package_curl () {
202- depends=(" ${depends[@]} "
203- " ${_cert_depends[@]} "
204- " ${_openssl_depends[@]} " )
205- test alternate = " $1 " ||
206- conflicts=(" ${MINGW_PACKAGE_PREFIX} -${_realname} -winssl"
207- " ${MINGW_PACKAGE_PREFIX} -${_realname} -gnutls" )
208-
209- # (Temporarily) force git-sdk-* to switch to the mingw-w64-curl-winssl
210- # package because that package does not depend on OpenSSL, allowing Git for
211- # Windows to upgrade to OpenSSL v3.* (which would otherwise break libcurl,
212- # and therefore `git clone`, and therefore Git for Windows' SDK
213- # synchronization, because that upgrade changes the OpenSSL DLL's file name).
214- #
215- # To allow Git's `http.sslBackend=openssl` to work, still, this code block
216- # _actually_ overrides the `mingw-w64-curl` package with the
217- # `-openssl-alternate` variant, and letting that variant depend on the
218- # `-winssl` one. This effectively "force-upgrades" mingw-w64-curl with
219- # mingw-w64-curl-winssl and mingw-w64-curl-openssl-alternate.
220- #
221- # The plan is to remove this override after Git for Windows' SDK has upgraded
222- # to OpenSSL v3.* (the current idea being to do that about a week after Git
223- # for Windows v2.41.0 has been released, i.e. to wait for a sort-of-idle
224- # time).
225- test alternate ! = " $* " || {
226- depends+=(" ${MINGW_PACKAGE_PREFIX} -${_realname} -winssl" )
227- replaces=(" ${MINGW_PACKAGE_PREFIX} -${_realname} " )
228- }
229-
230- do_package " " " $@ "
231- }
232-
233- package_curl-winssl () {
234- depends=(" ${depends[@]} "
235- " ${MINGW_PACKAGE_PREFIX} -libssh2-wincng" )
236- test alternate = " $1 " ||
237- provides=(" ${MINGW_PACKAGE_PREFIX} -${_realname} " )
238- test alternate = " $1 " ||
239- conflicts=(" ${MINGW_PACKAGE_PREFIX} -${_realname} "
240- " ${MINGW_PACKAGE_PREFIX} -${_realname} -gnutls" )
241- do_package -winssl " $@ "
242- }
243-
244- package_curl-gnutls () {
245- test alternate = " $1 " ||
246- provides=(" ${MINGW_PACKAGE_PREFIX} -${_realname} " )
247- depends=(" ${depends[@]} "
248- " ${_cert_depends[@]} "
249- " ${_gnutls_depends[@]} " )
250- test alternate = " $1 " ||
251- conflicts=(" ${MINGW_PACKAGE_PREFIX} -${_realname} "
252- " ${MINGW_PACKAGE_PREFIX} -${_realname} -winssl" )
253- do_package -gnutls " $@ "
254- }
255-
256- package_curl-pdb () {
257- package_curl pdb
258- }
259-
260- package_curl-winssl-pdb () {
261- package_curl-winssl pdb
262- }
263-
264- package_curl-gnutls-pdb () {
265- package_curl-gnutls pdb
266- }
267-
268- package_curl-openssl-alternate () {
269- package_curl alternate
270- }
271-
272- package_curl-winssl-alternate () {
273- package_curl-winssl alternate
274- }
275-
276- package_curl-gnutls-alternate () {
277- package_curl-gnutls alternate
278- }
279-
280- # template start; name=mingw-w64-splitpkg-wrappers; version=1.0;
281- # vim: set ft=bash :
282-
283- # generate wrappers
284- for _name in " ${pkgname[@]} " ; do
285- _short=" package_${_name# ${MINGW_PACKAGE_PREFIX} -} "
286- _func=" $( declare -f " ${_short} " ) "
287- eval " ${_func/# ${_short} / package_${_name} } "
288- done
289- # template end;
0 commit comments