diff options
author | Akinori Hattori <hattya@gentoo.org> | 2017-04-07 21:28:51 +0900 |
---|---|---|
committer | Akinori Hattori <hattya@gentoo.org> | 2017-04-07 21:28:51 +0900 |
commit | 2c2200f97c9774df23133d0c700246c4ec773f8a (patch) | |
tree | c6476b4190c153d0000173e31d2f6be03857a756 /app-text/hyperestraier | |
parent | app-text/hyperestraier: add perl USE flag (diff) | |
download | gentoo-2c2200f97c9774df23133d0c700246c4ec773f8a.tar.gz gentoo-2c2200f97c9774df23133d0c700246c4ec773f8a.tar.bz2 gentoo-2c2200f97c9774df23133d0c700246c4ec773f8a.zip |
app-text/hyperestraier: use ruby-ng eclass
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'app-text/hyperestraier')
-rw-r--r-- | app-text/hyperestraier/hyperestraier-1.4.13.ebuild | 138 |
1 files changed, 104 insertions, 34 deletions
diff --git a/app-text/hyperestraier/hyperestraier-1.4.13.ebuild b/app-text/hyperestraier/hyperestraier-1.4.13.ebuild index 8d57b0e5812d..a31998f22220 100644 --- a/app-text/hyperestraier/hyperestraier-1.4.13.ebuild +++ b/app-text/hyperestraier/hyperestraier-1.4.13.ebuild @@ -2,8 +2,10 @@ # Distributed under the terms of the GNU General Public License v2 EAPI="6" +USE_RUBY="ruby21 ruby22 ruby23 ruby24" +RUBY_OPTIONAL="yes" -inherit autotools java-pkg-opt-2 perl-functions +inherit autotools java-pkg-opt-2 perl-functions ruby-ng IUSE="bzip2 debug java lzo mecab perl ruby +zlib" @@ -21,11 +23,12 @@ RDEPEND="dev-db/qdbm lzo? ( dev-libs/lzo ) mecab? ( app-text/mecab ) perl? ( dev-lang/perl ) - ruby? ( dev-lang/ruby:= ) + ruby? ( $(ruby_implementations_depend) ) zlib? ( sys-libs/zlib )" DEPEND="${RDEPEND} virtual/pkgconfig java? ( >=virtual/jdk-1.4:* )" +S="${WORKDIR}/all/${P}" PATCHES=( "${FILESDIR}"/${PN}-configure.patch @@ -36,47 +39,89 @@ HTML_DOCS=( doc/. ) AT_NOELIBTOOLIZE="yes" +pkg_setup() { + java-pkg-opt-2_pkg_setup + use ruby && ruby-ng_pkg_setup +} + he_foreach_api() { local u d for u in java perl ruby; do if ! use "${u}"; then continue fi - for d in ${u}native ${u}pure; do - if [[ ! -d "${d}" ]]; then - continue - fi - einfo "${EBUILD_PHASE} ${d}" - cd "${d}" - case "${EBUILD_PHASE}" in - prepare) - mv configure.{in,ac} - eautoreconf - ;; - configure) - econf - ;; - compile) - emake - ;; - test) - if [[ "${d}" == "${u}native" ]]; then - emake check + if [[ "${u}" != "ruby" ]]; then + for d in ${u}native ${u}pure; do + if [[ ! -d "${d}" ]]; then + continue fi - ;; - install) - if [[ "${u}" != "java" ]]; then - emake DESTDIR="${D}" install - else - java-pkg_dojar *.jar + einfo "${EBUILD_PHASE} ${d}" + cd "${d}" + case "${EBUILD_PHASE}" in + prepare) + mv configure.{in,ac} + eautoreconf + ;; + configure) + econf + ;; + compile) + emake + ;; + test) if [[ "${d}" == "${u}native" ]]; then - dolib.so lib*.so* + emake check fi - fi - ;; - esac - cd - >/dev/null - done + ;; + 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 + else + PATCHES= ruby-ng_src_${EBUILD_PHASE} + fi + done +} + +he_foreach_ruby_api() { + local d + for d in rubynative rubypure; do + cd "${d}" + case "${EBUILD_PHASE}" in + prepare) + sed -i \ + -e "/RUBY=/cRUBY=\"${RUBY}\"" \ + -e "/=\`.*ruby/s|ruby|${RUBY}|" \ + configure.in + + mv configure.{in,ac} + eautoreconf + ;; + configure) + econf + ;; + compile) + emake + ;; + test) + if [[ "${d}" == "${u}native" ]]; then + emake check + fi + ;; + install) + emake DESTDIR="${D}" install + ;; + esac + cd - >/dev/null done } @@ -96,6 +141,15 @@ src_prepare() { he_foreach_api # prepare } +all_ruby_prepare() { + sed -i "/^RUNENV /s|\.\.|${WORKDIR}/all/${P}|" ruby*/Makefile.in + sed -i "s|\.\./\.\.|${WORKDIR}/all/${P}|" rubynative/src/extconf.rb +} + +each_ruby_prepare() { + he_foreach_ruby_api +} + src_configure() { econf \ $(use_enable bzip2 bzip) \ @@ -106,16 +160,28 @@ src_configure() { he_foreach_api } +each_ruby_configure() { + he_foreach_ruby_api +} + src_compile() { default he_foreach_api } +each_ruby_compile() { + he_foreach_ruby_api +} + src_test() { default he_foreach_api } +each_ruby_test() { + he_foreach_ruby_api +} + src_install() { emake DESTDIR="${D}" MYDOCS= install einstalldocs @@ -128,3 +194,7 @@ src_install() { rm -f "${D}"/usr/bin/*test } + +each_ruby_install() { + he_foreach_ruby_api +} |