summaryrefslogtreecommitdiff
path: root/app-misc/sphinx
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-misc/sphinx
reinit the tree, so we can have metadata
Diffstat (limited to 'app-misc/sphinx')
-rw-r--r--app-misc/sphinx/Manifest14
-rw-r--r--app-misc/sphinx/files/searchd.rc31
-rw-r--r--app-misc/sphinx/files/sphinx-2.0.1_beta-darwin8.patch22
-rw-r--r--app-misc/sphinx/metadata.xml12
-rw-r--r--app-misc/sphinx/sphinx-0.9.9.ebuild70
-rw-r--r--app-misc/sphinx/sphinx-2.0.10.ebuild100
-rw-r--r--app-misc/sphinx/sphinx-2.1.9.ebuild89
-rw-r--r--app-misc/sphinx/sphinx-2.2.11.ebuild91
8 files changed, 429 insertions, 0 deletions
diff --git a/app-misc/sphinx/Manifest b/app-misc/sphinx/Manifest
new file mode 100644
index 000000000000..8a145ad2494c
--- /dev/null
+++ b/app-misc/sphinx/Manifest
@@ -0,0 +1,14 @@
+AUX searchd.rc 656 SHA256 719ec5bed997d1040647ae9cccf2e164da5d9ea585d63cb79ea57034ca6b4db7 SHA512 0b24b6dfe10a99c9bb18b7acdaadf2f5d7e3fab2ea80a719bd65b9ea6f6dc83f249d4c2ecb52c48eed73e515f8e76bff294ff39b1ab6375a947a9a137211949c WHIRLPOOL 80e020e228062473dc23a1d0c0175119fc52d4dabdc3e91a86acd4784afdbe858490443a0dd05a8869fda881993610b7a4b186db53c0b0f7959261dc15dab6ad
+AUX sphinx-2.0.1_beta-darwin8.patch 538 SHA256 e7350f5c5fcd1a5a0925cdb9a775efd5747d5d790aa9eb3319717e98be82b683 SHA512 342d4ecd3e75c208e358a39de6e5cd2a2bd9dc627f53893869c2280ba5b50546c7edf8476c07cf681c8d1921eeadbeaf48c75337efba0349b951c7a4569f0c14 WHIRLPOOL 7b35a4081c03e821c10e17bb36b91d8a4f1438a64d1b29b979a2163a90419971b70ec6a8c2ee80bec34c4c505f0aa0d83a59bea9261bbb3a03960d2ba9d8f9e9
+DIST libstemmer_c-20091122.tgz 129207 SHA256 ad4e152379214480d599c86dd19421a36fce78cedd20fc324520c5bba0a512e7 SHA512 d1b2203dcc3d0f421526d3ec2f7e04889f93221222efe50501b4a1c7e74dfc51905141d4ada5a76feab5cec8dbc64f55dd55b53f6e89f658c67e72dc6667091d WHIRLPOOL 03baf5de80854a2726990d1f79e17a46342b0d8431a564805d78878bba1eba0c1aba6f4f53c64eb1a1946b50053632c32c9106305f0a53623068531f2b67b5c4
+DIST sphinx-0.9.9.tar.gz 1218359 SHA256 bf8f55ffc095ff6b628f0cbc7eb54761811140140679a1c869cc1b17c42803e4 SHA512 bf1f6b3429beac9336ed975137b9cc582541357df487ae97f407589458fa4cc4f3a797c868fd505c6b4e97a73b30a0f7f9c7ab6b3d8685ba173fde6d1d5383c2 WHIRLPOOL 70a7db079e35671c17f1c29d71569c4b643462475b10dbed6342a74ed20304ea740e442fb97af874fb3acc3cb9eb8a07ff43aa90dc90c9cf477fb1d651ced021
+DIST sphinx-2.0.10-release.tar.gz 2016687 SHA256 efc9e90d1edec4f159846c8d4ca8839e7dcf9ef88c117d0d369aaead75809f0a SHA512 d22a0ce261cd6decda2e9e91fc9806699c818bb45a9c9c5e11a0944a698d47b5862c577eb55e7b57dd208db982e7f8bfc7163af37aaedc1c537841aff1409952 WHIRLPOOL 46e17cc73225692e8ab73438547863ba78ef7c1be306bd46e393723220007b95d9a0ca62cbd8175423b62bf4599a68c4a4831ac6472d02249104ecdf0e3892ac
+DIST sphinx-2.1.9-release.tar.gz 2443797 SHA256 6289aa0ac3e1456a0c9181ce6bce2287778b5a163f685a1376e181fc87eb7c03 SHA512 7f4538011db5d68bd00c00978d476f780fc2d355113bd2819996bacbaef90b0de5b14c946a9aad83157b818d9b6b01ee0a26bc72862cfd151067ad9967c18f56 WHIRLPOOL fd9e6d31c8b9d88b8de7462ccd947aeb85d97ee4c23c64788653f732a5e47dad134c0f8cedc3b0ccc2d744eb0c4aaeb2d32fbdb02bae50be0d4ed8841a0683a1
+DIST sphinx-2.2.11-release.tar.gz 3061998 SHA256 6662039f093314f896950519fa781bc87610f926f64b3d349229002f06ac41a9 SHA512 cf1a262a5b0fbf0bd2827ec6ec629edeaf709ce855a6e7b509b65342baaeb26c02717ca63f1578d32c83d21e2fd6d1e92dceb34660e6351b93cd96fd4e623689 WHIRLPOOL 34e4aeb41f1b8e352404792cb18149542e624fd739b5d11bee688f49c8be5067553414e9bf57b4352408ce3a6ffb16ece843af8bcf3625a75813a6adaf231e62
+EBUILD sphinx-0.9.9.ebuild 1459 SHA256 2ed66f6df94ede4a9509b58f9f47662650fdef2270f26b0f6644b43ac083e75c SHA512 f3dafc5cbd51133e8290a11082a018a8cbffd587209398cc10ba04b65f19ef80ab0abcc08cec24602274281b51625c5cf490a3055572c9e9ebd164e531a776a6 WHIRLPOOL a213d8431f8170d3512a9e9a9c7769e4c7acca711203db651ab3ca26584d1196ef4e72206810c0a0123e11ef2d55c5c4305536974cc36d3e86cb33f2a6dd3b86
+EBUILD sphinx-2.0.10.ebuild 2618 SHA256 33f8d877e50383c13f63dde90803c02172e0bb4fbd0f8000fd120d9a32437b7a SHA512 1fb0f297183c55d0aefcb32d2c5594e28e85c441c49f32a5e65bab3598c69362a39b2ae8c471b34751a759aa86024901fe92c53784adad1e8845c732a2a4cb03 WHIRLPOOL 1854126f8db31290e7539a3af974f146f9b0a2d485abda6899035eaa3442c1fd2e5d3c109393377aacd4467a0c87c6caa96359b71c8c89737ee3862de5d9f699
+EBUILD sphinx-2.1.9.ebuild 2353 SHA256 9750378bd3a2a42327814200760f6aee8e3060634232cbdb091421fa6687e98a SHA512 fadf1c6b4861f1ba4307a4c5a6e18177ea44ad6d2b1a35a4a043309e97680258519216de8772446cd43d2a5500defb79978284f33b1e17944746b4b13a02cfc0 WHIRLPOOL 7ff12c7f44771f529370ec168e804e1b1e5629eb1934580f064b740587bb0459b695d563a4aad924bc632fe1f9d743c8a6372249f9da654d2a860993537d5359
+EBUILD sphinx-2.2.11.ebuild 2379 SHA256 b234cff9fb9f4e0e1a8903f2542c13559790046ebfb43bb090f1e5c3d4c23fdd SHA512 658227af2ac8ce1a5e1d0ac852528d2097ff8019470e9a50ea4c9f76a930dfccd83cbb1b7f57567bb8924236092be8b584c15203e7362c51564b1189eb06cd38 WHIRLPOOL dd9dd06d2f40341832cc170501fb59c52e87c4e072ebe1477734825d14e4efbf3e1d739280d70c9e1e966221b091fe99e02e175831a3d8810f1c41006e25b213
+MISC ChangeLog 5194 SHA256 e1a0f05491e13e252f2a5b7e473c4e4ed2d484a3b2d4bf90716cf48952f6ac34 SHA512 47f780eabfee326a0cbcd11cca701db875c4c52cd2157baa26f9e1ff72d35ba22d435d1d9e1e1329d419aa204e7b3d159d19c41e58fd895391204112ac9798c1 WHIRLPOOL d97c5693dfffe3fb37e2309d3a0c7eedd65995563a290c051ff50f31917c97861b8c0937889be326ba3bedbd4e56f95c4bd026c1cfe7e3a27cb736173cca98c1
+MISC ChangeLog-2015 12848 SHA256 98c9fd5b8b5ed98d0d98cd6adfe521e6330b6f690c55eb6e427ae41c7db3fb2b SHA512 92b78512fc6244a9612674a61f43348cea18b82b74ea0920df04b13d5874034ce30a4fddca0a10b5c179850c6de0b9cc2f3ef9ebb3309617d9d04c3716cfd011 WHIRLPOOL 862389cc878f65af26680eac8d1590e9d2505c268cdbe86faeb5db359220f99d82ece47f425828973456170599effbffbe89679fc412a7a2e4870e2b9c937821
+MISC metadata.xml 436 SHA256 7f7376931be063b65b8536f5643fe49388e5d8327e02539255e05f2a4306e94a SHA512 3083764b80745c3f6dd81c1bc9c2f406edcef6a451d49a79f952969db07c7741447df2b82a82a627b5ebe680f3ea36f99128ae701b553895f15b7bed0d8abecd WHIRLPOOL 55e9c7726a757d8a83803a1fca5fbfb65b608ffec3f9e7cbe35b92fa66d288cf873d7a354a99b9f258fc9449280e953c1d8e97423afc1c81870743cd49439add
diff --git a/app-misc/sphinx/files/searchd.rc b/app-misc/sphinx/files/searchd.rc
new file mode 100644
index 000000000000..55ff0e9c9b77
--- /dev/null
+++ b/app-misc/sphinx/files/searchd.rc
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ if [ ! -f /etc/sphinx/sphinx.conf ] ; then
+ eerror "Please create /etc/sphinx/sphinx.conf"
+ eerror "Sample conf: /etc/sphinx/sphinx.conf.dist"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Starting sphinx searchd"
+ start-stop-daemon --start --exec /usr/bin/searchd
+ eend $? "Failed to start sphinx searchd"
+}
+
+stop() {
+ ebegin "Stopping sphinx searchd"
+ start-stop-daemon --stop --exec /usr/bin/searchd
+ eend $? "Failed to stop sphinx searchd"
+}
diff --git a/app-misc/sphinx/files/sphinx-2.0.1_beta-darwin8.patch b/app-misc/sphinx/files/sphinx-2.0.1_beta-darwin8.patch
new file mode 100644
index 000000000000..e0dcd54097fd
--- /dev/null
+++ b/app-misc/sphinx/files/sphinx-2.0.1_beta-darwin8.patch
@@ -0,0 +1,22 @@
+Darwin8 has no backtrace functionalities yet
+
+--- src/sphinxutils.cpp
++++ src/sphinxutils.cpp
+@@ -1364,6 +1364,9 @@
+ }
+ sphSafeInfo ( iFD, "Stack bottom = 0x%p, thread stack size = 0x%x", pMyStack, iStackSize );
+
++#ifndef SIGRETURN_FRAME_OFFSET
++ sphLogFatal ( "Cannot get stack frame pointer on this architecture" );
++#else
+ while ( pMyStack && !bSafe )
+ {
+ sphSafeInfo ( iFD, "begin of manual backtrace:" );
+@@ -1421,6 +1424,7 @@
+
+ break;
+ }
++#endif
+
+ #if HAVE_BACKTRACE
+ sphSafeInfo ( iFD, "begin of system backtrace:" );
diff --git a/app-misc/sphinx/metadata.xml b/app-misc/sphinx/metadata.xml
new file mode 100644
index 000000000000..80a8842e3c97
--- /dev/null
+++ b/app-misc/sphinx/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>graaff@gentoo.org</email>
+</maintainer>
+<use>
+ <flag name="id64">use 64-bit document and word IDs</flag>
+ <flag name="re2">use the <pkg>dev-libs/re2</pkg> regular expression library</flag>
+ <flag name="stemmer">Enable language stemming support</flag>
+</use>
+</pkgmetadata>
diff --git a/app-misc/sphinx/sphinx-0.9.9.ebuild b/app-misc/sphinx/sphinx-0.9.9.ebuild
new file mode 100644
index 000000000000..462fd8723520
--- /dev/null
+++ b/app-misc/sphinx/sphinx-0.9.9.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+inherit eutils autotools
+
+WANT_AUTOMAKE="1.11"
+
+MY_P=${P/_/-}
+
+# This has been added by Gentoo, to explicitly version libstemmer.
+# It is the date that http://snowball.tartarus.org/dist/libstemmer_c.tgz was
+# fetched.
+STEMMER_PV="20091122"
+DESCRIPTION="Full-text search engine with support for MySQL and PostgreSQL"
+HOMEPAGE="http://www.sphinxsearch.com/"
+SRC_URI="http://sphinxsearch.com/downloads/${MY_P}.tar.gz
+ stemmer? ( mirror://gentoo/libstemmer_c-${STEMMER_PV}.tgz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug id64 mysql postgres stemmer test"
+
+RDEPEND="mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )"
+DEPEND="${RDEPEND}
+ test? ( dev-lang/php )"
+
+# Tests require a live database.
+RESTRICT="test"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${MY_P}.tar.gz
+ if use stemmer; then
+ cd "${S}"
+ unpack libstemmer_c-${STEMMER_PV}.tgz
+ fi
+}
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --sysconfdir="/etc/${PN}" \
+ $(use_enable id64) \
+ $(use_with debug) \
+ $(use_with mysql) \
+ $(use_with postgres pgsql) \
+ $(use_with stemmer libstemmer)
+}
+
+src_compile() {
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+ dodoc doc/*
+
+ dodir /var/lib/sphinx
+ dodir /var/log/sphinx
+ dodir /var/run/sphinx
+
+ newinitd "${FILESDIR}"/searchd.rc searchd
+}
diff --git a/app-misc/sphinx/sphinx-2.0.10.ebuild b/app-misc/sphinx/sphinx-2.0.10.ebuild
new file mode 100644
index 000000000000..1c327f6552d2
--- /dev/null
+++ b/app-misc/sphinx/sphinx-2.0.10.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils autotools toolchain-funcs
+
+#MY_P=${P/_/-}
+MY_P=${P}-release
+
+# This has been added by Gentoo, to explicitly version libstemmer.
+# It is the date that http://snowball.tartarus.org/dist/libstemmer_c.tgz was
+# fetched.
+STEMMER_PV="20091122"
+DESCRIPTION="Full-text search engine with support for MySQL and PostgreSQL"
+HOMEPAGE="http://www.sphinxsearch.com/"
+SRC_URI="http://sphinxsearch.com/files/${MY_P}.tar.gz
+ stemmer? ( mirror://gentoo/libstemmer_c-${STEMMER_PV}.tgz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris"
+IUSE="debug id64 mysql odbc postgres stemmer test"
+
+RDEPEND="mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ odbc? ( dev-db/unixODBC )
+ virtual/libiconv"
+DEPEND="${RDEPEND}
+ test? ( dev-lang/php )"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${MY_P}.tar.gz
+ if use stemmer; then
+ cd "${S}"
+ unpack libstemmer_c-${STEMMER_PV}.tgz
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.0.1_beta-darwin8.patch
+
+ # drop nasty hardcoded search path breaking Prefix
+ # We patch configure directly since otherwise we need to run
+ # eautoreconf twice and that causes problems, bug 425380
+ sed -i -e 's/\/usr\/local\//\/someplace\/nonexisting\//g' configure || die
+
+ # Fix QA compilation warnings.
+ sed -i -e '19i#include <string.h>' api/libsphinxclient/test.c || die
+
+ pushd api/libsphinxclient || die
+ eautoreconf
+ popd || die
+}
+
+src_configure() {
+ # fix libiconv detection
+ use !elibc_glibc && export ac_cv_search_iconv=-liconv
+
+ econf \
+ --sysconfdir="${EPREFIX}/etc/${PN}" \
+ $(use_enable id64) \
+ $(use_with debug) \
+ $(use_with mysql) \
+ $(use_with odbc unixodbc) \
+ $(use_with postgres pgsql) \
+ $(use_with stemmer libstemmer)
+
+ cd api/libsphinxclient || die
+ econf STRIP=:
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)" || die "emake failed"
+
+ emake -j 1 -C api/libsphinxclient || die "emake libsphinxclient failed"
+}
+
+src_test() {
+ elog "Tests require access to a live MySQL database and may require configuration."
+ elog "You will find them in /usr/share/${PN}/test and they require dev-lang/php"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+ emake DESTDIR="${D}" -C api/libsphinxclient install || die "install libsphinxclient failed"
+
+ dodoc doc/*
+
+ dodir /var/lib/sphinx
+ dodir /var/log/sphinx
+
+ newinitd "${FILESDIR}"/searchd.rc searchd
+
+ if use test; then
+ insinto /usr/share/${PN}
+ doins -r test
+ fi
+}
diff --git a/app-misc/sphinx/sphinx-2.1.9.ebuild b/app-misc/sphinx/sphinx-2.1.9.ebuild
new file mode 100644
index 000000000000..b34fbf799e50
--- /dev/null
+++ b/app-misc/sphinx/sphinx-2.1.9.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils autotools toolchain-funcs
+
+#MY_P=${P/_/-}
+MY_P=${P}-release
+
+DESCRIPTION="Full-text search engine with support for MySQL and PostgreSQL"
+HOMEPAGE="http://www.sphinxsearch.com/"
+SRC_URI="http://sphinxsearch.com/files/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris"
+IUSE="debug id64 mysql odbc postgres stemmer syslog test xml"
+
+RDEPEND="mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ odbc? ( dev-db/unixODBC )
+ stemmer? ( dev-libs/snowball-stemmer )
+ xml? ( dev-libs/expat )
+ virtual/libiconv"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.0.1_beta-darwin8.patch
+
+ # drop nasty hardcoded search path breaking Prefix
+ # We patch configure directly since otherwise we need to run
+ # eautoreconf twice and that causes problems, bug 425380
+ sed -i -e 's/\/usr\/local\//\/someplace\/nonexisting\//g' configure || die
+
+ # Fix QA compilation warnings.
+ sed -i -e '19i#include <string.h>' api/libsphinxclient/test.c || die
+
+ pushd api/libsphinxclient || die
+ eautoreconf
+ popd || die
+}
+
+src_configure() {
+ # fix libiconv detection
+ use !elibc_glibc && export ac_cv_search_iconv=-liconv
+
+ econf \
+ --sysconfdir="${EPREFIX}/etc/${PN}" \
+ $(use_enable id64) \
+ $(use_with debug) \
+ $(use_with mysql) \
+ $(use_with odbc unixodbc) \
+ $(use_with postgres pgsql) \
+ $(use_with stemmer libstemmer) \
+ $(use_with syslog syslog) \
+ $(use_with xml libexpat )
+
+ cd api/libsphinxclient || die
+ econf STRIP=:
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)" || die "emake failed"
+
+ emake -j 1 -C api/libsphinxclient || die "emake libsphinxclient failed"
+}
+
+src_test() {
+ elog "Tests require access to a live MySQL database and may require configuration."
+ elog "You will find them in /usr/share/${PN}/test and they require dev-lang/php"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+ emake DESTDIR="${D}" -C api/libsphinxclient install || die "install libsphinxclient failed"
+
+ dodoc doc/*
+
+ dodir /var/lib/sphinx
+ dodir /var/log/sphinx
+
+ newinitd "${FILESDIR}"/searchd.rc searchd
+
+ if use test; then
+ insinto /usr/share/${PN}
+ doins -r test
+ fi
+}
diff --git a/app-misc/sphinx/sphinx-2.2.11.ebuild b/app-misc/sphinx/sphinx-2.2.11.ebuild
new file mode 100644
index 000000000000..4284f2a9dabf
--- /dev/null
+++ b/app-misc/sphinx/sphinx-2.2.11.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils autotools toolchain-funcs
+
+#MY_P=${P/_/-}
+MY_P=${P}-release
+
+DESCRIPTION="Full-text search engine with support for MySQL and PostgreSQL"
+HOMEPAGE="http://www.sphinxsearch.com/"
+SRC_URI="http://sphinxsearch.com/files/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris"
+IUSE="debug +id64 mysql odbc postgres re2 stemmer syslog xml"
+
+RDEPEND="mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:* )
+ odbc? ( dev-db/unixODBC )
+ re2? ( dev-libs/re2 )
+ stemmer? ( dev-libs/snowball-stemmer )
+ xml? ( dev-libs/expat )
+ virtual/libiconv"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.0.1_beta-darwin8.patch
+
+ # drop nasty hardcoded search path breaking Prefix
+ # We patch configure directly since otherwise we need to run
+ # eautoreconf twice and that causes problems, bug 425380
+ sed -i -e 's/\/usr\/local\//\/someplace\/nonexisting\//g' configure || die
+
+ # Fix QA compilation warnings.
+ sed -i -e '19i#include <string.h>' api/libsphinxclient/test.c || die
+
+ pushd api/libsphinxclient || die
+ eautoreconf
+ popd || die
+
+ # Drop bundled code to ensure building against system versions. We
+ # cannot remove libstemmer_c since configure updates its Makefile.
+ rm -rf libexpat libre2 || die
+}
+
+src_configure() {
+ # fix libiconv detection
+ use !elibc_glibc && export ac_cv_search_iconv=-liconv
+
+ econf \
+ --sysconfdir="${EPREFIX}/etc/${PN}" \
+ $(use_enable id64) \
+ $(use_with debug) \
+ $(use_with mysql) \
+ $(use_with odbc unixodbc) \
+ $(use_with postgres pgsql) \
+ $(use_with re2) \
+ $(use_with stemmer libstemmer) \
+ $(use_with syslog syslog) \
+ $(use_with xml libexpat )
+
+ cd api/libsphinxclient || die
+ econf STRIP=:
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)" || die "emake failed"
+
+ emake -j 1 -C api/libsphinxclient || die "emake libsphinxclient failed"
+}
+
+src_test() {
+ # Tests require a live database and only work from the source
+ # directory.
+ :
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+ emake DESTDIR="${D}" -C api/libsphinxclient install || die "install libsphinxclient failed"
+
+ dodoc doc/*
+
+ dodir /var/lib/sphinx
+ dodir /var/log/sphinx
+
+ newinitd "${FILESDIR}"/searchd.rc searchd
+}