commit:     89653595daba17b71e834f3efcf44589a0cd4258
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Fri Sep 22 11:11:36 2023 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Sep 25 02:43:36 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89653595

app-text/podofo: skip tests which require USE flags to succeed

These do not indicate anything wrong with podofo -- the verbose errors
are just things like "cannot find an Arial font" or "png / jpeg is not
supported", and that's very innocent.

For the Arial test in particular, passing the test also requires
`SearchFont("LiberationSans")` so must be a build dependency when
enabling both test and fontconfig. Consequently, we drop ~hppa since
that font isn't keyworded on hppa; it will have to be rekeyworded later.

One could wish that the upstream testsuite automatically skipped those
tests, but it is what it is...

Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 app-text/podofo/podofo-0.10.1-r1.ebuild | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/app-text/podofo/podofo-0.10.1-r1.ebuild 
b/app-text/podofo/podofo-0.10.1-r1.ebuild
index 18c138d78704..01677dd282b6 100644
--- a/app-text/podofo/podofo-0.10.1-r1.ebuild
+++ b/app-text/podofo/podofo-0.10.1-r1.ebuild
@@ -17,7 +17,7 @@ 
SRC_URI="https://github.com/podofo/podofo/archive/refs/tags/${PV}.tar.gz -> ${P}
 
 LICENSE="LGPL-2+ tools? ( GPL-2+ )"
 SLOT="0/2"
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
 IUSE="idn jpeg tiff png fontconfig test tools"
 RESTRICT="!test? ( test )"
 
@@ -32,7 +32,10 @@ RDEPEND="
        tiff? ( media-libs/tiff:= )
        sys-libs/zlib:="
 DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig"
+BDEPEND="
+       virtual/pkgconfig
+       test? ( fontconfig? ( media-fonts/liberation-fonts ) )
+"
 
 src_prepare() {
        cmake_src_prepare
@@ -60,3 +63,14 @@ src_configure() {
 
        cmake_src_configure
 }
+
+src_test() {
+       local CMAKE_SKIP_TESTS=(
+               $(usev !png 'TestImage3')
+               $(usev !jpeg 'TestImage2 TestImage4 TestImage5')
+               # relies on finding arial font
+               $(usev !fontconfig 'testLoadEncrypedFilePdfMemDocument 
testLoadEncrypedFilePdfParser testCyclicTree testNestedArrayTree 
testEmptyKidsTree testNestedArrayTree testCreateDelete')
+       )
+
+       cmake_src_test
+}

Reply via email to