repo/gentoo:master commit in: dev-libs/xapian-bindings/

"Sam James" <[email protected]>
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1786770018.c4c139e2e619c1d3def5b51d41ff3d50c5956191.sam@gentoo>
commit:     c4c139e2e619c1d3def5b51d41ff3d50c5956191
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 15 04:59:26 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 15 05:00:18 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4c139e2

dev-libs/xapian-bindings: add 2.1.0

Bug: https://bugs.gentoo.org/980873
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/xapian-bindings/Manifest                  |   2 +
 .../xapian-bindings/xapian-bindings-2.1.0.ebuild   | 359 +++++++++++++++++++++
 2 files changed, 361 insertions(+)

diff --git a/dev-libs/xapian-bindings/Manifest b/dev-libs/xapian-bindings/Manifest
index 63cd2b7b1e8b..6d637cb02aca 100644
--- a/dev-libs/xapian-bindings/Manifest
+++ b/dev-libs/xapian-bindings/Manifest
@@ -7,3 +7,5 @@ DIST xapian-bindings-1.4.32.tar.xz 1122508 BLAKE2B d9fc0b762825dc81a99297ffb2cd8
 DIST xapian-bindings-1.4.32.tar.xz.asc 833 BLAKE2B fcd6169d64de6c81548f4903080b184e84e285aa6cb414521cccd24469d316f89a551ebee6d6d79f0fadc32d6457b1ee5920326bfdce14e624487539e6282ca9 SHA512 9831fb952e7db41718c9eb28b09dbc2a66d986c2718731881662e0fa3b4cc78701eb2b3cc4e007d35a73ac775ce3494d946e515ca76fcb18fdd296512402357d
 DIST xapian-bindings-2.0.0.tar.xz 1123744 BLAKE2B 16f97a5b86c3f07d3891238bce3d479ca7ebf7dfeb611893495399a9cc5106d288e51a09e702817b2379fc3d8849fcddb7ec1227b9dfe311700c7face997e93c SHA512 30815f95bc3133fb29ee71651ed10ac27b6436732de39cdf49166a8255bf6ca9e9001fcc827cc8354079add11af05fd045d993865165fd381251c5d4eabcfa21
 DIST xapian-bindings-2.0.0.tar.xz.asc 833 BLAKE2B 021e291a0811ffb5bd920377446a9daad81ae720c369e30c30fff18a5b4051aa6c981dbca282b2c532a9452f69b6abfe8d941f95945392152751f765614ce25a SHA512 dbb2a8b2b835d8b183502f3c3576d6d3971a096d9ded2d635da9ea3d8fbf695e11f8f51f73c7b723f037e5309b200252664b17f1029f68fa443abd588040212f
+DIST xapian-bindings-2.1.0.tar.xz 1124652 BLAKE2B 62f2fd1d78422c00fb134f42dd6e694c2d6b4861504e2a710e0624d1bdd6e15f74b1660fbb503fa118e0d0596eb62a0cbf9313437da6742f4899668f500a1b2a SHA512 05ae8a65dcfbf97b5e220e8b603f1771bd39a19db4d746a4e48670861898147036a7b17af6236c477d503737ac7f6f1e68c7f38e678e7888fa931e559c7de1ef
+DIST xapian-bindings-2.1.0.tar.xz.asc 833 BLAKE2B 9dd61b3ea21fb0a0dba8c5ec26a77f36a45da7e7592f786ee0f6d0b91a7943d0e6e3095084d796e8efb7ace8c7d227d914fcbbff1dec1d7715d05fc3b924aaa0 SHA512 8eb3fda0d28321c4a8b43950fd1fcf03334a8ba21377b51fca3d5d61634525ef9215c26ca347be3b7d694a3b95d437744f787f153889a5b2e8d083013205cef5

diff --git a/dev-libs/xapian-bindings/xapian-bindings-2.1.0.ebuild b/dev-libs/xapian-bindings/xapian-bindings-2.1.0.ebuild
new file mode 100644
index 000000000000..42f810375d4e
--- /dev/null
+++ b/dev-libs/xapian-bindings/xapian-bindings-2.1.0.ebuild
@@ -0,0 +1,359 @@
+# 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 ruby33"
+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-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-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-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-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
+}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.