Gentoo Archives: gentoo-commits

From: Akinori Hattori <hattya@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/qdbm/
Date: Thu, 30 Mar 2017 14:59:14
Message-Id: 1490885932.50cd6264c08587ebd7fa54a0dc9605dbdd9e35d4.hattya@gentoo
1 commit: 50cd6264c08587ebd7fa54a0dc9605dbdd9e35d4
2 Author: Akinori Hattori <hattya <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 30 14:58:52 2017 +0000
4 Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 30 14:58:52 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50cd6264
7
8 dev-db/qdbm: use ruby-ng eclass
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 dev-db/qdbm/qdbm-1.8.78-r1.ebuild | 96 +++++++++++++++++++++++++++++----------
13 1 file changed, 71 insertions(+), 25 deletions(-)
14
15 diff --git a/dev-db/qdbm/qdbm-1.8.78-r1.ebuild b/dev-db/qdbm/qdbm-1.8.78-r1.ebuild
16 index cbde7564d40..fcb210018c4 100644
17 --- a/dev-db/qdbm/qdbm-1.8.78-r1.ebuild
18 +++ b/dev-db/qdbm/qdbm-1.8.78-r1.ebuild
19 @@ -2,8 +2,10 @@
20 # Distributed under the terms of the GNU General Public License v2
21
22 EAPI="6"
23 +USE_RUBY="ruby21 ruby22 ruby23 ruby24"
24 +RUBY_OPTIONAL="yes"
25
26 -inherit autotools java-pkg-opt-2 perl-functions
27 +inherit autotools java-pkg-opt-2 perl-functions ruby-ng
28
29 DESCRIPTION="Quick Database Manager"
30 HOMEPAGE="http://fallabs.com/qdbm/"
31 @@ -18,10 +20,12 @@ RDEPEND="bzip2? ( app-arch/bzip2 )
32 java? ( >=virtual/jre-1.4:* )
33 lzo? ( dev-libs/lzo )
34 perl? ( dev-lang/perl )
35 - ruby? ( dev-lang/ruby:= )
36 + ruby? ( $(ruby_implementations_depend) )
37 zlib? ( sys-libs/zlib )"
38 DEPEND="${RDEPEND}
39 java? ( >=virtual/jdk-1.4:* )"
40 +S="${WORKDIR}/all/${P}"
41 +RUBY_S="${P}/ruby"
42
43 PATCHES=(
44 "${FILESDIR}"/${PN}-configure.patch
45 @@ -33,6 +37,11 @@ HTML_DOCS=( doc/. )
46
47 AT_NOELIBTOOLIZE="yes"
48
49 +pkg_setup() {
50 + java-pkg-opt-2_pkg_setup
51 + use ruby && ruby-ng_pkg_setup
52 +}
53 +
54 qdbm_foreach_api() {
55 local u
56 for u in cxx java perl ruby; do
57 @@ -43,32 +52,36 @@ qdbm_foreach_api() {
58 if [[ "${u}" == "cxx" ]]; then
59 u="plus"
60 fi
61 - cd "${u}"
62 - case "${EBUILD_PHASE}" in
63 - prepare)
64 - mv configure.{in,ac}
65 - eautoreconf
66 - ;;
67 - configure)
68 - case "${u}" in
69 - cgi|java|plus)
70 - econf $(use_enable debug)
71 + if [[ "${u}" != "ruby" ]]; then
72 + cd "${u}"
73 + case "${EBUILD_PHASE}" in
74 + prepare)
75 + mv configure.{in,ac}
76 + eautoreconf
77 + ;;
78 + configure)
79 + case "${u}" in
80 + cgi|java|plus)
81 + econf $(use_enable debug)
82 + ;;
83 + *)
84 + econf
85 + ;;
86 + esac
87 ;;
88 - *)
89 - econf
90 + compile)
91 + emake
92 ;;
93 + test)
94 + emake check
95 + ;;
96 + install)
97 + emake DESTDIR="${D}" MYDATADIR=/usr/share/doc/${P}/html install
98 esac
99 - ;;
100 - compile)
101 - emake
102 - ;;
103 - test)
104 - emake check
105 - ;;
106 - install)
107 - emake DESTDIR="${D}" MYDATADIR=/usr/share/doc/${P}/html install
108 - esac
109 - cd - >/dev/null
110 + cd - >/dev/null
111 + else
112 + PATCHES= ruby-ng_src_${EBUILD_PHASE}
113 + fi
114 done
115 }
116
117 @@ -91,6 +104,16 @@ src_prepare() {
118 qdbm_foreach_api
119 }
120
121 +each_ruby_prepare() {
122 + sed -i \
123 + -e "s|ruby |${RUBY} |" \
124 + -e "s|\.\./\.\.|${WORKDIR}/all/${P}|" \
125 + {Makefile,configure}.in {curia,depot,villa}/extconf.rb
126 +
127 + mv configure.{in,ac}
128 + eautoreconf
129 +}
130 +
131 src_configure() {
132 econf \
133 $(use_enable bzip2 bzip) \
134 @@ -102,16 +125,28 @@ src_configure() {
135 qdbm_foreach_api
136 }
137
138 +each_ruby_configure() {
139 + econf
140 +}
141 +
142 src_compile() {
143 default
144 qdbm_foreach_api
145 }
146
147 +each_ruby_compile() {
148 + emake
149 +}
150 +
151 src_test() {
152 default
153 qdbm_foreach_api
154 }
155
156 +each_ruby_test() {
157 + emake check
158 +}
159 +
160 src_install() {
161 default
162 qdbm_foreach_api
163 @@ -130,3 +165,14 @@ src_install() {
164 rm -f "${ED}"/usr/bin/*test
165 rm -f "${ED}"/usr/share/man/man1/*test.1*
166 }
167 +
168 +each_ruby_install() {
169 + local m
170 + for m in curia depot villa; do
171 + emake -C "${m}" DESTDIR="${D}" install
172 + done
173 +}
174 +
175 +all_ruby_install() {
176 + dodoc -r rb*.html rbapidoc
177 +}