Mail archive
alpine-aports

[alpine-aports] [PATCH 1/3] main/mdocml: modernize abuild and explicitly set UTF8_LOCALE

From: Daniel Sabogal <dsabogalcc_at_gmail.com>
Date: Tue, 1 Aug 2017 16:18:40 -0400

The configure script depends on the locale(1) utility to select a
UTF-8 encoding to test. This utility is not available.
---
 main/mdocml/APKBUILD | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)
diff --git a/main/mdocml/APKBUILD b/main/mdocml/APKBUILD
index 9e5537a6dc..facc8a0eaf 100644
--- a/main/mdocml/APKBUILD
+++ b/main/mdocml/APKBUILD
_at_@ -1,13 +1,14 @@
 # Maintainer:  Natanael Copa <ncopa_at_alpinelinux.org>
 pkgname=mdocml
 pkgver=1.14.1
-pkgrel=0
+pkgrel=1
 pkgdesc="mdoc/man compiler"
 url="http://mdocml.bsd.lv/"
 arch="all"
 license="BSD"
 depends=""
 makedepends="zlib-dev"
+checkdepends="perl"
 install="$pkgname.post-deinstall"
 triggers="$pkgname-apropos.trigger=/usr/share/man/*"
 subpackages="$pkgname-doc $pkgname-dev man::noarch $pkgname-apropos $pkgname-soelim"
_at_@ -18,32 +19,39 @@ source="http://mdocml.bsd.lv/snapshots/$pkgname-$pkgver.tar.gz
 	man.conf
 	"
 
-builddir="$srcdir"/$pkgname-$pkgver
+builddir="$srcdir/$pkgname-$pkgver"
 prepare() {
-	default_prepare || return 1
+	default_prepare
+
 	cd "$builddir"
 	cat >configure.local<<EOF
 PREFIX=/usr
 MANDIR=/usr/share/man
 LIBDIR=/usr/lib
 CFLAGS="$CFLAGS"
+UTF8_LOCALE="en_US.UTF-8"
 EOF
 }
 
 build() {
 	cd "$builddir"
-	./configure || return 1
-	make || return 1
+	./configure
+	make
+}
+
+check() {
+	cd "$builddir"
+	LD_LIBRARY_PATH="$builddir" make regress
 }
 
 package() {
 	cd "$builddir"
-	make -j1 DESTDIR="$pkgdir" base-install lib-install || return 1
-	install -Dm644 "$srcdir"/man.conf "$pkgdir"/etc/man.conf || return 1
+	make -j1 DESTDIR="$pkgdir" base-install lib-install
+	install -Dm644 "$srcdir"/man.conf "$pkgdir"/etc/man.conf
 	for X in usr/bin/apropos usr/bin/whatis usr/bin/man usr/sbin/makewhatis
 		do
-			rm -f "$pkgdir/$X" || return 1
-			ln -s /usr/bin/mandoc "$pkgdir/$X" || return 1
+			rm -f "$pkgdir/$X"
+			ln -s /usr/bin/mandoc "$pkgdir/$X"
 		done
 }
 
_at_@ -58,9 +66,9 @@ apropos() {
 	mkdir -p "$subpkgdir"/usr/sbin "$subpkgdir"/usr/bin
 	mv "$pkgdir"/usr/bin/apropos \
 		"$pkgdir"/usr/bin/whatis \
-		"$subpkgdir"/usr/bin/ || return 1
+		"$subpkgdir"/usr/bin/
 	mv "$pkgdir"/usr/sbin/makewhatis \
-		"$subpkgdir"/usr/sbin/ || return 1
+		"$subpkgdir"/usr/sbin/
 }
 
 soelim() {
_at_@ -68,7 +76,7 @@ soelim() {
 	depends=""
 	mkdir -p "$subpkgdir"/usr/bin
 	mv "$pkgdir"/usr/bin/soelim \
-		"$subpkgdir"/usr/bin/ || return 1
+		"$subpkgdir"/usr/bin/
 }
 
 sha512sums="90f00297d162faa404fe4e530f95422c210b8d23a0be5a115c2c8c17255d366e224444901842affb06ed8aaf8febd3e5c79966ff713fa7daf00e8c48b7a857c6  mdocml-1.14.1.tar.gz
-- 
2.13.3
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue Aug 01 2017 - 16:18:40 UTC