kawa-1.14.ebuild 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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="source"
  5. inherit eutils java-pkg-2
  6. DESCRIPTION="Kawa, the Java-based Scheme system & Language Framework"
  7. HOMEPAGE="https://www.gnu.org/software/kawa/"
  8. XQTS_Ver="1_0_3"
  9. SRC_URI="mirror://gnu/kawa/${P}.tar.gz
  10. xqtests? ( http://www.w3.org/XML/Query/test-suite/XQTS_${XQTS_Ver}.zip )"
  11. LICENSE="MIT public-domain
  12. jemacs? ( GPL-2 )
  13. krl? ( GPL-2 )"
  14. SLOT="0"
  15. KEYWORDS="~x86"
  16. IUSE="+awt echo2 +frontend jemacs krl +sax servlets +swing swt +xml xqtests"
  17. CDEPEND="( >=virtual/jdk-1.6 )
  18. frontend? ( sys-libs/readline:0 )
  19. sax? ( dev-java/sax:0 )
  20. echo2? ( dev-java/echo2 )
  21. swt? ( dev-java/swt:3.5 )
  22. servlets? ( java-virtuals/servlet-api:3.0 )"
  23. DEPEND="${CDEPEND}
  24. xqtests? ( app-arch/unzip:0 )"
  25. RDEPEND="${CDEPEND}"
  26. xtestsuite="XQTS_${XQTS_Ver}"
  27. src_unpack () {
  28. unpack kawa-${PV}.tar.gz || die
  29. if use xqtests; then
  30. mkdir "${WORKDIR}/${xtestsuite}" || die
  31. cd "${WORKDIR}/${xtestsuite}" || die
  32. unpack ${xtestsuite}.Zip || die
  33. fi
  34. }
  35. src_prepare() {
  36. epatch "${FILESDIR}"/${P}.patch
  37. }
  38. src_configure() {
  39. # speeds up one-shot ebuilds.
  40. myconf="--disable-dependency-tracking"
  41. if use jemacs && ! use swing; then
  42. echo
  43. einfo "Although the swing USE flag is disabled you chose to enable jemacs,"
  44. einfo "so swing is enabled anyway."
  45. echo
  46. myconf="${myconf} --with-swing"
  47. else
  48. myconf="${myconf} $(use_with swing)"
  49. fi
  50. if use xqtests; then
  51. myconf="${myconf} $(use_with xqtests XQTS=${WORKDIR}/${xtestsuite})"
  52. fi
  53. if use servlets; then
  54. myconf="${myconf} --with-servlet=$(java-pkg_getjar servletapi-2.4 servlet-api.jar)"
  55. fi
  56. if use swt; then
  57. myconf="${myconf} --with-swt=$(java-pkg_getjar swt-3.5 swt.jar)"
  58. fi
  59. econf ${myconf} $(use_enable frontend kawa-frontend) \
  60. $(use_enable xml) \
  61. $(use_enable krl brl) \
  62. $(use_enable echo2) \
  63. $(use_enable jemacs) \
  64. $(use_with awt) \
  65. $(use_with sax sax2) \
  66. --with-java-source=$(java-pkg_get-source) || die "econf failed."
  67. }
  68. src_compile() {
  69. emake -j1 || die "emake failed."
  70. }
  71. src_install () {
  72. emake -j1 DESTDIR="${D}" install || die "emake install failed"
  73. rm -rv "${D}"/usr/share/java/ || die "rm -rv failed"
  74. java-pkg_newjar kawa-${PV}.jar || die
  75. java-pkg_dolauncher "kawa" --main kawa.repl || die "dolauncher failed"
  76. java-pkg_dolauncher "qexo" --main kawa.repl --pkg_args \
  77. "--xquery" || die "dolauncher qexo failed"
  78. if use servlets; then
  79. java-pkg_dolauncher "kawa-cgi-servlet" --main \
  80. gnu.kawa.servlet.CGIServletWrapper || die
  81. fi
  82. if use jemacs; then
  83. java-pkg_dolauncher "jemacs" --main \
  84. gnu.jemacs.lang.ELisp || die
  85. fi
  86. use source && java-pkg_dosrc kawa/* gnu/*
  87. dodoc ChangeLog TODO README NEWS || die
  88. doinfo doc/kawa.info* || die
  89. cp doc/kawa.man doc/kawa.2 || die
  90. cp doc/qexo.man doc/qexo.2 || die
  91. doman doc/*.2 || die
  92. }