aboutsummaryrefslogtreecommitdiffstats
path: root/main/libxml2/APKBUILD
blob: 8d3d0531f1ced26d1640879bf531abf862905ca9 (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
73
74
75
76
77
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=libxml2
pkgver=2.9.4
pkgrel=4
pkgdesc="XML parsing library, version 2"
url="http://www.xmlsoft.org/"
arch="all"
license="MIT"
depends=
depends_dev="zlib-dev"
checkdepends="perl tar"
makedepends="$depends_dev python2-dev"
subpackages="$pkgname-doc $pkgname-dev py-$pkgname:py $pkgname-utils"
options="!strip"
source="ftp://ftp.xmlsoft.org/${pkgname}/${pkgname}-${pkgver}.tar.gz
	CVE-2016-5131.patch
	CVE-2016-9318.patch
	CVE-2017-5969.patch
	"
builddir="$srcdir/$pkgname-$pkgver"

# secfixes:
#   2.9.4-r1:
#     - CVE-2016-5131
#   2.9.4-r2:
#     - CVE-2016-9318
#   2.9.4-r4:
#     - CVE-2017-5969

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--disable-static
	make
}

check() {
	make -C "$builddir" tests
}

package() {
	cd "$builddir"
	make -j1 DESTDIR="$pkgdir" install

	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

dev() {
	default_dev
	mv "$pkgdir"/usr/lib/*.sh "$subpkgdir"/usr/lib/
}

py() {
	cd "$builddir"
	pkgdesc="$pkgname python bindings"
	install -d "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}

utils() {
	pkgdesc="XML utilities"
	replaces="libxml2"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

sha512sums="f5174ab1a3a0ec0037a47f47aa47def36674e02bfb42b57f609563f84c6247c585dbbb133c056953a5adb968d328f18cbc102eb0d00d48eb7c95478389e5daf9  libxml2-2.9.4.tar.gz
c92cda9851fdf8af6cb21aa80f39b474cddef8c749298f5b51f76f871160ac9749fdaac3fa406cc0c75a666f7627983fce0e90fb2919f3a8c778e1148583be33  CVE-2016-5131.patch
508550f2f3489954abceee5404722dc7a8dcf6590219561a1ab36c2c14b1d1bfc2bad0403577db4e20c2c4e8c9114beb6bd80b165bb8e02c6cc52e6c5fb6e1ee  CVE-2016-9318.patch
c1ce2284bdd874bd6eb1b2bef0e2c8d561861f82b5f03c4b7155e3ed11e2c56743d2f624530f0c7672d65329a13199e534f51ec19f06d4b6941b861dda50ef67  CVE-2017-5969.patch"