Bug#1078010: libnet-z3950-zoom-perl FTCBFS: hard codes the build architecture pkg-config

Helmut Grohne helmut at subdivi.de
Mon Aug 5 18:40:13 BST 2024


Source: libnet-z3950-zoom-perl
Version: 1.32-1
Tags: patch
User: debian-cross at lists.debian.org
Usertags: ftcbfs

libnet-z3950-zoom-perl fails to cross build from source, because
Makefile.PL hard codes the build architecture pkg-config and thus fails
finding yaz, which is only requested for the host architecture. There is
no really good mechanism to solve this at the time of this writing, but
making pkg-config substitutable via the environment variable PKG_CONFIG
and correctly substituting it is common in other build systems. I'm
attaching a patch for your convenience. If you see a way to derive the
toolchain prefix from the perl configuration module, that would be a
better way.

Helmut
-------------- next part --------------
diff --minimal -Nru libnet-z3950-zoom-perl-1.32/debian/changelog libnet-z3950-zoom-perl-1.32/debian/changelog
--- libnet-z3950-zoom-perl-1.32/debian/changelog	2024-08-03 23:46:12.000000000 +0200
+++ libnet-z3950-zoom-perl-1.32/debian/changelog	2024-08-05 16:30:59.000000000 +0200
@@ -1,3 +1,10 @@
+libnet-z3950-zoom-perl (1.32-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Use the host architecture pkg-config. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de>  Mon, 05 Aug 2024 16:30:59 +0200
+
 libnet-z3950-zoom-perl (1.32-1) unstable; urgency=medium
 
   * Import upstream version 1.32.
diff --minimal -Nru libnet-z3950-zoom-perl-1.32/debian/patches/cross.patch libnet-z3950-zoom-perl-1.32/debian/patches/cross.patch
--- libnet-z3950-zoom-perl-1.32/debian/patches/cross.patch	1970-01-01 01:00:00.000000000 +0100
+++ libnet-z3950-zoom-perl-1.32/debian/patches/cross.patch	2024-08-05 16:28:52.000000000 +0200
@@ -0,0 +1,19 @@
+--- libnet-z3950-zoom-perl-1.32.orig/Makefile.PL
++++ libnet-z3950-zoom-perl-1.32/Makefile.PL
+@@ -8,11 +8,12 @@ use strict;
+ my $yazver;
+ my $yazinc;
+ my $yazlibs;
+-system("pkg-config --exists yaz");
++my $PKG_CONFIG = $ENV{PKG_CONFIG} or "pkg-config";
++system("$PKG_CONFIG --exists yaz");
+ if ($? == 0) {
+-    $yazver = `pkg-config --modversion yaz` or die $!;
+-    $yazinc = `pkg-config --cflags yaz` or die $!;
+-    $yazlibs = `pkg-config --libs yaz` or die $!;
++    $yazver = `$PKG_CONFIG --modversion yaz` or die $!;
++    $yazinc = `$PKG_CONFIG --cflags yaz` or die $!;
++    $yazlibs = `$PKG_CONFIG --libs yaz` or die $!;
+ } else {
+     $yazver = `yaz-config --version`;
+     $yazinc = `yaz-config --cflags servers`;
diff --minimal -Nru libnet-z3950-zoom-perl-1.32/debian/patches/series libnet-z3950-zoom-perl-1.32/debian/patches/series
--- libnet-z3950-zoom-perl-1.32/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ libnet-z3950-zoom-perl-1.32/debian/patches/series	2024-08-05 16:28:47.000000000 +0200
@@ -0,0 +1 @@
+cross.patch
diff --minimal -Nru libnet-z3950-zoom-perl-1.32/debian/rules libnet-z3950-zoom-perl-1.32/debian/rules
--- libnet-z3950-zoom-perl-1.32/debian/rules	2024-08-03 23:46:12.000000000 +0200
+++ libnet-z3950-zoom-perl-1.32/debian/rules	2024-08-05 16:30:57.000000000 +0200
@@ -1,5 +1,8 @@
 #!/usr/bin/make -f
 
+DPKG_EXPORT_BUILDTOOLS=1
+include /usr/share/dpkg/buildtools.mk
+
 PACKAGE = $(shell dh_listpackages)
 TMP     = $(CURDIR)/debian/$(PACKAGE)
 


More information about the pkg-perl-maintainers mailing list