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