From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E8176139694 for ; Fri, 7 Apr 2017 12:29:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0C703E0B78; Fri, 7 Apr 2017 12:29:56 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CD8AAE0B78 for ; Fri, 7 Apr 2017 12:29:55 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2997234164B for ; Fri, 7 Apr 2017 12:29:54 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E14027419 for ; Fri, 7 Apr 2017 12:29:51 +0000 (UTC) From: "Akinori Hattori" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Akinori Hattori" Message-ID: <1491568131.2c2200f97c9774df23133d0c700246c4ec773f8a.hattya@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/hyperestraier/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-text/hyperestraier/hyperestraier-1.4.13.ebuild X-VCS-Directories: app-text/hyperestraier/ X-VCS-Committer: hattya X-VCS-Committer-Name: Akinori Hattori X-VCS-Revision: 2c2200f97c9774df23133d0c700246c4ec773f8a X-VCS-Branch: master Date: Fri, 7 Apr 2017 12:29:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 1da85b37-9bfa-4bc6-a715-84b5e1f56aec X-Archives-Hash: 20ae3cfd06f94ca67f0f5ea474799480 commit: 2c2200f97c9774df23133d0c700246c4ec773f8a Author: Akinori Hattori gentoo org> AuthorDate: Fri Apr 7 12:28:51 2017 +0000 Commit: Akinori Hattori gentoo org> CommitDate: Fri Apr 7 12:28:51 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c2200f9 app-text/hyperestraier: use ruby-ng eclass Package-Manager: Portage-2.3.3, Repoman-2.3.1 app-text/hyperestraier/hyperestraier-1.4.13.ebuild | 138 ++++++++++++++++----- 1 file 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 8d57b0e5812..a31998f2222 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 +}