Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Feb 2014 11:27:03 GMT
From:      Renato Botelho <garga@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/186687: [patch] net-im/imspector: Modernize and add an option to build PLUGINS
Message-ID:  <201402121127.s1CBR3Rb071353@cgiserv.freebsd.org>
Resent-Message-ID: <201402121130.s1CBU1ME081004@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         186687
>Category:       ports
>Synopsis:       [patch] net-im/imspector: Modernize and add an option to build PLUGINS
>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:   Wed Feb 12 11:30:01 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Renato Botelho
>Release:        11-CURRENT
>Organization:
ESF LLC
>Environment:
FreeBSD fbsd1 11.0-CURRENT FreeBSD 11.0-CURRENT #1 r261771: Tue Feb 11 14:45:17 BRST 2014     root@fbsd1:/usr/obj/usr/src/sys/GARGA  amd64
>Description:
- Replace USE_GMAKE by USES=gmake
- Use OPTIONS helpers
- Support STAGING
- Pet portlint
- Add a new option, off by default, to build PLUGINS
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(revision 343883)
+++ Makefile	(working copy)
@@ -13,8 +13,7 @@
 LICENSE=	GPLv2
 
 CFLAGS+=	-fPIC -I ${LOCALBASE}/include -DHAVE_SSL
-USE_GMAKE=	YES
-USES=		iconv
+USES=		iconv gmake
 USE_OPENSSL=	YES
 USE_LDCONFIG=	${LOCALBASE}/lib/imspector
 
@@ -24,19 +23,20 @@
 
 MAKE_ENV+=	ETCDIR=${ETCDIR}
 
-OPTIONS_DEFINE=	IPFW
-OPTIONS_DEFAULT=	IPFW
+OPTIONS_DEFINE=	IPFW PLUGINS
+OPTIONS_DEFAULT=IPFW
+OPTIONS_SUB=	yes
+
 IPFW_DESC=	Add IPFW support
+PLUGINS_DESC=	Build plugins
 
-NO_STAGE=	yes
+IPFW_CFLAGS=	-DIPFW_TRANSPARENT=1
+PLUGINS_USE=	MYSQL=yes SQLITE=yes PGSQL=yes
+
 .include <bsd.port.options.mk>
 
-.if ${PORT_OPTIONS:MIPFW}
-CFLAGS+=	-DIPFW_TRANSPARENT=1
-.endif
-
 post-extract:
-	${MV} ${WRKDIR}/${PORTNAME} ${WRKSRC}
+	@${MV} ${WRKDIR}/${PORTNAME} ${WRKSRC}
 
 post-patch:
 	@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' \
@@ -46,12 +46,9 @@
 		${WRKSRC}/sslstate.cpp
 	@${REINPLACE_CMD} -e 's,%%ICONV_LIB%%,${ICONV_LIB},' \
 		${WRKSRC}/Makefile
+.if ${PORT_OPTIONS:MPLUGINS}
+	@${REINPLACE_CMD} -e 's,#ADD_PLUGINS,ADD_PLUGINS,' \
+		${WRKSRC}/Makefile
+.endif
 
-post-install:
-.for f in ${CONFIG_FILES}
-	@if [ ! -f ${ETCDIR}/${f} ]; then \
-		${CP} -p ${ETCDIR}/${f}.sample ${ETCDIR}/${f} ; \
-	fi
-.endfor
-
 .include <bsd.port.mk>
Index: files/patch-Makefile
===================================================================
--- files/patch-Makefile	(revision 343883)
+++ files/patch-Makefile	(working copy)
@@ -1,5 +1,5 @@
---- Makefile.orig	2008-12-22 15:03:15.000000000 +0300
-+++ Makefile	2011-06-14 14:26:22.072210675 +0400
+--- Makefile.orig	2010-02-23 14:20:33.000000000 -0300
++++ Makefile	2014-02-11 21:23:19.000000000 -0200
 @@ -1,5 +1,5 @@
 -DESTDIR = /
 -PREFIX = /usr
@@ -46,7 +46,7 @@
  yahooprotocolplugin.so: yahooprotocolplugin.o libimspector.so
  	$(CXX) yahooprotocolplugin.o libimspector.so $(PLUGIN_FLAGS)
  ircprotocolplugin.so: ircprotocolplugin.o libimspector.so
-@@ -162,15 +162,15 @@
+@@ -162,17 +162,17 @@
  install: imspector libimspector.so $(PLUGINS)
  	-mkdir -p $(DESTDIR)/$(PREFIX)/sbin
  	-mkdir -p $(DESTDIR)/$(PREFIX)/lib/imspector
@@ -62,10 +62,14 @@
 -	-install imspector.conf $(DESTDIR)/$(PREFIX)/etc/imspector/imspector.conf
 -	-install badwords.txt $(DESTDIR)/$(PREFIX)/etc/imspector/badwords.txt
 -	-install acl.txt $(DESTDIR)/$(PREFIX)/etc/imspector/acl.txt
+-	-mkdir -p /var/log/imspector
+-	-mkdir -p /var/lib/imspector
 +	-mkdir -p $(DESTDIR)/$(ETCDIR)
 +	-${BSD_INSTALL_DATA} imspector.conf $(DESTDIR)/$(ETCDIR)/imspector.conf.sample
 +	-${BSD_INSTALL_DATA} badwords.txt $(DESTDIR)/$(ETCDIR)/badwords.txt.sample
 +	-${BSD_INSTALL_DATA} acl.txt $(DESTDIR)/$(ETCDIR)/acl.txt.sample
- 	-mkdir -p /var/log/imspector
- 	-mkdir -p /var/lib/imspector
++	-mkdir -p $(DESTDIR)/var/log/imspector
++	-mkdir -p $(DESTDIR)/var/lib/imspector
  
+ install-cert:
+ 	-mkdir -p $(DESTDIR)/$(PREFIX)/etc/imspector
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 343883)
+++ pkg-plist	(working copy)
@@ -23,6 +23,11 @@
 lib/imspector/miscfilterplugin.so
 lib/imspector/msnprotocolplugin.so
 lib/imspector/yahooprotocolplugin.so
+%%PLUGINS%%lib/imspector/dbfilterplugin.so
+%%PLUGINS%%lib/imspector/dbresponderplugin.so
+%%PLUGINS%%lib/imspector/mysqlloggingplugin.so
+%%PLUGINS%%lib/imspector/postgresqlloggingplugin.so
+%%PLUGINS%%lib/imspector/sqliteloggingplugin.so
 lib/libimspector.so
 sbin/imspector
 @dirrmtry %%ETCDIR%%
@@ -31,4 +36,4 @@
 @dirrmtry lib/imspector
 @dirrmtry lib
 @dirrmtry log/imspector
-@cwd 
+@cwd


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



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