blob: 47aafdbcd6d673365621c93d6468dc43f5d96afd (
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
|
pkgname=mingw-w64-x86_64-libxml2
pkgver=2.13.3
pkgrel=3
arch=('x86_64')
pkgdesc="XML parsing library, version 2 for amd64 (mingw-w64)"
makedepends=('mingw-w64-gcc')
options=('!buildflags' '!strip' 'staticlibs')
license=('MIT')
provides=("mingw-w64-$arch-libxml2=$pkgver")
conflicts=('mingw-w64-libxml2')
url="http://www.xmlsoft.org/"
source=("https://download.gnome.org/sources/libxml2/${pkgver::4}/libxml2-${pkgver}.tar.xz")
sha256sums=('0805d7c180cf09caad71666c7a458a74f041561a532902454da5047d83948138')
_basename=libxml2
_platform="x86_64-w64-mingw32"
prepare () {
cd "$srcdir/$_basename-$pkgver"
# disable doc & examples
sed -i "s| doc example | |g" Makefile.am
autoreconf -vfi
./configure --host=$_platform --prefix=/usr/$_platform --without-python
}
build() {
cd "$srcdir/$_basename-$pkgver"
make
}
package() {
cd "$srcdir/$_basename-$pkgver"
make DESTDIR="$pkgdir" install
find "$pkgdir/usr/$_platform" -name '*.exe' | xargs -rtL1 rm
find "$pkgdir/usr/$_platform" -name '*.dll' | xargs -rtL1 $_platform-strip -x
find "$pkgdir/usr/$_platform" -name '*.a' -o -name '*.dll' | xargs -rtL1 $_platform-strip -g
find "$pkgdir/usr/$_platform" -name '*.a' -o -name '*.dll' | xargs -rtL1 chmod 644
rm "$pkgdir/usr/$_platform/bin/xml2-config"
rm -r "$pkgdir/usr/$_platform/share"
install -d "$pkgdir/usr/share/licenses/$pkgname"
install -m644 -t "$pkgdir/usr/share/licenses/$pkgname" Copyright
}
|