commit: e5ca2d39147c6e797f644f5bab810d43c3ab7a63 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sat May 27 06:44:39 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat May 27 06:55:13 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5ca2d39
app-text/poppler: wire up tests Signed-off-by: Sam James <sam <AT> gentoo.org> app-text/poppler/Manifest | 1 + app-text/poppler/poppler-23.05.0.ebuild | 27 +++++++++++++++++++-------- app-text/poppler/poppler-9999.ebuild | 27 +++++++++++++++++++-------- 3 files changed, 39 insertions(+), 16 deletions(-) diff --git a/app-text/poppler/Manifest b/app-text/poppler/Manifest index ab1269221d59..e7f35b8ed217 100644 --- a/app-text/poppler/Manifest +++ b/app-text/poppler/Manifest @@ -2,3 +2,4 @@ DIST poppler-23.03.0.tar.xz 1849324 BLAKE2B 1247b7cf62466f65c46b739f0784e8ba9791 DIST poppler-23.03.0.tar.xz.sig 833 BLAKE2B a8a07aac9068a3edc6cdce4d59c2b5d3d792dd6addcd420d5b92f013041cfd934c0da04a21eabefdd25167fb89b940945f8ca03e7a7280d03a47b6df8490bdf4 SHA512 3d950ff4b1a368b6edd8333677d1d125f60b4b1a052e20a2be6a0d38489e7af393be8359fc2c75010b2a28673e201507da4bf4c8458904fa712247d8ebda4786 DIST poppler-23.05.0.tar.xz 1856488 BLAKE2B 837d532855da3816c3d83ff3401e9a545451d9f341b0e0260536f56d3eb56cdc1757ab057b49b8c8e1a2b9e4c34650807ea08138fb76d1ea86492bba51876dbd SHA512 b7fdd519737b95c5898f3ff83a294430390c330d0f3e5526180c956550656be9374a534d6c4e7ebffccaac3364b01d74b75a82d3f703e2575cc1b1273e7a12c3 DIST poppler-23.05.0.tar.xz.sig 833 BLAKE2B c372ded3a5ea3fcf46cccd3d1417d95b449f0b2abfbc114f4bae0d3574040140a8081c23da3c048b3eecca484ed75baee700d2484a12a86d4a5ae82337530f8c SHA512 c9b359dfe67d901578ba6708f1224d1d45b3307a97f3e14e6bac0da748dd2c4457d6e8ff8949b2def5e84acd770198c653e0c5ef8b91088168c38bebf4f3be50 +DIST poppler-test-eea2a4a355eb49ca70d944afd5245b24578af287.tar.bz2 5196899 BLAKE2B 926e148953a703249fa6369254f3aaacd945e0d08effdecec826a0b9c207c9b91d4af8dbeefb0a1a52decb5e941ff6b0f654fbaf15d5ed4d280ae1a7a3542534 SHA512 0c861f95a318f8a966851c7f12524d9311fba1914750527492bb4e5196d5d0be0deae7e3265fff78a5536617130b708285fed5b1edcb85c34ba83ca77226a7cd diff --git a/app-text/poppler/poppler-23.05.0.ebuild b/app-text/poppler/poppler-23.05.0.ebuild index 1a585a2a33e5..12b2f50d86e7 100644 --- a/app-text/poppler/poppler-23.05.0.ebuild +++ b/app-text/poppler/poppler-23.05.0.ebuild @@ -13,7 +13,9 @@ else VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/aacid.asc inherit verify-sig + TEST_COMMIT="eea2a4a355eb49ca70d944afd5245b24578af287" SRC_URI="https://poppler.freedesktop.org/${P}.tar.xz" + SRC_URI+=" test? ( https://gitlab.freedesktop.org/poppler/test/-/archive/${TEST_COMMIT}/test-${TEST_COMMIT}.tar.bz2 -> ${PN}-test-${TEST_COMMIT}.tar.bz2 )" SRC_URI+=" verify-sig? ( https://poppler.freedesktop.org/${P}.tar.xz.sig )" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" SLOT="0/128" # CHECK THIS WHEN BUMPING!!! SUBSLOT IS libpoppler.so SOVERSION @@ -23,10 +25,8 @@ DESCRIPTION="PDF rendering library based on the xpdf-3.0 code base" HOMEPAGE="https://poppler.freedesktop.org/" LICENSE="GPL-2" -IUSE="boost cairo cjk curl +cxx debug doc +introspection +jpeg +jpeg2k +lcms nss png qt5 tiff +utils" - -# No test data provided -RESTRICT="test" +IUSE="boost cairo cjk curl +cxx debug doc +introspection +jpeg +jpeg2k +lcms nss png qt5 test tiff +utils" +RESTRICT="!test? ( test )" COMMON_DEPEND=" >=media-libs/fontconfig-2.13 @@ -73,6 +73,16 @@ PATCHES=( "${FILESDIR}/${PN}-0.57.0-disable-internal-jpx.patch" ) +src_unpack() { + if [[ ${PV} == *9999* ]] ; then + git-r3_src_unpack + elif use verify-sig ; then + verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.sig} + fi + + default +} + src_prepare() { cmake_src_prepare @@ -95,10 +105,11 @@ src_configure() { append-lfs-flags # bug #898506 local mycmakeargs=( - -DBUILD_GTK_TESTS=OFF - -DBUILD_QT5_TESTS=OFF - -DBUILD_CPP_TESTS=OFF - -DBUILD_MANUAL_TESTS=OFF + -DBUILD_GTK_TESTS=OFFF + -DBUILD_QT5_TESTS=$(usex test $(usex qt5)) + -DBUILD_CPP_TESTS=$(usex test) + -DBUILD_MANUAL_TESTS=$(usex test) + -DTESTDATADIR="${WORKDIR}"/test-${TEST_COMMIT} -DRUN_GPERF_IF_PRESENT=OFF -DENABLE_BOOST="$(usex boost)" -DENABLE_ZLIB=ON diff --git a/app-text/poppler/poppler-9999.ebuild b/app-text/poppler/poppler-9999.ebuild index 1a585a2a33e5..12b2f50d86e7 100644 --- a/app-text/poppler/poppler-9999.ebuild +++ b/app-text/poppler/poppler-9999.ebuild @@ -13,7 +13,9 @@ else VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/aacid.asc inherit verify-sig + TEST_COMMIT="eea2a4a355eb49ca70d944afd5245b24578af287" SRC_URI="https://poppler.freedesktop.org/${P}.tar.xz" + SRC_URI+=" test? ( https://gitlab.freedesktop.org/poppler/test/-/archive/${TEST_COMMIT}/test-${TEST_COMMIT}.tar.bz2 -> ${PN}-test-${TEST_COMMIT}.tar.bz2 )" SRC_URI+=" verify-sig? ( https://poppler.freedesktop.org/${P}.tar.xz.sig )" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" SLOT="0/128" # CHECK THIS WHEN BUMPING!!! SUBSLOT IS libpoppler.so SOVERSION @@ -23,10 +25,8 @@ DESCRIPTION="PDF rendering library based on the xpdf-3.0 code base" HOMEPAGE="https://poppler.freedesktop.org/" LICENSE="GPL-2" -IUSE="boost cairo cjk curl +cxx debug doc +introspection +jpeg +jpeg2k +lcms nss png qt5 tiff +utils" - -# No test data provided -RESTRICT="test" +IUSE="boost cairo cjk curl +cxx debug doc +introspection +jpeg +jpeg2k +lcms nss png qt5 test tiff +utils" +RESTRICT="!test? ( test )" COMMON_DEPEND=" >=media-libs/fontconfig-2.13 @@ -73,6 +73,16 @@ PATCHES=( "${FILESDIR}/${PN}-0.57.0-disable-internal-jpx.patch" ) +src_unpack() { + if [[ ${PV} == *9999* ]] ; then + git-r3_src_unpack + elif use verify-sig ; then + verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.sig} + fi + + default +} + src_prepare() { cmake_src_prepare @@ -95,10 +105,11 @@ src_configure() { append-lfs-flags # bug #898506 local mycmakeargs=( - -DBUILD_GTK_TESTS=OFF - -DBUILD_QT5_TESTS=OFF - -DBUILD_CPP_TESTS=OFF - -DBUILD_MANUAL_TESTS=OFF + -DBUILD_GTK_TESTS=OFFF + -DBUILD_QT5_TESTS=$(usex test $(usex qt5)) + -DBUILD_CPP_TESTS=$(usex test) + -DBUILD_MANUAL_TESTS=$(usex test) + -DTESTDATADIR="${WORKDIR}"/test-${TEST_COMMIT} -DRUN_GPERF_IF_PRESENT=OFF -DENABLE_BOOST="$(usex boost)" -DENABLE_ZLIB=ON