commit:     67277b88c7b5fa08205cffa49b10472b78a10137
Author:     g3ngr33n <gengreen <AT> tutanota <DOT> com>
AuthorDate: Thu Dec 19 15:32:16 2019 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Wed Dec 25 19:24:16 2019 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=67277b88

x11-libs/libva-vdpau-driver: Fix ebuild

Fix incorrect patch files

Package-Manager: Portage-2.3.79, Repoman-2.3.16
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

 .../files/0001-fix-headers-musl.patch              | 10 ---------
 ...au-driver-0.7.4-include-linux-videodev2.h.patch | 25 ++++++++++++++++++++++
 .../libva-vdpau-driver-0.7.4-libvdpau-0.8.patch    |  4 ++--
 ...bva-vdpau-driver-0.7.4-missing-sys_time_h.patch |  5 ++---
 .../libva-vdpau-driver-0.7.4-sigfpe-crash.patch    | 21 ++++++++++++++++++
 .../libva-vdpau-driver-0.7.4-r5.ebuild             |  3 ++-
 6 files changed, 52 insertions(+), 16 deletions(-)

diff --git a/x11-libs/libva-vdpau-driver/files/0001-fix-headers-musl.patch 
b/x11-libs/libva-vdpau-driver/files/0001-fix-headers-musl.patch
deleted file mode 100644
index 2529fb2..0000000
--- a/x11-libs/libva-vdpau-driver/files/0001-fix-headers-musl.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/src/utils.c
-+++ b/src/utils.c
-@@ -21,6 +21,7 @@
- #include "sysdeps.h"
- #include "utils.h"
- #include <time.h>
-+#include <sys/time.h>
- #include <errno.h>
- 
- #define DEBUG 1

diff --git 
a/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-include-linux-videodev2.h.patch
 
b/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-include-linux-videodev2.h.patch
new file mode 100644
index 0000000..0d92074
--- /dev/null
+++ 
b/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-include-linux-videodev2.h.patch
@@ -0,0 +1,25 @@
+https://bugs.gentoo.org/689530
+
+libva commit 93c52a17b8d2 ("va_backend: remove unneeded
+linux/videodev2.h include") removed an include that provided the
+prototype of v4l2_format among other v4l2_* structs.
+
+Without this or a forward declaration of 'struct v4l2_format', the prototype
+and definition of vdpau_CreateSurfaceFromV4L2Buf() (which has a 'struct
+v4l2_format *' parameter) are seen as conflicting.
+
+Just include the removed header where we need it.
+
+diff --git a/src/vdpau_driver.h b/src/vdpau_driver.h
+index 6286d16..54d37fb 100644
+--- a/src/vdpau_driver.h
++++ b/src/vdpau_driver.h
+@@ -21,6 +21,8 @@
+ #ifndef VDPAU_DRIVER_H
+ #define VDPAU_DRIVER_H
+ 
++#include <linux/videodev2.h>
++
+ #include <va/va_backend.h>
+ #include "vaapi_compat.h"
+ #include "vdpau_gate.h"

diff --git 
a/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-libvdpau-0.8.patch 
b/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-libvdpau-0.8.patch
index 6d6d47a..412e9c3 100644
--- 
a/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-libvdpau-0.8.patch
+++ 
b/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-libvdpau-0.8.patch
@@ -1,7 +1,7 @@
 http://bugs.gentoo.org/517778
 
---- src/vdpau_decode.c
-+++ src/vdpau_decode.c
+--- a/src/vdpau_decode.c
++++ b/src/vdpau_decode.c
 @@ -1289,7 +1289,7 @@
              driver_data,
              obj_context->vdp_decoder,

diff --git 
a/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-missing-sys_time_h.patch
 
b/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-missing-sys_time_h.patch
index d37784a..2529fb2 100644
--- 
a/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-missing-sys_time_h.patch
+++ 
b/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-missing-sys_time_h.patch
@@ -1,6 +1,5 @@
-diff -Naur libva-vdpau-driver-0.7.4.orig/src/utils.c 
libva-vdpau-driver-0.7.4/src/utils.c
---- libva-vdpau-driver-0.7.4.orig/src/utils.c  2016-05-27 19:07:51.001006381 
+0000
-+++ libva-vdpau-driver-0.7.4/src/utils.c       2016-05-27 18:23:39.534238312 
+0000
+--- a/src/utils.c
++++ b/src/utils.c
 @@ -21,6 +21,7 @@
  #include "sysdeps.h"
  #include "utils.h"

diff --git 
a/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-sigfpe-crash.patch 
b/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-sigfpe-crash.patch
new file mode 100644
index 0000000..e2fe02c
--- /dev/null
+++ 
b/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-sigfpe-crash.patch
@@ -0,0 +1,21 @@
+Description: Fix a crash if a heap is destroyed before being initialized
+Author: Sebastian Ramacher <[email protected]>
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=58836
+Bug-Debian: http://bugs.debian.org/748294
+Last-Update: 2014-06-02
+
+--- vdpau-video-0.7.4.orig/src/object_heap.c
++++ vdpau-video-0.7.4/src/object_heap.c
+@@ -272,8 +272,10 @@ object_heap_destroy(object_heap_p heap)
+         ASSERT(obj->next_free != ALLOCATED);
+     }
+ 
+-    for (i = 0; i < heap->heap_size / heap->heap_increment; i++) {
+-        free(heap->bucket[i]);
++    if (heap->bucket) {
++        for (i = 0; i < heap->heap_size / heap->heap_increment; i++) {
++            free(heap->bucket[i]);
++        }
+     }
+ 
+     pthread_mutex_destroy(&heap->mutex);

diff --git a/x11-libs/libva-vdpau-driver/libva-vdpau-driver-0.7.4-r5.ebuild 
b/x11-libs/libva-vdpau-driver/libva-vdpau-driver-0.7.4-r5.ebuild
index 23e613e..15a4cc7 100644
--- a/x11-libs/libva-vdpau-driver/libva-vdpau-driver-0.7.4-r5.ebuild
+++ b/x11-libs/libva-vdpau-driver/libva-vdpau-driver-0.7.4-r5.ebuild
@@ -30,7 +30,8 @@ PATCHES=(
        "${FILESDIR}"/${P}-libvdpau-0.8.patch
        "${FILESDIR}"/${P}-sigfpe-crash.patch
        "${FILESDIR}"/${P}-include-linux-videodev2.h.patch
-       "${FILESDIR}"/0001-fix-headers-musl.patch
+       "${FILESDIR}"/${P}-missing-sys_time_h.patch
+
 )
 
 src_prepare() {

Reply via email to