From patchwork Thu Aug 4 14:27:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 3270 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 95CDB23F3D for ; Thu, 4 Aug 2011 14:27:23 +0000 (UTC) Received: from mail-qy0-f173.google.com (mail-qy0-f173.google.com [209.85.216.173]) by fiordland.canonical.com (Postfix) with ESMTP id 488A4A18659 for ; Thu, 4 Aug 2011 14:27:23 +0000 (UTC) Received: by qyk31 with SMTP id 31so373508qyk.11 for ; Thu, 04 Aug 2011 07:27:22 -0700 (PDT) Received: by 10.229.183.84 with SMTP id cf20mr677210qcb.121.1312468042708; Thu, 04 Aug 2011 07:27:22 -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.229.6.73 with SMTP id 9cs15773qcy; Thu, 4 Aug 2011 07:27:22 -0700 (PDT) Received: by 10.224.205.198 with SMTP id fr6mr666973qab.162.1312468041337; Thu, 04 Aug 2011 07:27:21 -0700 (PDT) Received: from afflict.kos.to (afflict.kos.to [92.243.29.197]) by mx.google.com with ESMTPS id eu4si4217688qab.36.2011.08.04.07.27.19 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 04 Aug 2011 07:27:20 -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 AF7632669C; Thu, 4 Aug 2011 14:27:18 +0000 (UTC) Date: Thu, 4 Aug 2011 17:27:18 +0300 From: Riku Voipio To: submit@bugs.debian.org Cc: patches@linaro.org Subject: Please add multiarch support to libsdl Message-ID: <20110804142718.GA1632@afflict.kos.to> MIME-Version: 1.0 Content-Disposition: inline X-message-flag: Warning: message not sent with a DRM-Certified client User-Agent: Mutt/1.5.18 (2008-05-17) Package: libsdl1.2debian Version: 1.2.14-6.4 Severity: wishlist User: debian-dpkg@lists.debian.org Usertags: multiarch Tags: patch The following patch adds multiarch support for libsdl1.2. It requires the following changes: - debian/control changes (Multi-Arch: same and debhelper reqirement update) - move libs to /usr/lib/$DEB_HOST_MULTIARCH/ - install a /usr/bin/sdl-config wrapper that calls /usr/lib/$DEB_HOST_MULTIARCH/sdl-config last is needed to support crosscompiling (so that /usr/bin/sdl-config is same on all archs, allowing Multi-Arch: same setting for the -dev package). See the following page for details: http://wiki.debian.org/Multiarch/Implementation diff -u libsdl1.2-1.2.14/debian/control libsdl1.2-1.2.14/debian/control --- libsdl1.2-1.2.14/debian/control +++ libsdl1.2-1.2.14/debian/control @@ -5,7 +5,7 @@ Uploaders: Barry deFreese Standards-Version: 3.8.4 Build-Depends: dpkg (>= 1.13.2), - debhelper (>= 5.0), + debhelper (>= 8.1.3), quilt, nasm [any-i386], libx11-dev, @@ -27,6 +27,7 @@ Package: libsdl1.2debian Architecture: any +Multi-Arch: same Depends: ${misc:Depends}, ${shlibs:Depends} Replaces: libsdl1.2debian-all, libsdl1.2debian-alsa, @@ -65,6 +66,7 @@ This version of SDL is compiled with directfb graphics and no sound. Package: libsdl1.2-dev +Multi-Arch: same Architecture: any Section: libdevel Depends: ${misc:Depends}, diff -u libsdl1.2-1.2.14/debian/libsdl1.2debian.install libsdl1.2-1.2.14/debian/libsdl1.2debian.install --- libsdl1.2-1.2.14/debian/libsdl1.2debian.install +++ libsdl1.2-1.2.14/debian/libsdl1.2debian.install @@ -1 +1 @@ -usr/lib/*.so.* +usr/lib/*/*.so.* diff -u libsdl1.2-1.2.14/debian/rules libsdl1.2-1.2.14/debian/rules --- libsdl1.2-1.2.14/debian/rules +++ libsdl1.2-1.2.14/debian/rules @@ -19,11 +19,13 @@ DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) export DEB_HOST_GNU_TYPE export DEB_BUILD_GNU_TYPE -confflags = --prefix=/usr +confflags = --prefix=/usr --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) + confflags += --disable-rpath --enable-sdl-dlopen --disable-loadso \ --disable-video-ggi --disable-video-svga --disable-video-aalib \ --disable-nas --disable-esd --disable-arts \ @@ -126,7 +128,10 @@ dh_installman -plibsdl1.2-dev debian/sdl-config.1 dh_installchangelogs dh_install --sourcedir=debian/tmp - sed -i -e "s/^dependency_libs=.*/dependency_libs=''/" debian/libsdl1.2-dev/usr/lib/libSDL.la + sed -i -e "s/^dependency_libs=.*/dependency_libs=''/" debian/libsdl1.2-dev/usr/lib/$(DEB_HOST_MULTIARCH)/libSDL.la + mkdir -p debian/libsdl1.2-dev/usr/bin debian/libsdl1.2-dev/usr/lib/$(DEB_HOST_MULTIARCH)/sdl/ + mv debian/tmp/usr/bin/sdl-config debian/libsdl1.2-dev/usr/lib/$(DEB_HOST_MULTIARCH)/sdl/sdl-config + cp -a debian/sdl-config debian/libsdl1.2-dev/usr/bin/ dh_install --sourcedir=builddir/udeb/ -plibsdl1.2debian-udeb build/.libs/*.so.* usr/lib/; rm -rf debian/libsdl1.2debian/usr/include dh_strip diff -u libsdl1.2-1.2.14/debian/libsdl1.2-dev.install libsdl1.2-1.2.14/debian/libsdl1.2-dev.install --- libsdl1.2-1.2.14/debian/libsdl1.2-dev.install +++ libsdl1.2-1.2.14/debian/libsdl1.2-dev.install @@ -1,7 +1,6 @@ usr/include/SDL -usr/lib/*.a -usr/lib/*.so -usr/lib/*.la -usr/lib/pkgconfig -usr/bin/sdl-config +usr/lib/*/*.a +usr/lib/*/*.so +usr/lib/*/*.la +usr/lib/*/pkgconfig usr/share/aclocal/* only in patch2: unchanged: --- libsdl1.2-1.2.14.orig/debian/sdl-config +++ libsdl1.2-1.2.14/debian/sdl-config @@ -0,0 +1,5 @@ +#!/bin/sh +# Generic multiarch wrapper for sdl-config +# Copyright (c) 2011 Riku Voipio + +/usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`/sdl/sdl-config "$@"