ports/164635: [maintainer] textproc/sphinxsearch -- clang support, etc
Matthew Seaman
m.seaman at infracaninophile.co.uk
Mon Jan 30 13:40:11 UTC 2012
>Number: 164635
>Category: ports
>Synopsis: [maintainer] textproc/sphinxsearch -- clang support, etc
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Mon Jan 30 13:40:10 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Matthew Seaman
>Release: FreeBSD 8.2-STABLE amd64
>Organization:
Infracaninophile
>Environment:
System: FreeBSD lucid-nonsense.infracaninophile.co.uk 8.2-STABLE FreeBSD 8.2-STABLE #0 r228845: Fri Dec 23 19:13:12 GMT 2011 root at lucid-nonsense.infracaninophile.co.uk:/usr/obj/usr/src/sys/LUCID-NONSENSE amd64
>Description:
* New patch files to enable compilation using clang:
files/patch-configure
files/patch-src_sphinxexpr.cpp
* Add libstemmer support, disabled by default. This adds stemming
support for French, Spanish, Portuguese, Italian, Romanian,
German, Dutch, Swedish, Norwegian, Danish, Finnish and Hungarian
* Clean up various OPTIONS related make code: if WITH_FOO is defined,
then WITHOUT_FOO isn't, and vice-versa. Even if make config has
never been run.
PORTREVISION not bumped, as there should be no significant changes to
the default package.
>How-To-Repeat:
>Fix:
--- sphinxsearch-port.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/textproc/sphinxsearch/Makefile,v
retrieving revision 1.18
diff -u -u -r1.18 Makefile
--- Makefile 31 Dec 2011 22:32:24 -0000 1.18
+++ Makefile 30 Jan 2012 12:47:05 -0000
@@ -13,6 +13,7 @@
CATEGORIES= textproc databases
MASTER_SITES= http://sphinxsearch.com/files/
DISTNAME= sphinx-${PORTVERSION}-release
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= m.seaman at infracaninophile.co.uk
COMMENT= Sphinx Full-Text Search Engine
@@ -30,10 +31,8 @@
OPTIMIZED_CFLAGS "Use compiler optimization (-O3)" off \
ID64 "use 64-bit document and word IDs" off \
UNIXODBC "unixODBC support" off \
- SYSLOG "enable logging via syslog" on
-
-## FFR
-## LIBSTEMMER "compile with libstemmer support" off
+ SYSLOG "enable logging via syslog" on \
+ LIBSTEMMER "compile with libstemmer support" off
CONFLICTS= sphinxsearch-devel-[0-9]*
@@ -42,21 +41,21 @@
# The port will successfully compile with both PGSQL and MYSQL support
# simultaneously. Not sure how useful that is in practice though.
-.if defined(WITH_MYSQL) && !defined(WITHOUT_MYSQL)
+.if defined(WITH_MYSQL)
CONFIGURE_ARGS+= --with-mysql
USE_MYSQL= yes
.else
CONFIGURE_ARGS+= --without-mysql
.endif
-.if defined(WITH_PGSQL) && !defined(WITHOUT_PGSQL)
+.if defined(WITH_PGSQL)
CONFIGURE_ARGS+= --with-pgsql
USE_PGSQL= yes
.else
CONFIGURE_ARGS+= --without-pgsql
.endif
-.if defined(WITH_ICONV) && !defined(WITHOUT_ICONV)
+.if defined(WITH_ICONV)
CONFIGURE_ARGS+= --with-iconv
USE_ICONV= yes
.else
@@ -81,29 +80,38 @@
CONFIGURE_ARGS+= --without-unixodbc
.endif
-.if defined(WITH_SYSLOG) && !defined(WITHOUT_SYSLOG)
+.if defined(WITH_SYSLOG)
CONFIGURE_ARGS+= --with-syslog
.else
CONFIGURE_ARGS+= --without-syslog
.endif
-## FFR. The snowball project doesn't release numbered versions of
-## it's pre-processors. Instead, at arbitrary intervals a snapshot of
-## their source repository is turned into a tarball (always the same
-## filename) and placed on their web site. It's like they want to
-## make it as hard as possible for anyone to package and use their
-## software.
-##
-## # Adds support for two additional word stemmming pre-processors
-## # from the Snowball project (http://snowball.tartarus.org/) --
-## # these essentially do exactly the same thing as the built in
-## # English and Russian stemmers but are slightly slower and may
-## # produce subtly different output. Disabled by default.
-## .if defined(WITH_LIBSTEMMER) && !defined(WITHOUT_LIBSTEMMER)
-## CONFIGURE_ARGS+= --with-libstemmer
-## .else
-## CONFIGURE_ARGS+= --without-libstemmer
-## .endif
+# Note: The snowball project doesn't release numbered versions of it's
+# pre-processors. Instead, at arbitrary but fairly long intervals a
+# snapshot of their source repository is turned into a tarball (always
+# the same filename) and placed on their web site. It's like they
+# want to make it as hard as possible for anyone to package and use
+# their software.
+#
+# Adds support for two additional word stemmming pre-processors from
+# the Snowball project (http://snowball.tartarus.org/) -- these
+# essentially do exactly the same thing as the built in English,
+# Russian and Czech stemmers but also support French, Spanish,
+# Portuguese, Italian, Romanian, German, Dutch, Swedish, Norwegian,
+# Danish, Finnish, Hungarian. Disabled by default.
+
+.if defined(WITH_LIBSTEMMER) || make(makesum) || defined(FETCH_ALL)
+MASTER_SITES+= http://snowball.tartarus.org/dist/:libstemmer
+LIBSTEMMER_TGZ= libstemmer_c.tgz
+DISTFILES+= ${LIBSTEMMER_TGZ}:libstemmer
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
+.endif
+
+.if defined(WITH_LIBSTEMMER)
+CONFIGURE_ARGS+= --with-libstemmer
+.else
+CONFIGURE_ARGS+= --without-libstemmer
+.endif
USERS?= _sphinx
GROUPS?= _sphinx
@@ -137,8 +145,14 @@
DOCS= doc/sphinx.css doc/sphinx.html doc/sphinx.txt doc/sphinx.xml
.endif
-# Fix up the sample configuration file to correspond to FreeBSD norms
+post-extract:
+.if defined(WITH_LIBSTEMMER)
+ @( cd ${WRKSRC} && \
+ ${GZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${LIBSTEMMER_TGZ} \
+ ${EXTRACT_AFTER_ARGS} )
+.endif
+# Fix up the sample configuration file to correspond to FreeBSD norms
post-patch:
@${REINPLACE_CMD} \
-e "s!@CONFDIR@/log/searchd.pid!${SPHINX_RUN}/searchd.pid!" \
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/textproc/sphinxsearch/distinfo,v
retrieving revision 1.8
diff -u -u -r1.8 distinfo
--- distinfo 31 Dec 2011 22:32:24 -0000 1.8
+++ distinfo 30 Jan 2012 12:47:05 -0000
@@ -1,2 +1,4 @@
SHA256 (sphinx-2.0.3-release.tar.gz) = 875af63473875b7c7e152e85ed34bd1a92d09db062a289b594bf049b3a8c82dd
SIZE (sphinx-2.0.3-release.tar.gz) = 1923911
+SHA256 (libstemmer_c.tgz) = e9c3a2c13acf34945054e35ad53b7410c61f046d4044c0ade620fdac253bab46
+SIZE (libstemmer_c.tgz) = 129529
Index: files/patch-configure
===================================================================
RCS file: files/patch-configure
diff -N files/patch-configure
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-configure 30 Jan 2012 12:47:05 -0000
@@ -0,0 +1,14 @@
+
+$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
Index: files/patch-src_sphinxexpr.cpp
===================================================================
RCS file: files/patch-src_sphinxexpr.cpp
diff -N files/patch-src_sphinxexpr.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-src_sphinxexpr.cpp 30 Jan 2012 12:47:05 -0000
@@ -0,0 +1,32 @@
+
+$FreeBSD$
+
+--- src/sphinxexpr.cpp.orig
++++ src/sphinxexpr.cpp
+@@ -1796,7 +1796,7 @@
+ /// 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 @@
+ /// 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 @@
+ /// 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;
+ }
+
--- sphinxsearch-port.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list