diff mbox

imagemagick multiarch conversion

Message ID 20110906150051.GA25405@afflict.kos.to
State Accepted
Headers show

Commit Message

Riku Voipio Sept. 6, 2011, 3 p.m. UTC
Package: imagemagic
Version: 8:6.6.9.7-5
Severity: normal
User: debian-dpkg@lists.debian.org
Usertags: multiarch
Tags: patch

(actual version: todays origin/debian/6.6.9.7 HEAD)

Convert imagemagick to multiarch. the -dev packages could also be Multi-Arch: same,
but that would mean splitting out /usr/bin/foo-config binaries to a imagemagic-dev-bin
package, or making foo-config binaries identical on all architectures (eg. removing the -L
from the script).

For details, see:

http://wiki.debian.org/Multiarch/Implementation
http://wiki.debian.org/Multiarch

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
---
 debian/control                      |   13 ++++++++++++-
 debian/libmagick++-dev.install      |   10 +++++-----
 debian/libmagick++4.install         |    2 +-
 debian/libmagickcore-dev.install    |   10 +++++-----
 debian/libmagickcore4-extra.install |   20 ++++++++++----------
 debian/libmagickcore4.install       |   10 +++++-----
 debian/libmagickwand-dev.install    |   10 +++++-----
 debian/libmagickwand4.install       |    2 +-
 debian/rules                        |    2 ++
 9 files changed, 46 insertions(+), 33 deletions(-)
diff mbox

Patch

diff --git a/debian/control b/debian/control
index 1483791..ae40265 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@  Uploaders: Luciano Bello <luciano@debian.org>,
  Bastien Roucariès <roucaries.bastien+debian@gmail.com>,
  Vincent Fourmond <fourmond@debian.org>
 Standards-Version: 3.9.2
-Build-Depends: chrpath, debhelper (>= 7), ghostscript, libbz2-dev,
+Build-Depends: chrpath, debhelper (>= 8.1.3), ghostscript, libbz2-dev,
  libdjvulibre-dev, libexif-dev, libfreetype6-dev, libgraphviz-dev,
  libjasper-dev, libjpeg-dev, liblcms-dev, liblqr-1-0-dev, libltdl-dev,
  libopenexr-dev, libperl-dev, libpng-dev, librsvg2-dev, libtiff-dev,
@@ -21,6 +21,7 @@  Homepage: http://www.imagemagick.org/
 Package: imagemagick
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
+Multi-Arch: foreign
 Recommends: libmagickcore4-extra, ghostscript, netpbm, ufraw-batch
 Suggests: imagemagick-doc, autotrace, cups-bsd | lpr | lprng, curl, enscript,
  ffmpeg, gimp, gnuplot, grads, groff-base, hp2xx, html2ps, libwmf-bin, mplayer,
@@ -49,6 +50,7 @@  Description: debugging symbols for ImageMagick
 Package: imagemagick-common
 Architecture: all
 Depends: ${misc:Depends}
+Multi-Arch: foreign
 Replaces:libmagickcore4 (= 8:6.6.9.7-3.1)  
 Description: image manipulation programs -- infrastructure
  imagemagick-common contains the filesystem infrastructure required for
@@ -71,6 +73,8 @@  Package: libmagickcore4
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends}, ${misc:Depends}, imagemagick-common
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
 Recommends: ghostscript, gsfonts
 Suggests: libmagickcore4-extra
 Description: low-level image manipulation library
@@ -87,6 +91,8 @@  Package: libmagickcore4-extra
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
 Provides: libmagickcore-extra
 Enhances: libmagickcore4
 Description: low-level image manipulation library - extra codecs
@@ -110,6 +116,8 @@  Package: libmagickwand4
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends}, ${misc:Depends}, imagemagick-common
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
 Description: image manipulation library 
  The MagickWand API is the recommended interface between the C programming
  language and the ImageMagick image processing libraries. Unlike the
