Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Mar 2007 14:22:03 +0400 (MSD)
From:      Denis Shaposhnikov <dsh@vlink.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/110845: Update port: net-im/sulci (add option to disable MUC logging)
Message-ID:  <200703261022.l2QAM3r9054350@neva.vlink.ru>
Resent-Message-ID: <200703261030.l2QAU4ii042418@freefall.freebsd.org>

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

>Number:         110845
>Category:       ports
>Synopsis:       Update port: net-im/sulci (add option to disable MUC logging)
>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 Mar 26 10:30:04 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Denis Shaposhnikov
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD neva.vlink.ru 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Fri Mar 16 09:20:13 MSK 2007 dsh@neva.vlink.ru:/var/FreeBSD/obj/var/FreeBSD/src/sys/MYNERIC i386


	
>Description:

This patch adds ports OPTION to disable MUC logging.

>How-To-Repeat:
	
>Fix:

diff -Nru --exclude=.svn sulci.orig/Makefile sulci/Makefile
--- sulci.orig/Makefile	Mon Mar 26 14:19:49 2007
+++ sulci/Makefile	Mon Mar 26 08:34:48 2007
@@ -15,27 +15,28 @@
 MAINTAINER=	dsh@vlink.ru
 COMMENT=	A Jabber bot
 
-BUILD_DEPENDS=	ocamlc:${PORTSDIR}/lang/ocaml \
-		${LOCALBASE}/lib/ocaml/cryptokit.cma:${PORTSDIR}/security/ocaml-cryptokit \
-		${OCAML_SITELIBDIR}/ulex/ulexing.a:${PORTSDIR}/devel/ocaml-ulex \
-		ocamlfind:${PORTSDIR}/devel/ocaml-findlib \
-		${OCAML_SITELIBDIR}/netstring/netstring.a:${PORTSDIR}/www/ocaml-net \
-		${OCAML_SITELIBDIR}/netclient/netclient.a:${PORTSDIR}/net/ocaml-netclient \
-		${OCAML_SITELIBDIR}/pcre/pcre.a:${PORTSDIR}/devel/ocaml-pcre
+BUILD_DEPENDS=	${LOCALBASE}/lib/ocaml/cryptokit.cma:${PORTSDIR}/security/ocaml-cryptokit \
+		${PREFIX}/${OCAML_SITELIBDIR}/ulex/ulexing.a:${PORTSDIR}/devel/ocaml-ulex \
+		${PREFIX}/${OCAML_SITELIBDIR}/netstring/netstring.a:${PORTSDIR}/www/ocaml-net \
+		${PREFIX}/${OCAML_SITELIBDIR}/netclient/netclient.a:${PORTSDIR}/net/ocaml-netclient \
+		${PREFIX}/${OCAML_SITELIBDIR}/pcre/pcre.a:${PORTSDIR}/devel/ocaml-pcre
 LIB_DEPENDS=	sqlite.2:${PORTSDIR}/databases/sqlite2 \
 		pcre.0:${PORTSDIR}/devel/pcre
-RUN_DEPENDS=	${OCAML_SITELIBDIR}/netstring/netstring.a:${PORTSDIR}/www/ocaml-net \
+RUN_DEPENDS=	${PREFIX}/${OCAML_SITELIBDIR}/netstring/netstring.a:${PORTSDIR}/www/ocaml-net \
 		mueller:${PORTSDIR}/russian/mueller-dic
 
 USE_BZIP2=	yes
 USE_GMAKE=	yes
+USE_OCAML=	yes
+NO_OCAML_RUNDEPENDS=	yes
+USE_OCAML_FINDLIB=	yes
 USE_RC_SUBR=	${PORTNAME}.sh
 
 ALL_TARGET=	subdirs
 PKGMESSAGE=	${WRKDIR}/pkg-message
 SUB_FILES=	pkg-message
 
-OCAML_SITELIBDIR=	${LOCALBASE}/lib/ocaml/site-lib
+OPTIONS=	MUC_LOG "with muc_log plugin" on
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}/${PORTNAME} ${PREFIX}/sbin
@@ -70,4 +71,11 @@
 post-install:
 	${CAT} ${PKGMESSAGE}
 
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+.include "${PORTSDIR}/lang/ocaml/bsd.ocaml.mk"
+
+.if defined(WITHOUT_MUC_LOG)
+EXTRA_PATCHES+=	${FILESDIR}/without-muc-log.patch
+.endif
+
+.include <bsd.port.post.mk>
diff -Nru --exclude=.svn sulci.orig/files/without-muc-log.patch sulci/files/without-muc-log.patch
--- sulci.orig/files/without-muc-log.patch	Thu Jan  1 03:00:00 1970
+++ sulci/files/without-muc-log.patch	Mon Mar 26 08:34:48 2007
@@ -0,0 +1,21 @@
+--- sulci/Makefile.orig	Tue Feb 21 16:05:07 2006
++++ sulci/Makefile	Wed Apr 26 18:11:29 2006
+@@ -5,7 +5,7 @@
+ include Makefile.conf
+ 
+ SOURCES = version.ml config.ml logger.ml common.ml types.ml lang.ml muc.ml \
+-	  find_url.ml muc_log.ml hooks.ml iq.ml http_suck.ml
++	  find_url.ml hooks.ml iq.ml http_suck.ml
+ 
+ SUBDIRS = lang
+ 
+--- sulci/hooks.ml.orig	Sat Feb  4 20:00:48 2006
++++ sulci/hooks.ml	Wed Apr 26 18:10:59 2006
+@@ -167,7 +167,6 @@
+    in
+       (try
+ 	  let event = get_event () in
+-	     Muc_log.process_log event from xml;
+ 	     List.iter (fun proc -> proc event from xml out) !filters;
+ 	     (match event with
+ 		 | Iq _ ->
diff -Nru --exclude=.svn sulci.orig/pkg-descr sulci/pkg-descr
--- sulci.orig/pkg-descr	Mon Mar 26 14:19:49 2007
+++ sulci/pkg-descr	Mon Sep 11 17:02:15 2006
@@ -1,3 +1,4 @@
-Sulci, an Jabber bot.
+Sulci is a free (GPL) Jabber bot that provides functionalities for
+individuals and chatrooms.
 
-WWW: http://home.ermine.pp.ru/svn/ocaml/trunk/
+WWW: http://ejabberd.jabber.ru/sulci
>Release-Note:
>Audit-Trail:
>Unformatted:



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