Source: gcin
Severity: wishlist
Tags: patch

Hey,

I'm forwarding a patch from Ubuntu which you might consider including.
In order to reduce the number of patches on our GTK+3 package, we've
been assessing which ones can be removed. One patch we carry, which is
also carried in Debian, is to have a 'fallback' directory for gtk
modules, which is /usr/lib/gtk-3.0. There are just a few packages
installing into this directory; if we can get them all using MA then we
could also remove this patch in Debian too.

It's not a full MA-ing though, because there are numerous other files
that will need to be split or moved. You could consider doing that if
you feel it to be worthwhile.

Cheers,
Iain
>From 1c052944f04a80faabf3a734558a4a4f59e14257 Mon Sep 17 00:00:00 2001
From: Iain Lane <iain.l...@canonical.com>
Date: Mon, 12 Nov 2012 11:16:14 +0000
Subject: [PATCH] Install gtk modules into multiarch directories

---
 debian/changelog                  |    4 ++++
 debian/gcin-gtk3-immodule.install |    2 +-
 debian/gcin.install               |    2 +-
 debian/rules                      |   10 ++++++----
 4 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index dcab7f0..4a20b8b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,13 @@
 gcin (2.7.8+dfsg2-1) unstable; urgency=low
 
+  [ Yao Wei (魏銘廷) ]
   * Imported Upstream version 2.7.8+dfsg2
   * debian/patches: add patch to pass LDFLAGS for hardening
   * debian/rules: add hardening options
 
+  [ Iain Lane ]
+  * Install gtk modules into multiarch directories
+
  -- Yao Wei (魏銘廷) <m...@lxde.org>  Sun, 01 Jul 2012 10:37:18 +0800
 
 gcin (2.7.6.1+dfsg-1) unstable; urgency=low
diff --git a/debian/gcin-gtk3-immodule.install b/debian/gcin-gtk3-immodule.install
index 5263f4f..af97ce1 100644
--- a/debian/gcin-gtk3-immodule.install
+++ b/debian/gcin-gtk3-immodule.install
@@ -1 +1 @@
-usr/lib/gtk-3.0
+usr/lib/*/gtk-3.0
diff --git a/debian/gcin.install b/debian/gcin.install
index dc43d64..acabd5b 100644
--- a/debian/gcin.install
+++ b/debian/gcin.install
@@ -1,5 +1,5 @@
 usr/bin
-usr/lib/gtk-2.0
+usr/lib/*/gtk-2.0
 usr/lib/gcin/gcin1.so
 usr/lib/gcin/gcin2.so
 usr/lib/gcin/intcode-module.so
diff --git a/debian/rules b/debian/rules
index 6308fa2..e73f230 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,6 +12,8 @@ CXXFLAGS+=$(CPPFLAGS)
 GTK2VER = $(shell pkg-config --variable=gtk_binary_version gtk+-2.0)
 GTK3VER = $(shell pkg-config --variable=gtk_binary_version gtk+-3.0)
 
+DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
 %:
 	dh $@ 
 
@@ -22,10 +24,10 @@ override_dh_auto_install:
 	make install DESTDIR=$(CURDIR)/debian/tmp
 
 	# move libraries to the correspond gtk version
-	mkdir -p debian/tmp/usr/lib/gtk-2.0/$(GTK2VER)
-	mv debian/tmp/usr/lib/gtk-2.0/immodules debian/tmp/usr/lib/gtk-2.0/$(GTK2VER)/
-	mkdir -p debian/tmp/usr/lib/gtk-3.0/$(GTK3VER)
-	mv debian/tmp/usr/lib/gtk-3.0/immodules debian/tmp/usr/lib/gtk-3.0/$(GTK3VER)/
+	mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gtk-2.0/$(GTK2VER)
+	mv debian/tmp/usr/lib/gtk-2.0/immodules debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gtk-2.0/$(GTK2VER)/
+	mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gtk-3.0/$(GTK3VER)
+	mv debian/tmp/usr/lib/gtk-3.0/immodules debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gtk-3.0/$(GTK3VER)/
 
 	# workaround to move arch-dep tables to /usr/lib
 	mv debian/tmp/usr/share/gcin/table debian/tmp/usr/lib/gcin/
-- 
1.7.10.4

Reply via email to