Skip to content

Commit

Permalink
app-text/hyperestraier: update to EAPI 6
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.3, Repoman-2.3.1
  • Loading branch information
hattya committed Apr 7, 2017
1 parent 07b8f5a commit b03e5c7
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 88 deletions.
148 changes: 71 additions & 77 deletions app-text/hyperestraier/hyperestraier-1.4.13.ebuild
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Copyright 1999-2014 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

inherit java-pkg-opt-2 multilib
EAPI="6"

IUSE="debug java mecab ruby"
inherit java-pkg-opt-2

IUSE="bzip2 debug java lzo mecab ruby +zlib"

DESCRIPTION="a full-text search system for communities"
HOMEPAGE="http://fallabs.com/hyperestraier/"
Expand All @@ -13,100 +15,92 @@ LICENSE="LGPL-2.1"
KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
SLOT="0"

RDEPEND=">=dev-db/qdbm-1.8.75
sys-libs/zlib
java? ( >=virtual/jre-1.4 )
RDEPEND="dev-db/qdbm
bzip2? ( app-arch/bzip2 )
java? ( >=virtual/jre-1.4:* )
lzo? ( dev-libs/lzo )
mecab? ( app-text/mecab )
ruby? ( dev-lang/ruby )"
ruby? ( dev-lang/ruby:= )
zlib? ( sys-libs/zlib )"
DEPEND="${RDEPEND}
java? ( >=virtual/jdk-1.4 )"

src_unpack() {

unpack ${A}
cd "${S}"

# fix for insecure runpath warning.
sed -i \
-e "/^LDENV/d" \
-e "/^CFLAGS/s/$/ ${CFLAGS}/" \
Makefile.in \
|| die
sed -i "/^JAVACFLAGS/s/$/ ${JAVACFLAGS}/" java*/Makefile.in || die

}

src_compile() {
virtual/pkgconfig
java? ( >=virtual/jdk-1.4:* )"

econf \
$(use_enable debug) \
$(use_enable mecab) \
|| die
emake || die
HTML_DOCS=( doc/. )

he_foreach_api() {
local u d

for u in java ruby; do
if ! use ${u}; then
if ! use "${u}"; then
continue
fi

for d in ${u}native ${u}pure; do
cd ${d}
econf || die
emake || die
cd -
einfo "${EBUILD_PHASE} ${d}"
cd "${d}"
case "${EBUILD_PHASE}" in
configure)
econf
;;
compile)
emake
;;
test)
if [[ "${d}" == "${u}native" ]]; then
emake check
fi
;;
install)
if [[ "${u}" != "java" ]]; then
emake DESTDIR="${D}" install
else
java-pkg_dojar *.jar
if [[ "${d}" == "${u}native" ]]; then
dolib.so lib*.so*
fi
fi
;;
esac
cd - >/dev/null
done
done

}

src_test() {

emake -j1 check || die
src_prepare() {
default
java-pkg-opt-2_src_prepare

local u d
sed -i \
-e "/^CFLAGS/s|$| ${CFLAGS}|" \
-e "/^JAVACFLAGS/s|$| ${JAVACFLAGS}|" \
-e '/^LDENV/d' \
-e 's/make\( \|$\)/$(MAKE)\1/g' \
Makefile.in {java,ruby}*/Makefile.in
}

for u in java ruby; do
if ! use ${u}; then
continue
fi
src_configure() {
econf \
$(use_enable bzip2 bzip) \
$(use_enable debug) \
$(use_enable lzo) \
$(use_enable mecab) \
$(use_enable zlib)
he_foreach_api
}

for d in ${u}native; do
cd ${d}
emake -j1 check || die
cd -
done
done
src_compile() {
default
he_foreach_api
}

src_test() {
default
he_foreach_api
}

src_install() {

emake DESTDIR="${D}" MYDOCS= install || die
dodoc ChangeLog README* THANKS
dohtml doc/{*.html,*.png}

local u d

for u in java ruby; do
if ! use ${u}; then
continue
fi

for d in ${u}native ${u}pure; do
cd ${d}
emake DESTDIR="${D}" install || die
cd -
dohtml -r doc/${d}api
done
done

if use java; then
java-pkg_dojar "${D}"/usr/$(get_libdir)/*.jar
rm -f "${D}"/usr/$(get_libdir)/*.jar
fi
emake DESTDIR="${D}" MYDOCS= install
einstalldocs
he_foreach_api

rm -f "${D}"/usr/bin/*test

}
21 changes: 10 additions & 11 deletions app-text/hyperestraier/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>[email protected]</email>
</maintainer>
<maintainer type="project">
<email>[email protected]</email>
<name>Cjk</name>
</maintainer>
<use>
<flag name="mecab">Enable <pkg>app-text/mecab</pkg> support
for Estraier</flag>
</use>
<maintainer type="person">
<email>[email protected]</email>
</maintainer>
<maintainer type="project">
<email>[email protected]</email>
<name>Cjk</name>
</maintainer>
<use>
<flag name="mecab">Enable <pkg>app-text/mecab</pkg> support for Estraier</flag>
</use>
</pkgmetadata>

0 comments on commit b03e5c7

Please sign in to comment.