@@ -133,6 +141,8 @@  Package: libmagick++4
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
 Description: object-oriented C++ interface to ImageMagick
  The Magick++ library is a set of C++ wrapper classes that provides access
  to the ImageMagick package functionality from within a C++ application.
@@ -154,6 +164,7 @@  Package: perlmagick
 Architecture: any
 Section: perl
 Depends: ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Multi-Arch: foreign
 Provides: libimage-magick-perl
 Suggests: imagemagick-doc
 Description: Perl interface to the ImageMagick graphics routines
diff --git a/debian/libmagick++-dev.install b/debian/libmagick++-dev.install
index ccab42a..742ac2f 100644
--- a/debian/libmagick++-dev.install
+++ b/debian/libmagick++-dev.install
@@ -1,8 +1,8 @@ 
 usr/bin/Magick++-config
 usr/include/ImageMagick/Magick++*
-usr/lib/libMagick++.a
-usr/lib/libMagick++.la
-usr/lib/libMagick++.so
-usr/lib/pkgconfig/ImageMagick++.pc
-usr/lib/pkgconfig/Magick++.pc
+usr/lib/*/libMagick++.a
+usr/lib/*/libMagick++.la
+usr/lib/*/libMagick++.so
+usr/lib/*/pkgconfig/ImageMagick++.pc
+usr/lib/*/pkgconfig/Magick++.pc
 usr/share/man/man1/Magick++-config.1
diff --git a/debian/libmagick++4.install b/debian/libmagick++4.install
index 2fce23d..24bdf67 100644
--- a/debian/libmagick++4.install
+++ b/debian/libmagick++4.install
@@ -1 +1 @@ 
-usr/lib/libMagick++.so.*
+usr/lib/*/libMagick++.so.*
diff --git a/debian/libmagickcore-dev.install b/debian/libmagickcore-dev.install
index 36bdd89..50a5670 100644
--- a/debian/libmagickcore-dev.install
+++ b/debian/libmagickcore-dev.install
@@ -1,10 +1,10 @@ 
 usr/bin/Magick-config
 usr/bin/MagickCore-config
 usr/include/ImageMagick/magick
-usr/lib/libMagickCore.a
-usr/lib/libMagickCore.la
-usr/lib/libMagickCore.so
-usr/lib/pkgconfig/ImageMagick.pc
-usr/lib/pkgconfig/MagickCore.pc
+usr/lib/*/libMagickCore.a
+usr/lib/*/libMagickCore.la
+usr/lib/*/libMagickCore.so
+usr/lib/*/pkgconfig/ImageMagick.pc
+usr/lib/*/pkgconfig/MagickCore.pc
 usr/share/man/man1/Magick-config.1
 usr/share/man/man1/MagickCore-config.1
diff --git a/debian/libmagickcore4-extra.install b/debian/libmagickcore4-extra.install
index 9b2b78d..88d9271 100644
--- a/debian/libmagickcore4-extra.install
+++ b/debian/libmagickcore4-extra.install
@@ -1,10 +1,10 @@ 
-usr/lib/ImageMagick-*/modules-Q16/coders/djvu.la
-usr/lib/ImageMagick-*/modules-Q16/coders/djvu.so
-usr/lib/ImageMagick-*/modules-Q16/coders/dot.la
-usr/lib/ImageMagick-*/modules-Q16/coders/dot.so
-usr/lib/ImageMagick-*/modules-Q16/coders/exr.la
-usr/lib/ImageMagick-*/modules-Q16/coders/exr.so
-usr/lib/ImageMagick-*/modules-Q16/coders/svg.la
-usr/lib/ImageMagick-*/modules-Q16/coders/svg.so
-usr/lib/ImageMagick-*/modules-Q16/coders/wmf.la
-usr/lib/ImageMagick-*/modules-Q16/coders/wmf.so
+usr/lib/*/ImageMagick-*/modules-Q16/coders/djvu.la
+usr/lib/*/ImageMagick-*/modules-Q16/coders/djvu.so
+usr/lib/*/ImageMagick-*/modules-Q16/coders/dot.la
+usr/lib/*/ImageMagick-*/modules-Q16/coders/dot.so
+usr/lib/*/ImageMagick-*/modules-Q16/coders/exr.la
+usr/lib/*/ImageMagick-*/modules-Q16/coders/exr.so
+usr/lib/*/ImageMagick-*/modules-Q16/coders/svg.la
+usr/lib/*/ImageMagick-*/modules-Q16/coders/svg.so
+usr/lib/*/ImageMagick-*/modules-Q16/coders/wmf.la
+usr/lib/*/ImageMagick-*/modules-Q16/coders/wmf.so
diff --git a/debian/libmagickcore4.install b/debian/libmagickcore4.install
index 64535a5..0986ab6 100644
--- a/debian/libmagickcore4.install
+++ b/debian/libmagickcore4.install
@@ -1,6 +1,6 @@ 
-usr/lib/ImageMagick-*/modules-Q16/coders/*.la
-usr/lib/ImageMagick-*/modules-Q16/coders/*.so
-usr/lib/ImageMagick-*/modules-Q16/filters/*.la
-usr/lib/ImageMagick-*/modules-Q16/filters/*.so
-usr/lib/libMagickCore.so.*
+usr/lib/*/ImageMagick-*/modules-Q16/coders/*.la
+usr/lib/*/ImageMagick-*/modules-Q16/coders/*.so
+usr/lib/*/ImageMagick-*/modules-Q16/filters/*.la
+usr/lib/*/ImageMagick-*/modules-Q16/filters/*.so
+usr/lib/*/libMagickCore.so.*
 usr/share/ImageMagick-*
