Source: zbar
Version: 0.23.93-8
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: cross-satisfiability ftcbfs

zbar fails to cross build from source for multiple reasons. The
immediate failure is a failure to satisfy its host architecture perl
dependency as it conflicts with the build architecture perl interpreter
that is part of essential. I guess that the reason for depending on perl
was to build a perl extension module. This need is now satisfied via
perl-xs-dev and that package happens to also install perl:any.
Therefore, I suggest dropping the perl dependency.

Nextup, a Python extension module is being built. Depending on
python3-dev:any is not enough. An additional dependency on
libpython3-dev is needed. Then the extension build needs to be told
about the desired architecture via _PYTHON_SYSCONFIGDATA_NAME.

Last but not least, the g-ir-scanner fails for zbar. I am attaching a
patch for the first two problems and will report a separate bug for the
g-ir-scanner.

Helmut
diff --minimal -Nru zbar-0.23.93/debian/changelog zbar-0.23.93/debian/changelog
--- zbar-0.23.93/debian/changelog       2025-05-01 09:00:31.000000000 +0200
+++ zbar-0.23.93/debian/changelog       2025-05-11 22:25:27.000000000 +0200
@@ -1,3 +1,12 @@
+zbar (0.23.93-9) UNRELEASED; urgency=medium
+
+  * Improve cross building. (Closes: #-1)
+    + Drop redundant perl dependency.
+    + Add libpython3-dev to Build-Depends.
+    + Export _PYTHON_SYSCONFIGDATA_NAME for cross building.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sun, 11 May 2025 22:25:27 +0200
+
 zbar (0.23.93-8) sid; urgency=medium
 
   * QA upload.
diff --minimal -Nru zbar-0.23.93/debian/control zbar-0.23.93/debian/control
--- zbar-0.23.93/debian/control 2025-05-01 09:00:31.000000000 +0200
+++ zbar-0.23.93/debian/control 2025-05-11 22:25:27.000000000 +0200
@@ -12,10 +12,10 @@
  libgtk-3-dev,
  libjpeg-dev,
  libmagick++-dev,
+ libpython3-dev,
  libqt5x11extras5-dev,
  libv4l-dev [linux-any],
  libx11-dev,
- perl,
  perl-xs-dev,
  pkgconf,
  python3-dev:any,
diff --minimal -Nru zbar-0.23.93/debian/rules zbar-0.23.93/debian/rules
--- zbar-0.23.93/debian/rules   2025-05-01 09:00:31.000000000 +0200
+++ zbar-0.23.93/debian/rules   2025-05-11 22:25:27.000000000 +0200
@@ -34,6 +34,10 @@
     CONFIGURE_FLAGS += --disable-video
 endif
 
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+export 
_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__$(DEB_HOST_ARCH_OS)_$(DEB_HOST_MULTIARCH)
+endif
+
 %:
        dh $@ --with gir
 

Reply via email to