sat4j-pseudo-2.3.1.ebuild 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Copyright 1999-2011 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="2"
  4. MY_PN="org.sat4j.pb"
  5. MY_PV="20111030"
  6. BUILD_PV="2.4"
  7. JAVA_PKG_IUSE="doc source"
  8. inherit java-pkg-2 java-ant-2
  9. DESCRIPTION="Pseudo Boolean solvers"
  10. HOMEPAGE="http://www.sat4j.org/"
  11. SRC_URI="http://download.forge.objectweb.org/sat4j/sat4j-pb-v${MY_PV}.zip
  12. http://download.forge.objectweb.org/sat4j/build-${BUILD_PV}.xml -> ${P}-build.xml"
  13. LICENSE="LGPL-2.1"
  14. SLOT="2.3"
  15. KEYWORDS="~amd64 ~x86"
  16. IUSE=""
  17. CDEPEND="dev-java/sat4j-core:2.3"
  18. RDEPEND="${CDEPEND}
  19. >=virtual/jre-1.5"
  20. DEPEND="${CDEPEND}
  21. >=virtual/jdk-1.5"
  22. S="${WORKDIR}"
  23. src_unpack() {
  24. unpack sat4j-pb-v${MY_PV}.zip
  25. }
  26. java_prepare() {
  27. mkdir -p {core,pb}/{lib,src} || die
  28. # Don't complain about missing javadoc stylesheet.
  29. touch core/lib/stylesheet.css
  30. # Grab build.xml. Don't fetch from CVS. Don't build core.
  31. sed -e 's/depends="core"//g' \
  32. -e 's/depends="prepare,getsource"/depends="prepare"/g' \
  33. "${DISTDIR}/${P}-build.xml" > build.xml || die
  34. # This is the version identifier used for custom builds.
  35. echo 'CUSTOM' > core/src/sat4j.version || die
  36. # Unpack manifest.
  37. cd pb || die
  38. jar xf "${WORKDIR}/${MY_PN}.jar" META-INF || die
  39. # Unpack sources.
  40. cd src || die
  41. jar xf "${WORKDIR}/${MY_PN}-src.jar" || die
  42. }
  43. JAVA_ANT_REWRITE_CLASSPATH="yes"
  44. EANT_BUILD_TARGET="pseudo"
  45. EANT_GENTOO_CLASSPATH="sat4j-core-2.3"
  46. EANT_DOC_TARGET="javadoc -Dmodule=pb -Dlib=pb/lib"
  47. src_install() {
  48. java-pkg_dojar dist/CUSTOM/${MY_PN}.jar
  49. use doc && java-pkg_dojavadoc api/pb
  50. use source && java-pkg_dosrc pb/src/org
  51. }