-
-;; namazu site-lisp configuration
-
(add-to-list 'load-path "@SITELISP@")
(autoload 'namazu "namazu" nil t)
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI="5"
+EAPI="6"
-inherit autotools eutils elisp-common
+inherit autotools elisp-common ltprune
DESCRIPTION="Namazu is a full-text search engine"
HOMEPAGE="http://www.namazu.org/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~ppc ~ppc64 x86"
-IUSE="emacs nls tk l10n_ja"
+IUSE="emacs l10n_ja nls static-libs tk"
-RDEPEND=">=dev-perl/File-MMagic-1.20
+RDEPEND="dev-perl/File-MMagic
emacs? ( virtual/emacs )
l10n_ja? (
app-i18n/nkf
DEPEND="${RDEPEND}
nls? ( sys-devel/gettext )"
+PATCHES=(
+ "${FILESDIR}"/${PN}-gentoo.patch
+ "${FILESDIR}"/${P}-memmove.patch
+)
+
src_prepare() {
- epatch "${FILESDIR}"/${PN}-gentoo.patch
- epatch "${FILESDIR}"/${P}-memmove.patch
+ default
mv configure.{in,ac}
mv tk${PN}/configure.{in,ac}
src_configure() {
local myconf=(
$(use_enable nls)
- $(use_enable tk tknamazu)
- --docdir="${EPREFIX}"/usr/share/doc/${PF}
- --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
+ $(use_enable static-libs static)
+ $(use_enable tk tk${PN})
)
use tk && myconf+=(
- --with-namazu=/usr/bin/namazu
- --with-mknmz=/usr/bin/mknmz
- --with-indexdir=/var/lib/namazu/index
+ --with-${PN}="${EPREFIX}"/usr/bin/${PN}
+ --with-mknmz="${EPREFIX}"/usr/bin/mknmz
+ --with-indexdir="${EPREFIX}"/var/lib/${PN}/index
)
econf "${myconf[@]}"
if use emacs; then
cd lisp
- elisp-compile gnus-nmz-1.el namazu.el
+ rm -f browse*
+ elisp-compile *.el
fi
}
emake DESTDIR="${D}" install
if use emacs; then
- elisp-install ${PN} lisp/gnus-nmz-1.el* lisp/namazu.el*
+ elisp-install ${PN} lisp/*.el*
elisp-site-file-install "${FILESDIR}"/50${PN}-gentoo.el
docinto lisp
dodoc lisp/ChangeLog*
fi
+
+ prune_libtool_files
}
pkg_postinst() {
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI="5"
+EAPI="6"
-AUTOTOOLS_AUTORECONF="1"
-inherit autotools-utils eutils elisp-common
+inherit autotools elisp-common ltprune
DESCRIPTION="Namazu is a full-text search engine"
HOMEPAGE="http://www.namazu.org/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
-IUSE="emacs nls tk l10n_ja"
+IUSE="emacs l10n_ja nls static-libs tk"
-RDEPEND=">=dev-perl/File-MMagic-1.20
+RDEPEND="dev-perl/File-MMagic
emacs? ( virtual/emacs )
l10n_ja? (
app-i18n/nkf
PATCHES=( "${FILESDIR}"/${PN}-gentoo.patch )
+src_prepare() {
+ default
+
+ mv configure.{in,ac}
+ mv tk${PN}/configure.{in,ac}
+ eautoreconf
+}
+
src_configure() {
- local myeconfargs=(
+ local myconf=(
$(use_enable nls)
- $(use_enable tk tknamazu)
- --docdir="${EPREFIX}"/usr/share/doc/${PF}
- --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
+ $(use_enable static-libs static)
+ $(use_enable tk tk${PN})
)
-
- use tk && myeconfargs+=(
- --with-namazu=/usr/bin/namazu
- --with-mknmz=/usr/bin/mknmz
- --with-indexdir=/var/lib/namazu/index
+ use tk && myconf+=(
+ --with-${PN}="${EPREFIX}"/usr/bin/${PN}
+ --with-mknmz="${EPREFIX}"/usr/bin/mknmz
+ --with-indexdir="${EPREFIX}"/var/lib/${PN}/index
)
- autotools-utils_src_configure
+
+ econf "${myconf[@]}"
}
src_compile() {
- autotools-utils_src_compile
+ emake
if use emacs; then
cd lisp
- elisp-compile gnus-nmz-1.el namazu.el
+ rm -f browse*
+ elisp-compile *.el
fi
}
src_install () {
- autotools-utils_src_install
+ emake DESTDIR="${D}" install
if use emacs; then
- elisp-install ${PN} lisp/gnus-nmz-1.el* lisp/namazu.el*
+ elisp-install ${PN} lisp/*.el*
elisp-site-file-install "${FILESDIR}"/50${PN}-gentoo.el
docinto lisp
dodoc lisp/ChangeLog*
fi
+
+ prune_libtool_files
}
pkg_postinst() {