summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2018-02-13 14:51:26 +0000
committerJames Le Cuirot <chewi@gentoo.org>2018-02-13 14:51:26 +0000
commit46de3dc525675413229e868165c7c713643661ff (patch)
tree56c3d244e9996bf72e93a4371f99008f04eea867 /media-libs/leptonica
parentdev-python/python-openstackclient: dekeyword on ~arm64 (diff)
downloadgentoo-46de3dc525675413229e868165c7c713643661ff.tar.gz
gentoo-46de3dc525675413229e868165c7c713643661ff.tar.bz2
gentoo-46de3dc525675413229e868165c7c713643661ff.zip
media-libs/leptonica: Patch to avoid gnuplot dependency
The test suite already checked whether gnuplot is present but it didn't check whether PNG support is enabled. Bug: https://github.com/DanBloomberg/leptonica/pull/308 Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'media-libs/leptonica')
-rw-r--r--media-libs/leptonica/files/gnuplot-png.patch29
-rw-r--r--media-libs/leptonica/leptonica-1.75.2.ebuild6
2 files changed, 31 insertions, 4 deletions
diff --git a/media-libs/leptonica/files/gnuplot-png.patch b/media-libs/leptonica/files/gnuplot-png.patch
new file mode 100644
index 000000000000..4e87fca73b3c
--- /dev/null
+++ b/media-libs/leptonica/files/gnuplot-png.patch
@@ -0,0 +1,29 @@
+From 1b3c9b64ee204b3f9371cea624c959b3177c9c1d Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@aura-online.co.uk>
+Date: Tue, 13 Feb 2018 14:37:32 +0000
+Subject: [PATCH] Skip gnuplot tests if it is missing PNG support
+
+---
+ prog/reg_wrapper.sh | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/prog/reg_wrapper.sh b/prog/reg_wrapper.sh
+index bc60c82..4afdc08 100755
+--- a/prog/reg_wrapper.sh
++++ b/prog/reg_wrapper.sh
+@@ -32,7 +32,11 @@ TEST_NAME="${TEST_NAME%_reg*}"
+
+ case "${TEST_NAME}" in
+ baseline|boxa1|colormask|colorspace|dna|enhance|extrema|fpix1|italic|kernel|nearline|projection|rankbin|rankhisto|wordboxes)
+- which gnuplot > /dev/null || which wgnuplot > /dev/null || exec ${@%${TEST}} /bin/sh -c "exit 77" ;;
++ GNUPLOT=$(type -P gnuplot wgnuplot)
++
++ if [ -z "${GNUPLOT}" ] || ! "${GNUPLOT}" -e "set terminal png" 2>/dev/null ; then
++ exec ${@%${TEST}} /bin/sh -c "exit 77"
++ fi
+ esac
+
+ exec ${@%${TEST}} /bin/sh -c "cd \"${srcdir}\" && \"${PWD}/\"${TEST} generate && \"${PWD}/\"${TEST} compare"
+--
+2.16.1
+
diff --git a/media-libs/leptonica/leptonica-1.75.2.ebuild b/media-libs/leptonica/leptonica-1.75.2.ebuild
index 38ffafa4bedf..d72072546d55 100644
--- a/media-libs/leptonica/leptonica-1.75.2.ebuild
+++ b/media-libs/leptonica/leptonica-1.75.2.ebuild
@@ -26,11 +26,9 @@ RDEPEND="gif? ( >=media-libs/giflib-5.1.3:=[${MULTILIB_USEDEP}] )
zlib? ( sys-libs/zlib:=[${MULTILIB_USEDEP}] )"
DEPEND="${RDEPEND}
- test? (
- media-libs/tiff:0[zlib]
- sci-visualization/gnuplot[cairo]
- )"
+ test? ( media-libs/tiff:0[zlib] )"
+PATCHES=( "${FILESDIR}"/gnuplot-png.patch )
ECONF_SOURCE="${S}"
DOCS=( README version-notes )