commit:     5e36f647d47a20ac377d7fb20d787bfd61f4f93e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 23 17:51:31 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 23 17:52:09 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e36f647

dev-libs/xapian-bindings: add 1.4.31

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/xapian-bindings/Manifest                  |   2 +
 .../xapian-bindings/xapian-bindings-1.4.31.ebuild  | 363 +++++++++++++++++++++
 2 files changed, 365 insertions(+)

diff --git a/dev-libs/xapian-bindings/Manifest 
b/dev-libs/xapian-bindings/Manifest
index 2098c8a990c8..2a591f1d90fc 100644
--- a/dev-libs/xapian-bindings/Manifest
+++ b/dev-libs/xapian-bindings/Manifest
@@ -1,3 +1,5 @@
 DIST xapian-bindings-1.4.29.tar.xz 1121212 BLAKE2B 
8bcfefb3e2c933223dd681874999905324c910d47a3260814a2bd9e97b3685b51c9828496db1a8275bf3da6fedf4727b173c69bfbe36dc458a1aa17eb47eb551
 SHA512 
54735a30971a108d2e23c07229aab29d4f898368de5b04fc08331e82b1e9a52fa7425150aa7aef05428a2b3c65757e83148f4077423a9847eb04e1a7fb05fe34
 DIST xapian-bindings-1.4.30.tar.xz 1121316 BLAKE2B 
49c47eae230ff46cf169cc0fc301f3cf87f5cad7e0d47125332b8b4a3ca896a1fa7bb63c7a3bd046d645433a2c8efe8499ad4112e042d0ebef206f7e2197c681
 SHA512 
fb48e10c01a219b34da41c2a0475f607fb0b12b5c444c06c37f16b7405905c8c113362caee409382d0ff90945b975b7c77acb2385ec82395684bdea6ff9b3926
 DIST xapian-bindings-1.4.30.tar.xz.asc 833 BLAKE2B 
971313adcaeda938a61743d372771256e8ccc7838a336d127a26464eb1bb29b51c2eaf4f0f9a77015488653d3db3d9d45bf2ca8a98b360f85087fd8b3d7b94a9
 SHA512 
1dcb114015ff8294ca530fb29226c73c403a55f3f8166a1a001f2f8c818412755713f19652a99534da409561127ee241f3447fab467cdbf8def3a8f620b321a0
+DIST xapian-bindings-1.4.31.tar.xz 1122212 BLAKE2B 
c283d96d6f6f553b7113fe7eb0f1e45072eb1e3b6b290be35f6d7686bdd2c8f2561fcbd4a4be61c16529ecc1e2faaf67e70f98a5343e96a3c7626827197f7378
 SHA512 
0da7f503368b9976fdb155f7a2c48b6f8a44a426753cc8f0b92ea53e180faa7b0eb2f0d646c190740509af54a122f0f3df6826ff58ad77b30c4b2c7addb02298
+DIST xapian-bindings-1.4.31.tar.xz.asc 833 BLAKE2B 
5d2edd62ba481e98950969bda1017702b4116c0629d70dfb653e3ad6ed78ff21147cd1581cacf8cd47968cdd95ac14ec68267d4aa86c28d03d15105781fd6c38
 SHA512 
0525e915085f9656bd164803513eb6381dfda55110bf1015d5ec0a80c7ee0cdd1ea83035f5022b6034b3fde05efdcda3759f92b31fc1b405dd8b5730ef48e1eb

