From question@closedsrc.org  Tue Mar 21 21:56:19 2006
Return-Path: <question@closedsrc.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5100C16A46C;
	Tue, 21 Mar 2006 21:56:19 +0000 (UTC)
	(envelope-from question@closedsrc.org)
Received: from q.closedsrc.org (q.closedsrc.org [72.1.133.20])
	by mx1.FreeBSD.org (Postfix) with ESMTP id DECB843D46;
	Tue, 21 Mar 2006 21:56:18 +0000 (GMT)
	(envelope-from question@closedsrc.org)
Received: by q.closedsrc.org (Postfix, from userid 1001)
	id 75CCD45026; Tue, 21 Mar 2006 13:56:18 -0800 (PST)
Message-Id: <20060321215618.75CCD45026@q.closedsrc.org>
Date: Tue, 21 Mar 2006 13:56:18 -0800 (PST)
From: Linh Pham <question+fbsdports@closedsrc.org>
Reply-To: Linh Pham <question+fbsdports@closedsrc.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: sergei@freebsd.org
Subject: Update port: security/base to 1.2.4 and add hooks for MySQL/PGSQL
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         94812
>Category:       ports
>Synopsis:       Update port: security/base to 1.2.4 and add hooks for MySQL/PGSQL
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    itetcu
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 21 22:00:33 GMT 2006
>Closed-Date:    Tue May 16 12:10:58 GMT 2006
>Last-Modified:  Tue May 16 12:10:58 GMT 2006
>Originator:     Linh Pham
>Release:        FreeBSD 6.0-RELEASE-p3 i386
>Organization:
>Environment:
System: FreeBSD q.internal.closedsrc.org 6.0-RELEASE-p3 FreeBSD 6.0-RELEASE-p3 #7: Thu Jan 19 21:46:45 PST 2006 question@q.internal.closedsrc.org:/usr/obj/usr/src/sys/Q i386
>Description:
Update security/base to 1.2.4; this PR supercedes ports/94085.

BASE 1.2.4 includes many, many bugfixes and changes which PDF library it uses.

I added hooks to the Makefile to allow the user to choose which database
to use, as well as the option to include support for PDF via print/fpdf.

Updated ./files/pkg-message.in to include mention of FPDF path, since it does
not use the standard PHP sub-ports or standard PHP class paths.

Any feedback on how I implemented how the the hooks are handled would be
appreciated.
>How-To-Repeat:
>Fix:

--- base-1.2.4.diff begins here ---
diff -ruN /usr/ports/security/base/Makefile base/Makefile
--- /usr/ports/security/base/Makefile	Tue Jan 17 18:42:15 2006
+++ base/Makefile	Tue Mar 21 13:48:37 2006
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	base
-PORTVERSION=	1.2.2
+PORTVERSION=	1.2.4
 CATEGORIES=	security
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	secureideas
@@ -18,13 +18,49 @@
 		${ADODB_DIR}/adodb.inc.php:${PORTSDIR}/databases/adodb \
 		${LOCALBASE}/share/pear/Image/Graph.php:${PORTSDIR}/graphics/pear-Image_Graph
 
-USE_PHP=	yes
-USE_REINPLACE=	yes
+USE_PHP=	session gettext
+WANT_PHP_PEAR=	yes
 
 ADODB_DIR=	${LOCALBASE}/share/adodb
 
 SUB_FILES=	pkg-message
 DOCS=		docs/CHANGELOG docs/CREDITS docs/README docs/TODO docs/UPGRADE
+
+.if defined(WITH_MYSQL)
+USE_PHP+=	mysql
+.endif
+
+.if defined(WITH_PGSQL)
+USE_PHP+=	pgsql
+.endif
+
+.if defined(WITH_PDF)
+USE_PHP+=	zlib
+RUN_DEPENDS+=	${LOCALBASE}/share/fpdf/fpdf.php:${PORTSDIR}/print/fpdf
+.endif
+
+pre-patch:
+.if !defined(WITH_MYSQL)
+	@${ECHO_MSG} ""
+	@${ECHO_MSG} "   *********************************************"
+	@${ECHO_MSG} "   To enable support for MySQL databases,"
+	@${ECHO_MSG} "   build this port with WITH_MYSQL=YES"
+	@${ECHO_MSG} "   *********************************************"
+.endif
+.if !defined(WITH_PGSQL)
+	@${ECHO_MSG} ""
+	@${ECHO_MSG} "   *********************************************"
+	@${ECHO_MSG} "   To enable support for PostgreSQL databases,"
+	@${ECHO_MSG} "   build this port with WITH_PGSQL=YES"
+	@${ECHO_MSG} "   *********************************************"
+.endif
+.if !defined(WITH_PDF)
+	@${ECHO_MSG} ""
+	@${ECHO_MSG} "   *********************************************"
+	@${ECHO_MSG} "   To enable support for PDF support,"
+	@${ECHO_MSG} "   build this port with WITH_PDF=YES"
+	@${ECHO_MSG} "   *********************************************"
+.endif
 
 do-build:
 	@${REINPLACE_CMD} -e 's,DBlib_path = "",DBlib_path = "${ADODB_DIR}",' \
