diff options
Diffstat (limited to 'app-misc/sphinx')
-rw-r--r-- | app-misc/sphinx/Manifest | 5 | ||||
-rw-r--r-- | app-misc/sphinx/files/searchd.rc | 32 | ||||
-rw-r--r-- | app-misc/sphinx/files/sphinx-1.10_beta-darwin8.patch | 23 | ||||
-rw-r--r-- | app-misc/sphinx/files/sphinx-1.10_beta-libsphinxclient-darwin.patch | 22 | ||||
-rw-r--r-- | app-misc/sphinx/files/sphinx-1.10_beta-nosigpipe.patch | 26 | ||||
-rw-r--r-- | app-misc/sphinx/files/sphinx-2.0.1_beta-darwin8.patch | 22 | ||||
-rw-r--r-- | app-misc/sphinx/files/sphinx-2.0.1_beta-solaris.patch | 35 | ||||
-rw-r--r-- | app-misc/sphinx/files/sphinx-2.0.4_gcc-4.7.patch | 29 | ||||
-rw-r--r-- | app-misc/sphinx/metadata.xml | 11 | ||||
-rw-r--r-- | app-misc/sphinx/sphinx-0.9.9.ebuild | 71 | ||||
-rw-r--r-- | app-misc/sphinx/sphinx-2.0.10.ebuild | 101 | ||||
-rw-r--r-- | app-misc/sphinx/sphinx-2.1.8.ebuild | 90 | ||||
-rw-r--r-- | app-misc/sphinx/sphinx-2.1.9.ebuild | 90 |
13 files changed, 557 insertions, 0 deletions
diff --git a/app-misc/sphinx/Manifest b/app-misc/sphinx/Manifest new file mode 100644 index 000000000000..fe330f828260 --- /dev/null +++ b/app-misc/sphinx/Manifest @@ -0,0 +1,5 @@ +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.8-release.tar.gz 2442119 SHA256 8aebff8b00ec07b71790a67781c80a9a9b3ee28e2a35b226663aaf37cb78b6db SHA512 e53d62a694c1f89a9614d15a7820f245cdad03d6bc4d512dd3dd743908f11c582f45d5cc0a416d0d05b4cbfaffc491fe40e704c03149774ef498b54519d288cf WHIRLPOOL e4bb44920ed536bf6f8dd52fa1c373e9c88fb07a98a7458bd6f39feee2f10323bae13431d26d6340537cc3d2bfde9b4af188cac89b8bf1694aeb3d0842ad71e7 +DIST sphinx-2.1.9-release.tar.gz 2443797 SHA256 6289aa0ac3e1456a0c9181ce6bce2287778b5a163f685a1376e181fc87eb7c03 SHA512 7f4538011db5d68bd00c00978d476f780fc2d355113bd2819996bacbaef90b0de5b14c946a9aad83157b818d9b6b01ee0a26bc72862cfd151067ad9967c18f56 WHIRLPOOL fd9e6d31c8b9d88b8de7462ccd947aeb85d97ee4c23c64788653f732a5e47dad134c0f8cedc3b0ccc2d744eb0c4aaeb2d32fbdb02bae50be0d4ed8841a0683a1 diff --git a/app-misc/sphinx/files/searchd.rc b/app-misc/sphinx/files/searchd.rc new file mode 100644 index 000000000000..3719850bb006 --- /dev/null +++ b/app-misc/sphinx/files/searchd.rc @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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-1.10_beta-darwin8.patch b/app-misc/sphinx/files/sphinx-1.10_beta-darwin8.patch new file mode 100644 index 000000000000..73ddd556d76d --- /dev/null +++ b/app-misc/sphinx/files/sphinx-1.10_beta-darwin8.patch @@ -0,0 +1,23 @@ +Darwin8 has no backtrace functionalities yet + +--- src/searchd.cpp ++++ src/searchd.cpp +@@ -1291,6 +1291,10 @@ + __asm __volatile__ ( "movq %%rbp,%0":"=r"(pFramePointer):"r"(pFramePointer) ); + #endif + ++#ifndef SIGRETURN_FRAME_OFFSET ++ sphLogFatal ( "Cannot get stack frame pointer on this architecture" ); ++#else ++ + if ( !pFramePointer ) + { + sphLogFatal ( "Frame pointer is null. Unable to backtrace the stack. Did you build the searchd with -fomit-frame-pointer?" ); +@@ -1329,6 +1333,7 @@ + if ( !bOk ) + sphWarning ( "Something wrong in frame pointers. BackTrace failed (failed FP was %p)", pNewFP ); + else ++#endif + #endif // !HAVE_BACKTRACE + sphInfo ( "Stack trace seems to be succesfull. Now you have to resolve the numbers above and attach resolved values to the bugreport. See the section about resolving in the documentation" ); + diff --git a/app-misc/sphinx/files/sphinx-1.10_beta-libsphinxclient-darwin.patch b/app-misc/sphinx/files/sphinx-1.10_beta-libsphinxclient-darwin.patch new file mode 100644 index 000000000000..594b7351e121 --- /dev/null +++ b/app-misc/sphinx/files/sphinx-1.10_beta-libsphinxclient-darwin.patch @@ -0,0 +1,22 @@ +On Darwin, the linker doesn't like it when vsnprintf is prefixed by an +underscore. This obviously is an error, since it's only necessary for +Windows. Add an extra guard, such that vsnprintf is left alone. + +--- api/libsphinxclient/sphinxclient.c ++++ api/libsphinxclient/sphinxclient.c +@@ -13,6 +13,7 @@ + // did not, you can find it at http://www.gnu.org/ + // + ++#if defined(_MSC_VER) + #if _MSC_VER>=1400 + // VS 2005 and above + #define _CRT_SECURE_NO_DEPRECATE 1 +@@ -21,6 +22,7 @@ + // VS 2003 and below + #define vsnprintf _vsnprintf + #endif ++#endif + + #include <stdlib.h> + #include <stdarg.h> diff --git a/app-misc/sphinx/files/sphinx-1.10_beta-nosigpipe.patch b/app-misc/sphinx/files/sphinx-1.10_beta-nosigpipe.patch new file mode 100644 index 000000000000..a713a891f21d --- /dev/null +++ b/app-misc/sphinx/files/sphinx-1.10_beta-nosigpipe.patch @@ -0,0 +1,26 @@ +Part of upstream fix: +http://code.google.com/p/sphinxsearch/source/detail?r=2423 + +--- api/libsphinxclient/sphinxclient.c.~1~ 2010-07-15 13:05:40.000000000 +0200 ++++ api/libsphinxclient/sphinxclient.c 2010-11-09 19:55:28.964939046 +0100 +@@ -1268,7 +1268,11 @@ + static sphinx_bool net_write ( int fd, const char * bytes, int len, sphinx_client * client ) + { + int res; ++#if defined(_WIN32) || defined(SO_NOSIGPIPE) + res = send ( fd, bytes, len, 0 ); ++#else ++ res = send ( fd, bytes, len, MSG_NOSIGNAL ); ++#endif + + if ( res<0 ) + { +@@ -1354,7 +1358,7 @@ + } + + optval = 1; +-#ifndef _WIN32 ++#if defined(SO_NOSIGPIPE) + if ( setsockopt ( sock, SOL_SOCKET, SO_NOSIGPIPE, (void *)&optval, (socklen_t)sizeof(optval) ) < 0 ) + { + set_error ( client, "setsockopt() failed: %s", sock_error() ); 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/files/sphinx-2.0.1_beta-solaris.patch b/app-misc/sphinx/files/sphinx-2.0.1_beta-solaris.patch new file mode 100644 index 000000000000..6cc69d2ccd96 --- /dev/null +++ b/app-misc/sphinx/files/sphinx-2.0.1_beta-solaris.patch @@ -0,0 +1,35 @@ +link against required libraries +include sys/fcntl.h for F_[SG]ET constants +don't try to use an undefined constant + +--- api/libsphinxclient/configure.in ++++ api/libsphinxclient/configure.in +@@ -33,6 +33,9 @@ + dnl Checks for header files. + AC_CHECK_HEADERS(string.h strings.h unistd.h stdint.h) + ++AC_CHECK_LIB([nsl], gethostbyname) ++AC_CHECK_LIB([socket], connect) ++ + DEFAULT_INSTALL_PREFIX="/usr/local" + + AC_ARG_ENABLE(debug, +--- api/libsphinxclient/sphinxclient.c ++++ api/libsphinxclient/sphinxclient.c +@@ -57,6 +57,7 @@ + #include <netdb.h> + #include <errno.h> + #include <sys/un.h> ++ #include <sys/fcntl.h> + #endif + + ////////////////////////////////////////////////////////////////////////// +@@ -1280,7 +1281,7 @@ + static sphinx_bool net_write ( int fd, const char * bytes, int len, sphinx_client * client ) + { + int res; +-#if defined(_WIN32) || defined(SO_NOSIGPIPE) ++#if defined(_WIN32) || defined(SO_NOSIGPIPE) || !defined(MSG_NOSIGNAL) + res = send ( fd, bytes, len, 0 ); + #else + res = send ( fd, bytes, len, MSG_NOSIGNAL ); diff --git a/app-misc/sphinx/files/sphinx-2.0.4_gcc-4.7.patch b/app-misc/sphinx/files/sphinx-2.0.4_gcc-4.7.patch new file mode 100644 index 000000000000..180db1b57c45 --- /dev/null +++ b/app-misc/sphinx/files/sphinx-2.0.4_gcc-4.7.patch @@ -0,0 +1,29 @@ +--- a/src/sphinxexpr.cpp ++++ b/src/sphinxexpr.cpp +@@ -1796,7 +1796,7 @@ public: + /// evaluate arg, return interval id + virtual int IntEval ( const CSphMatch & tMatch ) const + { +- T val = ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage ++ T val = this->ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage + ARRAY_FOREACH ( i, this->m_dValues ) // FIXME! OPTIMIZE! perform binary search here + if ( val<this->m_dValues[i] ) + return i; +@@ -1827,7 +1827,7 @@ public: + /// evaluate arg, return interval id + virtual int IntEval ( const CSphMatch & tMatch ) const + { +- T val = ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage ++ T val = this->ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage + ARRAY_FOREACH ( i, m_dTurnPoints ) + if ( val < Expr_ArgVsSet_c<T>::ExprEval ( m_dTurnPoints[i], tMatch ) ) + return i; +@@ -1873,7 +1873,7 @@ public: + /// evaluate arg, check if the value is within set + virtual int IntEval ( const CSphMatch & tMatch ) const + { +- T val = ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage ++ T val = this->ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage + return this->m_dValues.BinarySearch ( val )!=NULL; + } + diff --git a/app-misc/sphinx/metadata.xml b/app-misc/sphinx/metadata.xml new file mode 100644 index 000000000000..d605858165cf --- /dev/null +++ b/app-misc/sphinx/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>graaff@gentoo.org</email> +</maintainer> +<use> + <flag name='id64'>use 64-bit document and word IDs</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..3f6b0db95494 --- /dev/null +++ b/app-misc/sphinx/sphinx-0.9.9.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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..64bc30073f64 --- /dev/null +++ b/app-misc/sphinx/sphinx-2.0.10.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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.8.ebuild b/app-misc/sphinx/sphinx-2.1.8.ebuild new file mode 100644 index 000000000000..9fa5e9f97f8a --- /dev/null +++ b/app-misc/sphinx/sphinx-2.1.8.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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.1.9.ebuild b/app-misc/sphinx/sphinx-2.1.9.ebuild new file mode 100644 index 000000000000..3f2b3307dbb4 --- /dev/null +++ b/app-misc/sphinx/sphinx-2.1.9.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 +} |