summaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2018-11-25 19:26:29 +0000
committerabs <abs@pkgsrc.org>2018-11-25 19:26:29 +0000
commit6b5e98e17bc9efcfb1c645be7e300c6abeb94761 (patch)
tree1943cd1be073ea1b4382cf61b289b2ea9f9f1043 /multimedia
parenta94368adee041720e62f1b759ffd7a4747f1c738 (diff)
downloadpkgsrc-6b5e98e17bc9efcfb1c645be7e300c6abeb94761.tar.gz
Add conditional defines for some EGL extensions to fix build with
pkgsrc mesa-11.2.2. Taken from https://github.com/mpv-player/mpv/issues/5599
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/mpv/distinfo3
-rw-r--r--multimedia/mpv/patches/patch-video_out_opengl_hwdec__vaegl.c44
2 files changed, 46 insertions, 1 deletions
diff --git a/multimedia/mpv/distinfo b/multimedia/mpv/distinfo
index 34184aff6d2..912211b859f 100644
--- a/multimedia/mpv/distinfo
+++ b/multimedia/mpv/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.47 2018/10/25 08:31:32 leot Exp $
+$NetBSD: distinfo,v 1.48 2018/11/25 19:26:29 abs Exp $
SHA1 (mpv-0.29.1.tar.gz) = 83f2bc0eb5a8bec9a9d5efc7de0e19a442238ac5
RMD160 (mpv-0.29.1.tar.gz) = 72a4fda3a72ac4fd37ed04435833fa2cf378a012
@@ -6,3 +6,4 @@ SHA512 (mpv-0.29.1.tar.gz) = ec57c9ceaaf2915ee237dd5a1c5ea5d22725d8611e28a9b998e
Size (mpv-0.29.1.tar.gz) = 3059503 bytes
SHA1 (patch-audio_out_ao__oss.c) = 824c214d0d4464b94e46a922ede4045ae537a534
SHA1 (patch-player_main.c) = e794199990059cc95050032194bca70557c381d7
+SHA1 (patch-video_out_opengl_hwdec__vaegl.c) = 4c852741aa0edd0608ee38280e8c0bb9f3849eee
diff --git a/multimedia/mpv/patches/patch-video_out_opengl_hwdec__vaegl.c b/multimedia/mpv/patches/patch-video_out_opengl_hwdec__vaegl.c
new file mode 100644
index 00000000000..a04bc38615b
--- /dev/null
+++ b/multimedia/mpv/patches/patch-video_out_opengl_hwdec__vaegl.c
@@ -0,0 +1,44 @@
+$NetBSD: patch-video_out_opengl_hwdec__vaegl.c,v 1.1 2018/11/25 19:26:29 abs Exp $
+
+Provide extension definitions in case of older Mesa EGL
+
+Taken from https://github.com/mpv-player/mpv/issues/5599
+
+--- video/out/opengl/hwdec_vaegl.c.orig 2018-10-02 19:03:41.000000000 +0000
++++ video/out/opengl/hwdec_vaegl.c
+@@ -53,6 +53,35 @@ typedef void *EGLImageKHR;
+ #define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274
+ #endif
+
++/* Provide extension definitions in case of older Mesa EGL */
++#ifndef EGL_EXT_image_dma_buf_import_modifiers
++#define EGL_EXT_image_dma_buf_import_modifiers 1
++#define EGL_DMA_BUF_PLANE3_FD_EXT 0x3440
++#define EGL_DMA_BUF_PLANE3_OFFSET_EXT 0x3441
++#define EGL_DMA_BUF_PLANE3_PITCH_EXT 0x3442
++#define EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT 0x3443
++#define EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT 0x3444
++#define EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT 0x3445
++#define EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT 0x3446
++#define EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT 0x3447
++#define EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT 0x3448
++#define EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT 0x3449
++#define EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT 0x344A
++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDMABUFFORMATSEXTPROC) (EGLDisplay dpy, EGLint max_formats, EGLint *formats, EGLint *num_formats);
++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDMABUFMODIFIERSEXTPROC) (EGLDisplay dpy, EGLint format, EGLint max_modifiers, EGLuint64KHR *modifiers, EGLBoolean *external_only, EGLint *num_modifiers);
++#ifdef EGL_EGLEXT_PROTOTYPES
++EGLAPI EGLBoolean EGLAPIENTRY eglQueryDmaBufFormatsEXT (EGLDisplay dpy, EGLint max_formats, EGLint *formats, EGLint *num_formats);
++EGLAPI EGLBoolean EGLAPIENTRY eglQueryDmaBufModifiersEXT (EGLDisplay dpy, EGLint format, EGLint max_modifiers, EGLuint64KHR *modifiers, EGLBoolean *external_only, EGLint *num_modifiers);
++#endif
++#endif /* EGL_EXT_image_dma_buf_import_modifiers */
++
++#ifndef EGL_EXT_image_implicit_sync_control
++#define EGL_EXT_image_implicit_sync_control 1
++#define EGL_IMPORT_SYNC_TYPE_EXT 0x3470
++#define EGL_IMPORT_IMPLICIT_SYNC_EXT 0x3471
++#define EGL_IMPORT_EXPLICIT_SYNC_EXT 0x3472
++#endif /* EGL_EXT_image_implicit_sync_control */
++
+ #if HAVE_VAAPI_X11
+ #include <va/va_x11.h>
+