diff --git a/debian/libmagickwand-dev.install b/debian/libmagickwand-dev.install
index 7a455d1..dccdaad 100644
--- a/debian/libmagickwand-dev.install
+++ b/debian/libmagickwand-dev.install
@@ -1,10 +1,10 @@ 
 usr/bin/MagickWand-config
 usr/bin/Wand-config
 usr/include/ImageMagick/wand
-usr/lib/libMagickWand.a
-usr/lib/libMagickWand.la
-usr/lib/libMagickWand.so
-usr/lib/pkgconfig/MagickWand.pc
-usr/lib/pkgconfig/Wand.pc
+usr/lib/*/libMagickWand.a
+usr/lib/*/libMagickWand.la
+usr/lib/*/libMagickWand.so
+usr/lib/*/pkgconfig/MagickWand.pc
+usr/lib/*/pkgconfig/Wand.pc
 usr/share/man/man1/MagickWand-config.1
 usr/share/man/man1/Wand-config.1
diff --git a/debian/libmagickwand4.install b/debian/libmagickwand4.install
index d93b970..2d4adc6 100644
--- a/debian/libmagickwand4.install
+++ b/debian/libmagickwand4.install
@@ -1 +1 @@ 
-usr/lib/libMagickWand.so.*
+usr/lib/*/libMagickWand.so.*
diff --git a/debian/rules b/debian/rules
index 29c2f4b..16f437e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,6 +7,7 @@ 
 
 export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 export DEB_SOURCE_PACKAGE ?= $(strip $(shell egrep '^Source: ' debian/control | cut -f 2 -d ':'))
 export DEB_VERSION ?= $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
 export DEB_NOEPOCH_VERSION ?= $(shell echo $(DEB_VERSION) | cut -d: -f2-)
@@ -31,6 +32,7 @@  build-stamp: $(QUILT_STAMPFN)
 	--sysconfdir=/etc \
 	--mandir=\$${prefix}/share/man \
 	--infodir=\$${prefix}/share/info \
+	--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
 	--with-modules \
 	--with-gs-font-dir=/usr/share/fonts/type1/gsfonts \
 	--with-magick-plus-plus \