On Mon, 12 May 2014 at 02:48:26 +0200, John Paul Adrian Glaubitz wrote:
> >  /usr/lib/*/libzip/include/zipconf.h looks like multiarch file,
> > is it not the right place?
> 
> Indeed. The mentioned header file is platform-specific, so it might
> not be wise to put it under the general /usr/include directory
> structure.

On Debian and its derivatives (unlike other Linux distributions) the
compiler's default search path includes /usr/include/${DEB_HOST_MULTIARCH},
so it is possible to have headers that are available by default
*and* in an architecture-specific location.

The most appropriate place depends whether the intended API for libzip-dev is
"you should be able to use this library with cc -lzip" or "you are
expected to use pkg-config", which is partially a question for upstream.

GLib and libdbus are among the libraries whose intended API is "you are
expected to use pkg-config". Their headers are very deliberately not
on the compiler's default search path, and you are expected to put
something like `pkg-config --cflags glib-2.0` on the compiler command-line.

However, if libzip was in that category, I would expect it not to install
zip.h in the compiler's default search path. Getting there from here
is an API change, of a sort.

> I therefore suggest that, at least for the time being, we apply Mateusz'
> patch and revert the package back to a non-Multi-Arch version such that
> other packages which build-depend on libzip will no longer FTBFS.

That seems a reasonable short-term solution. However, multiarch -dev
packages are A Good Thing in general. The way to be multiarch while still
on the default search path is to copy, move or symlink zipconf.h into
/usr/include/${DEB_HOST_MULTIARCH}.

I attach a possible debdiff. I have not tested it against any unpatched
build-dependencies, so no patch tag just yet.

Regards,
    S
diffstat for libzip-0.11.2 libzip-0.11.2

 changelog |    9 +++++++++
 rules     |    7 +++++++
 2 files changed, 16 insertions(+)

diff -Nru libzip-0.11.2/debian/changelog libzip-0.11.2/debian/changelog
--- libzip-0.11.2/debian/changelog	2014-02-09 16:32:08.000000000 +0000
+++ libzip-0.11.2/debian/changelog	2014-08-02 21:16:02.000000000 +0100
@@ -1,3 +1,12 @@
+libzip (0.11.2-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Put a symlink to zipconf.h on the default search path, so that
+    packages that do not use pkg-config to locate libzip will not FTBFS
+    (Closes: #739308)
+
+ -- Simon McVittie <s...@debian.org>  Sat, 02 Aug 2014 21:13:50 +0100
+
 libzip (0.11.2-1) unstable; urgency=medium
 
   * New upstream release (Closes: #734388).
diff -Nru libzip-0.11.2/debian/rules libzip-0.11.2/debian/rules
--- libzip-0.11.2/debian/rules	2012-07-07 02:59:33.000000000 +0100
+++ libzip-0.11.2/debian/rules	2014-08-02 21:16:02.000000000 +0100
@@ -3,5 +3,12 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
 %:
 	dh $@ --parallel --list-missing --with autoreconf
+
+override_dh_link:
+	install -d debian/libzip-dev/usr/include/${DEB_HOST_MULTIARCH}
+	ln -s ../../lib/${DEB_HOST_MULTIARCH}/libzip/include/zipconf.h debian/libzip-dev/usr/include/${DEB_HOST_MULTIARCH}/zipconf.h
+	dh_link

Reply via email to