diff options
author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2022-04-21 19:12:37 +0200 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2022-09-09 08:41:08 +0200 |
commit | d88c28b7816a02cbbac3d37393c53b885245cc60 (patch) | |
tree | 76128995f11e1cfd60c4420b43e521b418886c51 /app-text/pdftk | |
parent | dev-java/system-rules: new package, add 1.19.0 (diff) | |
download | gentoo-d88c28b7816a02cbbac3d37393c53b885245cc60.tar.gz gentoo-d88c28b7816a02cbbac3d37393c53b885245cc60.tar.bz2 gentoo-d88c28b7816a02cbbac3d37393c53b885245cc60.zip |
app-text/pdftk: enable tests, switch to java-pkg-simple
Bug: https://bugs.gentoo.org/711438
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'app-text/pdftk')
-rw-r--r-- | app-text/pdftk/Manifest | 1 | ||||
-rw-r--r-- | app-text/pdftk/pdftk-3.3.2-r1.ebuild | 79 |
2 files changed, 80 insertions, 0 deletions
diff --git a/app-text/pdftk/Manifest b/app-text/pdftk/Manifest index dce889480e29..ec184abdaee5 100644 --- a/app-text/pdftk/Manifest +++ b/app-text/pdftk/Manifest @@ -1 +1,2 @@ DIST pdftk-v3.3.2.tar.bz2 2169492 BLAKE2B 53cb98fe3e3d1dbe8b01a45b5b11c6fbe57017ea8029efe35677914a48ffd446c5d67621443a89f512b15d0f7e77a81c945d4c220ccaf4fd658cc1726cc32059 SHA512 b02c713b67531205e760e8d8a240a82af47dbdc28e59aa683e03772d2fb27b504b98f8be1e8dc73bfc967cc9532f3dc1eccbd105abb21db396268855233051eb +DIST pdftk-v3.3.2.tar.gz 2343475 BLAKE2B cfa3cac4b78695d757e9cd3ba02f2a3e304343c481a44b0b6165e239d90e5ef72be3385faa1a72cd36194844f441fd1e93194e8d815807d2d0b364d0421553d2 SHA512 44056737e3b9b3cb988f46e96a0f3ec13193cfc662946f6def93add0ed56608fc026181254165440f1172e9fdda00771c3c018c20bf20ce87dad322fc1394893 diff --git a/app-text/pdftk/pdftk-3.3.2-r1.ebuild b/app-text/pdftk/pdftk-3.3.2-r1.ebuild new file mode 100644 index 000000000000..0c5ad3c5f4df --- /dev/null +++ b/app-text/pdftk/pdftk-3.3.2-r1.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source test" +MAVEN_ID="com.gitlab.pdftk-java:pdftk-java:3.3.2" +JAVA_TESTING_FRAMEWORKS="junit-4" + +inherit java-pkg-2 java-pkg-simple + +DESCRIPTION="A port of pdftk into java" +HOMEPAGE="https://gitlab.com/pdftk-java/pdftk" +SRC_URI="https://gitlab.com/pdftk-java/pdftk/-/archive/v${PV}/pdftk-v${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" + +CP_DEPEND=" + dev-java/bcprov:0 + dev-java/commons-lang:3.6 +" + +# Compile dependencies +# POM: pom.xml +# test? com.github.stefanbirkner:system-rules:1.19.0 -> !!!groupId-not-found!!! +# test? junit:junit:4.12 -> >=dev-java/junit-4.13.2:4 + +DEPEND=" + >=virtual/jdk-1.8:* + ${CP_DEPEND} + test? ( + dev-java/system-rules:0 + ) +" + +RDEPEND=" + >=virtual/jre-1.8:* + ${CP_DEPEND}" + +S="${WORKDIR}/${PN}-v${PV}" + +JAVA_LAUNCHER_FILENAME="${PN}" +JAVA_MAIN_CLASS="com.gitlab.pdftk_java.pdftk" +JAVA_SRC_DIR="java" +JAVA_RESOURCE_DIRS="resources/java" + +JAVA_TEST_GENTOO_CLASSPATH="junit-4,system-rules" +JAVA_TEST_SRC_DIR="test" + +src_prepare() { + default + mkdir resources || die + cp -r {,resources/}java || die + rm -r resources/java/com/gitlab/pdftk_java/com/lowagie/text/pdf/codec || die + find resources/java -type f \( -name '*.java' -o -name '*.sh' \) -exec rm -rf {} + || die +} + +src_test() { + # some tests seem to need special treatment + einfo "Runnig first test" + JAVA_TEST_RUN_ONLY=( + com.gitlab.pdftk_java.CatTest + com.gitlab.pdftk_java.DataTest + com.gitlab.pdftk_java.FormTest + com.gitlab.pdftk_java.MultipleTest + ) + java-pkg-simple_src_test + einfo "Running second test" + JAVA_TEST_RUN_ONLY=() + JAVA_TEST_EXCLUDES=( + com.gitlab.pdftk_java.CatTest + com.gitlab.pdftk_java.DataTest + com.gitlab.pdftk_java.FormTest + com.gitlab.pdftk_java.MultipleTest + ) + java-pkg-simple_src_test +} |