diff options
author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2021-04-27 18:10:39 +0200 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2021-04-30 15:50:58 +0200 |
commit | af53793a9c726082856102682deedd6366b30c41 (patch) | |
tree | 241c9d5b52a4bc6f653230f39639022b01d39a59 /dev-java/htmlcleaner | |
parent | dev-db/postgresql: remove libressl support (diff) | |
download | gentoo-af53793a9c726082856102682deedd6366b30c41.tar.gz gentoo-af53793a9c726082856102682deedd6366b30c41.tar.bz2 gentoo-af53793a9c726082856102682deedd6366b30c41.zip |
dev-java/htmlcleaner: bump to 2.24
Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java/htmlcleaner')
-rw-r--r-- | dev-java/htmlcleaner/Manifest | 1 | ||||
-rw-r--r-- | dev-java/htmlcleaner/htmlcleaner-2.24.ebuild | 70 |
2 files changed, 71 insertions, 0 deletions
diff --git a/dev-java/htmlcleaner/Manifest b/dev-java/htmlcleaner/Manifest index b705663e15df..ff37e647153f 100644 --- a/dev-java/htmlcleaner/Manifest +++ b/dev-java/htmlcleaner/Manifest @@ -1 +1,2 @@ DIST htmlcleaner-2.13-src.zip 346998 BLAKE2B 883a2550b9ddc0f56d88b1a412b2d9f809e0bb53d56827104aad99f15b4fc5c7f6c88b37cd10dbea5d05e27bc650d93f038142c66ea97ab0bb1bcea810bb40c5 SHA512 bf9cc014688ebb20b0bafba82fc710f25c1db8c173dd3e9f742c31c64f127c3c89b29b151e64a3368b04d278733cce8828831f297834ca9b872a60951e0a2d47 +DIST htmlcleaner-2.24-src.zip 413806 BLAKE2B 26ac6d150607c3ee00a8afcf58fed313ac570178f84c52a0fe43b0d324e3b32bb60f63db9ae5f171e7a6a7517799c633f85abfeb64e3f7421d655842bb5a5610 SHA512 beb16e383b6d43d0dfd4697b919a30c1a74eea824976521475c458bdda6c5f0eb22f299eddae033cb190a2af4fafde7e7f2c8ab1378bd82f15842a3ca8ebaaff diff --git a/dev-java/htmlcleaner/htmlcleaner-2.24.ebuild b/dev-java/htmlcleaner/htmlcleaner-2.24.ebuild new file mode 100644 index 000000000000..f51d425b4e9d --- /dev/null +++ b/dev-java/htmlcleaner/htmlcleaner-2.24.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +JAVA_PKG_IUSE="doc source" + +inherit java-pkg-2 java-pkg-simple + +DESCRIPTION="HTML parser written in Java that can be used as a tool, library or Ant task" +HOMEPAGE="http://htmlcleaner.sourceforge.net/" +SRC_URI="mirror://sourceforge/htmlcleaner/files/${P}-src.zip" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +CDEPEND="dev-java/jdom:2" + +RDEPEND=" + ${CDEPEND} + >=virtual/jre-1.8:*" + +DEPEND=" + ${CDEPEND} + dev-java/ant-core:0 + test? ( dev-java/junit:4 ) + >=virtual/jdk-1.8:*" + +BDEPEND=" + app-arch/unzip" + + +JAVA_SRC_DIR="src/main/java" +JAVA_GENTOO_CLASSPATH="jdom-2" + +src_prepare() { + default + # Don't require default.xml to be in the current directory. + sed -i "s:\"default\.xml\":\"${JAVA_PKG_SHAREPATH}/default.xml\":g" \ + src/main/java/org/htmlcleaner/ConfigFileTagProvider.java || die +} + +src_configure() { + JAVA_GENTOO_CLASSPATH_EXTRA=$(java-pkg_getjars --build-only ant-core) +} + +src_install() { + java-pkg-simple_src_install + java-pkg_register-ant-task + java-pkg_dolauncher ${PN} --main org.${PN}.CommandLine + + insinto "${JAVA_PKG_SHAREPATH}" + newins example.xml default.xml +} + +src_test() { + local DIR="src/test/java" + local CP="${DIR}:${PN}.jar:$(java-pkg_getjars junit-4,${JAVA_GENTOO_CLASSPATH})" + + local TESTS=$(find "${DIR}" -name "*Test.java" ! -name "Abstract*") + TESTS="${TESTS//src\/test\/java\/}" + TESTS="${TESTS//.java}" + TESTS="${TESTS//\//.}" + + ejavac -classpath "${CP}" -d "${DIR}" $(find "${DIR}" -name "*.java") + ejunit4 -classpath "${CP}" ${TESTS} +} |