commit: 46de3dc525675413229e868165c7c713643661ff Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> AuthorDate: Tue Feb 13 14:51:26 2018 +0000 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> CommitDate: Tue Feb 13 14:51:26 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46de3dc5
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 media-libs/leptonica/files/gnuplot-png.patch | 29 ++++++++++++++++++++++++++++ media-libs/leptonica/leptonica-1.75.2.ebuild | 6 ++---- 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 00000000000..4e87fca73b3 --- /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 <[email protected]> +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 38ffafa4bed..d72072546d5 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 )
