Package: libwxgtk2.8-0
Version: 2.8.12.1-1.1
Severity: normal
Tags: patch
--- Please enter the report below this line. ---
Dears Maintainer,
Could you support multiarch same for wxwidget2.8. At least
libwxbase2.8-0 and libwxgtk2.8-0 (see attached patch but can probably
be extended to msw stuff). See here for some multiarch details:
http://wiki.debian.org/Multiarch/Implementation
The package was a tough one to convert. So the attached patch will need
a carefully review. I checked that the library are moved in the good
place and are co-installable (amd64 and i386). I also checked that
wx-config returns the good path.
Best regards,
Gregory
---
Here a short description of the patch
Control file:
* bump debhelper dependency to 8.1.3 to ${support
misc:Pre-Depends}.
* Add multiarch
Postinst and prerm files:
* Add a =MA string that will be replaced with the triplet value in the
rule file.
Rule file:
* add --libdir=\$${exec_prefix}/lib/$(DEB_HOST_MULTIARCH) to wxbase and
wxgtk configuration flags.
* install library into /usr/lib/$(DEB_HOST_MULTIARCH).
* Generating the postinst and prerm file.
* create a symlink $(objdir_gtk_shared)/lib/$(DEB_HOST_MULTIARCH) to
$(objdir_gtk_shared)/lib. It works around some issue with the build
system (see below).
---
Some details on the build system issue:
During the build, libraries are installed into the directory LIBDIRNAME
equal to $(wx_top_builddir)/lib (defined on
build/bakefiles/common.bkl). Various places in the configure script
(configure.in) expect libraries in $(wx_top_builddir)/lib
Unfortunately wx-config script rely on $libdir
(/usr/lib/$DEB_HOST_MULTIARCH) and probably others places. Python try
to look up include file from wx-config but fail because LIBDIRNAME is
different of $libdir.
In my opinion, it would be better to create a variable $(wx_top_libdir)
that depends on $libdir. But it becomes big changes on an already too
complex build process hence I just create a symlink to workaround the
issue.
diff -u wxwidgets2.8-2.8.12.1/debian/control wxwidgets2.8-2.8.12.1/debian/control
--- wxwidgets2.8-2.8.12.1/debian/control
+++ wxwidgets2.8-2.8.12.1/debian/control
@@ -1,7 +1,7 @@
Source: wxwidgets2.8
Section: libs
Priority: optional
-Build-Depends: debhelper (>= 7), flex, bison, gettext, libgtk2.0-dev,
+Build-Depends: debhelper (>= 8.1.3), flex, bison, gettext, libgtk2.0-dev,
python-all (>= 2.6.6-3~), python-all-dev (>= 2.6.6-3~), python-all-dbg (>= 2.6.6-3~),
zlib1g-dev, libjpeg-dev, libpng12-dev, libtiff4-dev, libsm-dev,
libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, libesd0-dev,
@@ -16,7 +16,9 @@
Package: libwxbase2.8-0
Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
+Multi-Arch: same
Description: wxBase library (runtime) - non-GUI support classes of wxWidgets toolkit
wxBase is a collection of C++ classes providing basic data structures
(strings, lists, arrays), powerful wxDateTime class for date manipulations,
@@ -51,6 +53,7 @@
Architecture: any
Section: debug
Priority: extra
+Multi-Arch: same
Depends: wx2.8-headers (= ${binary:Version}), libc6-dev, ${misc:Depends}
Description: wxBase library (debug) - non-GUI support classes of wxWidgets toolkit
wxBase is a collection of C++ classes providing basic data structures
@@ -68,7 +71,9 @@
Package: libwxgtk2.8-0
Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
+Multi-Arch: same
Suggests: libgnomeprintui2.2-0
Description: wxWidgets Cross-platform C++ GUI toolkit (GTK+ runtime)
wxWidgets (formerly known as wxWindows) is a class library for C++ providing
@@ -99,6 +104,7 @@
Architecture: any
Section: debug
Priority: extra
+Multi-Arch: same
Depends: ${shlibs:Depends}, wx2.8-headers (= ${binary:Version}), libwxbase2.8-dbg (= ${binary:Version}), ${misc:Depends}
Description: wxWidgets Cross-platform C++ GUI toolkit (GTK+ debug)
wxWidgets (formerly known as wxWindows) is a class library for C++ providing
diff -u wxwidgets2.8-2.8.12.1/debian/libwxbase-dev.prerm wxwidgets2.8-2.8.12.1/debian/libwxbase-dev.prerm
--- wxwidgets2.8-2.8.12.1/debian/libwxbase-dev.prerm
+++ wxwidgets2.8-2.8.12.1/debian/libwxbase-dev.prerm
@@ -1,7 +1,7 @@
#! /bin/sh
set -e
-update-alternatives --remove wx-config /usr/lib/wx/config/base-unicode-release-=V
+update-alternatives --remove wx-config /usr/lib/=MA/wx/config/base-unicode-release-=V
#DEBHELPER#
diff -u wxwidgets2.8-2.8.12.1/debian/libwxbase-dev.postinst wxwidgets2.8-2.8.12.1/debian/libwxbase-dev.postinst
--- wxwidgets2.8-2.8.12.1/debian/libwxbase-dev.postinst
+++ wxwidgets2.8-2.8.12.1/debian/libwxbase-dev.postinst
@@ -2,7 +2,7 @@
set -e
update-alternatives --install /usr/bin/wx-config wx-config \
- /usr/lib/wx/config/base-unicode-release-=V \
+ /usr/lib/=MA/wx/config/base-unicode-release-=V \
$(( =PRIO * 10 + 7 ))
#DEBHELPER#
diff -u wxwidgets2.8-2.8.12.1/debian/control.in wxwidgets2.8-2.8.12.1/debian/control.in
--- wxwidgets2.8-2.8.12.1/debian/control.in
+++ wxwidgets2.8-2.8.12.1/debian/control.in
@@ -1,7 +1,7 @@
Source: wxwidgets=V
Section: libs
Priority: optional
-Build-Depends: debhelper (>= 7), flex, bison, gettext, libgtk2.0-dev,
+Build-Depends: debhelper (>= 8.1.3), flex, bison, gettext, libgtk2.0-dev,
python-all (>= 2.6.6-3~), python-all-dev (>= 2.6.6-3~), python-all-dbg (>= 2.6.6-3~),
zlib1g-dev, libjpeg-dev, libpng12-dev, libtiff4-dev, libsm-dev,
libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, libesd0-dev,
@@ -16,7 +16,9 @@
Package: libwxbase=SOV=U
Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
+Multi-Arch: same
Description: wxBase library (runtime) - non-GUI support classes of wxWidgets toolkit
wxBase is a collection of C++ classes providing basic data structures
(strings, lists, arrays), powerful wxDateTime class for date manipulations,
@@ -51,6 +53,7 @@
Architecture: any
Section: debug
Priority: extra
+Multi-Arch: same
Depends: wx=V-headers (= ${binary:Version}), libc6-dev, ${misc:Depends}
Description: wxBase library (debug) - non-GUI support classes of wxWidgets toolkit
wxBase is a collection of C++ classes providing basic data structures
@@ -68,7 +71,9 @@
Package: libwxgtk=SOV=U
Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
+Multi-Arch: same
Suggests: libgnomeprintui2.2-0
Description: wxWidgets Cross-platform C++ GUI toolkit (GTK+ runtime)
wxWidgets (formerly known as wxWindows) is a class library for C++ providing
@@ -99,6 +104,7 @@
Architecture: any
Section: debug
Priority: extra
+Multi-Arch: same
Depends: ${shlibs:Depends}, wx=V-headers (= ${binary:Version}), libwxbase=V=U-dbg (= ${binary:Version}), ${misc:Depends}
Description: wxWidgets Cross-platform C++ GUI toolkit (GTK+ debug)
wxWidgets (formerly known as wxWindows) is a class library for C++ providing
diff -u wxwidgets2.8-2.8.12.1/debian/libwxgtk-dev.postinst wxwidgets2.8-2.8.12.1/debian/libwxgtk-dev.postinst
--- wxwidgets2.8-2.8.12.1/debian/libwxgtk-dev.postinst
+++ wxwidgets2.8-2.8.12.1/debian/libwxgtk-dev.postinst
@@ -2,7 +2,7 @@
set -e
update-alternatives --install /usr/bin/wx-config wx-config \
- /usr/lib/wx/config/gtk2-unicode-release-=V \
+ /usr/lib/=MA/wx/config/gtk2-unicode-release-=V \
$(( =PRIO * 10 + 8 ))
#DEBHELPER#
diff -u wxwidgets2.8-2.8.12.1/debian/rules wxwidgets2.8-2.8.12.1/debian/rules
--- wxwidgets2.8-2.8.12.1/debian/rules
+++ wxwidgets2.8-2.8.12.1/debian/rules
@@ -16,6 +16,8 @@
# WXPYTHON_VERSION = $(shell dpkg-parsechangelog | sed -ne '/^Version: /s@Version: \(.*\)@\1@p')
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
# The standard way to specify the number of jobs.
@@ -125,6 +127,7 @@
BASE_CONFIGURE_OPTIONS = $(COMMON_CONFIGURE_OPTIONS) \
--disable-gui \
+ --libdir=\$${exec_prefix}/lib/$(DEB_HOST_MULTIARCH)
GTK_CONFIGURE_OPTIONS = $(COMMON_CONFIGURE_OPTIONS) \
--with-gtk \
@@ -137,6 +140,7 @@
--with-libjpeg=sys \
--with-libpng=sys \
--with-libtiff=sys \
+ --libdir=\$${exec_prefix}/lib/$(DEB_HOST_MULTIARCH)
# --enable-mediactrl \
MSW_CONFIGURE_OPTIONS = \
@@ -304,25 +308,25 @@
dh_testdir
@for f in postinst prerm; do \
echo "generating control file $(package_wxbase_dev).$$f"; \
- sed -e 's/=V/$(release)/g;s/=PRIO/$(alt_prio)/g' \
+ sed -e 's/=V/$(release)/g;s/=PRIO/$(alt_prio)/g;s/=MA/$(DEB_HOST_MULTIARCH)/g' \
< debian/libwxbase-dev.$$f \
> debian/$(package_wxbase_dev).$$f; \
done;
@for f in postinst prerm; do \
echo "generating control file $(package_wxbase_dbg).$$f"; \
- sed -e 's/=V/$(release)/g;s/=PRIO/$(alt_prio)/g' \
+ sed -e 's/=V/$(release)/g;s/=PRIO/$(alt_prio)/g;s/=MA/$(DEB_HOST_MULTIARCH)/g' \
< debian/libwxbase-dbg.$$f \
> debian/$(package_wxbase_dbg).$$f; \
done;
@for f in postinst prerm; do \
echo "generating control file $(package_gtk_dev).$$f"; \
- sed -e 's/=V/$(release)/g;s/=PRIO/$(alt_prio)/g' \
+ sed -e 's/=V/$(release)/g;s/=PRIO/$(alt_prio)/g;s/=MA/$(DEB_HOST_MULTIARCH)/g' \
< debian/libwxgtk-dev.$$f \
> debian/$(package_gtk_dev).$$f; \
done;
@for f in postinst prerm; do \
echo "generating control file $(package_gtk_dbg).$$f"; \
- sed -e 's/=V/$(release)/g;s/=PRIO/$(alt_prio)/g' \
+ sed -e 's/=V/$(release)/g;s/=PRIO/$(alt_prio)/g;s/=MA/$(DEB_HOST_MULTIARCH)/g' \
< debian/libwxgtk-dbg.$$f \
> debian/$(package_gtk_dbg).$$f; \
done;
@@ -425,6 +429,7 @@
build-gtk-shared-stamp: configure-gtk-shared-stamp
dh_testdir
cd $(objdir_gtk_shared) && $(FAST_MAKE)
+ cd $(objdir_gtk_shared)/lib && ln -s . $(DEB_HOST_MULTIARCH)
touch $@
@@ -438,6 +443,7 @@
build-gtk-debug-stamp: configure-gtk-debug-stamp
dh_testdir
cd $(objdir_gtk_debug) && $(FAST_MAKE)
+ cd $(objdir_gtk_debug)/lib && ln -s . $(DEB_HOST_MULTIARCH)
touch $@
@@ -661,7 +667,7 @@
dh_testroot
dh_prep
@# No, this is not a typo, we steal these libs from the gtk build.
- dh_install $(objdir_gtk_install)/lib/libwx_base*.so.* usr/lib
+ dh_install $(objdir_gtk_install)/lib/$(DEB_HOST_MULTIARCH)/libwx_base*.so.* usr/lib/$(DEB_HOST_MULTIARCH)
dh_installdirs usr/share/lintian/overrides
grep ^$(package_wxbase_lib): debian/lintian-override > debian/$(package_wxbase_lib)/usr/share/lintian/overrides/$(package_wxbase_lib)
@@ -671,9 +677,9 @@
dh_testroot
dh_prep
@# No, this is not a typo, we steal these libs from the gtk build.
- dh_install $(objdir_gtk_install)/lib/libwx_base*.so usr/lib
- dh_install $(objdir_wxbase_shared)/lib/wx/include usr/lib/wx
- dh_install $(objdir_wxbase_shared)/lib/wx/config/base* usr/lib/wx/config
+ dh_install $(objdir_gtk_install)/lib/$(DEB_HOST_MULTIARCH)/libwx_base*.so usr/lib/$(DEB_HOST_MULTIARCH)
+ dh_install $(objdir_wxbase_shared)/lib/wx/include usr/lib/$(DEB_HOST_MULTIARCH)/wx
+ dh_install $(objdir_wxbase_shared)/lib/wx/config/base* usr/lib/$(DEB_HOST_MULTIARCH)/wx/config
install-wxbase-dbg: DH_OPTIONS=-p$(package_wxbase_dbg)
install-wxbase-dbg: build-wxbase-debug-stamp
@@ -681,9 +687,9 @@
dh_testroot
dh_prep
@# No, this is not a typo, we steal these libs from the gtk debug build.
- dh_install $(objdir_gtk_debug)/lib/libwx_base* usr/lib
- dh_install $(objdir_wxbase_debug)/lib/wx/include usr/lib/wx
- dh_install $(objdir_wxbase_debug)/lib/wx/config/base* usr/lib/wx/config
+ dh_install $(objdir_gtk_debug)/lib/libwx_base* usr/lib/$(DEB_HOST_MULTIARCH)
+ dh_install $(objdir_wxbase_debug)/lib/wx/include usr/lib/$(DEB_HOST_MULTIARCH)/wx
+ dh_install $(objdir_wxbase_debug)/lib/wx/config/base* usr/lib/$(DEB_HOST_MULTIARCH)/wx/config
dh_installdirs usr/share/lintian/overrides
grep ^$(package_wxbase_dbg): debian/lintian-override > debian/$(package_wxbase_dbg)/usr/share/lintian/overrides/$(package_wxbase_dbg)
@@ -701,7 +707,7 @@
dh_testdir
dh_testroot
dh_prep
- dh_install $(objdir_gtk_install)/lib/libwx_gtk*.so.* usr/lib
+ dh_install $(objdir_gtk_install)/lib/$(DEB_HOST_MULTIARCH)/libwx_gtk*.so.* usr/lib/$(DEB_HOST_MULTIARCH)
dh_installdirs usr/share/lintian/overrides
grep ^$(package_gtk_lib): debian/lintian-override > debian/$(package_gtk_lib)/usr/share/lintian/overrides/$(package_gtk_lib)
@@ -710,18 +716,18 @@
dh_testdir
dh_testroot
dh_prep
- dh_install $(objdir_gtk_install)/lib/libwx_gtk*.so usr/lib
- dh_install $(objdir_gtk_install)/lib/wx/include usr/lib/wx
- dh_install $(objdir_gtk_install)/lib/wx/config/gtk* usr/lib/wx/config
+ dh_install $(objdir_gtk_install)/lib/$(DEB_HOST_MULTIARCH)/libwx_gtk*.so usr/lib/$(DEB_HOST_MULTIARCH)
+ dh_install $(objdir_gtk_install)/lib/$(DEB_HOST_MULTIARCH)/wx/include usr/lib/$(DEB_HOST_MULTIARCH)/wx
+ dh_install $(objdir_gtk_install)/lib/$(DEB_HOST_MULTIARCH)/wx/config/gtk* usr/lib/$(DEB_HOST_MULTIARCH)/wx/config
install-gtk-dbg: DH_OPTIONS=-p$(package_gtk_dbg)
install-gtk-dbg: build-gtk-debug-stamp build-gtk-debug-contrib-stamp
dh_testdir
dh_testroot
dh_prep
- dh_install $(objdir_gtk_debug)/lib/libwx_gtk* usr/lib
- dh_install $(objdir_gtk_debug)/lib/wx/include usr/lib/wx
- dh_install $(objdir_gtk_debug)/lib/wx/config/gtk* usr/lib/wx/config
+ dh_install $(objdir_gtk_debug)/lib/libwx_gtk* usr/lib/$(DEB_HOST_MULTIARCH)
+ dh_install $(objdir_gtk_debug)/lib/wx/include usr/lib/$(DEB_HOST_MULTIARCH)/wx
+ dh_install $(objdir_gtk_debug)/lib/wx/config/gtk* usr/lib/$(DEB_HOST_MULTIARCH)/wx/config
dh_installdirs usr/share/lintian/overrides
grep ^$(package_gtk_dbg): debian/lintian-override > debian/$(package_gtk_dbg)/usr/share/lintian/overrides/$(package_gtk_dbg)
diff -u wxwidgets2.8-2.8.12.1/debian/libwxgtk-dev.prerm wxwidgets2.8-2.8.12.1/debian/libwxgtk-dev.prerm
--- wxwidgets2.8-2.8.12.1/debian/libwxgtk-dev.prerm
+++ wxwidgets2.8-2.8.12.1/debian/libwxgtk-dev.prerm
@@ -1,7 +1,7 @@
#! /bin/sh
set -e
-update-alternatives --remove wx-config /usr/lib/wx/config/gtk2-unicode-release-=V
+update-alternatives --remove wx-config /usr/lib/=MA/wx/config/gtk2-unicode-release-=V
#DEBHELPER#
diff -u wxwidgets2.8-2.8.12.1/debian/libwxgtk-dbg.prerm wxwidgets2.8-2.8.12.1/debian/libwxgtk-dbg.prerm
--- wxwidgets2.8-2.8.12.1/debian/libwxgtk-dbg.prerm
+++ wxwidgets2.8-2.8.12.1/debian/libwxgtk-dbg.prerm
@@ -1,7 +1,7 @@
#! /bin/sh
set -e
-update-alternatives --remove wx-config /usr/lib/wx/config/gtk2-unicode-debug-=V
+update-alternatives --remove wx-config /usr/lib/=MA/wx/config/gtk2-unicode-debug-=V
#DEBHELPER#
diff -u wxwidgets2.8-2.8.12.1/debian/libwxbase-dbg.prerm wxwidgets2.8-2.8.12.1/debian/libwxbase-dbg.prerm
--- wxwidgets2.8-2.8.12.1/debian/libwxbase-dbg.prerm
+++ wxwidgets2.8-2.8.12.1/debian/libwxbase-dbg.prerm
@@ -1,7 +1,7 @@
#! /bin/sh
set -e
-update-alternatives --remove wx-config /usr/lib/wx/config/base-unicode-debug-=V
+update-alternatives --remove wx-config /usr/lib/=MA/wx/config/base-unicode-debug-=V
#DEBHELPER#
diff -u wxwidgets2.8-2.8.12.1/debian/libwxbase-dbg.postinst wxwidgets2.8-2.8.12.1/debian/libwxbase-dbg.postinst
--- wxwidgets2.8-2.8.12.1/debian/libwxbase-dbg.postinst
+++ wxwidgets2.8-2.8.12.1/debian/libwxbase-dbg.postinst
@@ -2,7 +2,7 @@
set -e
update-alternatives --install /usr/bin/wx-config wx-config \
- /usr/lib/wx/config/base-unicode-debug-=V \
+ /usr/lib/=MA/wx/config/base-unicode-debug-=V \
$(( =PRIO * 10 + 5 ))
#DEBHELPER#
diff -u wxwidgets2.8-2.8.12.1/debian/libwxgtk-dbg.postinst wxwidgets2.8-2.8.12.1/debian/libwxgtk-dbg.postinst
--- wxwidgets2.8-2.8.12.1/debian/libwxgtk-dbg.postinst
+++ wxwidgets2.8-2.8.12.1/debian/libwxgtk-dbg.postinst
@@ -2,7 +2,7 @@
set -e
update-alternatives --install /usr/bin/wx-config wx-config \
- /usr/lib/wx/config/gtk2-unicode-debug-=V \
+ /usr/lib/=MA/wx/config/gtk2-unicode-debug-=V \
$(( =PRIO * 10 + 6 ))
#DEBHELPER#