aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatthew <matthew@FreeBSD.org>2012-11-29 05:51:55 +0800
committermatthew <matthew@FreeBSD.org>2012-11-29 05:51:55 +0800
commit22c5296fa5801339f94e3d46381cff6cb26a7910 (patch)
treed91a362ed6b6a45bae765b0acff2bbc4ae3a6079
parent716ced041832c86a1c3813c90bd75476732dbaf7 (diff)
downloadfreebsd-ports-gnome-22c5296fa5801339f94e3d46381cff6cb26a7910.tar.gz
freebsd-ports-gnome-22c5296fa5801339f94e3d46381cff6cb26a7910.tar.zst
freebsd-ports-gnome-22c5296fa5801339f94e3d46381cff6cb26a7910.zip
Update to 2.0.6 release (1)
- trim Makefile headers - remove files/patch-configure as it has been incorporated upstream - Import a FreeBSD specific fix for shared mutex suppport from the project SVN repo (2): https://code.google.com/p/sphinxsearch/source/detail?r=3519 Feature safe: yes Submitted by: (1) Portscout (2) Denis <devzone.my@gmail.com>
-rw-r--r--textproc/sphinxsearch/Makefile7
-rw-r--r--textproc/sphinxsearch/distinfo4
-rw-r--r--textproc/sphinxsearch/files/patch-configure14
-rw-r--r--textproc/sphinxsearch/files/patch-src__sphinxstd.cpp107
-rw-r--r--textproc/sphinxsearch/files/patch-src__sphinxstd.h50
5 files changed, 161 insertions, 21 deletions
diff --git a/textproc/sphinxsearch/Makefile b/textproc/sphinxsearch/Makefile
index b5c23751a2a8..c7486500f397 100644
--- a/textproc/sphinxsearch/Makefile
+++ b/textproc/sphinxsearch/Makefile
@@ -1,7 +1,4 @@
-# New ports collection makefile for: Sphinx full-text search engine
-# Date created: 12 November 2006
-# Whom: Matthew Seaman <m.seaman@infracaninophile.co.uk>
-#
+# Created by: Matthew Seaman
# $FreeBSD$
#
# Note: the Sphinx Storage Engine MySQL plugin is not supported by
@@ -9,7 +6,7 @@
# See http://www.infracaninophile.co.uk/articles/sphinxse.html
PORTNAME= sphinxsearch
-PORTVERSION= 2.0.5
+PORTVERSION= 2.0.6
CATEGORIES= textproc databases
MASTER_SITES= http://sphinxsearch.com/files/
DISTNAME= sphinx-${PORTVERSION}-release
diff --git a/textproc/sphinxsearch/distinfo b/textproc/sphinxsearch/distinfo
index 7ad0cd8536f9..9227c9921121 100644
--- a/textproc/sphinxsearch/distinfo
+++ b/textproc/sphinxsearch/distinfo
@@ -1,4 +1,4 @@
-SHA256 (sphinx-2.0.5-release.tar.gz) = 45d89b9112cf52adb2a7289df3b6f4d37371bad8f892b9da4b75b574c7e6ba90
-SIZE (sphinx-2.0.5-release.tar.gz) = 1959258
+SHA256 (sphinx-2.0.6-release.tar.gz) = de943c397efda706661b3a12e12e9f8cc8a03bf6c02c5a6ba967a06384feede2
+SIZE (sphinx-2.0.6-release.tar.gz) = 1972728
SHA256 (libstemmer_c.tgz) = 19f1ef2a7ee03246f10dd963bcaa5a401a10b7f85f7488415e309e5dbe9f4cf9
SIZE (libstemmer_c.tgz) = 129520
diff --git a/textproc/sphinxsearch/files/patch-configure b/textproc/sphinxsearch/files/patch-configure
deleted file mode 100644
index e55be031654c..000000000000
--- a/textproc/sphinxsearch/files/patch-configure
+++ /dev/null
@@ -1,14 +0,0 @@
-
-$FreeBSD$
-
---- configure.orig
-+++ configure
-@@ -4361,7 +4361,7 @@
-
- #ifdef __GNUC__
- #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 3)
--void main() {}
-+int main() {return 0;}
- #else
- syntax error
- #endif
diff --git a/textproc/sphinxsearch/files/patch-src__sphinxstd.cpp b/textproc/sphinxsearch/files/patch-src__sphinxstd.cpp
new file mode 100644
index 000000000000..7748d0810b53
--- /dev/null
+++ b/textproc/sphinxsearch/files/patch-src__sphinxstd.cpp
@@ -0,0 +1,107 @@
+--- ./src/sphinxstd.cpp.orig 2012-11-28 21:23:23.177922214 +0000
++++ ./src/sphinxstd.cpp 2012-11-28 21:23:34.961920201 +0000
+@@ -1,5 +1,5 @@
+ //
+-// $Id: sphinxstd.cpp 3445 2012-10-12 10:45:41Z kevg $
++// $Id$
+ //
+
+ //
+@@ -737,6 +737,24 @@
+ {
+ m_pMutex = NULL;
+
++#ifdef __FreeBSD__
++ CSphString sError, sWarning;
++ if ( !m_pStorage.Alloc ( sizeof(sem_t) + iExtraSize, sError, sWarning ) )
++ {
++ m_sError.SetSprintf ( "storage.alloc, error='%s', warning='%s'", sError.cstr(), sWarning.cstr() );
++ return;
++ }
++
++ m_pMutex = (sem_t*) m_pStorage.GetWritePtr ();
++ int iRes = sem_init ( m_pMutex, 1, 1 );
++ if ( iRes )
++ {
++ m_sError.SetSprintf ( "sem_init, errno=%d ", iRes );
++ m_pMutex = NULL;
++ m_pStorage.Reset ();
++ return;
++ }
++#else
+ pthread_mutexattr_t tAttr;
+ int iRes = pthread_mutexattr_init ( &tAttr );
+ if ( iRes )
+@@ -767,6 +785,7 @@
+ m_pStorage.Reset ();
+ return;
+ }
++#endif // __FreeBSD__
+ }
+ #else
+ CSphProcessSharedMutex::CSphProcessSharedMutex ( int )
+@@ -777,18 +796,28 @@
+ void CSphProcessSharedMutex::Lock () const
+ {
+ #if !USE_WINDOWS
++#ifdef __FreeBSD__
++ if ( m_pMutex )
++ sem_wait ( m_pMutex );
++#else
+ if ( m_pMutex )
+ pthread_mutex_lock ( m_pMutex );
+ #endif
++#endif
+ }
+
+
+ void CSphProcessSharedMutex::Unlock () const
+ {
+ #if !USE_WINDOWS
++#ifdef __FreeBSD__
++ if ( m_pMutex )
++ sem_post ( m_pMutex );
++#else
+ if ( m_pMutex )
+ pthread_mutex_unlock ( m_pMutex );
+ #endif
++#endif
+ }
+
+
+@@ -802,6 +831,20 @@
+ if ( !m_pMutex )
+ return false;
+
++#ifdef __FreeBSD__
++ struct timespec tp;
++ clock_gettime ( CLOCK_REALTIME, &tp );
++
++ tp.tv_nsec += tmSpin * 1000;
++ if ( tp.tv_nsec > 1000000 )
++ {
++ int iDelta = (int)( tp.tv_nsec / 1000000 );
++ tp.tv_sec += iDelta * 1000000;
++ tp.tv_nsec -= iDelta * 1000000;
++ }
++
++ return ( sem_timedwait ( m_pMutex, &tp )==0 );
++#else
+ #if defined(HAVE_PTHREAD_MUTEX_TIMEDLOCK) && defined(HAVE_CLOCK_GETTIME)
+ struct timespec tp;
+ clock_gettime ( CLOCK_REALTIME, &tp );
+@@ -830,6 +873,7 @@
+
+ return iRes==0;
+ #endif // HAVE_PTHREAD_MUTEX_TIMEDLOCK && HAVE_CLOCK_GETTIME
++#endif // __FreeBSD__
+ #endif // USE_WINDOWS
+ }
+
+@@ -1338,5 +1382,5 @@
+ #endif
+
+ //
+-// $Id: sphinxstd.cpp 3445 2012-10-12 10:45:41Z kevg $
++// $Id$
+ //
diff --git a/textproc/sphinxsearch/files/patch-src__sphinxstd.h b/textproc/sphinxsearch/files/patch-src__sphinxstd.h
new file mode 100644
index 000000000000..2c7020c7757b
--- /dev/null
+++ b/textproc/sphinxsearch/files/patch-src__sphinxstd.h
@@ -0,0 +1,50 @@
+--- ./src/sphinxstd.h.orig 2012-11-28 21:23:17.008920478 +0000
++++ ./src/sphinxstd.h 2012-11-28 21:23:38.979912416 +0000
+@@ -1,5 +1,5 @@
+ //
+-// $Id: sphinxstd.h 3461 2012-10-19 09:48:07Z kevg $
++// $Id$
+ //
+
+ //
+@@ -62,6 +62,9 @@
+ #include <sys/mman.h>
+ #include <errno.h>
+ #include <pthread.h>
++#ifdef __FreeBSD__
++#include <semaphore.h>
++#endif
+ #endif
+
+ /////////////////////////////////////////////////////////////////////////////
+@@ -2032,7 +2035,11 @@
+ protected:
+ #if !USE_WINDOWS
+ CSphSharedBuffer<BYTE> m_pStorage;
++#ifdef __FreeBSD__
++ sem_t * m_pMutex;
++#else
+ pthread_mutex_t * m_pMutex;
++#endif
+ CSphString m_sError;
+ #endif
+ };
+@@ -2050,7 +2057,11 @@
+ {
+ if ( m_pMutex )
+ {
++#ifdef __FreeBSD__
++ m_pValue = reinterpret_cast<T*> ( m_pStorage.GetWritePtr () + sizeof ( sem_t ) );
++#else
+ m_pValue = reinterpret_cast<T*> ( m_pStorage.GetWritePtr () + sizeof ( pthread_mutex_t ) );
++#endif
+ *m_pValue = tInitValue;
+ }
+ }
+@@ -2478,5 +2489,5 @@
+ #endif // _sphinxstd_
+
+ //
+-// $Id: sphinxstd.h 3461 2012-10-19 09:48:07Z kevg $
++// $Id$
+ //