Package: libyang2-dev
Version: 2.1.148-0.1
Severity: wishlist
Tags: patch

Hi all,


the libyang2-dev package currently can't be installed in parallel for
multi-arch build environments with mixed 32-bit and 64-bit
architectures.  The reason for this is that the content of
/usr/include/libyang/config.h depends on the sizes of some types.

Attached is a patch to move that file to /usr/include/<arch>/libyang.
This enables cross-compiling setups where libyang is needed on both
build and host architectures.

Cheers,


equi
diff -ur libyang2-2.1.148/debian/libyang2-dev.install 
libyang2-2.1.148/debian/libyang2-dev.install
--- libyang2-2.1.148/debian/libyang2-dev.install        2023-02-01 
10:12:00.000000000 +0100
+++ libyang2-2.1.148/debian/libyang2-dev.install        2024-05-08 
17:25:49.081859201 +0200
@@ -1,3 +1,4 @@
 usr/include/libyang/*.h
+usr/include/*/libyang/*.h
 usr/lib/*/*.so
 usr/lib/*/pkgconfig/*.pc
diff -ur libyang2-2.1.148/debian/rules libyang2-2.1.148.new/debian/rules
--- libyang2-2.1.148/debian/rules       2023-02-01 10:12:00.000000000 +0100
+++ libyang2-2.1.148/debian/rules       2024-05-08 17:44:20.504783204 +0200
@@ -11,3 +11,11 @@
        dh_auto_configure -- \
                -DCMAKE_BUILD_TYPE:String="Release" \
                -DENABLE_TESTS=ON
+
+override_dh_auto_install:
+       dh_auto_install
+       mkdir -p debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/libyang
+       mv      debian/tmp/usr/include/libyang/config.h \
+               debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/libyang
+       sed -e 's%#include "config\.h"%#include <libyang/config.h>%' -i \
+               debian/tmp/usr/include/libyang/*.h

Reply via email to