freehep-graphicsbase-2.4.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. MY_PN="freehep-vectorgraphics"
  5. MY_P="${MY_PN}-${PV}"
  6. JAVA_PKG_IUSE="doc source"
  7. inherit java-pkg-2 java-pkg-simple
  8. DESCRIPTION="High Energy Physics Java library - FreeHEP Graphics Base Library"
  9. HOMEPAGE="http://java.freehep.org/"
  10. SRC_URI="https://github.com/freehep/${MY_PN}/archive/${MY_P}.tar.gz"
  11. LICENSE="Apache-2.0 LGPL-2.1"
  12. SLOT="0"
  13. KEYWORDS="~amd64 ~x86"
  14. IUSE="test"
  15. CDEPEND="dev-java/freehep-io:0
  16. dev-java/junit:4"
  17. DEPEND="${CDEPEND}
  18. >=virtual/jdk-1.7"
  19. RDEPEND="${CDEPEND}
  20. >=virtual/jre-1.7"
  21. S="${WORKDIR}/${MY_PN}-${MY_P}/${PN}"
  22. JAVA_SRC_DIR="src/main/java"
  23. JAVA_GENTOO_CLASSPATH="freehep-io,junit-4"
  24. src_compile() {
  25. java-pkg-simple_src_compile
  26. java-pkg_addres ${PN}.jar src/main/resources
  27. }
  28. src_test() {
  29. local DIR=src/test/java
  30. local CP="${DIR}:${PN}.jar:$(java-pkg_getjars ${JAVA_GENTOO_CLASSPATH})"
  31. local TESTS=$(find ${DIR} -name "*Test.java" ! -name "ExportFileTypeTest.java")
  32. TESTS="${TESTS//src\/test\/java\/}"
  33. TESTS="${TESTS//.java}"
  34. TESTS="${TESTS//\//.}"
  35. ejavac -cp "${CP}" -d ${DIR} $(find ${DIR} -name "*.java")
  36. ejunit4 -classpath "${CP}" ${TESTS}
  37. }