From m.seaman@infracaninophile.co.uk  Sat Mar 19 19:03:54 2011
Return-Path: <m.seaman@infracaninophile.co.uk>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3A66B106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 19 Mar 2011 19:03:54 +0000 (UTC)
	(envelope-from m.seaman@infracaninophile.co.uk)
Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3fd3:cd67:fafa:3d78])
	by mx1.freebsd.org (Postfix) with ESMTP id A17278FC15
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 19 Mar 2011 19:03:53 +0000 (UTC)
Received: from lucid-nonsense.infracaninophile.co.uk (localhost [IPv6:::1])
	by smtp.infracaninophile.co.uk (8.14.4/8.14.4) with ESMTP id p2JJ3qaX044043
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 19 Mar 2011 19:03:52 GMT
	(envelope-from matthew@lucid-nonsense.infracaninophile.co.uk)
Received: (from matthew@localhost)
	by lucid-nonsense.infracaninophile.co.uk (8.14.4/8.14.4/Submit) id p2JJ3qpr044042;
	Sat, 19 Mar 2011 19:03:52 GMT
	(envelope-from matthew)
Message-Id: <201103191903.p2JJ3qpr044042@lucid-nonsense.infracaninophile.co.uk>
Date: Sat, 19 Mar 2011 19:03:52 GMT
From: Matthew Seaman <m.seaman@infracaninophile.co.uk>
Reply-To: Matthew Seaman <m.seaman@infracaninophile.co.uk>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: bsd.database.mk -- check compatability with MySQL version without adding LIB_DEPENDS
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         155703
>Category:       ports
>Synopsis:       bsd.database.mk -- check compatability with MySQL version without adding LIB_DEPENDS
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    ale
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 19 19:10:02 UTC 2011
>Closed-Date:    Sat Mar 26 11:55:14 UTC 2011
>Last-Modified:  Sat Mar 26 11:55:14 UTC 2011
>Originator:     Matthew Seaman
>Release:        FreeBSD 8.2-STABLE amd64
>Organization:
Infracaninophile
>Environment:
System: FreeBSD lucid-nonsense.infracaninophile.co.uk 8.2-STABLE FreeBSD 8.2-STABLE #37 r219303M: Sat Mar 5 13:35:42 GMT 2011 root@lucid-nonsense.infracaninophile.co.uk:/usr/obj/usr/src/sys/LUCID-NONSENSE amd64


	
>Description:

I'm the maintainer of databases/phpmyadmin.  Up to now, I've had
'USE_MYSQL=yes' included in that port's Makefile so I could use the
IGNORE_WITH_MYSQL functionality, and not minded that this introduced a
LIB_DEPENDS on databases/mysqlXX-client, which isn't necessary as a
direct dependency for this port, because it would always have had that
as an indirect dependency in any case.

However, the php5-mysql or php5-mysqli modules now default to using
the MySQL native drivers, in which case, no LIB_DEPENDS on
mysql-client is needed.

databases/phpmyadmin is incompatible with older versions of MySQL, and
I'd still like to use the IGNORE_WITH_MYSQL functionality as far as
possible.

This patch allows port maintainers to say:

USE_MYSQL= compat
IGNORE_WITH_MYSQL=	323 40 41

without adding any dependency on databases/mysqlXX-client


>How-To-Repeat:
	
>Fix:

	

--- bsd.database.mk.diff begins here ---
Index: bsd.database.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.database.mk,v
retrieving revision 1.54
diff -u -u -r1.54 bsd.database.mk
--- bsd.database.mk	19 Mar 2011 13:13:46 -0000	1.54
+++ bsd.database.mk	19 Mar 2011 16:15:21 -0000
@@ -15,12 +15,14 @@
 # USE_[DATABASE]_VER or WANT_[DATABASE]_VER will include this file as well.
 #
 ##
-# USE_MYSQL		- Add MySQL (client/server/embedded) dependency (default:
-#				  client).
+# USE_MYSQL		- Add MySQL (client/server/embedded/compat) dependency
+#				  (default: client).
 #				  If no version is given (by the maintainer via the port or
 #				  by the user via defined variable), try to find the
-#				  currently installed version.  Fall back to default if
-#				  necessary (MySQL-5.5 = 55).
+#				  currently installed version.	Fall back to default if
+#				  necessary (MySQL-5.5 = 55). 'compat' allows the
+#				  IGNORE_WITH_MYSQL functionality, but doesn't add any
+#				  LIB_DEPENDS 
 # DEFAULT_MYSQL_VER
 #				- MySQL default version.  Can be overridden within a port.
 #				  Default: 55.
@@ -161,6 +163,7 @@
 .		endif
 .	endfor
 .endif # IGNORE_WITH_MYSQL
+.if (${USE_MYSQL} != "compat")
 .if (${USE_MYSQL} == "server" || ${USE_MYSQL} == "embedded")
 RUN_DEPENDS+=	${LOCALBASE}/libexec/mysqld:${PORTSDIR}/${_MYSQL_SERVER}
 .if (${USE_MYSQL} == "embedded")
@@ -169,6 +172,7 @@
 .else
 LIB_DEPENDS+=	mysqlclient.${MYSQL${MYSQL_VER}_LIBVER}:${PORTSDIR}/${_MYSQL_CLIENT}
 .endif
+.endif
 .else
 IGNORE=		cannot install: unknown MySQL version: ${MYSQL_VER}
 .endif # Check for correct libs
--- bsd.database.mk.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ale 
Responsible-Changed-By: miwi 
Responsible-Changed-When: Sat Mar 26 11:41:47 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=155703 
State-Changed-From-To: open->closed 
State-Changed-By: ale 
State-Changed-When: Sat Mar 26 11:52:14 UTC 2011 
State-Changed-Why:  
Thanks for the submission, but phpmyadmin should not use any form of 
USE_MYSQL: it doesn't need a library and it doesn't need a local server. 
Checking for the version of an installed MySQL Server is not correct, 
USE_MYSQL should be removed. 

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