summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortnut <thierryn1 at hispeed dot ch>2012-05-12 12:26:37 +0200
committertnut <thierryn1 at hispeed dot ch>2012-05-12 12:26:37 +0200
commit085aa2e8a2b5f3a1825cea976f3899dfd1325675 (patch)
tree6b26910c6315aedc599a44167bd9acb151e2f81a
parent8bd205bab529abe53f6752a2a745c3304f45d2a4 (diff)
downloadnutyx-pakxe-085aa2e8a2b5f3a1825cea976f3899dfd1325675.tar.gz
nutyx-pakxe-085aa2e8a2b5f3a1825cea976f3899dfd1325675.tar.bz2
nutyx-pakxe-085aa2e8a2b5f3a1825cea976f3899dfd1325675.tar.xz
nutyx-pakxe-085aa2e8a2b5f3a1825cea976f3899dfd1325675.zip
libvdpau, ajout
-rw-r--r--libvdpau/.footprint.i68622
-rw-r--r--libvdpau/.footprint.x86_6422
-rw-r--r--libvdpau/.md5sum.i6862
-rw-r--r--libvdpau/.md5sum.x86_642
-rwxr-xr-xlibvdpau/Pkgfile26
-rw-r--r--libvdpau/git_commit_4262513e.patch179
6 files changed, 253 insertions, 0 deletions
diff --git a/libvdpau/.footprint.i686 b/libvdpau/.footprint.i686
new file mode 100644
index 000000000..293092d68
--- /dev/null
+++ b/libvdpau/.footprint.i686
@@ -0,0 +1,22 @@
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/include/
+drwxr-xr-x root/root usr/include/vdpau/
+-rw-r--r-- root/root usr/include/vdpau/vdpau.h
+-rw-r--r-- root/root usr/include/vdpau/vdpau_x11.h
+drwxr-xr-x root/root usr/lib/
+-rwxr-xr-x root/root usr/lib/libvdpau.la
+lrwxrwxrwx root/root usr/lib/libvdpau.so -> libvdpau.so.1.0.0
+lrwxrwxrwx root/root usr/lib/libvdpau.so.1 -> libvdpau.so.1.0.0
+-rwxr-xr-x root/root usr/lib/libvdpau.so.1.0.0
+lrwxrwxrwx root/root usr/lib/libvdpau_nvidia.so -> vdpau/libvdpau_nvidia.so.285.05.09
+drwxr-xr-x root/root usr/lib/pkgconfig/
+-rw-r--r-- root/root usr/lib/pkgconfig/vdpau.pc
+drwxr-xr-x root/root usr/lib/vdpau/
+-rwxr-xr-x root/root usr/lib/vdpau/libvdpau_trace.la
+lrwxrwxrwx root/root usr/lib/vdpau/libvdpau_trace.so -> libvdpau_trace.so.1.0.0
+lrwxrwxrwx root/root usr/lib/vdpau/libvdpau_trace.so.1 -> libvdpau_trace.so.1.0.0
+-rwxr-xr-x root/root usr/lib/vdpau/libvdpau_trace.so.1.0.0
+drwxr-xr-x root/root usr/share/
+drwxr-xr-x root/root usr/share/licenses/
+drwxr-xr-x root/root usr/share/licenses/libvdpau/
+-rw-r--r-- root/root usr/share/licenses/libvdpau/COPYING
diff --git a/libvdpau/.footprint.x86_64 b/libvdpau/.footprint.x86_64
new file mode 100644
index 000000000..293092d68
--- /dev/null
+++ b/libvdpau/.footprint.x86_64
@@ -0,0 +1,22 @@
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/include/
+drwxr-xr-x root/root usr/include/vdpau/
+-rw-r--r-- root/root usr/include/vdpau/vdpau.h
+-rw-r--r-- root/root usr/include/vdpau/vdpau_x11.h
+drwxr-xr-x root/root usr/lib/
+-rwxr-xr-x root/root usr/lib/libvdpau.la
+lrwxrwxrwx root/root usr/lib/libvdpau.so -> libvdpau.so.1.0.0
+lrwxrwxrwx root/root usr/lib/libvdpau.so.1 -> libvdpau.so.1.0.0
+-rwxr-xr-x root/root usr/lib/libvdpau.so.1.0.0
+lrwxrwxrwx root/root usr/lib/libvdpau_nvidia.so -> vdpau/libvdpau_nvidia.so.285.05.09
+drwxr-xr-x root/root usr/lib/pkgconfig/
+-rw-r--r-- root/root usr/lib/pkgconfig/vdpau.pc
+drwxr-xr-x root/root usr/lib/vdpau/
+-rwxr-xr-x root/root usr/lib/vdpau/libvdpau_trace.la
+lrwxrwxrwx root/root usr/lib/vdpau/libvdpau_trace.so -> libvdpau_trace.so.1.0.0
+lrwxrwxrwx root/root usr/lib/vdpau/libvdpau_trace.so.1 -> libvdpau_trace.so.1.0.0
+-rwxr-xr-x root/root usr/lib/vdpau/libvdpau_trace.so.1.0.0
+drwxr-xr-x root/root usr/share/
+drwxr-xr-x root/root usr/share/licenses/
+drwxr-xr-x root/root usr/share/licenses/libvdpau/
+-rw-r--r-- root/root usr/share/licenses/libvdpau/COPYING
diff --git a/libvdpau/.md5sum.i686 b/libvdpau/.md5sum.i686
new file mode 100644
index 000000000..972d23d69
--- /dev/null
+++ b/libvdpau/.md5sum.i686
@@ -0,0 +1,2 @@
+1644e00b0d9acb09093c6c5e05a939ec git_commit_4262513e.patch
+8e1f0639bea4e4a842aee93ab64406cc libvdpau-0.4.1.tar.gz
diff --git a/libvdpau/.md5sum.x86_64 b/libvdpau/.md5sum.x86_64
new file mode 100644
index 000000000..972d23d69
--- /dev/null
+++ b/libvdpau/.md5sum.x86_64
@@ -0,0 +1,2 @@
+1644e00b0d9acb09093c6c5e05a939ec git_commit_4262513e.patch
+8e1f0639bea4e4a842aee93ab64406cc libvdpau-0.4.1.tar.gz
diff --git a/libvdpau/Pkgfile b/libvdpau/Pkgfile
new file mode 100755
index 000000000..01eeb3494
--- /dev/null
+++ b/libvdpau/Pkgfile
@@ -0,0 +1,26 @@
+# Description: Bibliothèque NVidia VDPAU
+# URL: http://cgit.freedesktop.org/~aplattner/libvdpau
+# Maintainer: NutyX core team
+# Packager: lesibel at free dot fr
+# Depends on: xorg-libx11
+# Run on:
+
+name=libvdpau
+version=0.4.1
+release=3
+nvidia_ver=285.05.09
+
+source=(http://people.freedesktop.org/~aplattner/vdpau/$name-$version.tar.gz git_commit_4262513e.patch)
+
+build() {
+ cd $name-$version
+ patch -p1 < ../git_commit_4262513e.patch
+ ./configure --prefix=/usr
+ make
+ make DESTDIR=$PKG install
+
+ ln -s vdpau/libvdpau_nvidia.so.$nvidia_ver $PKG/usr/lib/libvdpau_nvidia.so
+
+ install -d -m755 $PKG/usr/share/licenses/$name
+ install -m644 COPYING $PKG/usr/share/licenses/$name
+}
diff --git a/libvdpau/git_commit_4262513e.patch b/libvdpau/git_commit_4262513e.patch
new file mode 100644
index 000000000..e32fc120a
--- /dev/null
+++ b/libvdpau/git_commit_4262513e.patch
@@ -0,0 +1,179 @@
+From 4262513e67c3572ed19bd796ec6180cdde7ccb7e Mon Sep 17 00:00:00 2001
+From: Kiran Pawar <kpawar@nvidia.com>
+Date: Fri, 05 Aug 2011 06:15:18 +0000
+Subject: vdpau_wrapper.c: Track dynamic library handles and free them on exit using __attribute__((destructor))
+
+Signed-off-by: Kiran Pawar <kpawar@nvidia.com>
+Tested-by: Aaron Plattner <aplattner@nvidia.com>
+Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+---
+diff --git a/src/vdpau_wrapper.c b/src/vdpau_wrapper.c
+index f504775..23de3d4 100644
+--- a/src/vdpau_wrapper.c
++++ b/src/vdpau_wrapper.c
+@@ -40,6 +40,17 @@ typedef void SetDllHandle(
+ void * driver_dll_handle
+ );
+
++static void * _vdp_backend_dll;
++static void * _vdp_trace_dll;
++static void * _vdp_driver_dll;
++static VdpDeviceCreateX11 * _vdp_imp_device_create_x11_proc;
++
++#if defined(__GNUC__)
++
++static void _vdp_close_driver(void) __attribute__((destructor));
++
++#endif
++
+ #if DEBUG
+
+ static void _vdp_wrapper_error_breakpoint(char const * file, int line, char const * function)
+@@ -87,23 +98,16 @@ static char * _vdp_get_driver_name_from_dri2(
+ return driver_name;
+ }
+
+-VdpStatus vdp_device_create_x11(
++static VdpStatus _vdp_open_driver(
+ Display * display,
+- int screen,
+- /* output parameters follow */
+- VdpDevice * device,
+- VdpGetProcAddress * * get_proc_address
+-)
++ int screen)
+ {
+ char const * vdpau_driver;
+ char * vdpau_driver_dri2 = NULL;
+ char vdpau_driver_lib[PATH_MAX];
+- void * backend_dll;
+ char const * vdpau_trace;
+ char const * func_name;
+
+- VdpDeviceCreateX11 * vdp_imp_device_create_x11;
+-
+ vdpau_driver = getenv("VDPAU_DRIVER");
+ if (!vdpau_driver) {
+ vdpau_driver = vdpau_driver_dri2 =
+@@ -125,13 +129,13 @@ VdpStatus vdp_device_create_x11(
+ return VDP_STATUS_NO_IMPLEMENTATION;
+ }
+
+- backend_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL);
+- if (!backend_dll) {
++ _vdp_driver_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL);
++ if (!_vdp_driver_dll) {
+ /* Try again using the old path, which is guaranteed to fit in PATH_MAX
+ * if the complete path fit above. */
+ snprintf(vdpau_driver_lib, sizeof(vdpau_driver_lib), DRIVER_LIB_FORMAT,
+ "", vdpau_driver, "");
+- backend_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL);
++ _vdp_driver_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL);
+ }
+
+ if (vdpau_driver_dri2) {
+@@ -139,26 +143,28 @@ VdpStatus vdp_device_create_x11(
+ vdpau_driver_dri2 = NULL;
+ }
+
+- if (!backend_dll) {
++ if (!_vdp_driver_dll) {
+ fprintf(stderr, "Failed to open VDPAU backend %s\n", dlerror());
+ _VDP_ERROR_BREAKPOINT();
+ return VDP_STATUS_NO_IMPLEMENTATION;
+ }
+
++ _vdp_backend_dll = _vdp_driver_dll;
++
+ vdpau_trace = getenv("VDPAU_TRACE");
+ if (vdpau_trace && atoi(vdpau_trace)) {
+- void * trace_dll;
+ SetDllHandle * set_dll_handle;
+
+- trace_dll = dlopen(VDPAU_MODULEDIR "/libvdpau_trace.so.1", RTLD_NOW | RTLD_GLOBAL);
+- if (!trace_dll) {
++ _vdp_trace_dll = dlopen(VDPAU_MODULEDIR "/libvdpau_trace.so.1",
++ RTLD_NOW | RTLD_GLOBAL);
++ if (!_vdp_trace_dll) {
+ fprintf(stderr, "Failed to open VDPAU trace library %s\n", dlerror());
+ _VDP_ERROR_BREAKPOINT();
+ return VDP_STATUS_NO_IMPLEMENTATION;
+ }
+
+ set_dll_handle = (SetDllHandle*)dlsym(
+- trace_dll,
++ _vdp_trace_dll,
+ "vdp_trace_set_backend_handle"
+ );
+ if (!set_dll_handle) {
+@@ -167,9 +173,9 @@ VdpStatus vdp_device_create_x11(
+ return VDP_STATUS_NO_IMPLEMENTATION;
+ }
+
+- set_dll_handle(backend_dll);
++ set_dll_handle(_vdp_backend_dll);
+
+- backend_dll = trace_dll;
++ _vdp_backend_dll = _vdp_trace_dll;
+
+ func_name = "vdp_trace_device_create_x11";
+ }
+@@ -177,17 +183,52 @@ VdpStatus vdp_device_create_x11(
+ func_name = "vdp_imp_device_create_x11";
+ }
+
+- vdp_imp_device_create_x11 = (VdpDeviceCreateX11*)dlsym(
+- backend_dll,
++ _vdp_imp_device_create_x11_proc = (VdpDeviceCreateX11*)dlsym(
++ _vdp_backend_dll,
+ func_name
+ );
+- if (!vdp_imp_device_create_x11) {
++ if (!_vdp_imp_device_create_x11_proc) {
+ fprintf(stderr, "%s\n", dlerror());
+ _VDP_ERROR_BREAKPOINT();
+ return VDP_STATUS_NO_IMPLEMENTATION;
+ }
+
+- return vdp_imp_device_create_x11(
++ return VDP_STATUS_OK;
++}
++
++static void _vdp_close_driver(void)
++{
++ if (_vdp_driver_dll) {
++ dlclose(_vdp_driver_dll);
++ _vdp_driver_dll = NULL;
++ }
++ if (_vdp_trace_dll) {
++ dlclose(_vdp_trace_dll);
++ _vdp_trace_dll = NULL;
++ }
++ _vdp_backend_dll = NULL;
++ _vdp_imp_device_create_x11_proc = NULL;
++}
++
++VdpStatus vdp_device_create_x11(
++ Display * display,
++ int screen,
++ /* output parameters follow */
++ VdpDevice * device,
++ VdpGetProcAddress * * get_proc_address
++)
++{
++ VdpStatus status;
++
++ if (!_vdp_imp_device_create_x11_proc) {
++ status = _vdp_open_driver(display, screen);
++ if (status != VDP_STATUS_OK) {
++ _vdp_close_driver();
++ return status;
++ }
++ }
++
++ return _vdp_imp_device_create_x11_proc(
+ display,
+ screen,
+ device,
+--
+cgit v0.9.0.2-2-gbebe