ports/188975: [patch] www/mnogosearch: convert to USES=libtool + misc

Tijl Coosemans tijl at FreeBSD.org
Thu Apr 24 21:20:01 UTC 2014


>Number:         188975
>Category:       ports
>Synopsis:       [patch] www/mnogosearch: convert to USES=libtool + misc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 24 21:20:01 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Tijl Coosemans
>Release:        FreeBSD 11.0-CURRENT i386
>Organization:
>Environment:
>Description:
- Add DOCS and EXAMPLES options.
- Convert USE_AUTOTOOLS=libtool and USE_GNOME=lthack to USES=libtool.
  USE_GNOME=lthack is going away.
- Remove some remnants from older versions:
  * CONFIGURE_ARGS=--enable-shared.
  * CONFIGURE_ENV=LOCALBASE="${LOCALBASE}"
  * MAKE_ENV=MKDIRPROG="${MKDIR}"
  * CONFIGURE_ENV=LIBS="-pthread"
  * CFLAGS+=-DCONSOLE
  * pre-install target
- Don't set an so-version for libmnogosearch-3.4.so.  It's not needed
  and libmnogocharset-3.4.so doesn't have one either.
- Use new LIB_DEPENDS syntax.
- Replace NOPORTDOCS with PORT_OPTIONS.
- Replace STRIP_CMD with INSTALL_TARGET=install-strip.
- Don't cat pkg-message in post-install.  It's redundant with staging.
- Remove pkg-install script.  I cannot find any references to the
  directories it creates in the source code, but you might want to run-test
  this.

Redports: https://redports.org/buildarchive/20140424140201-12217/
>How-To-Repeat:
>Fix:

--- mnogosearch.patch begins here ---
Index: www/mnogosearch/Makefile
===================================================================
--- www/mnogosearch/Makefile	(revision 352018)
+++ www/mnogosearch/Makefile	(working copy)
@@ -3,7 +3,7 @@
 
 PORTNAME=	mnogosearch
 PORTVERSION=	3.4.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	www databases
 MASTER_SITES=	http://www.mnogosearch.org/Download/ \
 		http://www.bayofrum.net/dist/${PORTNAME}/
@@ -16,7 +16,7 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 CONFLICTS=	dpsearch-[0-9]* udmsearch-[0-9]* mguesser-[0-9]*
 
-OPTIONS_DEFINE=	THREADS SSL ASIAN SYSLOG
+OPTIONS_DEFINE=	DOCS EXAMPLES THREADS SSL ASIAN SYSLOG
 
 OPTIONS_MULTI=	database
 OPTIONS_MULTI_database=	PGSQL MSQL MYSQL SQLITE2 SQLITE3
@@ -28,19 +28,13 @@ SYSLOG_DESC=	Send logs to syslog
 SQLITE2_DESC=	Use SQLite 2.x
 SQLITE3_DESC=	Use SQLite 3.x
 
-USES=		gmake
+GNU_CONFIGURE=	yes
+INSTALL_TARGET=	install-strip
+USES=		gmake libtool
 USE_LDCONFIG=	yes
-USE_GNOME=	lthack
-USE_AUTOTOOLS=	libtool
-CONFIGURE_ARGS+=--enable-shared \
-		--sysconfdir=${ETCDIR} \
+CONFIGURE_ARGS=	--sysconfdir=${ETCDIR} \
 		--localstatedir=/var/mnogosearch \
 		--datadir=${DATADIR}
-CONFIGURE_ENV+=	LOCALBASE="${LOCALBASE}"
-MAKE_ENV+=	MKDIRPROG="${MKDIR}"
-
-PLIST_SUB+=	SHLIB_VER=${SHLIB_VER}
-SHLIB_VER=	1
 
 SUB_FILES+=	pkg-message
 
@@ -52,10 +46,8 @@ USE_OPENSSL=	yes
 
 .if ${PORT_OPTIONS:MTHREADS}
 CONFIGURE_ARGS+=	--enable-pthreads
-CONFIGURE_ENV+=	LIBS="-pthread"
 .else
 CONFIGURE_ARGS+=	--disable-pthreads
-CFLAGS+=	-DCONSOLE
 .endif
 
 .if ${PORT_OPTIONS:MSSL}
@@ -76,7 +68,7 @@ CONFIGURE_ARGS+=	--with-pgsql=${LOCALBAS
 .endif
 
 .if ${PORT_OPTIONS:MMSQL}
-LIB_DEPENDS+=		msql.1:${PORTSDIR}/databases/msql
+LIB_DEPENDS+=		libmsql.so:${PORTSDIR}/databases/msql
 CONFIGURE_ARGS+=	--with-msql=${LOCALBASE}
 .endif
 
@@ -100,7 +92,7 @@ PORTDOCS=	ChangeLog INSTALL README.html
 PORTEXAMPLES=	README *.conf
 
 post-patch:
-.if !defined (NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	@${REINPLACE_CMD} -e 's#$$(DESTDIR)$$(prefix)/doc#${DOCSDIR}#' \
 		${WRKSRC}/Makefile.in ${WRKSRC}/doc/Makefile.in
 .else
@@ -109,22 +101,12 @@ post-patch:
 		${WRKSRC}/Makefile.in
 .endif
 
-pre-install:
-	@${MKDIR} ${STAGEDIR}${DATADIR}
-
 post-install:
-.for l in charset search
-	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libmnogo$l-${PORTVERSION:R}.so
-.endfor
-	${LN} -sf libmnogosearch.so \
-		${STAGEDIR}${PREFIX}/lib/libmnogosearch-${PORTVERSION:R}.so.${SHLIB_VER}
 	${MKDIR} ${STAGEDIR}${DOCSDIR}
 .for f in ${PORTDOCS:NREADME.html}
 	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
 .endfor
 	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
 	${INSTALL_DATA} ${WRKSRC}/doc/samples/* ${STAGEDIR}${EXAMPLESDIR}/
-	@${ECHO}
-	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.mk>
Index: www/mnogosearch/pkg-install
===================================================================
--- www/mnogosearch/pkg-install	(revision 352018)
+++ www/mnogosearch/pkg-install	(working copy)
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-case $2 in
-    PRE-INSTALL)
-	;;
-    POST-INSTALL)
-	mkdir -m 755 /var/mnogosearch
-	mkdir -m 700 /var/mnogosearch/cache
-	mkdir -m 755 /var/mnogosearch/raw
-	mkdir -m 755 /var/mnogosearch/splitter
-	mkdir -m 755 /var/mnogosearch/tree
-	chown -R www:www /var/mnogosearch
-	;;
-    *)
-	echo "Unexpected Argument $2!!!"
-	exit 1
-	;;
-esac
-exit 0
Index: www/mnogosearch/pkg-plist
===================================================================
--- www/mnogosearch/pkg-plist	(revision 352018)
+++ www/mnogosearch/pkg-plist	(working copy)
@@ -72,12 +72,9 @@ include/udm_xmalloc.h
 include/udmsearch.h
 lib/libmnogocharset-3.4.so
 lib/libmnogocharset.a
-lib/libmnogocharset.la
 lib/libmnogocharset.so
 lib/libmnogosearch-3.4.so
-lib/libmnogosearch-3.4.so.%%SHLIB_VER%%
 lib/libmnogosearch.a
-lib/libmnogosearch.la
 lib/libmnogosearch.so
 man/man1/indexer.1.gz
 man/man5/indexer.conf.5.gz
--- mnogosearch.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list