[buildout]
extends =
  ../mysql-tritonn-5.0/buildout.cfg
  ../mariadb/buildout.cfg

parts =
  perl-DBD-MySQL

[perl-DBD-MySQL-common]
recipe = slapos.recipe.cmmi
depends =
  ${perl-DBI:location}
url = http://www.cpan.org/modules/by-module/DBD/DBD-mysql-4.027.tar.gz
md5sum = 11fa6449715ba9d3fa5f4ee5ae688d6f
patches =
  ${:_profile_base_location_}/DBD-mysql-4.027.rpathsupport.patch#a932982b7725e6621cfce3a3d7917e03
patch-options = -p1

[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

[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