summaryrefslogtreecommitdiff
path: root/main/libxml2/APKBUILD
blob: d73c500a2e5724bc1c93433cf6adda3b683fdde3 (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=libxml2
pkgver=2.10.3
pkgrel=2
pkgdesc="XML parsing library, version 2"
url="http://www.xmlsoft.org/"
arch="all"
license="MIT"
depends_dev="zlib-dev xz-dev $pkgname-utils=$pkgver-r$pkgrel"
checkdepends="perl tar"
makedepends_host="$depends_dev"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-static $pkgname-dev $pkgname-utils"
if [ -z "$BOOTSTRAP" ]; then
	makedepends_build="$makedepends_build python3-dev"
	subpackages="$subpackages py3-$pkgname:_py3"
	_py_configure="--with-python=/usr/bin/python3"
else
	_py_configure="--with-python=no"
fi
source="https://download.gnome.org/sources/libxml2/${pkgver%.*}/libxml2-$pkgver.tar.xz
	libxml2-2.9.8-python3-unicode-errors.patch
	"

# secfixes:
#   2.10.3-r0:
#     - CVE-2022-40303
#     - CVE-2022-40304
#   2.10.0-r0:
#     - CVE-2022-2309
#   2.9.14-r0:
#     - CVE-2022-29824
#   2.9.13-r0:
#     - CVE-2022-23308
#   2.9.11-r0:
#     - CVE-2016-3709
#     - CVE-2021-3517
#     - CVE-2021-3518
#     - CVE-2021-3537
#     - CVE-2021-3541
#   2.9.10-r5:
#     - CVE-2020-24977
#   2.9.10-r4:
#     - CVE-2019-20388
#   2.9.8-r3:
#     - CVE-2020-7595
#   2.9.8-r1:
#     - CVE-2018-9251
#     - CVE-2018-14404
#     - CVE-2018-14567
#   2.9.4-r4:
#     - CVE-2017-5969
#   2.9.4-r2:
#     - CVE-2016-9318
#   2.9.4-r1:
#     - CVE-2016-5131

prepare() {
	default_prepare

	# We don't build libxml2 with icu.
	rm test/icu_parse_test.xml
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--enable-static \
		--with-lzma \
		--with-zlib \
		$_py_configure
	make
}

check() {
	rm -f test/ebcdic_566012.xml
	make runtests
}

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

_py3() {
	depends="python3"
	pkgdesc="$pkgname python3 bindings"

	amove usr/lib/python3*
}

utils() {
	pkgdesc="XML utilities"
	replaces="libxml2"

	amove usr/bin
}

sha512sums="
33bb87ae9a45c475c3de09477e5d94840d8f687f893ef7839408bc7267e57611c4f2b863ed8ec819a4b5f1ebd6a122db9f6054c73bceed427d37f3e67f62620c  libxml2-2.10.3.tar.xz
a205c97fa1488fb8907cfa08b5f82e2055c80b86213dc3cc5c4b526fe6aa786bcc4e4eeb226c44635a1d021307b39e3940f706c42fb60e9e3e9b490a84164df7  libxml2-2.9.8-python3-unicode-errors.patch
"