Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Aug 2004 12:29:35 +0100 (BST)
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/71100: [ Maintainer Update ] databases/phpmyadmin add OPTIONS support and make some dependencies optional
Message-ID:  <200408291129.i7TBTZKL010627@happy-idiot-talk.infracaninophile.co.uk>
Resent-Message-ID: <200408291130.i7TBUIjw060746@freefall.freebsd.org>

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

>Number:         71100
>Category:       ports
>Synopsis:       [ Maintainer Update ] databases/phpmyadmin add OPTIONS support and make some dependencies optional
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 29 11:30:18 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Matthew Seaman
>Release:        FreeBSD 4.10-STABLE i386
>Organization:
Infracaninophile
>Environment:
System: FreeBSD happy-idiot-talk.infracaninophile.co.uk 4.10-STABLE FreeBSD 4.10-STABLE #81: Sat Aug 28 17:10:47 BST 2004 root@happy-idiot-talk.infracaninophile.co.uk:/usr/obj/usr/src/sys/HAPPY-IDIOT-TALK i386



>Description:

After e-mail conversations with a couple of phpMyAdmin users, and as
requested by them, here's a patch to make as much as possible of the
PHP module dependencies optional.  phpMyAdmin does lose some
functionality, but mostly it works fine without bz2, gd, openssl, pdf
or zlib support.  This should let those users who need it install as
slim a version as possible.

Note: OPTIONS processing copied and adapted from the
lang/php{4,5}-extensions ports

The WITH_SUPHP stuff can't be included with the other OPTIONS stuff as
it has to preceed even the inclusion of bsd.ports.pre.mk

>How-To-Repeat:

>Fix:


--- phpmyadmin.diff begins here ---
diff -Nur /usr/ports/databases/phpmyadmin/Makefile phpmyadmin/Makefile
--- /usr/ports/databases/phpmyadmin/Makefile	Sat Jul 24 19:39:51 2004
+++ phpmyadmin/Makefile	Tue Aug 17 10:13:27 2004
@@ -18,9 +18,12 @@
 
 USE_BZIP2=	yes
 NO_BUILD=	yes
-USE_PHP=	bz2 gd mysql openssl pcre pdf zlib
+USE_PHP=	mysql pcre
 
-.if defined(WITH_SUPHP)
+# Unfortunately can't make WITH_SUPHP part of the OPTIONS selection,
+# since it has to be processed before just about anything else.
+
+.if defined(WITH_SUPHP) && !defined(WITHOUT_SUPHP)
 
 PKGNAMESUFFIX=	-suphp
 RUN_DEPENDS+=	${LOCALBASE}/sbin/suphp:${PORTSDIR}/www/suphp
@@ -43,6 +46,29 @@
 
 .endif
 
+# Copy the way lang/php{4,5}-extensions deals with its OPTIONS -- avoids
+# problems with include of bsd.port.pre.mk
+
+OPTIONS=	BZ2		"bzip2 library support" on \
+		GD		"GD library support" on \
+		OPENSSL		"OpenSSL support" on \
+		PDF		"PDFlib support (implies GD)" on \
+		ZLIB		"ZLIB support" on
+
+PORT_DBDIR?=	/var/db/ports
+LATEST_LINK=	${PORTNAME}${PKGNAMESUFFIX}
+OPTIONSFILE?=	${PORT_DBDIR}/${LATEST_LINK}/options
+
+.if exists(${OPTIONSFILE})
+.include "${OPTIONSFILE}"
+.endif
+
+.for opt in BZ2 GD OPENSSL PDF ZLIB
+.    if !defined(WITHOUT_${opt}) || defined(WITH_${opt})
+USE_PHP+=	${opt:L}
+.    endif
+.endfor
+
 MSG_SKEL=	${PKGDIR}/pkg-message
 PKGMESSAGE=	${WRKDIR}/pkg-message
 
@@ -56,9 +82,12 @@
 
 .SILENT:
 
+do-build:
+	@${DO_NADA}
+
 pre-everything::
 	${ECHO_MSG} ""
-	${ECHO_MSG} "You may use the following build options:"
+	${ECHO_MSG} "You may use the following additional build option:"
 	${ECHO_MSG} ""
 	${ECHO_MSG} "    WITH_SUPHP=yes   Install appropriately for use with"
 	${ECHO_MSG} "                     the www/suphp port [default: no]"
--- phpmyadmin.diff ends here ---


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



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