diff options
-rw-r--r-- | lib/Debian/Debhelper/Buildsystem/perl_build.pm | 8 | ||||
-rw-r--r-- | lib/Debian/Debhelper/Buildsystem/perl_makemaker.pm | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/Debian/Debhelper/Buildsystem/perl_build.pm b/lib/Debian/Debhelper/Buildsystem/perl_build.pm index 8752905..056210e 100644 --- a/lib/Debian/Debhelper/Buildsystem/perl_build.pm +++ b/lib/Debian/Debhelper/Buildsystem/perl_build.pm @@ -8,7 +8,7 @@ package Debian::Debhelper::Buildsystem::perl_build; use strict; use warnings; -use Debian::Debhelper::Dh_Lib qw(compat is_cross_compiling perl_cross_incdir warning); +use Debian::Debhelper::Dh_Lib qw(compat is_cross_compiling perl_cross_incdir warning dpkg_architecture_value); use parent qw(Debian::Debhelper::Buildsystem); use Config; @@ -16,6 +16,11 @@ sub DESCRIPTION { "Perl Module::Build (Build.PL)" } +sub _get_pkgconf { + my $toolprefix = is_cross_compiling() ? dpkg_architecture_value("DEB_HOST_GNU_TYPE") . "-" : ""; + return "/usr/bin/" . $toolprefix . "pkg-config"; +} + sub check_auto_buildable { my ($this, $step) = @_; @@ -58,6 +63,7 @@ sub configure { if ($ENV{CFLAGS} && ! compat(8)) { push @flags, "--config", "optimize=$ENV{CFLAGS} $ENV{CPPFLAGS}"; } + $ENV{"PKG_CONFIG"} = _get_pkgconf() if not exists($ENV{"PKG_CONFIG"}); if ($ENV{LDFLAGS} && ! compat(8)) { my $ld = $Config{ld}; if (is_cross_compiling()) { diff --git a/lib/Debian/Debhelper/Buildsystem/perl_makemaker.pm b/lib/Debian/Debhelper/Buildsystem/perl_makemaker.pm index efb01d2..7bc81ef 100644 --- a/lib/Debian/Debhelper/Buildsystem/perl_makemaker.pm +++ b/lib/Debian/Debhelper/Buildsystem/perl_makemaker.pm @@ -8,7 +8,7 @@ package Debian::Debhelper::Buildsystem::perl_makemaker; use strict; use warnings; -use Debian::Debhelper::Dh_Lib qw(compat is_cross_compiling perl_cross_incdir warning); +use Debian::Debhelper::Dh_Lib qw(compat is_cross_compiling perl_cross_incdir warning dpkg_architecture_value); use parent qw(Debian::Debhelper::Buildsystem::makefile); use Config; |