ports/155703: bsd.database.mk -- check compatability with MySQL version without adding LIB_DEPENDS

Matthew Seaman m.seaman at infracaninophile.co.uk
Sat Mar 19 19:10:03 UTC 2011


>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:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 19 19:10:02 UTC 2011
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:



More information about the freebsd-ports-bugs mailing list