diff --git a/dev-libs/xapian-bindings/xapian-bindings-1.4.31.ebuild 
b/dev-libs/xapian-bindings/xapian-bindings-1.4.31.ebuild
new file mode 100644
index 000000000000..c2335433a2bd
--- /dev/null
+++ b/dev-libs/xapian-bindings/xapian-bindings-1.4.31.ebuild
@@ -0,0 +1,363 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+GENTOO_DEPEND_ON_PERL=no
+
+LUA_COMPAT=( lua5-{1,3,4} luajit )
+
+PYTHON_COMPAT=( python3_{12..14} )
+PYTHON_REQ_USE="threads(+)"
+
+USE_PHP="php8-2 php8-3"
+
+PHP_EXT_NAME="xapian"
+PHP_EXT_INI="yes"
+PHP_EXT_OPTIONAL_USE="php"
+
+USE_RUBY="ruby31 ruby32"
+RUBY_OPTIONAL="yes"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/ollybetts.asc
+inherit autotools java-pkg-opt-2 lua multibuild perl-module php-ext-source-r3
+inherit python-r1 ruby-ng verify-sig
+
+DESCRIPTION="SWIG and JNI bindings for Xapian"
+HOMEPAGE="https://xapian.org/";
+SRC_URI="
+       https://oligarchy.co.uk/xapian/${PV}/${P}.tar.xz
+       verify-sig? ( https://oligarchy.co.uk/xapian/${PV}/${P}.tar.xz.asc )
+"
+S="${WORKDIR}/${P}" # need this here, some inherited eclasses change it
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="java lua perl php python ruby tcl ${GENTOO_PERL_USESTRING}"
+REQUIRED_USE="
+       || ( java lua perl php python ruby tcl )
+       lua? ( ${LUA_REQUIRED_USE} )
+       python? ( ${PYTHON_REQUIRED_USE} )
+       ruby? ( || ( $(ruby_get_use_targets) ) )
+"
+
+COMMON_DEPEND="
+       ~dev-libs/xapian-${PV}
+       lua? ( ${LUA_DEPS} )
+       perl? (
+               ${GENTOO_PERL_DEPSTRING}
+               dev-lang/perl:=
+       )
+       php? ( dev-lang/php:=[-threads] )
+       python? (
+               dev-python/sphinx[${PYTHON_USEDEP}]
+               ${PYTHON_DEPS}
+       )
+       ruby? ( $(ruby_implementations_depend) )
+       tcl? ( dev-lang/tcl:= )
+"
+DEPEND="
+       ${COMMON_DEPEND}
+       virtual/pkgconfig
+       java? ( >=virtual/jdk-1.8:* )
+"
+RDEPEND="
+       ${COMMON_DEPEND}
+       java? ( >=virtual/jre-1.8:* )
+"
+BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-ollybetts )"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.4.22-remove-precompiled-python.patch
+       "${FILESDIR}"/${PN}-1.4.22-fix-java-installation.patch
+)
+
+has_basic_bindings() {
+       # Update this list if new bindings are added that are not built
+       # multiple times for multiple versions like lua, php, python and ruby 
are
+       return $(use java || use perl || use tcl)
+}
+
+php_copy_sources() {
+       local MULTIBUILD_VARIANTS=($(php_get_slots))
+       multibuild_copy_sources
+}
+
+php_foreach_impl() {
+       local MULTIBUILD_VARIANTS=($(php_get_slots))
+       multibuild_foreach_variant "$@"
+}
+
+ruby_copy_sources() {
+       local MULTIBUILD_VARIANTS=($(ruby_get_use_implementations))
+       multibuild_copy_sources
+}
+
+ruby_foreach_impl() {
+       local MULTIBUILD_VARIANTS=($(ruby_get_use_implementations))
+       multibuild_foreach_variant "$@"
+}
+
+pkg_setup() {
+       use java && java-pkg-opt-2_pkg_setup
+}
+
+src_unpack() {
+       use verify-sig && verify-sig_verify_detached 
"${DISTDIR}"/${P}.tar.xz{,.asc}
+       default
+
+       if use php; then
+               local php_slot
+               for php_slot in $(php_get_slots); do
+                       # Unfortunately required for 
php-ext-source-r3_createinifiles().
+                       mkdir "${WORKDIR}/${php_slot}"
+               done
+       fi
+}
+
+src_prepare() {
+       eapply "${PATCHES[@]}"
+       eautoreconf
+
+       use java && java-pkg-opt-2_src_prepare
+
+       # https://trac.xapian.org/ticket/702
+       export XAPIAN_CONFIG="/usr/bin/xapian-config"
+
+       if use lua; then
+               lua_copy_sources
+       fi
+
+       if use php; then
+               php_copy_sources
+       fi
+
+       if use python; then
+               python_copy_sources
+       fi
+
+       if use ruby; then
+               ruby_copy_sources
+       fi
+
+       eapply_user
+}
+
+src_configure() {
+       # Needed to get e.g. test failure details
+       MAKEOPTS+=" VERBOSE=1"
+
+       if has_basic_bindings ; then
+               local conf=(
+                       --disable-documentation
+                       $(use_with java)
+                       $(use_with perl)
+                       $(use_with tcl)
+                       --without-csharp
+                       --without-lua
+                       --without-php
+                       --without-python
+                       --without-python3
+                       --without-ruby
+               )
+
+               if use java; then
+                       local -x CXXFLAGS="${CXXFLAGS} 
$(java-pkg_get-jni-cflags)"
+               fi
+
+               if use perl; then
+                       local -x PERL_ARCH="$(perl -MConfig -e 'print 
$Config{installvendorarch}')"
+                       local -x PERL_LIB="$(perl -MConfig -e 'print 
$Config{installvendorlib}')"
+               fi
+
+               if use tcl; then
+                       local tcl_version="$(echo 'puts $tcl_version;exit 0' | 
tclsh)"
+                       if [[ -z ${tcl_version} ]]; then
+                               die 'Unable to detect the installed version of 
dev-lang/tcl.'
+                       fi
+                       local -x 
TCL_LIB="${EPREFIX}/usr/$(get_libdir)/tcl${tcl_version}"
+               fi
+
+               econf "${conf[@]}"
+       fi
+
+       lua_configure() {
+               local myconf=(
+                       --disable-documentation
+                       --without-csharp
+                       --without-java
+                       --without-perl
+                       --without-tcl
+                       --without-php
+                       --without-python
+                       --without-python3
+                       --without-ruby
+                       --with-lua
+               )
+
+               local -x LUA_INC="$(lua_get_include_dir)"
+               local -x LUA_LIB="$(lua_get_cmod_dir)"
+
+               econf "${myconf[@]}"
+
+       }
+
+       if use lua; then
+               lua_foreach_impl run_in_build_dir lua_configure
+       fi
+
+       php_configure() {
+               local myconf=(
+                       --disable-documentation
+                       --without-java
+                       --without-lua
+                       --without-csharp
+                       --without-perl
+                       --without-python
+                       --without-python3
+                       --without-ruby
+                       --without-tcl
+                       --with-php
+               )
+               local -x 
PHP_CONFIG="${EPREFIX}/usr/$(get_libdir)/${MULTIBUILD_VARIANT/-/.}/bin/php-config"
+
+               econf "${myconf[@]}"
+       }
+
+       if use php; then
+               addpredict /usr/share/snmp/mibs/.index
+               addpredict /var/lib/net-snmp/mib_indexes
+
+               php_foreach_impl run_in_build_dir php_configure
+       fi
+
+       python_configure() {
+               local myconf=(
+                       --disable-documentation
+                       --without-java
+                       --without-lua
+                       --without-csharp
+                       --without-perl
+                       --without-php
+                       --without-ruby
+                       --without-tcl
+                       --with-python3
+               )
+
+               # Avoid sandbox failures when compiling modules
+               addpredict "$(python_get_sitedir)"
+
+               econf "${myconf[@]}"
+       }
+
+       if use python; then
+               python_foreach_impl run_in_build_dir python_configure
+       fi
+
+       ruby_configure() {
+               local myconf=(
+                       --disable-documentation
+                       --without-java
+                       --without-lua
+                       --without-csharp
+                       --without-perl
+                       --without-php
+                       --without-python
+                       --without-python3
+                       --with-ruby
+                       --without-tcl
+               )
+               local -x RUBY="${EPREFIX}/usr/bin/${MULTIBUILD_VARIANT}"
+
+               econf "${myconf[@]}"
+       }
+
+       if use ruby; then
+               ruby_foreach_impl run_in_build_dir ruby_configure
+       fi
+}
+
+src_compile() {
+       if has_basic_bindings ; then
+               default
+       fi
+
+       if use lua; then
+               lua_foreach_impl run_in_build_dir emake
+       fi
+
+       if use php; then
+               php_foreach_impl run_in_build_dir emake
+       fi
+
+       if use python; then
+               unset PYTHONDONTWRITEBYTECODE
+               python_foreach_impl run_in_build_dir emake
+       fi
+
+       if use ruby; then
+               ruby_foreach_impl run_in_build_dir emake
+       fi
+}
+
+src_test() {
+       if has_basic_bindings ; then
+               default
+       fi
+
+       if use lua; then
+               lua_foreach_impl run_in_build_dir emake check
+       fi
+
+       if use php; then
+               php_foreach_impl run_in_build_dir emake check
+       fi
+
+       if use python; then
+               python_foreach_impl run_in_build_dir emake check
+       fi
+
+       if use ruby; then
+               ruby_foreach_impl run_in_build_dir emake check
+       fi
+}
+
+src_install() {
+       if has_basic_bindings ; then
+               emake DESTDIR="${D}" install
+       fi
+
+       if use java; then
+               java-pkg_dojar java/built/xapian.jar
+               java-pkg_doso java/.libs/libxapian_jni.so
+       fi
+
+       if use lua; then
+               lua_foreach_impl run_in_build_dir emake DESTDIR="${D}" install
+       fi
+
+       if use php; then
+               php_foreach_impl run_in_build_dir emake DESTDIR="${D}" install
+               php-ext-source-r3_createinifiles
+               # php-ext-source-r3_createinifiles() changes current directory.
+               cd "${S}"
+       fi
+
+       if use python; then
+               python_foreach_impl run_in_build_dir emake DESTDIR="${D}" 
install
+               python_foreach_impl python_optimize
+       fi
+
+       if use ruby; then
+               ruby_foreach_impl run_in_build_dir emake DESTDIR="${D}" install
+               find "${ED}"/usr/share/doc/${PF}/ruby/rdocs/js -name \*.gz 
-delete || die
+       fi
+
+       # For some USE combinations this directory is not created
+       if [[ -d "${ED}/usr/share/doc/xapian-bindings" ]]; then
+               mv "${ED}/usr/share/doc/xapian-bindings" 
"${ED}/usr/share/doc/${PF}" || die
+       fi
+
+       dodoc AUTHORS HACKING NEWS TODO README
+}

Reply via email to