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 0AF15139083 for ; Thu, 30 Mar 2017 14:59:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 22B5921C131; Thu, 30 Mar 2017 14:59:13 +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 DB38B21C131 for ; Thu, 30 Mar 2017 14:59:12 +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 8E7FE34162B for ; Thu, 30 Mar 2017 14:59:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0867B71DC for ; Thu, 30 Mar 2017 14:59:10 +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: <1490885932.50cd6264c08587ebd7fa54a0dc9605dbdd9e35d4.hattya@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/qdbm/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-db/qdbm/qdbm-1.8.78-r1.ebuild X-VCS-Directories: dev-db/qdbm/ X-VCS-Committer: hattya X-VCS-Committer-Name: Akinori Hattori X-VCS-Revision: 50cd6264c08587ebd7fa54a0dc9605dbdd9e35d4 X-VCS-Branch: master Date: Thu, 30 Mar 2017 14:59:10 +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: 109b3c95-1319-4e92-b168-422db271acef X-Archives-Hash: 4351c00dfd93dfeabe61541a9eb346aa commit: 50cd6264c08587ebd7fa54a0dc9605dbdd9e35d4 Author: Akinori Hattori gentoo org> AuthorDate: Thu Mar 30 14:58:52 2017 +0000 Commit: Akinori Hattori gentoo org> CommitDate: Thu Mar 30 14:58:52 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50cd6264 dev-db/qdbm: use ruby-ng eclass Package-Manager: Portage-2.3.3, Repoman-2.3.1 dev-db/qdbm/qdbm-1.8.78-r1.ebuild | 96 +++++++++++++++++++++++++++++---------- 1 file changed, 71 insertions(+), 25 deletions(-) diff --git a/dev-db/qdbm/qdbm-1.8.78-r1.ebuild b/dev-db/qdbm/qdbm-1.8.78-r1.ebuild index cbde7564d40..fcb210018c4 100644 --- a/dev-db/qdbm/qdbm-1.8.78-r1.ebuild +++ b/dev-db/qdbm/qdbm-1.8.78-r1.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 DESCRIPTION="Quick Database Manager" HOMEPAGE="http://fallabs.com/qdbm/" @@ -18,10 +20,12 @@ RDEPEND="bzip2? ( app-arch/bzip2 ) java? ( >=virtual/jre-1.4:* ) lzo? ( dev-libs/lzo ) perl? ( dev-lang/perl ) - ruby? ( dev-lang/ruby:= ) + ruby? ( $(ruby_implementations_depend) ) zlib? ( sys-libs/zlib )" DEPEND="${RDEPEND} java? ( >=virtual/jdk-1.4:* )" +S="${WORKDIR}/all/${P}" +RUBY_S="${P}/ruby" PATCHES=( "${FILESDIR}"/${PN}-configure.patch @@ -33,6 +37,11 @@ HTML_DOCS=( doc/. ) AT_NOELIBTOOLIZE="yes" +pkg_setup() { + java-pkg-opt-2_pkg_setup + use ruby && ruby-ng_pkg_setup +} + qdbm_foreach_api() { local u for u in cxx java perl ruby; do @@ -43,32 +52,36 @@ qdbm_foreach_api() { if [[ "${u}" == "cxx" ]]; then u="plus" fi - cd "${u}" - case "${EBUILD_PHASE}" in - prepare) - mv configure.{in,ac} - eautoreconf - ;; - configure) - case "${u}" in - cgi|java|plus) - econf $(use_enable debug) + if [[ "${u}" != "ruby" ]]; then + cd "${u}" + case "${EBUILD_PHASE}" in + prepare) + mv configure.{in,ac} + eautoreconf + ;; + configure) + case "${u}" in + cgi|java|plus) + econf $(use_enable debug) + ;; + *) + econf + ;; + esac ;; - *) - econf + compile) + emake ;; + test) + emake check + ;; + install) + emake DESTDIR="${D}" MYDATADIR=/usr/share/doc/${P}/html install esac - ;; - compile) - emake - ;; - test) - emake check - ;; - install) - emake DESTDIR="${D}" MYDATADIR=/usr/share/doc/${P}/html install - esac - cd - >/dev/null + cd - >/dev/null + else + PATCHES= ruby-ng_src_${EBUILD_PHASE} + fi done } @@ -91,6 +104,16 @@ src_prepare() { qdbm_foreach_api } +each_ruby_prepare() { + sed -i \ + -e "s|ruby |${RUBY} |" \ + -e "s|\.\./\.\.|${WORKDIR}/all/${P}|" \ + {Makefile,configure}.in {curia,depot,villa}/extconf.rb + + mv configure.{in,ac} + eautoreconf +} + src_configure() { econf \ $(use_enable bzip2 bzip) \ @@ -102,16 +125,28 @@ src_configure() { qdbm_foreach_api } +each_ruby_configure() { + econf +} + src_compile() { default qdbm_foreach_api } +each_ruby_compile() { + emake +} + src_test() { default qdbm_foreach_api } +each_ruby_test() { + emake check +} + src_install() { default qdbm_foreach_api @@ -130,3 +165,14 @@ src_install() { rm -f "${ED}"/usr/bin/*test rm -f "${ED}"/usr/share/man/man1/*test.1* } + +each_ruby_install() { + local m + for m in curia depot villa; do + emake -C "${m}" DESTDIR="${D}" install + done +} + +all_ruby_install() { + dodoc -r rb*.html rbapidoc +}