diff options
author | Akinori Hattori <hattya@gentoo.org> | 2017-03-30 23:58:52 +0900 |
---|---|---|
committer | Akinori Hattori <hattya@gentoo.org> | 2017-03-30 23:58:52 +0900 |
commit | 50cd6264c08587ebd7fa54a0dc9605dbdd9e35d4 (patch) | |
tree | 8cd3903a9f3f9fd50070dc1b1843b7aaa0b94d98 /dev-db/qdbm | |
parent | dev-db/tokumx: Reinstate 1.5.0 (with Boost 57 build fixes & automatic PaX mar... (diff) | |
download | gentoo-50cd6264c08587ebd7fa54a0dc9605dbdd9e35d4.tar.gz gentoo-50cd6264c08587ebd7fa54a0dc9605dbdd9e35d4.tar.bz2 gentoo-50cd6264c08587ebd7fa54a0dc9605dbdd9e35d4.zip |
dev-db/qdbm: use ruby-ng eclass
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'dev-db/qdbm')
-rw-r--r-- | dev-db/qdbm/qdbm-1.8.78-r1.ebuild | 96 |
1 files 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 cbde7564d40f..fcb210018c4c 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 +} |