diff mbox

please add multi-arch support for mpfr4

Message ID 20110823104840.GA15357@afflict.kos.to
State Accepted
Headers show

Commit Message

Riku Voipio Aug. 23, 2011, 10:48 a.m. UTC
Package: mpfr4
Version: 3.0.1-5
Severity: normal
User: debian-dpkg@lists.debian.org
Usertags: multiarch
Tags: patch

Hi,

The attached patch converts mpfr4 to multiarch paths 
and adds the relevant Multi-Arch: fields to debian/control.

Since mpfr4 is bottom dependency installed by default when installing
toolchain, we need a early conversion of mpfr4 to be able to take advantage
of multiarch.

Riku
diff mbox

Patch

diff -urN orig/mpfr4-3.0.1//debian/control mpfr4-3.0.1//debian/control
--- orig/mpfr4-3.0.1//debian/control	2011-07-18 15:50:27.000000000 +0300
+++ mpfr4-3.0.1//debian/control	2011-08-23 10:35:14.691262001 +0300
@@ -1,7 +1,7 @@ 
 Source: mpfr4
 Section: math
 Priority: optional
-Build-Depends: debhelper (>= 7), libgmp-dev, lib32gmp-dev [amd64 kfreebsd-amd64 ppc64], gcc-multilib [amd64 kfreebsd-amd64 ppc64], g++-multilib [amd64 kfreebsd-amd64 ppc64]
+Build-Depends: debhelper (>= 8.1.3), libgmp-dev, lib32gmp-dev [amd64 kfreebsd-amd64 ppc64], gcc-multilib [amd64 kfreebsd-amd64 ppc64], g++-multilib [amd64 kfreebsd-amd64 ppc64]
 Build-Depends-Indep: texinfo, texlive-latex-base
 Maintainer: Laurent Fousse <lfousse@debian.org>
 Uploaders: Steve M. Robbins <smr@debian.org>, Philipp Matthias Hahn <pmhahn@debian.org>
@@ -14,6 +14,8 @@ 
 Section: libs
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
 Conflicts: libgmp3 (<< 4.1.4-3)
 Description: multiple precision floating-point computation
  MPFR provides a library for multiple-precision floating-point computation
@@ -40,6 +42,7 @@ 
 Section: libdevel
 Architecture: any
 Depends: libgmp-dev, libmpfr4 (= ${binary:Version}), ${misc:Depends}
+Multi-Arch: same
 Suggests: libmpfr-doc
 Conflicts: libgmp3-dev (<< 4.1.4-3)
 Replaces: libgmp3-dev (<< 4.1.4-3)
diff -urN orig/mpfr4-3.0.1//debian/libmpfr4.install mpfr4-3.0.1//debian/libmpfr4.install
--- orig/mpfr4-3.0.1//debian/libmpfr4.install	2010-06-10 16:06:42.000000000 +0300
+++ mpfr4-3.0.1//debian/libmpfr4.install	2011-08-23 10:35:44.081262001 +0300
@@ -1 +1 @@ 
-usr/lib/libmpfr.so.*	usr/lib/
+usr/lib/*/libmpfr.so.*
diff -urN orig/mpfr4-3.0.1//debian/libmpfr-dev.install mpfr4-3.0.1//debian/libmpfr-dev.install
--- orig/mpfr4-3.0.1//debian/libmpfr-dev.install	2011-07-18 15:50:27.000000000 +0300
+++ mpfr4-3.0.1//debian/libmpfr-dev.install	2011-08-23 10:36:03.231262001 +0300
@@ -1,3 +1,3 @@ 
-usr/lib/libmpfr.so	usr/lib/
-usr/lib/libmpfr.a	usr/lib/
+usr/lib/*/libmpfr.so
+usr/lib/*/libmpfr.a
 usr/include/*.h		usr/include/
diff -urN orig/mpfr4-3.0.1//debian/rules mpfr4-3.0.1//debian/rules
--- orig/mpfr4-3.0.1//debian/rules	2011-07-18 15:50:27.000000000 +0300
+++ mpfr4-3.0.1//debian/rules	2011-08-23 10:41:19.331262002 +0300
@@ -26,6 +26,7 @@ 
 DEB_HOST_ARCH  ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 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)
 
 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
   confflags += --build $(DEB_HOST_GNU_TYPE)
@@ -66,7 +67,7 @@ 
 	chmod +x configure
 	cd build && \
 	    ../configure $(confflags) --prefix=/usr \
-		--enable-shared
+		--enable-shared --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
 	touch configure-stamp
 
 configure32: configure32-stamp