Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Dec 2010 20:40:55 GMT
From:      Aldis Berjoza <aldis@bsdroot.lv>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/153379: [PATCH] www/hastymail2 add options to add dependencies on DBs
Message-ID:  <201012222040.oBMKetRH074893@red.freebsd.org>
Resent-Message-ID: <201012222050.oBMKo8O0015982@freefall.freebsd.org>

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

>Number:         153379
>Category:       ports
>Synopsis:       [PATCH] www/hastymail2 add options to add dependencies on DBs
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 22 20:50:08 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Aldis Berjoza
>Release:        
>Organization:
>Environment:
>Description:
Hastymail2 can work with MySQL and PostgreSQL, or it can work with bare files...
This patch adds options to add dependencies on databases, and ports needed

Also please remove empty file: files/patch-lib-constant.php
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -urN hastymail2.bak/Makefile hastymail2/Makefile
--- hastymail2.bak/Makefile	2010-12-22 22:23:47.000000000 +0200
+++ hastymail2/Makefile	2010-12-22 19:03:43.766060248 +0200
@@ -7,6 +7,7 @@
 
 PORTNAME=	hastymail2
 PORTVERSION=	1.1
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	www mail
 MASTER_SITES=	SF/hastymail/Hastymail2%20Stable%20Releases/Hastymail2%201.01/
@@ -32,8 +33,30 @@
 NO_BUILD=	yes
 FIND_SKIP_OPTS=	-not -name hastymail2.conf.example -not -name '*.orig'
 
+OPTIONS=	PGSQL	"Use PostgreSQL" off \
+		MYSQL	"Use MySQL" off \
+		DB	"Use older pear DB (instead of MDB2)" off
+
 .include <bsd.port.pre.mk>
 
+.if defined(WITH_MYSQL)
+USE_MYSQL=	yes
+.if !defined(WITH_DB)
+RUN_DEPENDS+=	${LOCALBASE}/share/pear/MDB2/Driver/mysql.php:${PORTSDIR}/databases/pear-MDB2_Driver_mysql
+.endif
+.endif
+
+.if defined(WITH_PGSQL)
+USE_PGSQL=	yes
+.if !defined(WITH_DB)
+RUN_DEPENDS+=	${LOCALBASE}/share/pear/MDB2/Driver/pgsql.php:${PORTSDIR}/databases/pear-MDB2_Driver_pgsql
+.endif
+.endif
+
+.if defined(WITH_DB) && (defined(WITH_MYSQL) || defined(WITH_PGSQL))
+RUN_DEPENDS+=	${LOCALBASE}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB
+.endif
+
 post-patch:
 	@${SED} -I.orig -e "s#'/etc/hastymail2/hastymail2.rc'#'${PREFIX}/etc/hastymail2/hastymail2.rc'#" \
 		${WRKSRC}/index.php


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



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