From 441d1370330332b7d78f238d2f5e13f7aed5e4e0 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 25 Dec 2020 23:06:25 +0000 Subject: gentoo christmass resync : 25.12.2020 --- dev-libs/xapian-bindings/Manifest | 1 + .../xapian-bindings-1.4.17-r100.ebuild | 340 +++++++++++++++++++++ 2 files changed, 341 insertions(+) create mode 100644 dev-libs/xapian-bindings/xapian-bindings-1.4.17-r100.ebuild (limited to 'dev-libs/xapian-bindings') diff --git a/dev-libs/xapian-bindings/Manifest b/dev-libs/xapian-bindings/Manifest index 2dddf4cedd32..43fbb0e3a25d 100644 --- a/dev-libs/xapian-bindings/Manifest +++ b/dev-libs/xapian-bindings/Manifest @@ -5,5 +5,6 @@ DIST xapian-bindings-1.4.17.tar.xz 1135100 BLAKE2B 8c45322725c341f6e6484e0aa8716 EBUILD xapian-bindings-1.4.14.ebuild 6447 BLAKE2B 8c879c77362dd1a6de377899e37a7a45f3b10c84b3f8f30a85f37818b0fef560ba4ef76151ea231b9ef305025cddf8f18e6bd2dfa785b86d7a13fa5ed245b276 SHA512 acef1bef8b5c6d23899eca4960b1565ebe289b0b73dfaa551c27ebda73160e51eeddf53b9e2628f729b524a3e1e35646b41018f4e47f76bc834c49aa848faf0d EBUILD xapian-bindings-1.4.15.ebuild 6448 BLAKE2B 863f3a89cfc7656e07a25cb972456a45cd8d3da090ab4d0e5f830d39f4841ae04377dff6c93f798fd02ea01aefa5783cacd4a071b2eb95f6a215a8657540d6d5 SHA512 f59f5e58dabf13fe38e3d4dd35b1709feff7530fb3fb4fd29d48cd56d1148af6aa7fdacb0cfd8b7b1f59e6cd663eff2aa9ad82485b3ca3fd99ff6dedfbe5e360 EBUILD xapian-bindings-1.4.16.ebuild 6448 BLAKE2B 863f3a89cfc7656e07a25cb972456a45cd8d3da090ab4d0e5f830d39f4841ae04377dff6c93f798fd02ea01aefa5783cacd4a071b2eb95f6a215a8657540d6d5 SHA512 f59f5e58dabf13fe38e3d4dd35b1709feff7530fb3fb4fd29d48cd56d1148af6aa7fdacb0cfd8b7b1f59e6cd663eff2aa9ad82485b3ca3fd99ff6dedfbe5e360 +EBUILD xapian-bindings-1.4.17-r100.ebuild 7014 BLAKE2B f5a2ccf4b25e8e62e5bbf54578486bbc61f48f262360a5c71b36de94062e72a61d0a6e866aa5d5d54b22f35787778ad862b84fcb814a6363e81af7b110bee342 SHA512 d92f9d3069ef48e7437d3bd994424e90e70104d86964eb4e6adcda156cceb71fe75873b38a92d724a32b94775e179cc3c165df38a49077334625c944eff9f9d3 EBUILD xapian-bindings-1.4.17.ebuild 6447 BLAKE2B 4c9f93b886563f6010bd2e60e7e429bc9ab7b914cb6c367a354e6c5dcf0e1bb1ce8f219a069b6ef9e40cad932b4e69bebd815b2878964bc333921485b21e65e7 SHA512 ebeebfb7223e7efa49b06ad076a82a99d03b836f18bd5dcb69ca512c4f5ac762443ea1e2ace41693e9bebe53e14810c5df4f1d7fa9b1c0c2c1d449e824ed4b4e MISC metadata.xml 252 BLAKE2B f6282e2a99df668246ea8570c72345463f06d282b6adc6d9de2a08ef0827cf4572332c580caa594aad5ba8e200870d8d25494549ee4413798025f0d885b61a68 SHA512 cbda7bf9832872764ae776ce16b2966c37a2ba3a1982d9817006fd6b82d7b17146434cde428bf114062a483e9053d2acdcdd004695e6ebf428d19cdc09937c65 diff --git a/dev-libs/xapian-bindings/xapian-bindings-1.4.17-r100.ebuild b/dev-libs/xapian-bindings/xapian-bindings-1.4.17-r100.ebuild new file mode 100644 index 000000000000..0c2cba44761d --- /dev/null +++ b/dev-libs/xapian-bindings/xapian-bindings-1.4.17-r100.ebuild @@ -0,0 +1,340 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +LUA_COMPAT=( lua5-{1..4} luajit ) + +PYTHON_COMPAT=( python{3_6,3_7,3_8} ) +PYTHON_REQ_USE="threads(+)" + +USE_PHP="php7-2 php7-3 php7-4" + +PHP_EXT_NAME="xapian" +PHP_EXT_INI="yes" +PHP_EXT_OPTIONAL_USE="php" + +USE_RUBY="ruby24 ruby25 ruby26" +RUBY_OPTIONAL="yes" + +inherit java-pkg-opt-2 lua mono-env multibuild php-ext-source-r3 python-r1 ruby-ng toolchain-funcs + +DESCRIPTION="SWIG and JNI bindings for Xapian" +HOMEPAGE="https://www.xapian.org/" +SRC_URI="https://oligarchy.co.uk/xapian/${PV}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="java lua mono perl php python ruby tcl" +REQUIRED_USE="|| ( java lua mono perl php python ruby tcl ) + lua? ( ${LUA_REQUIRED_USE} ) + python? ( ${PYTHON_REQUIRED_USE} ) + ruby? ( || ( $(ruby_get_use_targets) ) )" + +COMMONDEPEND=">=dev-libs/xapian-1.4.15 + lua? ( ${LUA_DEPS} ) + perl? ( dev-lang/perl:= ) + php? ( dev-lang/php:=[-threads] ) + python? ( + dev-python/sphinx[${PYTHON_USEDEP}] + ${PYTHON_DEPS} + ) + ruby? ( $(ruby_implementations_depend) ) + tcl? ( dev-lang/tcl:= ) + mono? ( dev-lang/mono )" +DEPEND="${COMMONDEPEND} + virtual/pkgconfig + java? ( >=virtual/jdk-1.6 )" +RDEPEND="${COMMONDEPEND} + java? ( >=virtual/jre-1.6 )" + +S="${WORKDIR}/${P}" + +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 mono || 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 mono && mono-env_pkg_setup + use java && java-pkg-opt-2_pkg_setup +} + +src_unpack() { + 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() { + 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() { + if has_basic_bindings ; then + local conf=( + --disable-documentation + $(use_with mono csharp) + $(use_with java) + $(use_with perl) + $(use_with tcl) + --without-lua + --without-php + --without-php7 + --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 + + econf "${conf[@]}" + fi + + lua_configure() { + local myconf=( + --disable-documentation + --without-csharp + --without-java + --without-perl + --without-tcl + --without-php + --without-php7 + --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[@]}" + + } + + lua_foreach_impl run_in_build_dir lua_configure + + php_configure() { + local myconf=( + --disable-documentation + --without-java + --without-lua + --without-csharp + --without-perl + --without-python + --without-python3 + --without-ruby + --without-tcl + ) + if [[ ${MULTIBUILD_VARIANT} == php5.* ]]; then + myconf+=( + --with-php + --without-php7 + ) + local -x PHP_CONFIG="${EPREFIX}/usr/$(get_libdir)/${MULTIBUILD_VARIANT/-/.}/bin/php-config" + elif [[ ${MULTIBUILD_VARIANT} == php7.* ]]; then + myconf+=( + --without-php + --with-php7 + ) + local -x PHP_CONFIG7="${EPREFIX}/usr/$(get_libdir)/${MULTIBUILD_VARIANT/-/.}/bin/php-config" + fi + + 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-php7 + --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-php7 + --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 + # TODO: make the build system not install this... + java-pkg_doso java/.libs/libxapian_jni.so + rm -rf "${D}var" || die "could not remove java cruft!" + 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 + fi + + if use ruby; then + ruby_foreach_impl run_in_build_dir emake DESTDIR="${D}" install + fi + + # For some USE combinations this directory is not created + if [[ -d "${D}/usr/share/doc/xapian-bindings" ]]; then + mv "${D}/usr/share/doc/xapian-bindings" "${D}/usr/share/doc/${PF}" || die + fi + + dodoc AUTHORS HACKING NEWS TODO README +} -- cgit v1.2.3