Mail archive
alpine-aports

[alpine-aports] [PATCH] main/libxml2: modernize APKBUILD, add check

From: Sören Tempel <soeren+git_at_soeren-tempel.net>
Date: Thu, 13 Apr 2017 13:31:57 +0200

---
 main/libxml2/APKBUILD | 25 +++++++++----------------
 1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/main/libxml2/APKBUILD b/main/libxml2/APKBUILD
index 47b555e715..48afac511a 100644
--- a/main/libxml2/APKBUILD
+++ b/main/libxml2/APKBUILD
_at_@ -2,19 +2,22 @@
 # Maintainer: Carlo Landmeter <clandmeter_at_gmail.com>
 pkgname=libxml2
 pkgver=2.9.4
-pkgrel=2
+pkgrel=3
 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
 	"
+builddir="$srcdir/$pkgname-$pkgver"
 
 # secfixes:
 #   2.9.4-r1:
_at_@ -22,18 +25,6 @@ source="ftp://ftp.xmlsoft.org/${pkgname}/${pkgname}-${pkgver}.tar.gz
 #   2.9.4-r2:
 #     - CVE-2016-9318
 
-options="!strip"
-
-builddir="$srcdir/$pkgname-$pkgver"
-prepare() {
-	cd "$builddir"
-	for i in $source; do
-		case $i in
-		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
-		esac
-	done
-}
-
 build() {
 	cd "$builddir"
 	./configure \
_at_@ -43,11 +34,14 @@ build() {
 		--sysconfdir=/etc \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
-		--disable-static \
-		|| return 1
+		--disable-static
 	make
 }
 
+check() {
+	make -C "$builddir" tests
+}
+
 package() {
 	cd "$builddir"
 	make -j1 DESTDIR="$pkgdir" install
_at_@ -74,7 +68,6 @@ utils() {
 	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
 }
 
-
 sha512sums="f5174ab1a3a0ec0037a47f47aa47def36674e02bfb42b57f609563f84c6247c585dbbb133c056953a5adb968d328f18cbc102eb0d00d48eb7c95478389e5daf9  libxml2-2.9.4.tar.gz
 c92cda9851fdf8af6cb21aa80f39b474cddef8c749298f5b51f76f871160ac9749fdaac3fa406cc0c75a666f7627983fce0e90fb2919f3a8c778e1148583be33  CVE-2016-5131.patch
 508550f2f3489954abceee5404722dc7a8dcf6590219561a1ab36c2c14b1d1bfc2bad0403577db4e20c2c4e8c9114beb6bd80b165bb8e02c6cc52e6c5fb6e1ee  CVE-2016-9318.patch"
-- 
2.12.2
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Thu Apr 13 2017 - 13:31:57 UTC