Hi Lisandro. Again, thanks for replying.
perezme...@gmail.com writes: > Multiarch does not has support for arch-qualified headers yet Are you sure this is true? The main debian wiki page (https://wiki.debian.org/Multiarch) claims both library and header support. What is missing? My debian/sid box has a /usr/include/x86_64-linux-gnu directory, and there are headers there from various packages. This directory also is in the default -I list of gcc. In any case, I added logic to the earlier patch to ship qconfig.h in this arch-specific directory. With that the packages build and look reasonable. I haven't built on any other arch yet, so I haven't yet tested the co-instability explicitly. Am I being too optimistic? Thanks. dima
>From 9b46cfe2a05121d305d2f745eb97191c1418a4d5 Mon Sep 17 00:00:00 2001 From: Dima Kogan <d...@oblong.com> Date: Thu, 9 Jan 2014 00:27:39 -0800 Subject: [PATCH] QT5 -dev packages are now Multi-Arch:same Mostly this is just a change in the debian/control tag, since the package contents (mostly) already used the arch-specific paths and thus didn't conflict. The only exception to this is /usr/include/qt5/QtCore/qconfig.h This file contains arch-specific #defines. I ship this header to /usr/include/<deb_arch_triplet> The rest of the headers go to /usr/include, as before. This patch also updates the .pc file to look in this directory. --- debian/control | 9 +++++++++ debian/qtbase5-dev.install-common | 4 +++- debian/rules | 14 ++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index b1401f8..d3d136a 100644 --- a/debian/control +++ b/debian/control @@ -11,6 +11,7 @@ Uploaders: Fathi Boudra <f...@debian.org>, Dmitry Shachnev <mity...@gmail.com> Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1), + dh-exec, firebird-dev [amd64 armel i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc s390 sh4 sparc], freetds-dev, gdb, @@ -263,6 +264,8 @@ Description: Qt 5 print support module Package: qtbase5-dev Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} Section: libdevel Depends: libgl1-mesa-dev [!armel !armhf] | libgl-dev [!armel !armhf], libgles2-mesa-dev [armel armhf] | libgles2-dev [armel armhf], @@ -296,6 +299,8 @@ Description: Qt 5 base development files Package: qtbase5-private-dev Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} Section: libdevel Depends: qtbase5-dev (= ${binary:Version}), ${misc:Depends} Breaks: qtbase5-dev (<< 5.0.2+dfsg1-3~) @@ -311,6 +316,8 @@ Description: Qt 5 base private development files Package: libqt5opengl5-dev Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} Section: libdevel Depends: libqt5opengl5 (= ${binary:Version}), qtbase5-dev (= ${binary:Version}), @@ -406,6 +413,8 @@ Description: Qt 5 base examples debugging symbols Package: qt5-default Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} Depends: qtbase5-dev, qtchooser, ${misc:Depends} Conflicts: qt4-default Suggests: qt5-qmake, qtbase5-dev-tools diff --git a/debian/qtbase5-dev.install-common b/debian/qtbase5-dev.install-common index e4b1e39..bbe57d1 100644 --- a/debian/qtbase5-dev.install-common +++ b/debian/qtbase5-dev.install-common @@ -1,3 +1,5 @@ +#!/usr/bin/dh-exec + usr/include/qt5/QtConcurrent/QtConcurrent usr/include/qt5/QtConcurrent/QtConcurrentDepends usr/include/qt5/QtConcurrent/QtConcurrentFilter @@ -370,7 +372,7 @@ usr/include/qt5/QtCore/qconfig-medium.h usr/include/qt5/QtCore/qconfig-minimal.h usr/include/qt5/QtCore/qconfig-nacl.h usr/include/qt5/QtCore/qconfig-small.h -usr/include/qt5/QtCore/qconfig.h +usr/include/qt5/QtCore/qconfig.h usr/include/${DEB_HOST_MULTIARCH}/qt5/QtCore/ usr/include/qt5/QtCore/qcontainerfwd.h usr/include/qt5/QtCore/qcontiguouscache.h usr/include/qt5/QtCore/qcoreapplication.h diff --git a/debian/rules b/debian/rules index b4e8a55..8309f63 100755 --- a/debian/rules +++ b/debian/rules @@ -197,6 +197,13 @@ ifeq ($(vendor),Ubuntu) rm -rf po endif + +# add includedir_arch definition, and add it to -I +define ADD_MULTIARCH_INCLUDES +s{(includedir)=(\$${prefix}/include)(/.*)}{$$1=$$2$$3\n$$1_arch=$$2/$(DEB_HOST_MULTIARCH)$$3}; \ +s{(-I\$${includedir})(\S*)}{$$1$$2 -I\$${includedir_arch}$$2}g; +endef + override_dh_auto_install: dh_auto_install -Smakefile -- INSTALL_ROOT=$(CURDIR)/debian/tmp/ @@ -204,6 +211,10 @@ override_dh_auto_install: find $(CURDIR)/debian/tmp/usr/lib/*/pkgconfig -type f -name '*.pc' \ -exec perl -pi -e "s, -L$(CURDIR)/?\S+,,g" {} \; + # add the multi-arch include path to the pkgconfig files + find $(CURDIR)/debian/tmp/usr/lib/*/pkgconfig -type f -name '*.pc' \ + -exec perl -pi -e '$(ADD_MULTIARCH_INCLUDES)' {} \; + # Add a configuration for qtchooser mkdir -p $(CURDIR)/debian/tmp/usr/share/qtchooser echo "/usr/lib/$(DEB_HOST_MULTIARCH)/qt5/bin" > $(CURDIR)/debian/tmp/usr/share/qtchooser/qt5-$(DEB_HOST_MULTIARCH).conf @@ -251,6 +262,9 @@ override_dh_install: cat debian/$$pkg.install-$(DEB_HOST_ARCH_OS) >> debian/$$pkg.install ; \ done + # I add the +x bit to allow dh-exec to work + chmod ug+x debian/qtbase5-dev.install + # Call dh_install normally. It will process .install, .install.ARCH # and/or .install.OS files. dh_install --fail-missing -- 1.7.10.4