ports/59242: bsd.port.mk: MYSQL_VER - beautify with "."

Sergey Matveychuk sem at Current.sem-home.ciam.ru
Thu Nov 13 04:10:12 UTC 2003


>Number:         59242
>Category:       ports
>Synopsis:       bsd.port.mk: MYSQL_VER - beautify with "."
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 12 20:10:06 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Sergey Matveychuk
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
>Environment:
System: FreeBSD Current.sem-home.ciam.ru 5.1-CURRENT FreeBSD 5.1-CURRENT #1: Sun Oct 19 08:20:34 MSD 2003 root at current-test.sem-home.ciam.ru:/usr/obj/usr/src/sys/CURRENT i386


	
>Description:
	
	Now MySQL version looks like 323, 40, 41
	It will looks better with ".": 3.23, 4.0, 4.1
	A patch keeps backward compatibles
>How-To-Repeat:
	
>Fix:

	

--- bsd.port.mk.diff begins here ---
--- bsd.port.mk.1.473	Mon Nov 10 10:13:30 2003
+++ bsd.port.mk	Wed Nov 12 19:57:40 2003
@@ -1622,9 +1622,9 @@
 .endif
 
 .if defined(USE_MYSQL)
-DEFAULT_MYSQL_VER?=	40
+DEFAULT_MYSQL_VER?=	4.0
 # MySQL client version currently supported.
-MYSQL323_LIBVER=10
+MYSQL323_LIBVER=	10
 MYSQL40_LIBVER=		12
 MYSQL41_LIBVER=		14
 
@@ -1634,25 +1634,25 @@
 .elif defined(WITH_MYSQL_VER)
 MYSQL_VER=	${WITH_MYSQL_VER}
 .elif exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.${MYSQL323_LIBVER})
-MYSQL_VER=	323
+MYSQL_VER=	3.23
 .elif exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.${MYSQL40_LIBVER})
-MYSQL_VER=	40
+MYSQL_VER=	4.0
 .elif exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.${MYSQL41_LIBVER})
-MYSQL_VER=	41
+MYSQL_VER=	4.1
 .else
 MYSQL_VER=	${DEFAULT_MYSQL_VER}
 .endif # WANT_MYSQL
 
 # And now we are checking if we can use it
-.if exists(${PORTSDIR}/databases/mysql${MYSQL_VER}-client)
+.if exists(${PORTSDIR}/databases/mysql${MYSQL_VER:S/.//g}-client)
 .if defined(BROKEN_WITH_MYSQL)
 .	for VER in ${BROKEN_WITH_MYSQL}
-.		if (${MYSQL_VER} == "${VER}")
+.		if (${MYSQL_VER:S/.//g} == "${VER:S/.//g}")
 BROKEN=		"Doesn't work with MySQL version : ${MYSQL_VER} (Doesn't support MySQL ${BROKEN_WITH_MYSQL})"
 .		endif
 .	endfor
 .endif # BROKEN_WITH_MYSQL
-LIB_DEPENDS+=	mysqlclient.${MYSQL${MYSQL_VER}_LIBVER}:${PORTSDIR}/databases/mysql${MYSQL_VER}-client
+LIB_DEPENDS+=	mysqlclient.${MYSQL${MYSQL_VER:S/.//g}_LIBVER}:${PORTSDIR}/databases/mysql${MYSQL_VER:S/.//g}-client
 .else
 BROKEN=		"unknown MySQL version: ${MYSQL_VER}"
 .endif # Check for correct libs
--- bsd.port.mk.diff ends here ---


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



More information about the freebsd-ports-bugs mailing list