summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2013-12-05 19:54:55 +0000
committerAnthony G. Basile <blueness@gentoo.org>2013-12-05 19:54:55 +0000
commitc7a3ce559e42b9a98442aab2056b578f3a5624bf (patch)
tree02cda13c7b208b9234460d248614ebe4738e8979 /dev-libs
parentVersion bump (diff)
downloadhistorical-c7a3ce559e42b9a98442aab2056b578f3a5624bf.tar.gz
historical-c7a3ce559e42b9a98442aab2056b578f3a5624bf.tar.bz2
historical-c7a3ce559e42b9a98442aab2056b578f3a5624bf.zip
Version bump 1.2.{15,16}. Disable mono bindings since it violates sandbox.
Package-Manager: portage-2.2.7/cvs/Linux x86_64 Manifest-Sign-Key: 0xF52D4BBA
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/xapian-bindings/ChangeLog9
-rw-r--r--dev-libs/xapian-bindings/Manifest34
-rw-r--r--dev-libs/xapian-bindings/xapian-bindings-1.2.15.ebuild184
-rw-r--r--dev-libs/xapian-bindings/xapian-bindings-1.2.16.ebuild184
4 files changed, 395 insertions, 16 deletions
diff --git a/dev-libs/xapian-bindings/ChangeLog b/dev-libs/xapian-bindings/ChangeLog
index 3fc6e31c9942..ac82482645f6 100644
--- a/dev-libs/xapian-bindings/ChangeLog
+++ b/dev-libs/xapian-bindings/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-libs/xapian-bindings
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/xapian-bindings/ChangeLog,v 1.73 2013/11/24 18:39:11 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/xapian-bindings/ChangeLog,v 1.74 2013/12/05 19:54:43 blueness Exp $
+
+*xapian-bindings-1.2.15 (05 Dec 2013)
+*xapian-bindings-1.2.16 (05 Dec 2013)
+
+ 05 Dec 2013; Anthony G. Basile <blueness@gentoo.org>
+ +xapian-bindings-1.2.15.ebuild, +xapian-bindings-1.2.16.ebuild:
+ Version bump 1.2.{15,16}. Disable mono bindings since it violates sandbox.
24 Nov 2013; Agostino Sarubbo <ago@gentoo.org> xapian-bindings-1.2.14.ebuild:
Stable for sparc, wrt bug #470402
diff --git a/dev-libs/xapian-bindings/Manifest b/dev-libs/xapian-bindings/Manifest
index bf95e81248b8..431e09f7b9a9 100644
--- a/dev-libs/xapian-bindings/Manifest
+++ b/dev-libs/xapian-bindings/Manifest
@@ -1,28 +1,32 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA512
+Hash: SHA256
DIST xapian-bindings-1.2.13.tar.gz 1481645 SHA256 bfef8a18303a67f6fb29b09393c2f01a23f5c10a248567f92ddc5edfda5db17d SHA512 1a685d903812508a20450a491ee9aef30ba5cd14708dfdc57f197da0e2cccf01eb46a076ac3fc32834e1802f10b82f08f8a910d2cf180a11604aa68e03826033 WHIRLPOOL d3998ec885a86cf4440c2290921de6d7e738972ecf8730c70d1dd1e1dec18f24ca8130790bb488b8846209eb9579fcc0860af650db9614162cc2edea5587e874
DIST xapian-bindings-1.2.14.tar.gz 1483276 SHA256 a55815ddff0bd5f79814b5964cc94299ecf8f7ebafea11523aa0787f6082e3d7 SHA512 943a99ed19cb0f14435321de25b28ace5c7ad60be819f54fdf86bf161f92b2d2153d92506873b2af5b514403a4b98815db7f6c14a14b37fbd60c765460eb48f0 WHIRLPOOL 845b4f60f0787eaaf039c4f583ab233fd5ac0e1ba8b2cbcdc5bc20c11038f871717da9e8abf381c5bf9b472cbbb7451d08fb74bebf6e8d4999003c020202e6e9
+DIST xapian-bindings-1.2.15.tar.gz 1484058 SHA256 89d30cbd38dcfb9d9e0fccc8e4ba7d6452ffad45afb3f1e9614a3be0a3a33e77 SHA512 b3733308f0446fa041dcae677b3d3316bd8e775fcd1a1770ca2fab5b60e40463bbbce210cb1161161f6e9f1ff5e5473d38c2dab922b7f4f2705ac165d991c0ec WHIRLPOOL fdc4a07a487c339faa1d8837ea19c37f9f298b90657312b135f727b9fcf3984b149341cbf96c2ea16f54839b93b7677becb65452619b79e71a5204dcb660265d
+DIST xapian-bindings-1.2.16.tar.xz 825868 SHA256 e87ddcd70a5044565e631fb334155f7d66a3b7b491a94a22aa1db2aa0d26af6c SHA512 2c92986d7f678cc17c0608a29ee893bdd3c6a1b00aed12394df32c46311663f8851e7c82685cf43ff7071869dd46f129b47f16f21ce0fae992d07e5780b93286 WHIRLPOOL ccb4ce580188e2a73e2810fdeb125d15aff8feee8cb57a73a00f1f4ff54273496b11dd1add1cddd445dc65179e60b96aae0e3b5e2a0d29626dbc897b3669b48f
DIST xapian-bindings-1.3.1.tar.gz 1562988 SHA256 5c18ce77b08d2fcc738dadbf85448239d714aad27a0833436e32a82c2ff622c4 SHA512 e295ab93fe61e038bb5f95786f80ff36bc9cbc486c4d03e457fabc6efa97e7119411afa3aafd29786ab9237505b03c27fdb5d524fdb43db2c2f3550cd41c7396 WHIRLPOOL f76dcced799116569f5d4f6ba9245045a5fb3c8f7d64672997408fe0c11b72ef7d7ed24a1901d96777ac763d910be6bd378859dd952290bbbcae9dbe6452a2dd
EBUILD xapian-bindings-1.2.13.ebuild 4574 SHA256 21226044f90466082102c2cd08ed8ecab3dfbff2b64121b4cbbba3de9985386a SHA512 cb77629ac668c8e2a6ff1e0a87cb732cc235525253e7249b262474848b202a9cc90950ec55e28e731c7873af67fe7d4221626a3b1c73d837338694ccf1b0764e WHIRLPOOL 1a2d3b3dc559dd7edaa1dc95423e973e66e479b8143ac7a874a713a4728841a3869b9e1eb9159f700a42b9693f696c965d3c7237569f1af2a96208504591a655
EBUILD xapian-bindings-1.2.14.ebuild 4571 SHA256 328fcf61b59b6ffef6d776819c74d5969bc4265561ef061bc80ed2baecc652fc SHA512 ef31bcdf30347dd7ee1917a666967602dc1b3a98f1a42c8e5e0e9ec015c8dfa2ded8f114f7e1e54f8557ea64c8dd198c2fd382874c0e7a16b0d5486fc08d0459 WHIRLPOOL 5ce309104f0375a3060f93a22068fc1e0e4a6626241f437fd33648228fd829ab8a2861d7706eef4f02bfd9d9963ef2922d5a5fd1a6ce37b86b34b118beac32a5
+EBUILD xapian-bindings-1.2.15.ebuild 4797 SHA256 ff4459aafd8630122e2e3af0a940865933087889d728cbdc6c46427fc0aae7f0 SHA512 02915ade14f86af3332c19b00d72cab40fa148d03df50c68bb7c77ea883eaba029e7326c743e74b4deb7006ef0fa130362d1c6615310da1a342f962e5727469f WHIRLPOOL ef29878e0cf0805cb58af68d7a8dee7062af8e86ee90c26e94db40f558395f9fd6e544b4858c69c86f32004a5d5f37a1d1415396faac7206e4aa9c1a8c76e83b
+EBUILD xapian-bindings-1.2.16.ebuild 4797 SHA256 a082a2879727dfe9575f69189fd448e9c1964ba1dce9c5a51d9a23fe5ebd016e SHA512 ad23521d95b8edd9b4da07219a8965ea0d8c9cb1d632f6f75cd69daf93d08f2c67d1aa9e3dab44cf78046409f8f7c59010199ab7a2622dcc09ab1006c4f9a81a WHIRLPOOL 487b59e7fd4eac775e382b963cd0707c0a4860370791fdbd42211ead5cbb9a64435bfc5f1d9e243a4286a7dd0857d37a9cd5633617c536bf0ee481102116707c
EBUILD xapian-bindings-1.3.1.ebuild 4429 SHA256 9519d9d3b23f8735a683ae099966536dc753f48fcab471a75b75ca9263af3c6e SHA512 26c79acd92c006103b48ca32d06ada29372a22112c7529272ef1f8081b30e2d9512a1899f3c4f9fbb6e04422317e02cd94abbe25fe3b5f13d5b165cebae4ec14 WHIRLPOOL 477fd5d049dbf393f7bec363eace4886553017b3c4936a7d78d9ff6be37e6517b6ea260def2ad684c564f54cdefcfaba7e54714d5e7886bbb4b5561e40e26285
-MISC ChangeLog 11581 SHA256 d52d469cc6d48a30bf04389608abf4cf6dd5b2016d351cc0b83d1a6cedf2f97c SHA512 197bb6d378650cb6274ef63223ce1e34fa05e87a19084045b8ea77f0afb60f740b4686392c529b61687a5388f92d24aede1cf6e03b02bd812818c82aa24ec6ed WHIRLPOOL 6d97210e6f8bc99de5cb5a32b6c93966161d4233cf894861b10f32a4fba15686df7cb4c179c82f74080d1dd95232e1091fe2e61846f5fce6306b9b2b7e108fec
+MISC ChangeLog 11863 SHA256 720984427892169816ff5e3d8a1e1184e97bc4d540729dbb8283f21fc17f63e4 SHA512 e44ac2703ed41e817461bb582f7d13277e09de508d75863cc687290f9be2f80e8c8c579fa6ca9a8aefe2f54c4d175eda2bb3754165d1c58242c1e424c8955cd6 WHIRLPOOL adcb527eee5c924b54efa74f31bfe30f77724a709ff9a0da8ac1d210969245ecd280daf4b2ee4e6f67fc9b7889dce6e939a7923b20b63215f940b013573d3acd
MISC metadata.xml 367 SHA256 e757cf120c1188c0010caaf7449e89deee52d8aa275f4f0c3b9cc0c097d28596 SHA512 e562b4dfbdcf62a3f860cd185dcd5fb2cf4067cb9b6c11c94669027c9cbae94bc437fa63e68b3b982a6bdda624087a60b24a269031fae2f3f975efb3d8e85d44 WHIRLPOOL 1314776082f07f5fdf74d15ad6b5093276b58f47e4dce35c0377e6a7baef0941bf567e43047e4ff80a726e2078d506c9029cd033cba8aeba9110b75cbbffa036
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
-iQIcBAEBCgAGBQJSkke9AAoJELp701BxlEWfV8gP/i2+mEpWfa7Zm9Jpo3hN3oFf
-CCmmZZG/LachzOED2CosME1lDhw6DrTmn74EWg1wPMEtOTYo/pBy+ARPVs9nbO4a
-6k1qfxfGliB44vf64YYxNoP1P3U8RHZMN4Go1mabxlRfEte0mcXJ1trJPeIQLBa7
-c4RpEKPsb7baUDZx2RHZpG9D2SI4NhxS8roaaRjPbgWHMGavAQ7SQfAffcxORgwX
-1T0yXzwPWjQw4Dm3s4hOHOXccNFCympE6P0fMNiugd5438Kg47vhGCmxfGA8hNSq
-TyspHDaTl6Whhcr0pgPHirFolx/ZVOVxou7Mhw3JRPwf9kKlnYvg2xI1Ihp6/Er5
-UJbkv8NHZjBK8R2GAxQUywB7LdKqTJwDv8/u9ouGfv9JRR2emL7ykUkL9Qu/avod
-k0YAAMwt0f2urPq989rSu5uPpUFSizhYjBbBP3PFjnzN6m7BRL5I0CyrSD+EAKIG
-OoV2rxQI9WU2WqYpcAJTZrxrUVKZAd5qaEfchrtFt9NHYM0TYlVNJ6K7zteKgdOA
-ELZ88qXdDnFqM5dqiuYmRbTzKreYMzgdMkYzBzTQTBiBd4767BrdUCKeodq8Y+xm
-s7s3VlDs8eKHfHB/oa7BvFAPrVnJNmT4Bqe48Pl2QJFk1kopx7QDmZypJEZ/w32/
-b80rMa7WMTIrlkpu4PMt
-=ZeQB
+iQIcBAEBCAAGBQJSoNpaAAoJEJOE+m71LUu6MCwP/A0XY1FHgd3fCkzJPtDvHuxV
+OIyKpYiGASiysagmFzTlgJL1gsvFg84FeKXfKsibkBXbZaQowJpNu7yRgE4jzFqs
+Vrq8QYOOuEoY3xiDv1PCjE0G4DvnbhssMFXXWavDyIQC5Y+YfRsldnRoZrkp8WUK
+jOsWW8l3gHxs9PCZDAGYVh+7vg9oYkYJTHfNIUEbcR95VYqTsTM9tqnlaGj6+IrX
+7Z9bfZYPrqOgWOo0HwqMJmU/tzfwPk77mv9mUdhVOUjGDagnnT8EqItamK/ZPaOq
+WwAtQ427ox8U7xPynTj3qOe5FWE3SwHWZGPIiia13ssu1bN7Pw365CjFnTUdF6Je
+6uTzFdxRW2jn/ZeDAEpAkSIaYZ7kwTchBLZOVAbgh/lvOFAurE/ttDJF8vik0ydQ
+sURJjsAg10k0imv4K2tKGaIO2UDMMK+E0uIrtMGejO9+gvZt3+yOu/0lDoMQBWSP
+iGEXVzaMknybr5QQ1MVQf/KEbPa68xHnLirxCG7yBnnRG14MECDilXxjP4FH0/rb
+p6NzZAKeNjX91Bshm1yfaYwluDp2JogowVX+sGvVhurwcDMHlWymuwBsFgkBznPX
+LKMfMVp8r2uSASzwE9rWr9Ewc1NjB69uH5dTh5TKCW9j02mKiWzjxhCidlOJk6KK
+tp6VXVbozyKcDIbSs2xj
+=e9je
-----END PGP SIGNATURE-----
diff --git a/dev-libs/xapian-bindings/xapian-bindings-1.2.15.ebuild b/dev-libs/xapian-bindings/xapian-bindings-1.2.15.ebuild
new file mode 100644
index 000000000000..938ceea7de1f
--- /dev/null
+++ b/dev-libs/xapian-bindings/xapian-bindings-1.2.15.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/xapian-bindings/xapian-bindings-1.2.15.ebuild,v 1.1 2013/12/05 19:54:43 blueness Exp $
+
+EAPI="5"
+
+PYTHON_DEPEND="python? 2"
+PYTHON_USE_WITH="threads"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
+
+USE_PHP="php5-3 php5-4"
+
+PHP_EXT_NAME="xapian"
+PHP_EXT_INI="yes"
+PHP_EXT_OPTIONAL_USE="php"
+
+#mono violates sandbox, we disable it until we figure this out
+#inherit java-pkg-opt-2 mono php-ext-source-r2 python
+inherit java-pkg-opt-2 php-ext-source-r2 python
+
+DESCRIPTION="SWIG and JNI bindings for Xapian"
+HOMEPAGE="http://www.xapian.org/"
+SRC_URI="http://oligarchy.co.uk/xapian/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~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 )"
+IUSE="java lua perl php python ruby tcl"
+REQUIRED_USE="|| ( java lua perl php python ruby tcl )"
+
+COMMONDEPEND="=dev-libs/xapian-${PV}*
+ lua? ( >=dev-lang/lua-5.1 )
+ perl? ( dev-lang/perl )
+ ruby? ( dev-lang/ruby )
+ tcl? ( >=dev-lang/tcl-8.1 )"
+# mono? ( >=dev-lang/mono-1.0.8 )
+DEPEND="${COMMONDEPEND}
+ java? ( >=virtual/jdk-1.3 )"
+RDEPEND="${COMMONDEPEND}
+ java? ( >=virtual/jre-1.3 )"
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+
+ if use python; then
+ python_pkg_setup
+ fi
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+ if use java; then
+ sed \
+ -e 's/$(JAVAC)/$(JAVAC) $(JAVACFLAGS)/' \
+ -i java{/,/org/xapian/errors/,/org/xapian/}Makefile.in || die "sed failed"
+ fi
+
+ if use python; then
+ sed \
+ -e 's:\(^pkgpylib_DATA = xapian/__init__.py\).*:\1:' \
+ -e 's|\(^xapian/__init__.py: modern/xapian.py\)|\1 xapian/_xapian$(PYTHON_SO)|' \
+ -i python/Makefile.in || die "sed failed"
+ fi
+}
+
+src_configure() {
+ if use java; then
+ CXXFLAGS="${CXXFLAGS} $(java-pkg_get-jni-cflags)"
+ fi
+
+ if use perl; then
+ export PERL_ARCH="$(perl -MConfig -e 'print $Config{installvendorarch}')"
+ export PERL_LIB="$(perl -MConfig -e 'print $Config{installvendorlib}')"
+ fi
+
+ if use lua; then
+ export LUA_LIB="$(pkg-config --variable=INSTALL_CMOD lua)"
+ fi
+
+ econf \
+ $(use_with java) \
+ $(use_with lua) \
+ $(use_with perl) \
+ $(use_with php) \
+ $(use_with python) \
+ $(use_with ruby) \
+ $(use_with tcl)
+# $(use_with mono csharp) \
+
+ # Python bindings are built/tested/installed manually.
+ sed -e "/SUBDIRS =/s/ python//" -i Makefile || die "sed Makefile"
+}
+
+src_compile() {
+ default
+
+ if use python; then
+ python_copy_sources python
+ building() {
+ emake \
+ PYTHON="$(PYTHON)" \
+ PYTHON_INC="$(python_get_includedir)" \
+ PYTHON_LIB="$(python_get_libdir)" \
+ PYTHON_SO="$("$(PYTHON)" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_config_vars("SO")[0])')" \
+ pkgpylibdir="$(python_get_sitedir)/xapian"
+ }
+ python_execute_function -s --source-dir python building
+ fi
+}
+
+src_test() {
+ default
+
+ if use python; then
+ testing() {
+ emake \
+ PYTHON="$(PYTHON)" \
+ PYTHON_INC="$(python_get_includedir)" \
+ PYTHON_LIB="$(python_get_libdir)" \
+ PYTHON_SO="$("$(PYTHON)" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_config_vars("SO")[0])')" \
+ pkgpylibdir="$(python_get_sitedir)/xapian" \
+ VERBOSE="1" \
+ check
+ }
+ python_execute_function -s --source-dir python testing
+ fi
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ if use java; then
+ java-pkg_dojar java/built/xapian_jni.jar
+ # TODO: make the build system not install this...
+ java-pkg_doso "${D}/${S}/java/built/libxapian_jni.so"
+ rm "${D}/${S}/java/built/libxapian_jni.so"
+ rmdir -p "${D}/${S}/java/built"
+ rmdir -p "${D}/${S}/java/native"
+ fi
+
+ if use python; then
+ installation() {
+ emake \
+ DESTDIR="${D}" \
+ PYTHON="$(PYTHON)" \
+ PYTHON_INC="$(python_get_includedir)" \
+ PYTHON_LIB="$(python_get_libdir)" \
+ PYTHON_SO="$("$(PYTHON)" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_config_vars("SO")[0])')" \
+ pkgpylibdir="$(python_get_sitedir)/xapian" \
+ install
+ }
+ python_execute_function -s --source-dir python installation
+ fi
+
+ if use php; then
+ php-ext-source-r2_createinifiles
+ 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}"
+ fi
+
+ dodoc AUTHORS HACKING NEWS TODO README || die "dodoc failed"
+}
+
+pkg_postinst() {
+ if use python; then
+ python_mod_optimize xapian
+ fi
+
+ if use php_targets_php5-4; then
+ ewarn "Note: subclassing Xapian classes in PHP currently doesn't work with PHP 5.4"
+ fi
+}
+
+pkg_postrm() {
+ if use python; then
+ python_mod_cleanup xapian
+ fi
+}
diff --git a/dev-libs/xapian-bindings/xapian-bindings-1.2.16.ebuild b/dev-libs/xapian-bindings/xapian-bindings-1.2.16.ebuild
new file mode 100644
index 000000000000..58f88cdf9a7f
--- /dev/null
+++ b/dev-libs/xapian-bindings/xapian-bindings-1.2.16.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/xapian-bindings/xapian-bindings-1.2.16.ebuild,v 1.1 2013/12/05 19:54:43 blueness Exp $
+
+EAPI="5"
+
+PYTHON_DEPEND="python? 2"
+PYTHON_USE_WITH="threads"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
+
+USE_PHP="php5-3 php5-4"
+
+PHP_EXT_NAME="xapian"
+PHP_EXT_INI="yes"
+PHP_EXT_OPTIONAL_USE="php"
+
+#mono violates sandbox, we disable it until we figure this out
+#inherit java-pkg-opt-2 mono php-ext-source-r2 python
+inherit java-pkg-opt-2 php-ext-source-r2 python
+
+DESCRIPTION="SWIG and JNI bindings for Xapian"
+HOMEPAGE="http://www.xapian.org/"
+SRC_URI="http://oligarchy.co.uk/xapian/${PV}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~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 )"
+IUSE="java lua perl php python ruby tcl"
+REQUIRED_USE="|| ( java lua perl php python ruby tcl )"
+
+COMMONDEPEND="=dev-libs/xapian-${PV}*
+ lua? ( >=dev-lang/lua-5.1 )
+ perl? ( dev-lang/perl )
+ ruby? ( dev-lang/ruby )
+ tcl? ( >=dev-lang/tcl-8.1 )"
+# mono? ( >=dev-lang/mono-1.0.8 )
+DEPEND="${COMMONDEPEND}
+ java? ( >=virtual/jdk-1.3 )"
+RDEPEND="${COMMONDEPEND}
+ java? ( >=virtual/jre-1.3 )"
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+
+ if use python; then
+ python_pkg_setup
+ fi
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+ if use java; then
+ sed \
+ -e 's/$(JAVAC)/$(JAVAC) $(JAVACFLAGS)/' \
+ -i java{/,/org/xapian/errors/,/org/xapian/}Makefile.in || die "sed failed"
+ fi
+
+ if use python; then
+ sed \
+ -e 's:\(^pkgpylib_DATA = xapian/__init__.py\).*:\1:' \
+ -e 's|\(^xapian/__init__.py: modern/xapian.py\)|\1 xapian/_xapian$(PYTHON_SO)|' \
+ -i python/Makefile.in || die "sed failed"
+ fi
+}
+
+src_configure() {
+ if use java; then
+ CXXFLAGS="${CXXFLAGS} $(java-pkg_get-jni-cflags)"
+ fi
+
+ if use perl; then
+ export PERL_ARCH="$(perl -MConfig -e 'print $Config{installvendorarch}')"
+ export PERL_LIB="$(perl -MConfig -e 'print $Config{installvendorlib}')"
+ fi
+
+ if use lua; then
+ export LUA_LIB="$(pkg-config --variable=INSTALL_CMOD lua)"
+ fi
+
+ econf \
+ $(use_with java) \
+ $(use_with lua) \
+ $(use_with perl) \
+ $(use_with php) \
+ $(use_with python) \
+ $(use_with ruby) \
+ $(use_with tcl)
+# $(use_with mono csharp) \
+
+ # Python bindings are built/tested/installed manually.
+ sed -e "/SUBDIRS =/s/ python//" -i Makefile || die "sed Makefile"
+}
+
+src_compile() {
+ default
+
+ if use python; then
+ python_copy_sources python
+ building() {
+ emake \
+ PYTHON="$(PYTHON)" \
+ PYTHON_INC="$(python_get_includedir)" \
+ PYTHON_LIB="$(python_get_libdir)" \
+ PYTHON_SO="$("$(PYTHON)" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_config_vars("SO")[0])')" \
+ pkgpylibdir="$(python_get_sitedir)/xapian"
+ }
+ python_execute_function -s --source-dir python building
+ fi
+}
+
+src_test() {
+ default
+
+ if use python; then
+ testing() {
+ emake \
+ PYTHON="$(PYTHON)" \
+ PYTHON_INC="$(python_get_includedir)" \
+ PYTHON_LIB="$(python_get_libdir)" \
+ PYTHON_SO="$("$(PYTHON)" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_config_vars("SO")[0])')" \
+ pkgpylibdir="$(python_get_sitedir)/xapian" \
+ VERBOSE="1" \
+ check
+ }
+ python_execute_function -s --source-dir python testing
+ fi
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ if use java; then
+ java-pkg_dojar java/built/xapian_jni.jar
+ # TODO: make the build system not install this...
+ java-pkg_doso "${D}/${S}/java/built/libxapian_jni.so"
+ rm "${D}/${S}/java/built/libxapian_jni.so"
+ rmdir -p "${D}/${S}/java/built"
+ rmdir -p "${D}/${S}/java/native"
+ fi
+
+ if use python; then
+ installation() {
+ emake \
+ DESTDIR="${D}" \
+ PYTHON="$(PYTHON)" \
+ PYTHON_INC="$(python_get_includedir)" \
+ PYTHON_LIB="$(python_get_libdir)" \
+ PYTHON_SO="$("$(PYTHON)" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_config_vars("SO")[0])')" \
+ pkgpylibdir="$(python_get_sitedir)/xapian" \
+ install
+ }
+ python_execute_function -s --source-dir python installation
+ fi
+
+ if use php; then
+ php-ext-source-r2_createinifiles
+ 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}"
+ fi
+
+ dodoc AUTHORS HACKING NEWS TODO README || die "dodoc failed"
+}
+
+pkg_postinst() {
+ if use python; then
+ python_mod_optimize xapian
+ fi
+
+ if use php_targets_php5-4; then
+ ewarn "Note: subclassing Xapian classes in PHP currently doesn't work with PHP 5.4"
+ fi
+}
+
+pkg_postrm() {
+ if use python; then
+ python_mod_cleanup xapian
+ fi
+}