diff options
Diffstat (limited to 'app-misc/sphinx/files')
-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 |
7 files changed, 189 insertions, 0 deletions
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; + } + |