Subject: [alpine-aports] [PATCH] community/girara: run test with xvfb, disable tput

From: Jean-Louis Fuchs <[email-masked]>
Date: Mon, 23 Oct 2017 22:29:49 +0200

* COLOR=0 (disabling tput) wasn't set for all make calls
---
I can't reproduce the tput problem locally, but now the girara build-system
should not call tput anymore.

 community/girara/APKBUILD | 14 ++++++++------
 community/girara/test.sh  | 12 ++++++++++++
 2 files changed, 20 insertions(+), 6 deletions(-)
 create mode 100755 community/girara/test.sh

diff --git a/community/girara/APKBUILD b/community/girara/APKBUILD
index cb46d05398..0c7f5b06b7 100644
--- a/community/girara/APKBUILD
+++ b/community/girara/APKBUILD
@@ -10,10 +10,10 @@ url="https://pwmt.org/projects/girara/"
 arch="all"
 license="zlib"
 checkdepends="dbus"
-options="!check"  # fails due to tput: terminal attributes: No such device or address
-makedepends="gtk+3.0-dev libnotify-dev intltool doxygen check-dev ncurses"
+makedepends="gtk+3.0-dev libnotify-dev intltool doxygen check-dev xvfb ncurses"
 subpackages="$pkgname-doc $pkgname-dev $pkgname-lang"
-source="https://pwmt.org/projects/girara/download/girara-$pkgver.tar.gz"
+source="https://pwmt.org/projects/girara/download/girara-$pkgver.tar.gz
+	test.sh"
 
 builddir="$srcdir"/$pkgname-$pkgver
 
@@ -24,7 +24,7 @@ build() {
 
 package() {
 	make PREFIX=/usr DESTDIR="$pkgdir" \
-		-C "$builddir" install
+		-C "$builddir" install COLOR=0
 }
 
 doc() {
@@ -36,8 +36,10 @@ doc() {
 
 check () {
 	if [ "$CARCH" != "ppc64le" ]; then
-		make -C "$builddir" test
+		cd "$builddir"
+		"$srcdir/test.sh"
 	fi
 }
 
-sha512sums="4229565b8a5fad1ecbf42e4f3f852644964a7d5c90154dab9b7dcb5ccd5f25731911452472bbeb28927d1e30d4df6ed066926e11c6a73f0fd5740570493a036f  girara-0.2.7.tar.gz"
+sha512sums="4229565b8a5fad1ecbf42e4f3f852644964a7d5c90154dab9b7dcb5ccd5f25731911452472bbeb28927d1e30d4df6ed066926e11c6a73f0fd5740570493a036f  girara-0.2.7.tar.gz
+a8e200a84395d638219f2fdb29055d7caead8fc9db63f98e77944f84e206e1d561d36fe6818a969bf4f8b348b7f5c2f5d0db655c01ee8ee31687ecbe9b8c1494  test.sh"
diff --git a/community/girara/test.sh b/community/girara/test.sh
new file mode 100755
index 0000000000..690b3c5a38
--- /dev/null
+++ b/community/girara/test.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+Xvfb :4242 &
+PID=$!
+export DISPLAY=:4242
+if make test COLOR=0; then
+	kill $PID
+	return 0
+else
+	kill $PID
+	return 1
+fi
-- 
2.13.5

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---