jabref-2.10-r4.ebuild 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. JAVA_ANT_REWRITE_CLASSPATH="true"
  5. inherit eutils java-pkg-2 java-ant-2 java-utils-2
  6. MY_PV="${PV/_beta/b}"
  7. DESCRIPTION="Java GUI for managing BibTeX and other bibliographies"
  8. HOMEPAGE="http://jabref.sourceforge.net/"
  9. SRC_URI="mirror://sourceforge/${PN}/JabRef-${MY_PV}-src.tar.bz2"
  10. LICENSE="GPL-2"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
  13. IUSE="doc"
  14. COMMON_DEP="
  15. dev-java/antlr:0
  16. dev-java/antlr:3
  17. dev-java/fontbox:1.7
  18. dev-java/jempbox:1.7
  19. dev-java/log4j:0
  20. dev-java/spin:0
  21. dev-java/microba:0
  22. >=dev-java/glazedlists-1.8.0:0
  23. "
  24. DEPEND="
  25. >=virtual/jdk-1.6
  26. ${COMMON_DEP}"
  27. RDEPEND="
  28. >=virtual/jre-1.6
  29. ${COMMON_DEP}"
  30. S="${WORKDIR}/${PN}-${MY_PV}"
  31. java_prepare() {
  32. # Remove bundled dependencies.
  33. rm lib/antlr*.jar || die
  34. rm lib/fontbox*.jar || die
  35. rm lib/jempbox*.jar || die
  36. rm lib/spin.jar || die
  37. rm lib/microba.jar || die
  38. rm lib/glazedlists*.jar || die
  39. # Remove unjarlib target (do this only once we have removed all
  40. # bundled dependencies in lib).
  41. #sed -i -e 's:depends="build, unjarlib":depends="build":' build.xml
  42. # Fix license file copy operation for microba bundled lib.
  43. sed -i -e 's:^.*microba-license.*::' build.xml
  44. }
  45. src_compile() {
  46. local EXTERNAL_JARS="antlr,antlr-3,fontbox-1.7,jempbox-1.7,log4j,spin,microba,glazedlists"
  47. local CLASSPATH="$(java-pkg_getjars --with-dependencies ${EXTERNAL_JARS})"
  48. eant \
  49. -Dgentoo.classpath=${CLASSPATH} \
  50. jars \
  51. $(usex doc docs "")
  52. }
  53. src_install() {
  54. java-pkg_newjar build/lib/JabRef-${MY_PV}.jar
  55. use doc && java-pkg_dojavadoc build/docs/API
  56. dodoc src/txt/README
  57. java-pkg_dolauncher ${PN} --main net.sf.jabref.JabRef
  58. newicon src/images/JabRef-icon-48.png JabRef-icon.png
  59. make_desktop_entry ${PN} JabRef JabRef-icon Office
  60. }