jext-5.0-r2.ebuild 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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"
  5. inherit java-pkg-2 java-ant-2
  6. DESCRIPTION="A text editor written in Java"
  7. HOMEPAGE="https://sourceforge.net/projects/jext/"
  8. MY_PV="${PV/_}"
  9. SRC_URI="mirror://sourceforge/${PN}/${PN}-sources-${MY_PV}.tar.gz"
  10. LICENSE="|| ( GPL-2 JPython )"
  11. SLOT="0"
  12. KEYWORDS="amd64 x86"
  13. IUSE=""
  14. CDEPEND="dev-java/jython:2.7
  15. dev-java/jgoodies-looks:1.2
  16. dev-java/gnu-regexp:1"
  17. DEPEND=">=virtual/jdk-1.6
  18. ${CDEPEND}"
  19. RDEPEND=">=virtual/jre-1.6
  20. ${CDEPEND}"
  21. S="${WORKDIR}/${PN}-src-${MY_PV}"
  22. # Necessary otherwise it chokes on compiling with jdk-1.8
  23. # due to unmappable characters.
  24. JAVA_ANT_ENCODING="ISO-8859-1"
  25. java_prepare() {
  26. # bundles some com.microstar.xml who knows what's that
  27. # also com.jgoodies.uif_lite which is apparently some jgoodies-looks
  28. # example code which we don't package and there is probably no point
  29. rm -v "${S}"/extplugins/Admin/*.jar || die
  30. rm -rf src/lib/gnu || die
  31. # Fix "enum as a keyword" error.
  32. epatch "${FILESDIR}"/"${P}"-enum-as-keyword.patch
  33. }
  34. src_compile() {
  35. cd "${S}/src" || die
  36. eant jar $(use_doc javadocs) \
  37. -Dclasspath="$(java-pkg_getjars jython-2.7,jgoodies-looks-1.2,gnu-regexp-1)"
  38. }
  39. src_install () {
  40. java-pkg_newjar lib/${P}.jar
  41. java-pkg_dojar lib/dawn*.jar
  42. java-pkg_dolauncher ${PN} \
  43. --main org.jext.Jext \
  44. --java_args '-Dpython.path=$(java-config --classpath=jython-2.7)' \
  45. -pre "${FILESDIR}/${PN}-pre"
  46. if use doc; then
  47. java-pkg_dohtml -r docs/api
  48. fi
  49. }
  50. pkg_postinst() {
  51. elog "Plugins are currently not built/installed. Patches welcome."
  52. }