summaryrefslogtreecommitdiffstats
path: root/lib/Debian/Debhelper/Buildsystem
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:17:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:17:26 +0000
commit36b03e2bee4497aef85033f4f900f5d89d5dc55e (patch)
treeec9a0e0972bd08cc628efaa53161b44f9361dd37 /lib/Debian/Debhelper/Buildsystem
parentAdding debian version 13.16. (diff)
downloaddebhelper-36b03e2bee4497aef85033f4f900f5d89d5dc55e.tar.xz
debhelper-36b03e2bee4497aef85033f4f900f5d89d5dc55e.zip
Merging upstream version 13.17.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/Debian/Debhelper/Buildsystem')
-rw-r--r--lib/Debian/Debhelper/Buildsystem/cmake.pm10
-rw-r--r--lib/Debian/Debhelper/Buildsystem/perl_makemaker.pm7
2 files changed, 15 insertions, 2 deletions
diff --git a/lib/Debian/Debhelper/Buildsystem/cmake.pm b/lib/Debian/Debhelper/Buildsystem/cmake.pm
index cafc743..42e4cac 100644
--- a/lib/Debian/Debhelper/Buildsystem/cmake.pm
+++ b/lib/Debian/Debhelper/Buildsystem/cmake.pm
@@ -79,9 +79,15 @@ sub new {
return $this;
}
+sub _get_pkgconf {
+ my $toolprefix = is_cross_compiling() ? dpkg_architecture_value("DEB_HOST_GNU_TYPE") . "-" : "";
+ return "/usr/bin/" . $toolprefix . "pkg-config";
+}
+
sub _get_cmake_env {
my $update_env = {};
$update_env->{DEB_PYTHON_INSTALL_LAYOUT} = 'deb' unless $ENV{DEB_PYTHON_INSTALL_LAYOUT};
+ $update_env->{PKG_CONFIG} = _get_pkgconf() unless $ENV{PKG_CONFIG};
return $update_env;
}
@@ -129,8 +135,8 @@ sub configure {
if (not $ENV{CXX}) {
push @flags, "-DCMAKE_CXX_COMPILER=" . dpkg_architecture_value("DEB_HOST_GNU_TYPE") . "-g++";
}
- push(@flags, "-DPKG_CONFIG_EXECUTABLE=/usr/bin/" . dpkg_architecture_value("DEB_HOST_GNU_TYPE") . "-pkg-config");
- push(@flags, "-DPKGCONFIG_EXECUTABLE=/usr/bin/" . dpkg_architecture_value("DEB_HOST_GNU_TYPE") . "-pkg-config");
+ push(@flags, "-DPKG_CONFIG_EXECUTABLE=" . _get_pkgconf());
+ push(@flags, "-DPKGCONFIG_EXECUTABLE=" . _get_pkgconf());
push(@flags, "-DQMAKE_EXECUTABLE=/usr/bin/" . dpkg_architecture_value("DEB_HOST_GNU_TYPE") . "-qmake");
}
push(@flags, "-DCMAKE_INSTALL_LIBDIR=lib/" . dpkg_architecture_value("DEB_HOST_MULTIARCH"));
diff --git a/lib/Debian/Debhelper/Buildsystem/perl_makemaker.pm b/lib/Debian/Debhelper/Buildsystem/perl_makemaker.pm
index 881f1ec..efb01d2 100644
--- a/lib/Debian/Debhelper/Buildsystem/perl_makemaker.pm
+++ b/lib/Debian/Debhelper/Buildsystem/perl_makemaker.pm
@@ -32,6 +32,12 @@ sub check_auto_buildable {
return 0;
}
+sub _get_pkgconf {
+ my $toolprefix = is_cross_compiling() ? dpkg_architecture_value("DEB_HOST_GNU_TYPE") . "-" : "";
+ return "/usr/bin/" . $toolprefix . "pkg-config";
+}
+
+
sub new {
my $class=shift;
my $this=$class->SUPER::new(@_);
@@ -66,6 +72,7 @@ sub configure {
if is_cross_compiling() and defined $cross_flag;
push @flags, "LD=$ld $ENV{CFLAGS} $ENV{LDFLAGS}";
}
+ $ENV{"PKG_CONFIG"} = _get_pkgconf() if not exists($ENV{"PKG_CONFIG"});
push(@perl_flags, '-I.') if compat(10);