hyperestraier-1.4.13.ebuild 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit java-pkg-opt-2 multilib
  4. IUSE="debug java mecab ruby"
  5. DESCRIPTION="a full-text search system for communities"
  6. HOMEPAGE="http://fallabs.com/hyperestraier/"
  7. SRC_URI="http://fallabs.com/hyperestraier/${P}.tar.gz"
  8. LICENSE="LGPL-2.1"
  9. KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
  10. SLOT="0"
  11. RDEPEND=">=dev-db/qdbm-1.8.75
  12. sys-libs/zlib
  13. java? ( >=virtual/jre-1.4 )
  14. mecab? ( app-text/mecab )
  15. ruby? ( dev-lang/ruby )"
  16. DEPEND="${RDEPEND}
  17. java? ( >=virtual/jdk-1.4 )"
  18. src_unpack() {
  19. unpack ${A}
  20. cd "${S}"
  21. # fix for insecure runpath warning.
  22. sed -i \
  23. -e "/^LDENV/d" \
  24. -e "/^CFLAGS/s/$/ ${CFLAGS}/" \
  25. Makefile.in \
  26. || die
  27. sed -i "/^JAVACFLAGS/s/$/ ${JAVACFLAGS}/" java*/Makefile.in || die
  28. }
  29. src_compile() {
  30. econf \
  31. $(use_enable debug) \
  32. $(use_enable mecab) \
  33. || die
  34. emake || die
  35. local u d
  36. for u in java ruby; do
  37. if ! use ${u}; then
  38. continue
  39. fi
  40. for d in ${u}native ${u}pure; do
  41. cd ${d}
  42. econf || die
  43. emake || die
  44. cd -
  45. done
  46. done
  47. }
  48. src_test() {
  49. emake -j1 check || die
  50. local u d
  51. for u in java ruby; do
  52. if ! use ${u}; then
  53. continue
  54. fi
  55. for d in ${u}native; do
  56. cd ${d}
  57. emake -j1 check || die
  58. cd -
  59. done
  60. done
  61. }
  62. src_install() {
  63. emake DESTDIR="${D}" MYDOCS= install || die
  64. dodoc ChangeLog README* THANKS
  65. dohtml doc/{*.html,*.png}
  66. local u d
  67. for u in java ruby; do
  68. if ! use ${u}; then
  69. continue
  70. fi
  71. for d in ${u}native ${u}pure; do
  72. cd ${d}
  73. emake DESTDIR="${D}" install || die
  74. cd -
  75. dohtml -r doc/${d}api
  76. done
  77. done
  78. if use java; then
  79. java-pkg_dojar "${D}"/usr/$(get_libdir)/*.jar
  80. rm -f "${D}"/usr/$(get_libdir)/*.jar
  81. fi
  82. rm -f "${D}"/usr/bin/*test
  83. }