commit:     7461a982b3b7cdd5720f72241143e682aa447acc
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 12 22:50:21 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Apr 12 22:51:04 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7461a982

net-print/cups-filters: make testfont optional

Closes: https://bugs.gentoo.org/717138
Package-Manager: Portage-2.3.98, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 net-print/cups-filters/cups-filters-1.27.4.ebuild        | 16 +++++++++++++---
 net-print/cups-filters/cups-filters-9999.ebuild          | 16 +++++++++++++---
 ...-filters-1.27.4-make-missing-testfont-non-fatal.patch | 11 +++++++++++
 3 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/net-print/cups-filters/cups-filters-1.27.4.ebuild 
b/net-print/cups-filters/cups-filters-1.27.4.ebuild
index 6cb600e6a3a..7abb7a7fcbf 100644
--- a/net-print/cups-filters/cups-filters-1.27.4.ebuild
+++ b/net-print/cups-filters/cups-filters-1.27.4.ebuild
@@ -5,10 +5,10 @@ EAPI=7
 
 GENTOO_DEPEND_ON_PERL=no
 
-inherit perl-module systemd flag-o-matic
+inherit autotools perl-module systemd flag-o-matic
 
 if [[ "${PV}" == "9999" ]] ; then
-       inherit autotools git-r3
+       inherit git-r3
        EGIT_REPO_URI="https://github.com/OpenPrinting/cups-filters.git";
 else
        SRC_URI="http://www.openprinting.org/download/${PN}/${P}.tar.xz";
@@ -54,8 +54,18 @@ BDEPEND="
 "
 
 src_prepare() {
+       local need_eautoreconf=
+
        default
-       [[ "${PV}" == "9999" ]] && eautoreconf
+
+       if ! use test ; then
+               eapply 
"${FILESDIR}"/${PN}-1.27.4-make-missing-testfont-non-fatal.patch
+               need_eautoreconf=yes
+       elif [[ "${PV}" == "9999" ]] ; then
+               need_eautoreconf=yes
+       fi
+
+       [[ -n ${need_eautoreconf} ]] && eautoreconf
 
        # Bug #626800
        append-cxxflags -std=c++11

diff --git a/net-print/cups-filters/cups-filters-9999.ebuild 
b/net-print/cups-filters/cups-filters-9999.ebuild
index 6cb600e6a3a..7abb7a7fcbf 100644
--- a/net-print/cups-filters/cups-filters-9999.ebuild
+++ b/net-print/cups-filters/cups-filters-9999.ebuild
@@ -5,10 +5,10 @@ EAPI=7
 
 GENTOO_DEPEND_ON_PERL=no
 
-inherit perl-module systemd flag-o-matic
+inherit autotools perl-module systemd flag-o-matic
 
 if [[ "${PV}" == "9999" ]] ; then
-       inherit autotools git-r3
+       inherit git-r3
        EGIT_REPO_URI="https://github.com/OpenPrinting/cups-filters.git";
 else
        SRC_URI="http://www.openprinting.org/download/${PN}/${P}.tar.xz";
@@ -54,8 +54,18 @@ BDEPEND="
 "
 
 src_prepare() {
+       local need_eautoreconf=
+
        default
-       [[ "${PV}" == "9999" ]] && eautoreconf
+
+       if ! use test ; then
+               eapply 
"${FILESDIR}"/${PN}-1.27.4-make-missing-testfont-non-fatal.patch
+               need_eautoreconf=yes
+       elif [[ "${PV}" == "9999" ]] ; then
+               need_eautoreconf=yes
+       fi
+
+       [[ -n ${need_eautoreconf} ]] && eautoreconf
 
        # Bug #626800
        append-cxxflags -std=c++11

diff --git 
a/net-print/cups-filters/files/cups-filters-1.27.4-make-missing-testfont-non-fatal.patch
 
b/net-print/cups-filters/files/cups-filters-1.27.4-make-missing-testfont-non-fatal.patch
new file mode 100644
index 00000000000..50866e4a729
--- /dev/null
+++ 
b/net-print/cups-filters/files/cups-filters-1.27.4-make-missing-testfont-non-fatal.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -789,7 +789,7 @@ AC_ARG_WITH([test-font-path],
+       [with_test_font_path=`find /usr/share/fonts -name DejaVuSans.ttf || 
echo /usr/share/fonts/dejavu/DejaVuSans.ttf`]
+ )
+ AC_CHECK_FILE("$with_test_font_path", [], [
+-      AC_MSG_ERROR([Requested font file is missing. Please install a package 
providing it.])
++      AC_MSG_WARN([Specified font for tests not found. Expect test failures!])
+ ])
+ AC_DEFINE_UNQUOTED([TESTFONT], ["$with_test_font_path"], [Path to font used 
in tests])
+ 

Reply via email to