# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="4" JAVA_PKG_IUSE="doc source test" inherit java-pkg-2 java-ant-2 MY_PN=esapi MY_PV=2.0GA DESCRIPTION="The OWASP Enterprise Security API is a web application security control library" HOMEPAGE="https://code.google.com/p/owasp-esapi-java" SRC_URI="https://owasp-esapi-java.googlecode.com/files/${MY_PN}-${PV}-dist.tar.gz" LICENSE="BSD" SLOT="2" KEYWORDS="~amd64" IUSE="" CDEPEND=" dev-java/bsh:0 dev-java/commons-beanutils:1.7 dev-java/commons-collections:0 dev-java/commons-configuration:0 dev-java/commons-fileupload:0 dev-java/commons-io:1 dev-java/commons-lang:2.1 dev-java/log4j:0 dev-java/owasp-antisamy:0 dev-java/xom:0 java-virtuals/servlet-api:3.0" RDEPEND=">=virtual/jre-1.5 ${CDEPEND}" DEPEND=">=virtual/jdk-1.5 test? ( dev-java/ant-junit:0 dev-java/junit:4 ) ${CDEPEND}" S="${WORKDIR}" java_prepare() { #generated from http://owasp-esapi-java.googlecode.com/svn/tags/esapi-2.0GA/pom.xml cp -v "${FILESDIR}"/${P}_maven-build.xml build.xml || die find "${S}" -name '*.jar' -print -delete || die epatch "${FILESDIR}"/${P}_test-mockups.patch } JAVA_ANT_REWRITE_CLASSPATH="yes" EANT_TEST_GENTOO_CLASSPATH="junit-4" EANT_GENTOO_CLASSPATH="bsh,commons-beanutils:1.7,commons-collections,commons-configuration,commons-fileupload,commons-lang-2.1,commons-io-1,log4j,owasp-antisamy,xom,servlet-api-3.0" EANT_TEST_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH},junit-4" src_test() { java-pkg-2_src_test } src_install() { java-pkg_newjar target/${MY_PN}-${MY_PV}.jar ${PN}.jar use doc && java-pkg_dojavadoc target/site/apidocs use source && java-pkg_dosrc src/main/java/org }