From f00af33c28b265f00dfc725f0d3c03cce47d2cda Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Tue, 13 Jun 2017 13:35:37 +0200
Subject: [PATCH] component/perl-DBD-MySQL: specify zlib and openssl library
 location explicitly.

it is required for DBD-mysql-4.0.42 with MariaDB 10.1.
---
 component/perl-DBD-MySQL/buildout.cfg | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/component/perl-DBD-MySQL/buildout.cfg b/component/perl-DBD-MySQL/buildout.cfg
index 580472b18..5b5201e9a 100644
--- a/component/perl-DBD-MySQL/buildout.cfg
+++ b/component/perl-DBD-MySQL/buildout.cfg
@@ -18,21 +18,18 @@ md5sum = a144bd950b55af68835d44bc4ea6e5aa
 patches =
   ${:_profile_base_location_}/DBD-mysql-4.027.rpathsupport.patch#a932982b7725e6621cfce3a3d7917e03
   ${:_profile_base_location_}/DBD-mysql-4.042.mariadb.patch#5864d36d19c4a05034b3a4873f7c659a
-
 patch-options = -p1
+configure-command =
+  ${perl:location}/bin/perl Makefile.PL --libs="-L${zlib:location}/lib -L${openssl:location}/lib $(mysql_config --libs)"
 
 [perl-DBD-MySQL]
 <= perl-DBD-MySQL-common
-configure-command =
-  ${perl:location}/bin/perl Makefile.PL --mysql_config=${mysql-tritonn-5.0:location}/bin/mysql_config
 environment =
   OTHERLDFLAGS=-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${mysql-tritonn-5.0:location}/lib/mysql -Wl,-rpath=${openssl:location}/lib
-  PATH=${patch:location}/bin:%(PATH)s
+  PATH=${mysql-tritonn-5.0:location}/bin:${patch:location}/bin:%(PATH)s
 
 [perl-DBD-mariadb]
 <= perl-DBD-MySQL-common
-configure-command =
-  ${perl:location}/bin/perl Makefile.PL --mysql_config=${mariadb:location}/bin/mysql_config
 environment =
-  OTHERLDFLAGS=-L${zlib:location}/lib -L${openssl:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${mariadb:location}/lib -Wl,-rpath=${openssl:location}/lib
-  PATH=${patch:location}/bin:%(PATH)s
+  OTHERLDFLAGS=-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${mariadb:location}/lib -Wl,-rpath=${openssl:location}/lib
+  PATH=${mariadb:location}/bin:${patch:location}/bin:%(PATH)s
-- 
2.30.9