git: 040e9e09916b - main - multimedia/gstreamer1-plugins: Fix build in the presence of libdrm

From: Thomas Zander <riggs_at_FreeBSD.org>
Date: Tue, 01 Nov 2022 23:24:46 UTC
The branch main has been updated by riggs:

URL: https://cgit.FreeBSD.org/ports/commit/?id=040e9e09916bc42675bb0d3aa94fee4787bb15c3

commit 040e9e09916bc42675bb0d3aa94fee4787bb15c3
Author:     Thomas Zander <riggs@FreeBSD.org>
AuthorDate: 2022-11-01 22:36:11 +0000
Commit:     Thomas Zander <riggs@FreeBSD.org>
CommitDate: 2022-11-01 23:24:41 +0000

    multimedia/gstreamer1-plugins: Fix build in the presence of libdrm
    
    PR:             267100
    Reported by:    rkoberman@gmail.com
---
 .../files/patch-ext_gl_meson.build                 | 15 ++++++++++--
 .../files/patch-gst-libs_gst_gl_meson.build        | 28 +++++++++++++++-------
 2 files changed, 33 insertions(+), 10 deletions(-)

diff --git a/multimedia/gstreamer1-plugins/files/patch-ext_gl_meson.build b/multimedia/gstreamer1-plugins/files/patch-ext_gl_meson.build
index 87e324d065c1..92e0bdc7bd5b 100644
--- a/multimedia/gstreamer1-plugins/files/patch-ext_gl_meson.build
+++ b/multimedia/gstreamer1-plugins/files/patch-ext_gl_meson.build
@@ -1,6 +1,17 @@
---- ext/gl/meson.build.orig	2022-09-09 09:05:31 UTC
+--- ext/gl/meson.build.orig	2022-06-15 22:36:22 UTC
 +++ ext/gl/meson.build
-@@ -146,7 +146,7 @@ gstopengl = library('gstopengl',
+@@ -116,10 +116,6 @@ if bcm_host_dep.found()
+   optional_deps += bcm_host_dep
+ endif
+ 
+-if egl_dep.found() and cc.has_header('libdrm/drm_fourcc.h')
+-  optional_deps += allocators_dep
+-endif
+-
+ if ['darwin', 'ios'].contains(host_system)
+   if not have_objc
+     error('No ObjC compiler found')
+@@ -146,7 +142,7 @@ gstopengl = library('gstopengl',
    objc_args : gst_plugins_base_args + gl_objc_args + extra_c_args,
    link_args : noseh_link_args,
    include_directories : [configinc],
diff --git a/multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_gl_meson.build b/multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_gl_meson.build
index e784c477c858..f8ef9876117d 100644
--- a/multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_gl_meson.build
+++ b/multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_gl_meson.build
@@ -1,6 +1,18 @@
---- gst-libs/gst/gl/meson.build.orig	2022-09-08 22:01:19 UTC
+--- gst-libs/gst/gl/meson.build.orig	2022-11-01 22:00:52 UTC
 +++ gst-libs/gst/gl/meson.build
-@@ -1049,7 +1049,7 @@ if build_gstgl
+@@ -554,11 +554,6 @@ if need_platform_egl != 'no'
+     gl_platform_deps += egl_dep
+     glconf.set('GST_GL_HAVE_PLATFORM_EGL', 1)
+ 
+-    if cc.has_header('libdrm/drm_fourcc.h')
+-      gl_misc_deps += allocators_dep
+-      glconf.set('GST_GL_HAVE_DMABUF', 1)
+-    endif
+-
+     egl_includes = '''
+ #include <EGL/egl.h>
+ #include <EGL/eglext.h>
+@@ -1049,7 +1044,7 @@ if build_gstgl
      soversion : soversion,
      darwin_versions : osxversion,
      install : true,
@@ -9,7 +21,7 @@
                      gl_lib_deps, gl_platform_deps, gl_winsys_deps, gl_misc_deps],
      # don't confuse EGL/egl.h with gst-libs/gl/egl/egl.h on case-insensitive file systems
      implicit_include_directories : false)
-@@ -1060,10 +1060,10 @@ if build_gstgl
+@@ -1060,10 +1055,10 @@ if build_gstgl
      'gl_apis=' + ' '.join(enabled_gl_apis),
    ]
  
@@ -22,7 +34,7 @@
      variables : pkgconfig_variables + pkgconfig_gl_variables,
      uninstalled_variables : pkgconfig_gl_variables,
      subdirs : pkgconfig_subdirs,
-@@ -1095,7 +1095,7 @@ if build_gstgl
+@@ -1095,7 +1090,7 @@ if build_gstgl
          'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'],
          'install' : true,
          'extra_args' : gir_init_section + ['--c-include=gst/gl/gl.h'],
@@ -31,7 +43,7 @@
      }
      library_def += {'gir': [gir]}
      if not static_build
-@@ -1107,7 +1107,7 @@ if build_gstgl
+@@ -1107,7 +1102,7 @@ if build_gstgl
    gstgl_dep = declare_dependency(link_with : gstgl,
      include_directories : [libsinc, compat_includes],
      sources: gen_sources,
@@ -40,7 +52,7 @@
    gstglproto_dep = declare_dependency(dependencies : [gstgl_dep] + gl_lib_deps)
    meson.override_dependency('gstreamer-gl-1.0', gstgl_dep)
    meson.override_dependency('gstreamer-gl-prototypes-1.0', gstglproto_dep)
-@@ -1134,7 +1134,7 @@ if build_gstgl
+@@ -1134,7 +1129,7 @@ if build_gstgl
          'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'],
          'install' : true,
          'extra_args' : gir_init_section + ['--c-include=gst/gl/x11/x11.h'],
@@ -49,7 +61,7 @@
        }
        gir_dict = gir + {'includes': gir['includes'] + ['GstGL-1.0']}
        libraries += [[pkg_name, {'gir': gir_dict}]]
-@@ -1170,7 +1170,7 @@ if build_gstgl
+@@ -1170,7 +1165,7 @@ if build_gstgl
          'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'],
          'install' : true,
          'extra_args' : gir_init_section + ['--c-include=gst/gl/wayland/wayland.h'],
@@ -58,7 +70,7 @@
        }
  
        gir_dict = gir + {'includes': gir['includes'] + ['GstGL-1.0']}
-@@ -1206,7 +1206,7 @@ if build_gstgl
+@@ -1206,7 +1201,7 @@ if build_gstgl
          'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'],
          'install' : true,
          'extra_args' : gir_init_section + ['--c-include=gst/gl/egl/egl.h'],