ant-ivy-1.4.1-r1.ebuild 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. JAVA_PKG_IUSE="doc examples source test"
  5. # Registers as split-ant task.
  6. WANT_SPLIT_ANT="true"
  7. # Rewrites examples otherwise... bad.
  8. JAVA_PKG_BSFIX_ALL="no"
  9. inherit java-pkg-2 java-ant-2 eutils
  10. MY_PN="${PN##*-}"
  11. MY_P="${MY_PN}-${PV}"
  12. DESCRIPTION="Ivy is a free java based dependency manager"
  13. HOMEPAGE="http://ant.apache.org/ivy"
  14. SRC_URI="http://www.jaya.free.fr/downloads/ivy/${PV}/${MY_P}-src.zip"
  15. LICENSE="Apache-2.0"
  16. SLOT="0"
  17. KEYWORDS="~amd64 ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
  18. COMMON_DEP="
  19. dev-java/ant-core:0
  20. dev-java/commons-cli:1
  21. dev-java/commons-httpclient:3
  22. dev-java/commons-vfs:0
  23. dev-java/jakarta-oro:2.0
  24. dev-java/jsch:0"
  25. DEPEND="
  26. >=virtual/jdk-1.4
  27. app-arch/unzip
  28. test? ( dev-java/ant-junit:0 )
  29. ${COMMON_DEP}"
  30. RDEPEND=">=virtual/jre-1.4
  31. ${COMMON_DEP}"
  32. S="${WORKDIR}/${MY_P}"
  33. java_prepare() {
  34. epatch "${FILESDIR}/1.4.1-javadoc.patch"
  35. # init-ivy expects existing ivy.jar, but we don't need actually it
  36. sed -i -e 's/depends="init-ivy, prepare"/depends="prepare"/' build.xml \
  37. || die
  38. rm -v src/java/fr/jayasoft/ivy/repository/vfs/IvyWebdav* || die
  39. java-ant_rewrite-classpath
  40. mkdir lib
  41. }
  42. EANT_GENTOO_CLASSPATH="
  43. ant-core,commons-cli-1,commons-httpclient-3
  44. commons-vfs,jakarta-oro-2.0,jsch"
  45. EANT_BUILD_TARGET="offline jar"
  46. src_test() {
  47. # TODO: find out why a couple of these fail
  48. java-pkg_jar-from --into lib junit
  49. ANT_TASKS="ant-junit" eant offline test
  50. }
  51. src_install() {
  52. java-pkg_dojar build/artifact/${MY_PN}.jar
  53. use doc && java-pkg_dojavadoc doc/ivy/api
  54. use examples && java-pkg_doexamples src/example
  55. use source && java-pkg_dosrc src/java/*
  56. java-pkg_register-ant-task
  57. }