blob: 098bc9523b2f06eea8285151eade8e479388a2a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# Maintainer: Maks Verver <maks@verver.ch>
# Contributor: drakkan <nicola.murino at gmail dot com>
# Contributor: Andrew Sun <adsun701 at gmail dot com>
# Contributor: ant32 <antreimer at gmail dot com>
pkgname=mingw-w64-curl
pkgver=8.9.1
pkgrel=1
pkgdesc="An URL retrival utility and library (mingw-w64)"
arch=('any')
url="https://curl.haxx.se"
license=("MIT")
depends=('mingw-w64-crt'
'mingw-w64-libidn2'
'mingw-w64-libpsl'
'mingw-w64-libssh2'
'mingw-w64-openssl'
'mingw-w64-libnghttp2'
'mingw-w64-zstd'
'mingw-w64-brotli'
'mingw-w64-zlib')
makedepends=('mingw-w64-configure')
options=('staticlibs' '!strip' '!buildflags')
source=("${url}/download/curl-${pkgver}.tar.xz"
"0002-nghttp2-static.patch"
"0004-more-static-fixes.patch")
sha256sums=('f292f6cc051d5bbabf725ef85d432dfeacc8711dd717ea97612ae590643801e5'
'9da305e320ea306d0ca634edd73092b404b96d91f5cac681304bb6a9ae49e5ef'
'22dcdfd89a1d847ab6bbe1078c6a8ac198cc6c11eb86b00580583492848fd1b1')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
prepare() {
cd "${srcdir}"/${pkgname#mingw-w64-}-${pkgver}
patch -Np1 -i "${srcdir}/0002-nghttp2-static.patch"
patch -Np1 -i "${srcdir}/0004-more-static-fixes.patch"
autoreconf -vfi
}
build() {
cd "${srcdir}"/${pkgname#mingw-w64-}-${pkgver}
export CHOST=$(./config.guess)
for _arch in ${_architectures}; do
configure_args="--with-openssl --enable-ipv6 --with-libidn2 --with-libssh2 --without-ca-bundle --without-random --with-libpsl --with-brotli --with-zstd"
mkdir -p build-${_arch}-static && pushd build-${_arch}-static
${_arch}-configure $configure_args \
--enable-static --disable-shared ..
make
popd
mkdir -p build-${_arch} && pushd build-${_arch}
${_arch}-configure $configure_args \
--disable-static --enable-shared ..
make
popd
done
}
package() {
for _arch in ${_architectures}; do
cd "${srcdir}/${pkgname#mingw-w64-}-${pkgver}/build-${_arch}-static"
make DESTDIR="${pkgdir}" install
cd "${srcdir}/${pkgname#mingw-w64-}-${pkgver}/build-${_arch}"
make DESTDIR="${pkgdir}" install
#rm "$pkgdir"/usr/${_arch}/bin/*.exe
rm -r "${pkgdir}/usr/${_arch}/share"
${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.exe
${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
done
}
# vim: ts=2 sw=2 et:
|