Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Dec 2013 22:27:59 +0000 (UTC)
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r335943 - head/textproc/sphinxsearch
Message-ID:  <201312082227.rB8MRxWi078685@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: matthew
Date: Sun Dec  8 22:27:59 2013
New Revision: 335943
URL: http://svnweb.freebsd.org/changeset/ports/335943

Log:
   * use option helpers (blatantly copying from the
     textproc/sphinxseach-devel port) [1]
   * New style LIB_DEPENDS for libodbc
   * Install DOCS and EXAMPLES to the stage directory unconditionally
  
  Submitted by:	danger [1]

Modified:
  head/textproc/sphinxsearch/Makefile

Modified: head/textproc/sphinxsearch/Makefile
==============================================================================
--- head/textproc/sphinxsearch/Makefile	Sun Dec  8 21:13:56 2013	(r335942)
+++ head/textproc/sphinxsearch/Makefile	Sun Dec  8 22:27:59 2013	(r335943)
@@ -8,7 +8,8 @@
 PORTNAME=	sphinxsearch
 PORTVERSION=	2.1.3
 CATEGORIES=	textproc databases
-MASTER_SITES=	http://sphinxsearch.com/files/
+MASTER_SITES=	http://sphinxsearch.com/files/ \
+		http://snowball.tartarus.org/dist/:libstemmer
 DISTNAME=	sphinx-${PORTVERSION}-release
 DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
 
@@ -24,75 +25,17 @@ LIB_DEPENDS=	libexpat.so:${PORTSDIR}/tex
 
 OPTIONS_DEFINE=	ICONV ID64 LIBSTEMMER MYSQL OPTIMIZED_CFLAGS PGSQL \
 		SYSLOG UNIXODBC
+OPTIONS_DEFAULT=ICONV MYSQL SYSLOG
 
-#ICONV_DESC=		Iconv support
-ID64_DESC=		use 64-bit document and word IDs
-LIBSTEMMER_DESC=	compile with libstemmer support
-#MYSQL_DESC=		MySQL support
-#OPTIMIZED_CFLAGS_DESC=	Use compiler optimization (-O3)
-#PGSQL_DESC=		PostgreSQL support
-SYSLOG_DESC=		enable logging via syslog
-UNIXODBC_DESC=		unixODBC support
-
-OPTIONS_DEFAULT=	ICONV MYSQL SYSLOG
-
-CONFLICTS=	sphinxsearch-devel-[0-9]* dpsearch-[0-9]* rdb-[0-9]* \
-		swish++-[0-9]* xaira-[0-9]*
-
-.include <bsd.port.options.mk>
-
-# 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 \
-			--with-mysql-includes=${LOCALBASE}/include/mysql \
-			--with-mysql-libs=${LOCALBASE}/lib/mysql
-USE_MYSQL=		yes
-.else
-CONFIGURE_ARGS+=	--without-mysql
-.endif
-
-.if ${PORT_OPTIONS:MPGSQL}
-CONFIGURE_ARGS+=	--with-pgsql \
-			--with-pgsql-includes=${LOCALBASE}/include \
-			--with-pgsql-libs=${LOCALBASE}/lib
-USE_PGSQL=		yes
-.else
-CONFIGURE_ARGS+=	--without-pgsql
-.endif
-
-.if ${PORT_OPTIONS:MICONV}
-CONFIGURE_ARGS+=	--with-iconv
-USES+=			iconv
-LDFLAGS+=		${ICONV_LIB}
-.else
-CONFIGURE_ARGS+=	--without-iconv
-.endif
-
-.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
-CXXFLAGS+=		-O3 -fomit-frame-pointer
-.endif
+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.
-.if ${PORT_OPTIONS:MID64}
-CONFIGURE_ARGS+=	--enable-id64
-.endif
-
-.if ${PORT_OPTIONS:MUNIXODBC}
-CONFIGURE_ARGS+=	--with-unixodbc
-LIB_DEPENDS+=		odbc:${PORTSDIR}/databases/unixODBC
-.else
-CONFIGURE_ARGS+=	--without-unixodbc
-.endif
-
-.if ${PORT_OPTIONS:MSYSLOG}
-CONFIGURE_ARGS+=	--with-syslog
-.else
-CONFIGURE_ARGS+=	--without-syslog
-.endif
+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
@@ -107,19 +50,40 @@ CONFIGURE_ARGS+=	--without-syslog
 # 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 ${PORT_OPTIONS:MLIBSTEMMER} || 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}
