Package: libvdpau1 Version: 0.4.1-2 Tags: patch Followup-For: Bug #631174 Attached is a patch to install the library in multi-arch paths.
I had to change libvdpau-dev from Architecture: all to any, as the .so link is now installed in a architecture-dependent path. > In order to convert the nvidia-graphics-driver package to multiarch, we > need a multiarch enabled libvdpau1 with the following change: adjust the > search path for implementations to look in both /usr/lib/<triplet>/vdpau > and /usr/lib/vdpau/. The second patch makes it fall back to searching in /usr/lib/vdpau/ if it doesn't find anything in /usr/lib/<triplet/vdpau/. > Please keep the lib32vdpau1 package unmodified around for now > (but libvdpau1 could get a Conflicts: lib32vdpau1 [i386]) I don't think that's necessary, as lib32vdpau1 is not available on i386. Thanks, Daniel Schaal -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (990, 'unstable'), (102, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.1.0-rc3-00270-g7a54f5e (SMP w/2 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages libvdpau1 depends on: ii libc6 2.13-18 Embedded GNU C Library: Shared lib ii libgcc1 1:4.6.1-8 GCC support library ii libstdc++6 4.6.1-8 GNU Standard C++ Library v3 ii libx11-6 2:1.4.4-1 X11 client-side library ii libxext6 2:1.3.0-3 X11 miscellaneous extension librar libvdpau1 recommends no packages. Versions of packages libvdpau1 suggests: pn nvidia-vdpau-driver | nvidia- <none> (no description available) -- no debconf information
>From 6523fb5bef435e72e72f82a68d7146b60411dc44 Mon Sep 17 00:00:00 2001 From: Daniel Schaal <farb...@web.de> Date: Mon, 29 Aug 2011 17:46:33 +0200 Subject: [PATCH 1/2] Install library in multiarch paths --- debian/control | 4 +++- debian/libvdpau-dev.install | 4 ++-- debian/libvdpau1.install | 4 ++-- debian/rules | 4 +++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/debian/control b/debian/control index 01a32a3..468fa06 100644 --- a/debian/control +++ b/debian/control @@ -16,7 +16,7 @@ Vcs-Git: git://git.debian.org/git/pkg-nvidia/libvdpau.git Vcs-Browser: http://git.debian.org/?p=pkg-nvidia/libvdpau.git Package: libvdpau-dev -Architecture: all +Architecture: any Section: libdevel Depends: libvdpau1 (>= ${source:Version}), libvdpau1 (<< ${source:Version}.1~), @@ -37,6 +37,8 @@ Description: Video Decode and Presentation API for Unix (development files) Package: libvdpau1 Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Replaces: nvidia-libvdpau, nvidia-libvdpau-ia32, nvidia-libvdpau1 (<< 195.36.24-2), nvidia-libvdpau1-ia32 (<< 195.36.24-2) diff --git a/debian/libvdpau-dev.install b/debian/libvdpau-dev.install index 42ea648..f02a5ba 100644 --- a/debian/libvdpau-dev.install +++ b/debian/libvdpau-dev.install @@ -1,3 +1,3 @@ -usr/lib/libvdpau.so -usr/lib/pkgconfig +usr/lib/*/libvdpau.so +usr/lib/*/pkgconfig usr/include diff --git a/debian/libvdpau1.install b/debian/libvdpau1.install index ab4eeea..cc4b2ad 100644 --- a/debian/libvdpau1.install +++ b/debian/libvdpau1.install @@ -1,2 +1,2 @@ -usr/lib/libvdpau.so.* -usr/lib/vdpau/libvdpau_trace.so.* +usr/lib/*/libvdpau.so.* +usr/lib/*/vdpau/libvdpau_trace.so.* diff --git a/debian/rules b/debian/rules index cd3e389..a70d523 100755 --- a/debian/rules +++ b/debian/rules @@ -3,6 +3,7 @@ #export DH_VERBOSE=1 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) # Used to enable documentation if dependencies are available define cond_enable @@ -28,7 +29,8 @@ binary: binary-indep binary-arch ; override_dh_auto_configure: $(EXTRA_CONFIGURE) dh_testdir - ./configure --prefix=/usr $(CONFIGURE_OPTIONS) + ./configure --prefix=/usr --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ + $(CONFIGURE_OPTIONS) configure32: dh_testdir -- 1.7.5.4
>From 564b7e2392022fbf346f7cb32b68b4a8e7181b24 Mon Sep 17 00:00:00 2001 From: Daniel Schaal <farb...@web.de> Date: Mon, 29 Aug 2011 20:14:50 +0200 Subject: [PATCH 2/2] add patch to fall back to /usr/lib/vdpau search path --- debian/patches/search-in-usr-lib-vdpau.patch | 17 +++++++++++++++++ debian/patches/series | 1 + 2 files changed, 18 insertions(+), 0 deletions(-) create mode 100644 debian/patches/search-in-usr-lib-vdpau.patch diff --git a/debian/patches/search-in-usr-lib-vdpau.patch b/debian/patches/search-in-usr-lib-vdpau.patch new file mode 100644 index 0000000..128db41 --- /dev/null +++ b/debian/patches/search-in-usr-lib-vdpau.patch @@ -0,0 +1,17 @@ +Index: libvdpau/src/vdpau_wrapper.c +=================================================================== +--- libvdpau.orig/src/vdpau_wrapper.c 2011-08-29 20:03:58.000000000 +0200 ++++ libvdpau/src/vdpau_wrapper.c 2011-08-29 20:14:42.000000000 +0200 +@@ -133,6 +133,12 @@ + "", vdpau_driver, ""); + backend_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL); + } ++ if (!backend_dll) { ++ /* Try again using the "legacy" /usr/lib/vdpau/ path */ ++ snprintf(vdpau_driver_lib, sizeof(vdpau_driver_lib), DRIVER_LIB_FORMAT, ++ "/usr/lib/vdpau/", vdpau_driver, ".1"); ++ backend_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL); ++ } + + if (vdpau_driver_dri2) { + XFree(vdpau_driver_dri2); diff --git a/debian/patches/series b/debian/patches/series index 9f0c591..ab2d0bc 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ link-with-libx11.patch autoreconf_-fi.patch +search-in-usr-lib-vdpau.patch -- 1.7.5.4