diff options
author | danger <danger@FreeBSD.org> | 2013-11-29 22:30:25 +0800 |
---|---|---|
committer | danger <danger@FreeBSD.org> | 2013-11-29 22:30:25 +0800 |
commit | 8df5cf94661a528850fdea0879731c53eeaa960c (patch) | |
tree | e2a722b87a914c39311bd0bca3e1a222d1f62090 /textproc | |
parent | cd13de846d8abaa6822e2508b52fe9f283701d11 (diff) | |
download | freebsd-ports-gnome-8df5cf94661a528850fdea0879731c53eeaa960c.tar.gz freebsd-ports-gnome-8df5cf94661a528850fdea0879731c53eeaa960c.tar.zst freebsd-ports-gnome-8df5cf94661a528850fdea0879731c53eeaa960c.zip |
- update to 2.2.1
- sync with textproc/sphinxsearch
- use OPTIONS Helpers
Approved by: mat
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/sphinxsearch-devel/Makefile | 167 | ||||
-rw-r--r-- | textproc/sphinxsearch-devel/distinfo | 6 | ||||
-rw-r--r-- | textproc/sphinxsearch-devel/files/patch-src-sphinxstd.h | 20 | ||||
-rw-r--r-- | textproc/sphinxsearch-devel/files/patch-src_sphinxexpr.cpp | 29 | ||||
-rw-r--r-- | textproc/sphinxsearch-devel/files/pkg-deinstall.in | 6 | ||||
-rw-r--r-- | textproc/sphinxsearch-devel/files/sphinxsearch.in | 6 | ||||
-rw-r--r-- | textproc/sphinxsearch-devel/pkg-descr | 35 | ||||
-rw-r--r-- | textproc/sphinxsearch-devel/pkg-plist | 7 |
8 files changed, 132 insertions, 144 deletions
diff --git a/textproc/sphinxsearch-devel/Makefile b/textproc/sphinxsearch-devel/Makefile index 636a3b2ea2b7..5fee3e42f19c 100644 --- a/textproc/sphinxsearch-devel/Makefile +++ b/textproc/sphinxsearch-devel/Makefile @@ -1,16 +1,19 @@ # Created by: Daniel Gerzo <danger@FreeBSD.org> # $FreeBSD$ +# Note: the Sphinx Storage Engine MySQL plugin is not supported by +# this port. You need a patched version of mysql server for that. +# See http://www.infracaninophile.co.uk/articles/sphinxse.html + PORTNAME= sphinxsearch -PORTVERSION= 2.0.1b -PORTREVISION= 2 +PORTVERSION= 2.2.1 PORTEPOCH= 1 CATEGORIES= textproc databases -MASTER_SITES= http://sphinxsearch.com/files/ +MASTER_SITES= http://sphinxsearch.com/files/ \ + http://snowball.tartarus.org/dist/:libstemmer PKGNAMESUFFIX?= -devel -DISTNAME= sphinx-2.0.1-beta - -PATCH_DIST_STRIP=-p1 +DISTNAME= sphinx-${PORTVERSION}-beta +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= danger@FreeBSD.org COMMENT= Sphinx Full-Text Search Engine @@ -19,66 +22,73 @@ LICENSE= GPLv2 LATEST_LINK= sphinxsearch-devel -CONFLICTS= sphinxsearch-[0-9]* \ - dpsearch-[0-9]* \ - rdb-[0-9]* \ - swish++-[0-9]* \ - xaira-[0-9]* - # If expat is present on the system and configure finds it, it will # unconditionally link the output binary against it. There's no way -# of turning this off. So for consistency, make sure it's always on. -LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2 +# of turning this off. So for consistency, make sure it's always on. +LIB_DEPENDS= libexpat.so:${PORTSDIR}/textproc/expat2 -OPTIONS_DEFINE= MYSQL PGSQL ICONV OPTIMIZED_CFLAGS ID64 UNIXODBC \ - DOCS EXAMPLES -ID64_DESC= 64-bit document and word IDs -OPTIONS_DEFAULT= MYSQL ICONV +OPTIONS_DEFINE= ICONV ID64 LIBSTEMMER MYSQL OPTIMIZED_CFLAGS PGSQL \ + SYSLOG UNIXODBC +OPTIONS_DEFAULT=ICONV MYSQL SYSLOG -NO_STAGE= yes -.include <bsd.port.options.mk> +ICONV_CONFIGURE_WITH= iconv +ICONV_USES= iconv +ICONV_LDFLAGS= ${ICONV_LIB} + +# Changes document and word IDs to a 64bit type, useful if you have +# more than about 4.2E9 such items to deal with. Means corresponding +# changes in DB schema. Disabled by default. +ID64_DESC= Use 64-bit document and word IDs +ID64_CONFIGURE_ENABLE= id64 + +# 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. +LIBSTEMMER_DESC= Compile with libstemmer support +LIBSTEMMER_CONFIGURE_WITH=libstemmer +LIBSTEMMER_DISTNAME= libstemmer_c +LIBSTEMMER_DISTFILES= ${LIBSTEMMER_DISTNAME}.tgz:libstemmer + +.if make(makesum) || defined(FETCH_ALL) +OPTIONS_SET_FORCE= LIBSTEMMER +.endif # The port will successfully compile with both PGSQL and MYSQL support # simultaneously. Not sure how useful that is in practice though. -.if ${PORT_OPTIONS:MMYSQL} -CONFIGURE_ARGS+= --with-mysql -USE_MYSQL= yes -.else -CONFIGURE_ARGS+= --without-mysql -.endif +MYSQL_CONFIGURE_WITH= mysql +MYSQL_CONFIGURE_ON= --with-mysql-includes=${LOCALBASE}/include/mysql \ + --with-mysql-libs=${LOCALBASE}/lib/mysql +MYSQL_USE= mysql -.if ${PORT_OPTIONS:MPGSQL} -CONFIGURE_ARGS+= --with-pgsql -USE_PGSQL= yes -.else -CONFIGURE_ARGS+= --without-pgsql -.endif +OPTIMIZED_CFLAGS_CXXFLAGS=-O3 -fomit-frame-pointer -.if ${PORT_OPTIONS:MICONV} -CONFIGURE_ARGS+= --with-iconv -USES+= iconv -.else -CONFIGURE_ARGS+= --without-iconv -.endif +PGSQL_CONFIGURE_WITH= pgsql +PGSQL_CONFIGURE_ON= --with-pgsql-includes=${LOCALBASE}/include \ + --with-pgsql-libs=${LOCALBASE}/lib +PGSQL_USE= pgsql -.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} -CXXFLAGS+= -O3 -fomit-frame-pointer -.endif +SYSLOG_DESC= Enable logging via syslog +SYSLOG_CONFIGURE_WITH= syslog -# Changes document and word IDs to a 64bit type, useful if you have -# more than about 4.2E9 such items to deal with. Means corresponding -# changes in DB schema. Disabled by default. -.if ${PORT_OPTIONS:MID64} -CONFIGURE_ARGS+= --enable-id64 -.endif +UNIXODBC_CONFIGURE_WITH=unixodbc +UNIXODBC_LIB_DEPENDS= odbc:${PORTSDIR}/databases/unixODBC -.if ${PORT_OPTIONS:MUNIXODBC} -CONFIGURE_ARGS+= --with-unixodbc -LIB_DEPENDS+= odbc.2:${PORTSDIR}/databases/unixODBC -.else -CONFIGURE_ARGS+= --without-unixodbc -.endif + +CONFLICTS= sphinxsearch-[0-9]* dpsearch-[0-9]* rdb-[0-9]* \ + swish++-[0-9]* xaira-[0-9]* + +.include <bsd.port.options.mk> USERS?= _sphinx GROUPS?= _sphinx @@ -110,14 +120,17 @@ PORTEXAMPLES= * .if ${PORT_OPTIONS:MDOCS} DOCS= doc/sphinx.css doc/sphinx.html doc/sphinx.txt doc/sphinx.xml +DOCSRC= ${WRKSRC}/doc +MAN1SRC= indexer.1 indextool.1 search.1 spelldump.1 +MAN8SRC= searchd.8 .endif -.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64" -BROKEN= Does not compile on ia64, powerpc, or sparc64 +post-extract: +.if ${PORT_OPTIONS:MLIBSTEMMER} + @( cd ${WRKDIR} && ${COPYTREE_SHARE} ${LIBSTEMMER_DISTNAME} ${WRKSRC} ) .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!" \ @@ -125,34 +138,36 @@ post-patch: -e "s!@CONFDIR@/log/searchd.log!${SPHINX_LOG}/searchd.log!" \ -e "s!@CONFDIR@!${SPHINX_DIR}!" \ ${WRKSRC}/sphinx.conf.in +.if ${PORT_OPTIONS:MDOCS} + ${SED} -e 's/"1"/"8"/' ${DOCSRC}/searchd.1 > ${DOCSRC}/searchd.8 +.for man in ${MAN1} + ${SED} -i~ -e 's/\\fBsearchd\\fR(1)/\\fBsearchd\\fR(8)/' \ + ${DOCSRC}/${man} +.endfor +.endif -do-install: install-bin install-docs install-examples +do-install: install-bin install-docs install-man install-examples install-bin: - ${INSTALL_PROGRAM} ${WRKSRC}/src/indexer ${PREFIX}/bin/indexer - ${INSTALL_PROGRAM} ${WRKSRC}/src/search ${PREFIX}/bin/search - ${INSTALL_PROGRAM} ${WRKSRC}/src/searchd ${PREFIX}/sbin/searchd - ${INSTALL_DATA} ${WRKSRC}/sphinx.conf.dist ${CFGFILE}.sample + ${INSTALL_PROGRAM} ${WRKSRC}/src/indexer ${STAGEDIR}${PREFIX}/bin/indexer + ${INSTALL_PROGRAM} ${WRKSRC}/src/indextool ${STAGEDIR}${PREFIX}/bin/indextool + ${INSTALL_PROGRAM} ${WRKSRC}/src/search ${STAGEDIR}${PREFIX}/bin/search + ${INSTALL_PROGRAM} ${WRKSRC}/src/spelldump ${STAGEDIR}${PREFIX}/bin/spelldump + ${INSTALL_PROGRAM} ${WRKSRC}/src/searchd ${STAGEDIR}${PREFIX}/sbin/searchd + ${INSTALL_DATA} ${WRKSRC}/sphinx.conf.dist ${STAGEDIR}${CFGFILE}.sample install-docs: -.if ${PORT_OPTIONS:MDOCS} - @${MKDIR} ${DOCSDIR} -.for doc in ${DOCS} - ${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR} -.endfor -.endif + @${MKDIR} ${STAGEDIR}${DOCSDIR} + (cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}/${DOCSDIR}) + +install-man: + (cd ${WRKSRC} && ${INSTALL_MAN} ${MAN1SRC} ${STAGEDIR}${MANPREFIX}/man/man1) + (cd ${WRKSRC} && ${INSTALL_MAN} ${MAN8SRC} ${STAGEDIR}${MANPREFIX}/man/man8) install-examples: .if ${PORT_OPTIONS:MEXAMPLES} - @${MKDIR} ${EXAMPLESDIR} -.for example in ${EXAMPLES} - @cd ${WRKSRC} && ${COPYTREE_SHARE} ${example} ${EXAMPLESDIR} -.endfor + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + (cd ${WRKSRC} && ${COPYTREE_SHARE} ${EXAMPLES} ${STAGEDIR}${EXAMPLESDIR}) .endif -post-install-cfg: - @if [ ! -f ${CFGFILE} ]; then \ - ${CP} -p ${CFGFILE}.sample ${CFGFILE} ; \ - fi - .include <bsd.port.mk> diff --git a/textproc/sphinxsearch-devel/distinfo b/textproc/sphinxsearch-devel/distinfo index 35bb86499f08..15b91b1ba861 100644 --- a/textproc/sphinxsearch-devel/distinfo +++ b/textproc/sphinxsearch-devel/distinfo @@ -1,2 +1,4 @@ -SHA256 (sphinx-2.0.1-beta.tar.gz) = fe27152ee24224bcf2ab7293dabe826d8db69c35eca16edf1ca510e0a1f4bf81 -SIZE (sphinx-2.0.1-beta.tar.gz) = 1761313 +SHA256 (sphinx-2.2.1-beta.tar.gz) = 877b9e072b21c6d23f6808e004a7637cef7b186686a6cb0de97d99a9ed038898 +SIZE (sphinx-2.2.1-beta.tar.gz) = 2717191 +SHA256 (libstemmer_c.tgz) = 5adcf6432fd3d5ba51c8674d833d851b5aa6e532d52ff95e57102033edcd285f +SIZE (libstemmer_c.tgz) = 129496 diff --git a/textproc/sphinxsearch-devel/files/patch-src-sphinxstd.h b/textproc/sphinxsearch-devel/files/patch-src-sphinxstd.h deleted file mode 100644 index 27c28f4b79b1..000000000000 --- a/textproc/sphinxsearch-devel/files/patch-src-sphinxstd.h +++ /dev/null @@ -1,20 +0,0 @@ ---- src/sphinxstd.h~ 2011-04-01 16:50:14.000000000 +0000 -+++ src/sphinxstd.h 2011-06-15 09:22:46.000000000 +0000 -@@ -1922,6 +1922,8 @@ - T ReadValue() const - { - assert ( m_pValue ); -+ if (!m_pValue) -+ return 0; - Lock(); - T val = *m_pValue; - Unlock(); -@@ -1930,6 +1932,8 @@ - void WriteValue ( const T& tNewValue ) - { - assert ( m_pValue ); -+ if (!m_pValue) -+ return; - Lock(); - *m_pValue = tNewValue; - Unlock(); diff --git a/textproc/sphinxsearch-devel/files/patch-src_sphinxexpr.cpp b/textproc/sphinxsearch-devel/files/patch-src_sphinxexpr.cpp deleted file mode 100644 index 95af72ef21b8..000000000000 --- a/textproc/sphinxsearch-devel/files/patch-src_sphinxexpr.cpp +++ /dev/null @@ -1,29 +0,0 @@ ---- src/sphinxexpr.cpp.orig 2011-03-11 17:43:11.000000000 +0000 -+++ src/sphinxexpr.cpp -@@ -1722,7 +1722,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; -@@ -1753,7 +1753,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; -@@ -1799,7 +1799,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/textproc/sphinxsearch-devel/files/pkg-deinstall.in b/textproc/sphinxsearch-devel/files/pkg-deinstall.in index 85b63ccf82cf..6fe5ffd4cdb4 100644 --- a/textproc/sphinxsearch-devel/files/pkg-deinstall.in +++ b/textproc/sphinxsearch-devel/files/pkg-deinstall.in @@ -6,15 +6,15 @@ sphinx_usr=%%SPHINX_USR%% sphinx_grp=%%SPHINX_GRP%% sphinx_dir=%%SPHINX_DIR%% -sphinx_name=%%PORTNAME%% +portname=%%PORTNAME%% case $2 in POST-DEINSTALL) cat <<EOMSG -The $sphinx_name port has been deleted. If you are not -upgrading and don't intend to use $sphinx_name any more +The $portname port has been deleted. If you are not +upgrading and don't intend to use $portname any more then you may wish to delete the $sphinx_usr account, and the $sphinx_grp group together with the working directory $sphinx_dir; which can be done with the diff --git a/textproc/sphinxsearch-devel/files/sphinxsearch.in b/textproc/sphinxsearch-devel/files/sphinxsearch.in index 877267aa3634..15347f8c2ea2 100644 --- a/textproc/sphinxsearch-devel/files/sphinxsearch.in +++ b/textproc/sphinxsearch-devel/files/sphinxsearch.in @@ -61,9 +61,9 @@ start_precmd=%%PORTNAME%%_prestart ${%%PORTNAME%%_logdir} fi if [ ! -d ${%%PORTNAME%%_dir} ]; then - mkdir -m 755 -p ${%%PORTNAME%%_dir} ${%%PORTNAME%%_dir}/data - chown -R ${%%PORTNAME%%_user}:${%%PORTNAME%%_group} \ - ${%%PORTNAME%%_dir} + mkdir -m 755 -p ${%%PORTNAME%%_dir} ${%%PORTNAME%%_dir}/data + chown -R ${%%PORTNAME%%_user}:${%%PORTNAME%%_group} \ + ${%%PORTNAME%%_dir} fi } diff --git a/textproc/sphinxsearch-devel/pkg-descr b/textproc/sphinxsearch-devel/pkg-descr index 59b3fdaa98a7..b65bb2281d11 100644 --- a/textproc/sphinxsearch-devel/pkg-descr +++ b/textproc/sphinxsearch-devel/pkg-descr @@ -1,14 +1,27 @@ -Sphinx is a full-text search engine, distributed under GPL version -2. Commercial license is also available for embedded use. +Sphinx is an open source full text search server, designed from the +ground up with performance, relevance (aka search quality), and +integration simplicity in mind. It's written in C++ and works on Linux +(RedHat, Ubuntu, etc), Windows, MacOS, Solaris, FreeBSD, and a few +other systems. -Generally, it's a standalone search engine, meant to provide fast, -size-efficient and relevant fulltext search functions to other -applications. Sphinx was specially designed to integrate well with SQL -databases and scripting languages. Currently built-in data sources -support fetching data either via direct connection to MySQL, or from -an XML pipe. +Sphinx lets you either batch index and search data stored in an SQL +database, NoSQL storage, or just files quickly easily and or index and +search data on the fly, working with Sphinx pretty much as with a +database server. -As for the name, Sphinx is an acronym which is officially decoded as -SQL Phrase Index. +A variety of text processing features enable fine-tuning Sphinx for +your particular application requirements, and a number of relevance +functions ensures you can tweak search quality as well. -WWW: http://www.sphinxsearch.com/ +Searching via SphinxAPI is as simple as 3 lines of code, and querying +via SphinxQL is even simpler, with search queries expressed in good +old SQL. + +Sphinx clusters scale up to billions of documents and tens of millions +search queries per day, powering top websites such as Craigslist, +DailyMotion, NetLog, etc. + +And last but not least, it's open-sourced under GPLv2, and the +community edition is free to use. + +WWW: http://sphinxsearch.com/ diff --git a/textproc/sphinxsearch-devel/pkg-plist b/textproc/sphinxsearch-devel/pkg-plist index 6b70ba9ab41b..c67005db0e02 100644 --- a/textproc/sphinxsearch-devel/pkg-plist +++ b/textproc/sphinxsearch-devel/pkg-plist @@ -1,9 +1,16 @@ bin/indexer +bin/indextool bin/search +bin/spelldump sbin/searchd @unexec if cmp -s %D/etc/sphinx.conf.sample %D/etc/sphinx.conf; then rm -f %D/etc/sphinx.conf; fi etc/sphinx.conf.sample @exec if [ ! -f %D/etc/sphinx.conf ] ; then cp -p %D/%F %B/sphinx.conf; fi +%%PORTDOCS%%man/man1/indexer.1.gz +%%PORTDOCS%%man/man1/indextool.1.gz +%%PORTDOCS%%man/man1/search.1.gz +%%PORTDOCS%%man/man1/spelldump.1.gz +%%PORTDOCS%%man/man8/searchd.8.gz %%PORTDOCS%%%%DOCSDIR%%/sphinx.css %%PORTDOCS%%%%DOCSDIR%%/sphinx.html %%PORTDOCS%%%%DOCSDIR%%/sphinx.txt |