diff options
author | James Le Cuirot <chewi@gentoo.org> | 2015-08-17 23:28:39 +0100 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2015-08-17 23:28:39 +0100 |
commit | 6357034e4caf72d9b29c3666a94a31f57bbddb54 (patch) | |
tree | ef5e9c8d2561e90f672e982aeee4f4ce3a1ce6fe /dev-java/htmlcleaner/htmlcleaner-2.13.ebuild | |
parent | dev-lang/rust-bin: version bump (diff) | |
download | gentoo-6357034e4caf72d9b29c3666a94a31f57bbddb54.tar.gz gentoo-6357034e4caf72d9b29c3666a94a31f57bbddb54.tar.bz2 gentoo-6357034e4caf72d9b29c3666a94a31f57bbddb54.zip |
dev-java/htmlcleaner: Imported and bumped from java-overlay
Closes bug #369977.
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'dev-java/htmlcleaner/htmlcleaner-2.13.ebuild')
-rw-r--r-- | dev-java/htmlcleaner/htmlcleaner-2.13.ebuild | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/dev-java/htmlcleaner/htmlcleaner-2.13.ebuild b/dev-java/htmlcleaner/htmlcleaner-2.13.ebuild new file mode 100644 index 000000000000..fa953f27cdfa --- /dev/null +++ b/dev-java/htmlcleaner/htmlcleaner-2.13.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +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" + +CDEPEND="dev-java/jdom:2" + +DEPEND="${CDEPEND} + >=virtual/jdk-1.5 + app-arch/unzip + dev-java/ant-core:0 + test? ( dev-java/junit:4 )" + +RDEPEND="${CDEPEND} + >=virtual/jre-1.5" + +JAVA_SRC_DIR="src/main/java" +JAVA_GENTOO_CLASSPATH="jdom-2" + +src_prepare() { + # 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_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} +} |