namazu-2.0.22_p1.ebuild 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit autotools-utils eutils elisp-common
  5. DESCRIPTION="Namazu is a full-text search engine"
  6. HOMEPAGE="http://www.namazu.org/"
  7. SRC_URI="http://www.namazu.org/test/${P/_p/pre}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS=""
  11. IUSE="emacs nls tk l10n_ja"
  12. RDEPEND=">=dev-perl/File-MMagic-1.20
  13. emacs? ( virtual/emacs )
  14. l10n_ja? (
  15. app-i18n/nkf
  16. || (
  17. dev-perl/Text-Kakasi
  18. app-i18n/kakasi
  19. app-text/chasen
  20. app-text/mecab
  21. )
  22. )
  23. nls? ( virtual/libintl )
  24. tk? (
  25. dev-lang/tk:0
  26. www-client/lynx
  27. )"
  28. DEPEND="${RDEPEND}
  29. nls? ( sys-devel/gettext )"
  30. S="${WORKDIR}"/${P/_p/pre}
  31. PATCHES=(
  32. "${FILESDIR}/${PN}-2.0.19-gentoo.patch"
  33. )
  34. DOCS=(AUTHORS CREDITS NEWS THANKS TODO)
  35. src_configure() {
  36. local myeconfargs=(
  37. $(use_enable nls)
  38. $(use_enable tk tknamazu)
  39. )
  40. use tk && myeconfargs+=(
  41. --with-namazu=/usr/bin/namazu
  42. --with-mknmz=/usr/bin/mknmz
  43. --with-indexdir=/var/lib/namazu/index
  44. )
  45. autotools-utils_src_configure
  46. }
  47. src_compile() {
  48. autotools-utils_src_compile
  49. if use emacs; then
  50. cd lisp
  51. elisp-compile gnus-nmz-1.el namazu.el
  52. fi
  53. }
  54. src_install () {
  55. autotools-utils_src_install
  56. dodoc ChangeLog* HACKING* README* etc/*.png
  57. dohtml -r doc/*
  58. rm -r "${ED}"/usr/share/namazu/doc || die
  59. if use emacs; then
  60. elisp-install ${PN} lisp/gnus-nmz-1.el* lisp/namazu.el*
  61. elisp-site-file-install "${FILESDIR}"/50${PN}-gentoo.el
  62. docinto lisp
  63. dodoc lisp/ChangeLog*
  64. fi
  65. }
  66. pkg_postinst() {
  67. use emacs && elisp-site-regen
  68. }
  69. pkg_postrm() {
  70. use emacs && elisp-site-regen
  71. }