junit-addons-1.4-r1.ebuild 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. JAVA_PKG_IUSE="doc source"
  5. inherit java-pkg-2 java-ant-2
  6. DESCRIPTION="JUnit-addons is a collection of helper classes for JUnit"
  7. HOMEPAGE="http://junit-addons.sourceforge.net/"
  8. SRC_URI="mirror://sourceforge/${PN}/${P}.zip"
  9. LICENSE="Apache-1.1"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~x86 ~x86-linux ~x86-macos"
  12. COMMON_DEP="
  13. dev-java/junit:0
  14. dev-java/ant-core:0
  15. dev-java/jdom:0
  16. dev-java/jaxen:1.1
  17. "
  18. RDEPEND=">=virtual/jre-1.4
  19. ${COMMON_DEP}"
  20. DEPEND=">=virtual/jdk-1.4
  21. app-arch/unzip
  22. ${COMMON_DEP}"
  23. java_prepare() {
  24. unpack ./src.jar
  25. rm -v *.jar || die
  26. # Not included so taken from cvs
  27. cp "${FILESDIR}/${PV}-build.xml" build.xml || die
  28. cp "${FILESDIR}/${PV}-common.properties" common.properties || die
  29. }
  30. _eant() {
  31. eant \
  32. -Djunit.jar="$(java-pkg_getjar junit junit.jar)" \
  33. -Dant.jar="$(java-pkg_getjar ant-core ant.jar)" \
  34. -Djdom.jar="$(java-pkg_getjar jdom jdom.jar)" \
  35. -Djaxen.jar="$(java-pkg_getjar jaxen-1.1 jaxen.jar)" \
  36. "${@}"
  37. }
  38. src_compile() {
  39. # javadocs are bundled
  40. _eant release
  41. }
  42. # Needs junit-addons-runner that again needs this package to build
  43. #src_test() {
  44. # cd src/test/
  45. # _eant -f AntTest.xml
  46. #}
  47. src_install() {
  48. java-pkg_newjar dist/${P}.jar
  49. dodoc README WHATSNEW || die
  50. use doc && java-pkg_dojavadoc api
  51. if use source; then
  52. insinto "${JAVA_PKG_SOURCESPATH}"
  53. newins dist/src.jar ${PN}-src.zip
  54. fi
  55. }