From c3216bdee975711398a0afae623934d57221b904cf2e886f7df9bfdad34b0f01 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Thu, 13 Sep 2012 05:02:01 +0000 Subject: [PATCH] Accepting request 133166 from X11:Drivers:Video - Update to v0.5 * vdpau_wrapper.c: Track dynamic library handles and free them on exit * Implement workarounds for Adobe Flash bugs - Add libvdpau-alway-workaround-libflash.patch: always enable Flash workarounds and not depend on kernel command line. Users can disable this in the /etc/vdpau_wrapper.cfg file. (forwarded request 132823 from namtrac) OBS-URL: https://build.opensuse.org/request/show/133166 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvdpau?expand=0&rev=19 --- libvdpau-0.4.1.tar.gz | 3 -- libvdpau-0.5.tar.gz | 3 ++ libvdpau-always-workaround-libflash.patch | 39 +++++++++++++++++++++++ libvdpau.changes | 11 +++++++ libvdpau.spec | 15 ++++++--- 5 files changed, 64 insertions(+), 7 deletions(-) delete mode 100644 libvdpau-0.4.1.tar.gz create mode 100644 libvdpau-0.5.tar.gz create mode 100644 libvdpau-always-workaround-libflash.patch diff --git a/libvdpau-0.4.1.tar.gz b/libvdpau-0.4.1.tar.gz deleted file mode 100644 index 95e3839..0000000 --- a/libvdpau-0.4.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:061b6f86c64912f79851bfefcac4f77b401e9a939dbbb7b1ec795bc7d5aaf59b -size 456607 diff --git a/libvdpau-0.5.tar.gz b/libvdpau-0.5.tar.gz new file mode 100644 index 0000000..14898ae --- /dev/null +++ b/libvdpau-0.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1dba27b86c94c400d540df0cc5166fb683d1157794867627b5fe9febc96f5e4c +size 478945 diff --git a/libvdpau-always-workaround-libflash.patch b/libvdpau-always-workaround-libflash.patch new file mode 100644 index 0000000..ee5d47a --- /dev/null +++ b/libvdpau-always-workaround-libflash.patch @@ -0,0 +1,39 @@ +Index: libvdpau-0.5/src/vdpau_wrapper.c +=================================================================== +--- libvdpau-0.5.orig/src/vdpau_wrapper.c ++++ libvdpau-0.5/src/vdpau_wrapper.c +@@ -296,33 +296,7 @@ static VdpStatus vdp_wrapper_get_proc_ad + + static void init_running_under_flash(void) + { +- FILE *fp; +- char buffer[1024]; +- int ret, i; +- +- fp = fopen("/proc/self/cmdline", "r"); +- if (!fp) { +- return; +- } +- ret = fread(buffer, 1, sizeof(buffer) - 1, fp); +- fclose(fp); +- if (ret < 0) { +- return; +- } +- /* +- * Sometimes the file contains null between arguments. Wipe these out so +- * strstr doesn't stop early. +- */ +- for (i = 0; i < ret; i++) { +- if (buffer[i] == '\0') { +- buffer[i] = 'x'; +- } +- } +- buffer[ret] = '\0'; +- +- if (strstr(buffer, "libflashplayer") != NULL) { +- _running_under_flash = 1; +- } ++ _running_under_flash = 1; + } + + void init_config(void) diff --git a/libvdpau.changes b/libvdpau.changes index 97d5747..50114d8 100644 --- a/libvdpau.changes +++ b/libvdpau.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Sep 5 15:58:42 UTC 2012 - idonmez@suse.com + +- Update to v0.5 + * vdpau_wrapper.c: Track dynamic library handles and free them + on exit + * Implement workarounds for Adobe Flash bugs +- Add libvdpau-alway-workaround-libflash.patch: always enable + Flash workarounds and not depend on kernel command line. Users + can disable this in the /etc/vdpau_wrapper.cfg file. + ------------------------------------------------------------------- Tue Jun 26 12:34:44 UTC 2012 - sndirsch@suse.com diff --git a/libvdpau.spec b/libvdpau.spec index aeb94e3..a72e996 100644 --- a/libvdpau.spec +++ b/libvdpau.spec @@ -17,19 +17,20 @@ Name: libvdpau -Version: 0.4.1 +Version: 0.5 Release: 0 Summary: VDPAU wrapper and trace libraries License: MIT Group: System/Libraries Url: http://people.freedesktop.org/~aplattner -Source: %{name}-%{version}.tar.gz +Source: http://people.freedesktop.org/~aplattner/vdpau/%{name}-%{version}.tar.gz Source1: vdpauinfo-0.0.6.tar.gz Source2: README Source99: baselibs.conf Source100: %{name}-rpmlintrc Patch: vdpauinfo-missing-lX11.diff Patch1: libvdpau-nopdftex.patch +Patch2: libvdpau-always-workaround-libflash.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: doxygen @@ -88,25 +89,30 @@ Its usage is documented in the README. pushd ../vdpauinfo-* %patch -p0 popd +%patch2 -p1 %build autoreconf -fi %configure -make %{?jobs:-j%jobs} +make %{?_smp_mflags} %install %makeinstall + rm %{buildroot}%{_libdir}/libvdpau.la rm %{buildroot}%{_libdir}/vdpau/libvdpau_trace.la /sbin/ldconfig -n $RPM_BUILD_ROOT/%{_libdir}/vdpau rm %{buildroot}%{_libdir}/vdpau/libvdpau_trace.so + pushd ../vdpauinfo-* %configure \ VDPAU_CFLAGS=-I$RPM_BUILD_ROOT/usr/include \ VDPAU_LIBS="-L$RPM_BUILD_ROOT/%{_libdir} -lvdpau -lX11" -make %{?jobs:-j%jobs} + +make %{?_smp_mflags} %makeinstall popd + cp $RPM_SOURCE_DIR/README . %post -n libvdpau1 -p /sbin/ldconfig @@ -118,6 +124,7 @@ cp $RPM_SOURCE_DIR/README . %dir %{_libdir}/vdpau /usr/bin/vdpauinfo %{_libdir}/libvdpau.so.* +%config /etc/vdpau_wrapper.cfg %files -n libvdpau-devel %defattr(-,root,root)