From patchwork Tue Aug 23 10:49:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 3617 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 7A0A723F41 for ; Tue, 23 Aug 2011 10:50:00 +0000 (UTC) Received: from mail-bw0-f52.google.com (mail-bw0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id 62692A186E3 for ; Tue, 23 Aug 2011 10:50:00 +0000 (UTC) Received: by bkbzs2 with SMTP id zs2so6814412bkb.11 for ; Tue, 23 Aug 2011 03:50:00 -0700 (PDT) Received: by 10.204.131.198 with SMTP id y6mr1496131bks.330.1314096600034; Tue, 23 Aug 2011 03:50:00 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.204.41.75 with SMTP id n11cs206362bke; Tue, 23 Aug 2011 03:49:59 -0700 (PDT) Received: by 10.224.209.136 with SMTP id gg8mr2223097qab.147.1314096599123; Tue, 23 Aug 2011 03:49:59 -0700 (PDT) Received: from afflict.kos.to (afflict.kos.to. [92.243.29.197]) by mx.google.com with ESMTPS id dw9si43753qab.92.2011.08.23.03.49.58 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 23 Aug 2011 03:49:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of nchip@afflict.kos.to designates 92.243.29.197 as permitted sender) client-ip=92.243.29.197; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of nchip@afflict.kos.to designates 92.243.29.197 as permitted sender) smtp.mail=nchip@afflict.kos.to Received: by afflict.kos.to (Postfix, from userid 1000) id 637FC2669D; Tue, 23 Aug 2011 10:49:57 +0000 (UTC) Date: Tue, 23 Aug 2011 13:49:57 +0300 From: Riku Voipio To: submit@bugs.debian.org Subject: please add multi-arch support for gmp Message-ID: <20110823104957.GB15357@afflict.kos.to> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Package: gmp Version: 2:5.0.1+dfsg-7 Severity: normal User: debian-dpkg@lists.debian.org Usertags: multiarch Tags: patch Hi, The attached patch converts gmp to multiarch paths and adds the relevant Multi-Arch: fields to debian/control. Since gmp is bottom dependency installed by default when installing toolchain, we need a early conversion of gmp to be able to take advantage of multiarch. Riku diff -urN orig/gmp-5.0.1+dfsg//debian/control gmp-5.0.1+dfsg//debian/control --- orig/gmp-5.0.1+dfsg//debian/control 2011-08-23 11:19:30.000000000 +0300 +++ gmp-5.0.1+dfsg//debian/control 2011-08-23 11:44:06.914692001 +0300 @@ -2,7 +2,7 @@ Homepage: http://gmplib.org/ Section: libs Priority: optional -Build-Depends: m4, debhelper (>= 7), quilt, gcc-multilib [amd64 kfreebsd-amd64 powerpc ppc64], g++-multilib [amd64 kfreebsd-amd64 powerpc ppc64] +Build-Depends: m4, debhelper (>= 8.1.3), quilt, gcc-multilib [amd64 kfreebsd-amd64 powerpc ppc64], g++-multilib [amd64 kfreebsd-amd64 powerpc ppc64] Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian Scientific Computing Team Uploaders: Steve M. Robbins @@ -15,6 +15,8 @@ Priority: optional Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same Description: Multiprecision arithmetic library GNU MP is a programmer's library for arbitrary precision arithmetic (ie, a bignum package). It can operate on signed @@ -28,6 +30,8 @@ Priority: optional Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same Conflicts: libgmp3, libgmpxx4 Replaces: libgmp3 Description: Multiprecision arithmetic library (C++ bindings) @@ -40,6 +44,7 @@ Priority: optional Architecture: any Depends: libgmp10 (= ${binary:Version}), libgmpxx4ldbl (= ${binary:Version}), ${misc:Depends} +Multi-Arch: same Provides: libgmp10-dev Conflicts: libgmp3-dev (<< 5.0.1), libgmp10-dev Replaces: libgmp3-dev, libgmp10-dev diff -urN orig/gmp-5.0.1+dfsg//debian/rules gmp-5.0.1+dfsg//debian/rules --- orig/gmp-5.0.1+dfsg//debian/rules 2011-08-23 11:19:30.000000000 +0300 +++ gmp-5.0.1+dfsg//debian/rules 2011-08-23 11:58:22.764692001 +0300 @@ -18,6 +18,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) MAKE_CHECK = : disabled make check ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) @@ -82,6 +83,8 @@ MAKE_CHECK = : disabled make check endif +confflags_ma = $(confflags) --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) + CC = $(DEB_HOST_GNU_TYPE)-gcc CC32 = $(DEB_HOST_GNU_TYPE)-gcc $(m32) CC64 = $(DEB_HOST_GNU_TYPE)-gcc $(m64) @@ -112,7 +115,7 @@ configure: patch configure-stamp configure-stamp: mkdir -p build - cd build && ../configure $(confflags) \ + cd build && ../configure $(confflags_ma) \ AR=$(AR) CC="$(CC)" CFLAGS="$(CFLAGS)" \ CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" CC="$(DEB_HOST_GNU_TYPE)-gcc" sh debian/fix-gmp-h.sh build @@ -174,14 +177,14 @@ install: build-stamp install-prep $(MAKE) DESTDIR=`pwd`/debian/tmp -C build install - dh_install -plibgmp10 usr/lib/libgmp.so.* - dh_install -plibmp3 usr/lib/libmp.so.* + dh_install -plibgmp10 usr/lib/*/libgmp.so.* + dh_install -plibmp3 usr/lib/*/libmp.so.* - dh_install -plibgmpxx4ldbl usr/lib/libgmpxx.so.* + dh_install -plibgmpxx4ldbl usr/lib/*/libgmpxx.so.* - dh_install -plibgmp-dev usr/lib/lib*.so - dh_install -plibgmp-dev usr/lib/lib*.a - dh_install -plibgmp-dev usr/lib/lib*.la + dh_install -plibgmp-dev usr/lib/*/lib*.so + dh_install -plibgmp-dev usr/lib/*/lib*.a + dh_install -plibgmp-dev usr/lib/*/lib*.la dh_install -plibgmp-dev usr/include dh_install -plibgmp-dev -Xgmp-mparam.h build/gmp*.h usr/include