Commit 2ce3d292 authored by Jérome Perrin's avatar Jérome Perrin

component/perl-DBD-MySQL: use --libs options to set rpath

Makefile.PL supports --libs:

  --libs=<libs>          Use <libs> for running the linker; defaults
                         to the value of "mysql_config --libs" or a gussed
                         value

Instead of patching, use this option, calling manually "mysql_config
--libs" and appending our rpath flags.

Also move `environment` to base part, as it's now same in both
mariadb/mysql versions of the component.
parent ce4a856e
--- DBD-mysql-4.027/Makefile.PL.orig 2014-03-14 19:34:06.000000000 +0100
+++ DBD-mysql-4.027/Makefile.PL 2014-05-10 07:34:50.497350471 +0200
@@ -974,7 +974,12 @@
delete $params{ABSTRACT_FROM} if $] < 5.005;
delete $params{BINARY_LOCATION} if $] < 5.005;
- ExtUtils::MakeMaker::WriteMakefile(%params);
+ my %config;
+ if (defined($ENV{'OTHERLDFLAGS'})) {
+ $config{dynamic_lib} = { OTHERLDFLAGS => " $ENV{'OTHERLDFLAGS'} " };
+ }
+
+ ExtUtils::MakeMaker::WriteMakefile(%params, %config);
}
__DATA__
......@@ -18,23 +18,17 @@ depends =
url = http://www.cpan.org/modules/by-module/DBD/DBD-mysql-4.042.tar.gz
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
environment =
PATH=${patch:location}/bin:%(PATH)s
[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
${perl:location}/bin/perl Makefile.PL --mysql_config=${mysql-tritonn-5.0:location}/bin/mysql_config --libs="-L${zlib:location}/lib -L${openssl:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${mysql-tritonn-5.0:location}/lib/mysql -Wl,-rpath=${openssl:location}/lib $(${mysql-tritonn-5.0:location}/bin/mysql_config --libs)"
[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
${perl:location}/bin/perl Makefile.PL --mysql_config=${mariadb:location}/bin/mysql_config --libs="-L${zlib:location}/lib -L${openssl:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${mariadb:location}/lib/mysql -Wl,-rpath=${openssl:location}/lib $(${mariadb:location}/bin/mysql_config --libs)"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment