tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

mariadb and buildlink



Hello

If MYSQL_VERSION_DEFAULT=MARIADB55 then some package build break, 
because they expect BUILDINK_xxx.mysql-client to be defined and they get
BUILDINK_xxx.mariadb-client instead.

Take the example of databases/php-pdo_mysql. Its Makefile features:
CONFIGURE_ARGS+=--with-${MODNAME}=shared,${BUILDLINK_PREFIX.mysql-client}

This should be --with-pdo_mysql=shared,/usr/pkg and it becomes just
--with-pdo_mysql=shared, with the consequence that php-pdo_mysql configure
script cannot find mysql_config and aborts;

Working around is simple, we just need to define the proper variable in the
mariadb55-client case. The patch below lets databases/php-pdo_mysql build with
MYSQL_VERSION_DEFAULT=MARIADB55.

I did not commit it though, because the fix may be at the wrong place, and
also because it is probably incomplete. A grep -r 'BUILDLINK_.*mysql-client'
throughout pkgsrc shows that other BUILDLINK_ variables are used. For
instance, databases/tcl-fbsql uses BUILDLINK_INCDIRS.mysql-client and
BUILDLINK_LIBDIRS.mysql-client. 

Also may change fails to add BUILDLINK_PREFIX.mysql-client to MAKEVAR. How
this should be handled The Right Way?

Index: mk/mysql.buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/mysql.buildlink3.mk,v
retrieving revision 1.20
diff -U4 -r1.20 mysql.buildlink3.mk
--- mk/mysql.buildlink3.mk      16 Apr 2015 20:24:15 -0000      1.20
+++ mk/mysql.buildlink3.mk      10 Aug 2015 03:43:33 -0000
@@ -113,8 +113,11 @@
 .if ${_MYSQL_VERSION} == "56"
 MYSQL_PKGSRCDIR=       ../../databases/mysql56-client
 .elif ${_MYSQL_VERSION} == "MARIADB55"
 MYSQL_PKGSRCDIR=       ../../databases/mariadb55-client
+# Make sure BUILDLINK_PREFIX.mysql-client is defined 
+# as it is used in CONFIGURE_ARGS for e.g. databases/php-pdo_mysql
+BUILDLINK_PREFIX.mysql-client= ${BUILDLINK_PREFIX.mariadb-client}
 .elif ${_MYSQL_VERSION} == "55"
 MYSQL_PKGSRCDIR=       ../../databases/mysql55-client
 .elif ${_MYSQL_VERSION} == "51"
 MYSQL_PKGSRCDIR=       ../../databases/mysql51-client
-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index