+.if make(makesum) || defined(FETCH_ALL)
+OPTIONS_SET_FORCE= LIBSTEMMER
 .endif
 
-.if ${PORT_OPTIONS:MLIBSTEMMER}
-CONFIGURE_ARGS+=	--with-libstemmer
-.else
-CONFIGURE_ARGS+=	--without-libstemmer
-.endif
+# The port will successfully compile with both PGSQL and MYSQL support
+# simultaneously.  Not sure how useful that is in practice though.
+
+MYSQL_CONFIGURE_WITH=	mysql
+MYSQL_CONFIGURE_ON=	--with-mysql-includes=${LOCALBASE}/include/mysql \
+			--with-mysql-libs=${LOCALBASE}/lib/mysql
+MYSQL_USE=		mysql
+
+OPTIMIZED_CFLAGS_CXXFLAGS=-O3 -fomit-frame-pointer
+
+PGSQL_CONFIGURE_WITH=	pgsql
+PGSQL_CONFIGURE_ON=	--with-pgsql-includes=${LOCALBASE}/include \
+			--with-pgsql-libs=${LOCALBASE}/lib
+PGSQL_USE=		pgsql
+
+SYSLOG_DESC=		Enable logging via syslog
+SYSLOG_CONFIGURE_WITH=	syslog
+
+UNIXODBC_CONFIGURE_WITH=unixodbc
+UNIXODBC_LIB_DEPENDS=	libodbc.so:${PORTSDIR}/databases/unixODBC
+
+CONFLICTS=	sphinxsearch-devel-[0-9]* dpsearch-[0-9]* rdb-[0-9]* \
+		swish++-[0-9]* xaira-[0-9]*
+
+.include <bsd.port.options.mk>
 
 USERS?=		_sphinx
 GROUPS?=	_sphinx
@@ -152,15 +116,14 @@ PORTEXAMPLES=	*
 .if ${PORT_OPTIONS:MDOCS}
 DOCS=		doc/sphinx.css doc/sphinx.html doc/sphinx.txt doc/sphinx.xml
 DOCSRC=		${WRKSRC}/doc
+.endif
+
 MAN1SRC=	indexer.1 indextool.1 search.1 spelldump.1
 MAN8SRC=	searchd.8
-.endif
 
 post-extract:
 .if ${PORT_OPTIONS:MLIBSTEMMER}
-	@( cd ${WRKSRC} && \
-	    ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${LIBSTEMMER_TGZ} \
-	    ${EXTRACT_AFTER_ARGS} )
+	@( cd ${WRKDIR} && ${COPYTREE_SHARE} ${LIBSTEMMER_DISTNAME} ${WRKSRC} )
 .endif
 
 # Fix up the sample configuration file to correspond to FreeBSD norms
@@ -171,13 +134,11 @@ 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-man install-examples
 
@@ -190,29 +151,23 @@ install-bin:
 	${INSTALL_DATA}	   ${WRKSRC}/sphinx.conf.dist ${STAGEDIR}${CFGFILE}.sample
 
 install-docs:
-.if ${PORT_OPTIONS:MDOCS}
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 .for doc in ${DOCS}
 	${INSTALL_DATA} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR}
 .endfor
-.endif
 
 install-man:
-.if ${PORT_OPTIONS:MDOCS}
 .for man in ${MAN1SRC}
 	${INSTALL_MAN} ${DOCSRC}/${man} ${STAGEDIR}${MANPREFIX}/man/man1/${man}
 .endfor
 .for man in ${MAN8SRC}
 	${INSTALL_MAN} ${DOCSRC}/${man} ${STAGEDIR}${MANPREFIX}/man/man8/${man}
 .endfor
-.endif
 
 install-examples:
-.if ${PORT_OPTIONS:MEXAMPLES}
 	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
 .for example in ${EXAMPLES}
 	@cd ${WRKSRC} && ${COPYTREE_SHARE} ${example} ${STAGEDIR}${EXAMPLESDIR}
 .endfor
-.endif
 
 .include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312082227.rB8MRxWi078685>