Source: openscap
Version: 1.3.10+dfsg-1
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

Cross building openscap successfully results in a broken
libopenscap-perl. It uses the build architecture multiarch directory.
When building a perl extension, you should Build-Depends: perl-xs-dev
rather than libperl-dev these days and then you can pass a suitable
PERL5LIB supplying the cross configuration. I'm attaching a patch for
your convenience.

Helmut
diff --minimal -Nru openscap-1.3.10+dfsg/debian/changelog 
openscap-1.3.10+dfsg/debian/changelog
--- openscap-1.3.10+dfsg/debian/changelog       2024-04-05 07:40:35.000000000 
+0200
+++ openscap-1.3.10+dfsg/debian/changelog       2024-05-03 08:23:56.000000000 
+0200
@@ -1,3 +1,12 @@
+openscap (1.3.10+dfsg-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix cross misbuild: (Closes: #-1)
+    + Build-Depends: perl-xs-dev for building a perl extension.
+    + Supply a cross PERL5LIB.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Fri, 03 May 2024 08:23:56 +0200
+
 openscap (1.3.10+dfsg-1) unstable; urgency=medium
 
   * New upstream release.
diff --minimal -Nru openscap-1.3.10+dfsg/debian/control 
openscap-1.3.10+dfsg/debian/control
--- openscap-1.3.10+dfsg/debian/control 2024-04-05 07:40:35.000000000 +0200
+++ openscap-1.3.10+dfsg/debian/control 2024-05-03 08:23:55.000000000 +0200
@@ -18,7 +18,6 @@
                libldap2-dev,
                libopendbx1-dev,
                libpcre2-dev,
-               libperl-dev,
                libpopt-dev,
                libpython3-all-dev,
                librpm-dev,
@@ -29,6 +28,7 @@
                libxmlsec1-dev,
                libxslt1-dev,
                libyaml-dev,
+               perl-xs-dev,
                pkgconf,
                python3-all-dev:native,
                python3-pytest <!nocheck>,
diff --minimal -Nru openscap-1.3.10+dfsg/debian/rules 
openscap-1.3.10+dfsg/debian/rules
--- openscap-1.3.10+dfsg/debian/rules   2024-04-05 07:40:35.000000000 +0200
+++ openscap-1.3.10+dfsg/debian/rules   2024-05-03 08:23:56.000000000 +0200
@@ -6,6 +6,14 @@
 
 export DEB_BUILD_MAINT_OPTIONS := hardening=+all
 
+include /usr/share/dpkg/architecture.mk
+
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+PERLVER := $(shell perl -MConfig -e 'print $$Config{version}')
+PERL5LIB := /usr/lib/$(DEB_HOST_MULTIARCH)/perl/cross-config-$(PERLVER)$(if 
$(PERL5LIB),:$(PERL5LIB))
+export PERL5LIB
+endif
+
 PYVERS=$(shell py3versions --supported --version)
 CMAKE_OPTS = \
             -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON \

Reply via email to