bcel-6.0_rc3.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. MY_PV="${PV//./_}"
  5. MY_PV="${MY_PV/rc/RC}"
  6. MY_P="BCEL_${MY_PV}"
  7. JAVA_PKG_IUSE="doc source"
  8. inherit java-pkg-2 java-pkg-simple
  9. DESCRIPTION="The Byte Code Engineering Library: analyze, create, manipulate Java class files"
  10. HOMEPAGE="http://commons.apache.org/bcel/"
  11. SRC_URI="https://github.com/apache/commons-${PN}/archive/${MY_P}.tar.gz"
  12. LICENSE="Apache-2.0"
  13. SLOT="0"
  14. KEYWORDS="amd64 ~arm ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
  15. IUSE="test"
  16. RDEPEND=">=virtual/jre-1.5"
  17. DEPEND=">=virtual/jdk-1.5
  18. test? ( dev-java/junit:4 )"
  19. S="${WORKDIR}/commons-${PN}-${MY_P}/src"
  20. JAVA_SRC_DIR="main/java"
  21. src_install() {
  22. java-pkg-simple_src_install
  23. dodoc ../{NOTICE,README,RELEASE-NOTES}.txt
  24. }
  25. src_test() {
  26. cd test/java || die
  27. local CP=".:${S}/${PN}.jar:$(java-pkg_getjars junit-4)"
  28. local TESTS=$(find * -name "*TestCase.java" ! -name "Abstract*")
  29. TESTS="${TESTS//.java}"
  30. TESTS="${TESTS//\//.}"
  31. ejavac -g -cp "${CP}" -d . $(find * -name "*.java")
  32. ejunit4 -classpath "${CP}" ${TESTS}
  33. }