Package: libgupnp-av-1.0-dev
Version: 0.12.8-2
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

dleyna-server fails to cross build from source, because pkg-config does
not find gupnp-av-1.0.pc. That's due to cross pkg-config not considering
/usr/lib/pkgconfig, which is a deliberate choice by the pkg-config
maintainer. Thus libgupnp-av-1.0-dev needs to move its .pc file to a
multiarch location to be useful for cross compilation. The attached
patch does just that.

This patch/bug is not about multiarch in general. It may be feasible to
add Multi-Arch headers to debian/control after applying it, but that's
not required for making cross builds work. So this patch only does the
minimum amount of work to support cross builds. Making multiarch work is
welcome nonetheless.

Helmut
diff --minimal -Nru gupnp-av-0.12.8/debian/changelog 
gupnp-av-0.12.8/debian/changelog
--- gupnp-av-0.12.8/debian/changelog    2016-03-09 17:00:20.000000000 +0100
+++ gupnp-av-0.12.8/debian/changelog    2016-09-12 22:40:41.000000000 +0200
@@ -1,3 +1,10 @@
+gupnp-av (0.12.8-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Move gupnp-av-1.0.pc to a multiarch path (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 12 Sep 2016 22:40:15 +0200
+
 gupnp-av (0.12.8-2) unstable; urgency=medium
 
   * debian/copyright: Updated and switched to DEP5 format
diff --minimal -Nru gupnp-av-0.12.8/debian/gir1.2-gupnp-av-1.0.install 
gupnp-av-0.12.8/debian/gir1.2-gupnp-av-1.0.install
--- gupnp-av-0.12.8/debian/gir1.2-gupnp-av-1.0.install  2016-03-09 
16:48:35.000000000 +0100
+++ gupnp-av-0.12.8/debian/gir1.2-gupnp-av-1.0.install  2016-09-12 
22:41:54.000000000 +0200
@@ -1 +1 @@
-usr/lib/girepository-1.0/GUPnPAV-1.0.typelib
+usr/lib/*/girepository-1.0/GUPnPAV-1.0.typelib
diff --minimal -Nru gupnp-av-0.12.8/debian/libgupnp-av-1.0-2.install 
gupnp-av-0.12.8/debian/libgupnp-av-1.0-2.install
--- gupnp-av-0.12.8/debian/libgupnp-av-1.0-2.install    2016-03-09 
16:48:35.000000000 +0100
+++ gupnp-av-0.12.8/debian/libgupnp-av-1.0-2.install    2016-09-12 
22:39:51.000000000 +0200
@@ -1,2 +1,2 @@
-usr/lib/*.so.*
+usr/lib/*/*.so.*
 usr/share/gupnp-av/*.xsd
diff --minimal -Nru gupnp-av-0.12.8/debian/libgupnp-av-1.0-dev.install 
gupnp-av-0.12.8/debian/libgupnp-av-1.0-dev.install
--- gupnp-av-0.12.8/debian/libgupnp-av-1.0-dev.install  2016-03-09 
16:48:35.000000000 +0100
+++ gupnp-av-0.12.8/debian/libgupnp-av-1.0-dev.install  2016-09-12 
22:39:58.000000000 +0200
@@ -1,7 +1,7 @@
 usr/include/gupnp-av-1.0/*
-usr/lib/*.so
-usr/lib/*.a
-usr/lib/pkgconfig/*
+usr/lib/*/*.so
+usr/lib/*/*.a
+usr/lib/*/pkgconfig/*
 usr/share/gir-1.0/GUPnPAV-1.0.gir
 usr/share/vala/vapi/gupnp-av-1.0.vapi
 usr/share/vala/vapi/gupnp-av-1.0.deps
diff --minimal -Nru gupnp-av-0.12.8/debian/rules gupnp-av-0.12.8/debian/rules
--- gupnp-av-0.12.8/debian/rules        2016-03-09 16:56:39.000000000 +0100
+++ gupnp-av-0.12.8/debian/rules        2016-09-12 22:39:38.000000000 +0200
@@ -1,5 +1,6 @@
 #! /usr/bin/make -f 
 
+include /usr/share/dpkg/architecture.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/autotools.mk
 include /usr/share/cdbs/1/rules/utils.mk
@@ -9,5 +10,7 @@
 
 DEB_DH_MAKESHLIBS_ARGS_ALL := -V -- -c4
 
+DEB_CONFIGURE_EXTRA_FLAGS += --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
+
 common-binary-predeb-arch:: list-missing
 

Reply via email to