diff -ruN /usr/ports/security/base/distinfo base/distinfo
--- /usr/ports/security/base/distinfo	Tue Jan 17 18:42:15 2006
+++ base/distinfo	Tue Mar 21 13:19:10 2006
@@ -1,3 +1,3 @@
-MD5 (base-1.2.2.tar.gz) = b257240c6e554f0e3a78913ecd01baa3
-SHA256 (base-1.2.2.tar.gz) = 63054beb2d615934ad492b239a89536e97c7fd89c4faeb67107d2b3929d80e53
-SIZE (base-1.2.2.tar.gz) = 346518
+MD5 (base-1.2.4.tar.gz) = 7f67a39b4213bdc6bce71a90444a9c58
+SHA256 (base-1.2.4.tar.gz) = a9f578a421d687d66f150e1e32f37e6641fe1ad36b2837e8d2476481143f28c1
+SIZE (base-1.2.4.tar.gz) = 327770
diff -ruN /usr/ports/security/base/files/pkg-message.in base/files/pkg-message.in
--- /usr/ports/security/base/files/pkg-message.in	Sat Jul  2 19:46:28 2005
+++ base/files/pkg-message.in	Tue Mar 21 13:40:38 2006
@@ -18,4 +18,9 @@
 
     include_path = ".:%%PREFIX%%/share/pear"
 
+If you built BASE with PDF support, make sure you include the FPDF
+path in your %%LOCALBASE%%/etc/php.ini configuration file, like:
+
+    include_path = ".:%%PREFIX%%/share/pear:%%PREFIX%%/share/fpdf"
+
 ========================================================================
diff -ruN /usr/ports/security/base/pkg-plist base/pkg-plist
--- /usr/ports/security/base/pkg-plist	Tue Jan 24 10:04:44 2006
+++ base/pkg-plist	Tue Mar 21 13:44:43 2006
@@ -69,8 +69,8 @@
 www/base/includes/base_state_query.inc.php
 www/base/includes/base_template.php
 www/base/includes/base_user.inc.php
-www/base/includes/class.ezpdf.php
-www/base/includes/class.pdf.php
+www/base/includes/fpdf_class.php
+www/base/includes/fpdf_fonts.php
 www/base/index.php
 www/base/languages/czech.lang.php
 www/base/languages/chinese.lang.php
--- base-1.2.4.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->itetcu 
Responsible-Changed-By: itetcu 
Responsible-Changed-When: Tue May 9 10:55:38 UTC 2006 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94812 

From: Ion-Mihai "IOnut" Tetcu <itetcu@FreeBSD.org>
To: Linh Pham <question+fbsdports@closedsrc.org>
Cc: FreeBSD-gnats-submit@FreeBSD.org, sergei@FreeBSD.org
Subject: Re: ports/94812: Update port: security/base to 1.2.4 and add hooks
 for MySQL/PGSQL
Date: Tue, 9 May 2006 13:58:14 +0300

 --Sig_nay=b=n0RbR2cO0sWm9Bv9w
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: quoted-printable
 
 > +.if defined(WITH_MYSQL)
 > +USE_PHP+=3D	mysql
 > +.endif
 > +
 > +.if defined(WITH_PGSQL)
 > +USE_PHP+=3D	pgsql
 > +.endif
 > +
 > +.if defined(WITH_PDF)
 > +USE_PHP+=3D	zlib
 > +RUN_DEPENDS+=3D	${LOCALBASE}/share/fpdf/fpdf.php:${PORTSDIR}/print/fpdf
 > +.endif
 
 Could you please convert this port to OPTIONS and send a new patch
 please ?
 
 
 --=20
 IOnut - Un^d^dregistered ;) FreeBSD "user"
   "Intellectual Property" is   nowhere near as valuable   as "Intellect"
 
 BOFH excuse #328:
 Fiber optics caused gas main leak
 
 
 
 --Sig_nay=b=n0RbR2cO0sWm9Bv9w
 Content-Type: application/pgp-signature; name=signature.asc
 Content-Disposition: attachment; filename=signature.asc
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.3 (FreeBSD)
 
 iD8DBQFEYHXGBX6fi0k6KXsRAj0LAKDXn0YOXJ+qSiTSOeF8ppIDfF8bQQCgiJRl
 lsxW8M7qkn+HnuQUbE8uurM=
 =fC9I
 -----END PGP SIGNATURE-----
 
 --Sig_nay=b=n0RbR2cO0sWm9Bv9w--
State-Changed-From-To: open->feedback 
State-Changed-By: itetcu 
State-Changed-When: Tue May 9 21:36:52 UTC 2006 
State-Changed-Why:  
Ask for maintainer fix. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94812 
State-Changed-From-To: feedback->open 
State-Changed-By: itetcu 
State-Changed-When: Wed May 10 00:34:29 UTC 2006 
State-Changed-Why:  
Feedback recevied, converting to options will come later. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94812 
State-Changed-From-To: open->feedback 
State-Changed-By: itetcu 
State-Changed-When: Sat May 13 23:08:23 UTC 2006 
State-Changed-Why:  
It looks like the Makefile could use a few variables from bsd.tcl.mk. Could you 
please check this and, if true, either submit a new diff ? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94812 
State-Changed-From-To: feedback->open 
State-Changed-By: itetcu 
State-Changed-When: Sat May 13 23:10:39 UTC 2006 
State-Changed-Why:  
Wrong PR :) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94812 
State-Changed-From-To: open->feedback 
State-Changed-By: itetcu 
State-Changed-When: Sat May 13 23:11:19 UTC 2006 
State-Changed-Why:  
Please tell where  WANT_PHP_PEAR= yes comes from, I've been unable to find any 
reference to it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94812 
State-Changed-From-To: feedback->open 
State-Changed-By: itetcu 
State-Changed-When: Tue May 16 11:07:09 UTC 2006 
State-Changed-Why:  
new patch received 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94812 
State-Changed-From-To: open->closed 
State-Changed-By: itetcu 
State-Changed-When: Tue May 16 12:10:56 UTC 2006 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94812 
>Unformatted:
