freehep-graphicsio-emf-2.4.ebuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 eutils java-pkg-2 java-pkg-simple
  8. DESCRIPTION="High Energy Physics Java library - FreeHEP Enhanced Metafile Format Driver"
  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-graphics2d-${PV}:${SLOT}
  16. ~dev-java/freehep-graphicsbase-${PV}:${SLOT}
  17. ~dev-java/freehep-graphicsio-${PV}:${SLOT}
  18. dev-java/freehep-io:0"
  19. DEPEND="${CDEPEND}
  20. >=virtual/jdk-1.7
  21. test? (
  22. ~dev-java/freehep-graphicsio-tests-${PV}:${SLOT}
  23. dev-java/junit:4
  24. )"
  25. RDEPEND="${CDEPEND}
  26. >=virtual/jre-1.7"
  27. S="${WORKDIR}/${MY_PN}-${MY_P}/${PN}"
  28. JAVA_SRC_DIR="src/main/java"
  29. JAVA_GENTOO_CLASSPATH="freehep-graphics2d,freehep-graphicsbase,freehep-graphicsio,freehep-io"
  30. java_prepare() {
  31. epatch "${FILESDIR}"/github-30.patch
  32. }
  33. src_compile() {
  34. java-pkg-simple_src_compile
  35. java-pkg_addres ${PN}.jar src/main/resources
  36. }
  37. src_install() {
  38. java-pkg-simple_src_install
  39. java-pkg_register-optional-dependency freehep-graphicsio-svg
  40. java-pkg_dolauncher emf2svg --main org.freehep.graphicsio.emf.EMF2SVG
  41. }
  42. src_test() {
  43. local DIR=src/test/java
  44. local CP="${DIR}:${PN}.jar:$(java-pkg_getjars junit-4,freehep-graphicsio-tests,${JAVA_GENTOO_CLASSPATH})"
  45. ejavac -cp "${CP}" -d ${DIR} $(find ${DIR} -name "*.java")
  46. ejunit4 -classpath "${CP}" org.freehep.graphicsio.emf.test.EMFTestSuite
  47. }