aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libspectre/APKBUILD
diff options
context:
space:
mode:
authorJean-Louis Fuchs <ganwell@fangorn.ch>2017-03-23 14:49:02 +0100
committerLeonardo Arena <rnalrd@alpinelinux.org>2017-03-27 12:39:26 +0000
commita93a9ea4300454d3da446338a6fddd94c2a799d2 (patch)
tree80fd541c9848ec894d984730af3933803816786c /testing/libspectre/APKBUILD
parent2e7328a8092d9db4e2ffa79690805a55dfff0ec6 (diff)
downloadaports-a93a9ea4300454d3da446338a6fddd94c2a799d2.tar.bz2
aports-a93a9ea4300454d3da446338a6fddd94c2a799d2.tar.xz
testing/libspectre: Bump, remove returns, add check()
Diffstat (limited to 'testing/libspectre/APKBUILD')
-rw-r--r--testing/libspectre/APKBUILD54
1 files changed, 32 insertions, 22 deletions
diff --git a/testing/libspectre/APKBUILD b/testing/libspectre/APKBUILD
index c00d08d50b..58a4b848bf 100644
--- a/testing/libspectre/APKBUILD
+++ b/testing/libspectre/APKBUILD
@@ -2,29 +2,28 @@
# Contributor: Jean-Louis Fuchs <ganwell@fangorn.ch>
# Maintainer: Jean-Louis Fuchs <ganwell@fangorn.ch>
pkgname=libspectre
-pkgver=0.2.7
+pkgver=0.2.8
pkgrel=0
pkgdesc="A small library for rendering Postscript documents"
url="http://www.freedesktop.org/wiki/Software/libspectre"
arch="all"
license="GPL2"
-depends=""
depends_dev=""
-makedepends="$depends_dev ghostscript-dev doxygen"
-install=""
+# file, cairo-dev for tests only
+makedepends="$depends_dev ghostscript-dev doxygen graphviz cairo-dev file"
subpackages="$pkgname-dev $pkgname-doc"
source="http://libspectre.freedesktop.org/releases/libspectre-$pkgver.tar.gz
- ghostscript-api.patch"
+ test.ps"
-_builddir="$srcdir"/libspectre-$pkgver
+builddir="$srcdir/libspectre-$pkgver"
prepare() {
- update_config_sub || return 1
- default_prepare || return 1
+ update_config_sub | true
+ default_prepare
}
build() {
- cd "$_builddir"
+ cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -32,25 +31,36 @@ build() {
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
- --localstatedir=/var \
- || return 1
- make || return 1
+ --localstatedir=/var
+ make
make doc
}
package() {
- cd "$_builddir"
- make DESTDIR="$pkgdir" install || return 1
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
}
doc() {
- mkdir -m 0755 -p "$subpkgdir"/usr/share/doc/libspectre || return 1
- install -m 0644 "$_builddir"/doc/html/* "$subpkgdir"/usr/share/doc/libspectre/
+ mkdir -m 0755 -p "$subpkgdir"/usr/share/doc/libspectre
+ install -m 0644 "$builddir"/doc/html/* "$subpkgdir"/usr/share/doc/libspectre/
}
-md5sums="8f759c0e6cd88d68fc8149130fcbc3d3 libspectre-0.2.7.tar.gz
-43c860e4f8ca8690759440115570b738 ghostscript-api.patch"
-sha256sums="e81b822a106beed14cf0fec70f1b890c690c2ffa150fa2eee41dc26518a6c3ec libspectre-0.2.7.tar.gz
-1b5ad9d94ddd6cd3febfc6d559cbf329b4c57a841821df024cccf93ae3cb8159 ghostscript-api.patch"
-sha512sums="2e60905f7eeed9ac6ec3b5f8b47a7dad85178c8c35a63ba097ef6088dd334f7fde5797ecb05cf67532b759d07a65006427914d2cd6b09107ecc90620c9541794 libspectre-0.2.7.tar.gz
-d54a2dd2b03de9bcdf012e3cb429d7f882f38dc0c66c5253271fbec0e0917f41fce06e33a383fdd6989ad8e83d6ff2d85cce194b7aa97212564ae56ebbda7c4c ghostscript-api.patch"
+check() {
+ cd "$builddir/test"
+ make
+ mkdir work
+ ./parser-test "$srcdir/test.ps" work
+ ./spectre-test "$srcdir/test.ps" work
+ file work/output.ps | grep -q "PostScript document text conforming DSC level 3.0, Level 2"
+ file work/output.pdf | grep -q "PDF document, version 1.5"
+ file work/document.png | grep -q "PNG image data"
+ rm -r work
+}
+
+md5sums="97ad2c8188db6bdc77fd742522b0bbdf libspectre-0.2.8.tar.gz
+dabc20a5e57ac6ae5b7b017f9e27b2e5 test.ps"
+sha256sums="65256af389823bbc4ee4d25bfd1cc19023ffc29ae9f9677f2d200fa6e98bc7a8 libspectre-0.2.8.tar.gz
+5ef0ee544b834a47864b1228b253be4c5b1811f8630cc970bcfec3f7c06d113c test.ps"
+sha512sums="ebbe7f6adcbc7f7d6af61f24e23b114116c878755dbe90f1163546c1284a005b4d539be01986c1f940611e84141ca19768b8effc2abf1013606da7c93547da86 libspectre-0.2.8.tar.gz
+c5148d38da69ebd125f66bb92204f2c7c79797d60a137d431122792c4e4cdcdb3a6a20cfadadd2821536449b1d638258f4596e43154e1ad2307bffa97af4908b test.ps"