Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/xapian-bindings/
Date: Fri, 15 Mar 2019 13:39:20
Message-Id: 1552657127.6c0f1302f3927c26a7a24670878201032cd339e4.blueness@gentoo
1 commit: 6c0f1302f3927c26a7a24670878201032cd339e4
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 15 13:38:47 2019 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 15 13:38:47 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c0f1302
7
8 dev-libs/xapian-bindings: version bump to 1.4.11
9
10 Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
11 Package-Manager: Portage-2.3.51, Repoman-2.3.11
12
13 dev-libs/xapian-bindings/Manifest | 1 +
14 .../xapian-bindings/xapian-bindings-1.4.11.ebuild | 306 +++++++++++++++++++++
15 2 files changed, 307 insertions(+)
16
17 diff --git a/dev-libs/xapian-bindings/Manifest b/dev-libs/xapian-bindings/Manifest
18 index f5714a8bac5..153a3e81420 100644
19 --- a/dev-libs/xapian-bindings/Manifest
20 +++ b/dev-libs/xapian-bindings/Manifest
21 @@ -1,5 +1,6 @@
22 DIST xapian-bindings-1.2.25.tar.xz 1711860 BLAKE2B 66367dbc503333c4f59da8bb5bd4885fe9678aace45365573bac8e0e8e2c712795af2021ff52de9eeabb91f65a2f0447d1963424b1ae6558be95b737d1279e98 SHA512 5d27b2ae2722409ea99a1b9e6bf3f5c61ed9195b67121c090f1533340d3b11c546014985d0989a0725b60a07b392b9705bce054495f423bd3a7c99835aa336c7
23 DIST xapian-bindings-1.4.10.tar.xz 1125168 BLAKE2B cb864021362098243993560724a66964532cd4ff47ce7a746876f1102113d136676b0feb70fa6515a9c9b31627e5363c76f4d65d9928b21822f05fe41b92401c SHA512 e993c33820f7606e17ee6ff5a13bdcb91beceec6a8443298ff06a3160052e96caff3aca30908c68a8a695429ec51189a86404b69c5525e5770741637cc63bbc1
24 +DIST xapian-bindings-1.4.11.tar.xz 1125716 BLAKE2B 0fd4204b4d18c04e017385f5eb116df68daa2f76f528f2b1770e61e5ab5062498aed6ccb57f51ac26ced58912d41c5f5a6f076e0f721a7eb1c3f83e01f2b9523 SHA512 326b08b9959143b92e6c10bd9b6b107ce2779e6ef1a3b5570abd07802a5988dd7df4e890d820f7da355f9f9e64df9a3ae08a0664d70d10ba6f876fca3dc44ecd
25 DIST xapian-bindings-1.4.5.tar.xz 1118884 BLAKE2B 507b06f0121e5a56224250bfe7b19795eb9fd2fba977d12022d054e7b832fd70af70085ad576dab41efcde261f9ecd48179646f1ea67aaa266fb6272358eb69a SHA512 e39ece495e25077990db3d06554306567c52c6f45ad55a65005cb97e18086ee18947e41d0d612157b891b61e015881385bcb082a03aa0c6452565e90d09e8275
26 DIST xapian-bindings-1.4.7.tar.xz 1121700 BLAKE2B f8492113b76aba322c975aa2b957a627a32e5209d8b79f435dc85c899cf14619af6165265e624e2ba8806f3c91dd35d71d98c4a47f5d6f4fba1b7fb83700c0d0 SHA512 c904cd3abf19d68495b0487ea77265fdc92a3cd8b1c2437b89034efd349ce41198bbc4abca49f259f71a1ba0fd269b2cf9b6dd4c1607678a73cbed4de9c5a1d5
27 DIST xapian-bindings-1.4.8.tar.xz 1123812 BLAKE2B 5aa496ff3cfe06a40fa8db6a04cdc9041f4a0d9f12c7a61565f10c7d360490a7c8a7c745d91c9eda45b9d9bc58bd6a2bbae02aa9dd7ff1949ac59f7e09b090df SHA512 f979c32b096ecdc7a71b2bd032c6d0e7131f3d304e47e44005989ca79ea1f940c39626c60a8e52ff3cdb2cb380aa5ddf82a99bae08e06629c0bd47d8e0bfa7cc
28
29 diff --git a/dev-libs/xapian-bindings/xapian-bindings-1.4.11.ebuild b/dev-libs/xapian-bindings/xapian-bindings-1.4.11.ebuild
30 new file mode 100644
31 index 00000000000..2420ca3c9f5
32 --- /dev/null
33 +++ b/dev-libs/xapian-bindings/xapian-bindings-1.4.11.ebuild
34 @@ -0,0 +1,306 @@
35 +# Copyright 1999-2019 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI="6"
39 +
40 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
41 +PYTHON_REQ_USE="threads(+)"
42 +
43 +USE_PHP="php7-1 php7-2 php7-3"
44 +
45 +PHP_EXT_NAME="xapian"
46 +PHP_EXT_INI="yes"
47 +PHP_EXT_OPTIONAL_USE="php"
48 +
49 +USE_RUBY="ruby22 ruby23 ruby24"
50 +RUBY_OPTIONAL="yes"
51 +
52 +inherit java-pkg-opt-2 mono-env multibuild php-ext-source-r3 python-r1 ruby-ng toolchain-funcs
53 +
54 +DESCRIPTION="SWIG and JNI bindings for Xapian"
55 +HOMEPAGE="http://www.xapian.org/"
56 +SRC_URI="http://oligarchy.co.uk/xapian/${PV}/${P}.tar.xz"
57 +
58 +LICENSE="GPL-2"
59 +SLOT="0"
60 +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
61 +IUSE="java lua mono perl php python ruby tcl"
62 +REQUIRED_USE="|| ( java lua mono perl php python ruby tcl )
63 + python? ( ${PYTHON_REQUIRED_USE} )
64 + ruby? ( || ( $(ruby_get_use_targets) ) )"
65 +
66 +COMMONDEPEND=">=dev-libs/xapian-1.4.9:0/30
67 + lua? ( dev-lang/lua:= )
68 + perl? ( dev-lang/perl:= )
69 + php? ( dev-lang/php:=[-threads] )
70 + python? (
71 + dev-python/sphinx[${PYTHON_USEDEP}]
72 + ${PYTHON_DEPS}
73 + )
74 + ruby? ( $(ruby_implementations_depend) )
75 + tcl? ( dev-lang/tcl:= )
76 + mono? ( dev-lang/mono )"
77 +DEPEND="${COMMONDEPEND}
78 + virtual/pkgconfig
79 + java? ( >=virtual/jdk-1.6 )"
80 +RDEPEND="${COMMONDEPEND}
81 + java? ( >=virtual/jre-1.6 )"
82 +
83 +S="${WORKDIR}/${P}"
84 +
85 +has_basic_bindings() {
86 + # Update this list if new bindings are added that are not built
87 + # multiple times for multiple versions like php, python and ruby are
88 + return $(use mono || use java || use lua || use perl || use tcl)
89 +}
90 +
91 +php_copy_sources() {
92 + local MULTIBUILD_VARIANTS=($(php_get_slots))
93 + multibuild_copy_sources
94 +}
95 +
96 +php_foreach_impl() {
97 + local MULTIBUILD_VARIANTS=($(php_get_slots))
98 + multibuild_foreach_variant "$@"
99 +}
100 +
101 +ruby_copy_sources() {
102 + local MULTIBUILD_VARIANTS=($(ruby_get_use_implementations))
103 + multibuild_copy_sources
104 +}
105 +
106 +ruby_foreach_impl() {
107 + local MULTIBUILD_VARIANTS=($(ruby_get_use_implementations))
108 + multibuild_foreach_variant "$@"
109 +}
110 +
111 +pkg_setup() {
112 + use mono && mono-env_pkg_setup
113 + use java && java-pkg-opt-2_pkg_setup
114 +}
115 +
116 +src_unpack() {
117 + default
118 +
119 + if use php; then
120 + local php_slot
121 + for php_slot in $(php_get_slots); do
122 + # Unfortunately required for php-ext-source-r3_createinifiles().
123 + mkdir "${WORKDIR}/${php_slot}"
124 + done
125 + fi
126 +}
127 +
128 +src_prepare() {
129 + use java && java-pkg-opt-2_src_prepare
130 +
131 + # http://trac.xapian.org/ticket/702
132 + export XAPIAN_CONFIG="/usr/bin/xapian-config"
133 +
134 + if use php; then
135 + php_copy_sources
136 + fi
137 +
138 + if use python; then
139 + python_copy_sources
140 + fi
141 +
142 + if use ruby; then
143 + ruby_copy_sources
144 + fi
145 +
146 + eapply_user
147 +}
148 +
149 +src_configure() {
150 + if has_basic_bindings ; then
151 + local conf=(
152 + --disable-documentation
153 + $(use_with mono csharp)
154 + $(use_with java)
155 + $(use_with lua)
156 + $(use_with perl)
157 + $(use_with tcl)
158 + --without-php
159 + --without-php7
160 + --without-python
161 + --without-python3
162 + --without-ruby
163 + )
164 +
165 + if use java; then
166 + local -x CXXFLAGS="${CXXFLAGS} $(java-pkg_get-jni-cflags)"
167 + fi
168 +
169 + if use perl; then
170 + local -x PERL_ARCH="$(perl -MConfig -e 'print $Config{installvendorarch}')"
171 + local -x PERL_LIB="$(perl -MConfig -e 'print $Config{installvendorlib}')"
172 + fi
173 +
174 + if use lua; then
175 + local -x LUA_INC="$("$(tc-getPKG_CONFIG)" --variable=INSTALL_INC lua)"
176 + local -x LUA_LIB="$("$(tc-getPKG_CONFIG)" --variable=INSTALL_CMOD lua)"
177 + fi
178 +
179 + econf "${conf[@]}"
180 + fi
181 +
182 + php_configure() {
183 + local myconf=(
184 + --disable-documentation
185 + --without-java
186 + --without-lua
187 + --without-csharp
188 + --without-perl
189 + --without-python
190 + --without-python3
191 + --without-ruby
192 + --without-tcl
193 + )
194 + if [[ ${MULTIBUILD_VARIANT} == php5.* ]]; then
195 + myconf+=(
196 + --with-php
197 + --without-php7
198 + )
199 + local -x PHP_CONFIG="${EPREFIX}/usr/$(get_libdir)/${MULTIBUILD_VARIANT/-/.}/bin/php-config"
200 + elif [[ ${MULTIBUILD_VARIANT} == php7.* ]]; then
201 + myconf+=(
202 + --without-php
203 + --with-php7
204 + )
205 + local -x PHP_CONFIG7="${EPREFIX}/usr/$(get_libdir)/${MULTIBUILD_VARIANT/-/.}/bin/php-config"
206 + fi
207 +
208 + econf "${myconf[@]}"
209 + }
210 +
211 + if use php; then
212 + addpredict /usr/share/snmp/mibs/.index
213 + addpredict /var/lib/net-snmp/mib_indexes
214 +
215 + php_foreach_impl run_in_build_dir php_configure
216 + fi
217 +
218 + python_configure() {
219 + local myconf=(
220 + --disable-documentation
221 + --without-java
222 + --without-lua
223 + --without-csharp
224 + --without-perl
225 + --without-php
226 + --without-php7
227 + --without-ruby
228 + --without-tcl
229 + )
230 + if python_is_python3; then
231 + myconf+=( --with-python3 )
232 + else
233 + myconf+=( --with-python )
234 + fi
235 +
236 + # Avoid sandbox failures when compiling modules
237 + addpredict "$(python_get_sitedir)"
238 +
239 + econf "${myconf[@]}"
240 + }
241 +
242 + if use python; then
243 + python_foreach_impl run_in_build_dir python_configure
244 + fi
245 +
246 + ruby_configure() {
247 + local myconf=(
248 + --disable-documentation
249 + --without-java
250 + --without-lua
251 + --without-csharp
252 + --without-perl
253 + --without-php
254 + --without-php7
255 + --without-python
256 + --without-python3
257 + --with-ruby
258 + --without-tcl
259 + )
260 + local -x RUBY="${EPREFIX}/usr/bin/${MULTIBUILD_VARIANT}"
261 +
262 + econf "${myconf[@]}"
263 + }
264 +
265 + if use ruby; then
266 + ruby_foreach_impl run_in_build_dir ruby_configure
267 + fi
268 +}
269 +
270 +src_compile() {
271 + if has_basic_bindings ; then
272 + default
273 + fi
274 +
275 + if use php; then
276 + php_foreach_impl run_in_build_dir emake
277 + fi
278 +
279 + if use python; then
280 + unset PYTHONDONTWRITEBYTECODE
281 + python_foreach_impl run_in_build_dir emake
282 + fi
283 +
284 + if use ruby; then
285 + ruby_foreach_impl run_in_build_dir emake
286 + fi
287 +}
288 +
289 +src_test() {
290 + if has_basic_bindings ; then
291 + default
292 + fi
293 +
294 + if use php; then
295 + php_foreach_impl run_in_build_dir emake check
296 + fi
297 +
298 + if use python; then
299 + python_foreach_impl run_in_build_dir emake check
300 + fi
301 +
302 + if use ruby; then
303 + ruby_foreach_impl run_in_build_dir emake check
304 + fi
305 +}
306 +
307 +src_install() {
308 + if has_basic_bindings ; then
309 + emake DESTDIR="${D}" install
310 + fi
311 +
312 + if use java; then
313 + java-pkg_dojar java/built/xapian.jar
314 + # TODO: make the build system not install this...
315 + java-pkg_doso java/.libs/libxapian_jni.so
316 + rm -rf "${D}var" || die "could not remove java cruft!"
317 + fi
318 +
319 + if use php; then
320 + php_foreach_impl run_in_build_dir emake DESTDIR="${D}" install
321 + php-ext-source-r3_createinifiles
322 + # php-ext-source-r3_createinifiles() changes current directory.
323 + cd "${S}"
324 + fi
325 +
326 + if use python; then
327 + python_foreach_impl run_in_build_dir emake DESTDIR="${D}" install
328 + fi
329 +
330 + if use ruby; then
331 + ruby_foreach_impl run_in_build_dir emake DESTDIR="${D}" install
332 + fi
333 +
334 + # For some USE combinations this directory is not created
335 + if [[ -d "${D}/usr/share/doc/xapian-bindings" ]]; then
336 + mv "${D}/usr/share/doc/xapian-bindings" "${D}/usr/share/doc/${PF}" || die
337 + fi
338 +
339 + dodoc AUTHORS HACKING NEWS TODO README
340 +}