[MacPorts] #69640: webkit2-gtk: +x11 error: GStreamerGL is needed for USE_GSTREAMER_GL

MacPorts noreply at macports.org
Mon Apr 8 10:37:00 UTC 2024


#69640: webkit2-gtk: +x11 error: GStreamerGL is needed for USE_GSTREAMER_GL
-------------------------------------------------+-------------------------
  Reporter:  JonnyTech                           |      Owner:  dbevans
      Type:  defect                              |     Status:  assigned
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:  2.9.1
Resolution:                                      |   Keywords:  sonoma
      Port:  webkit2-gtk, gstreamer1-gst-        |
  plugins-base                                   |
-------------------------------------------------+-------------------------

Comment (by christophecvr):

 Replying to [comment:31 barracuda156]:
 > Replying to [comment:24 christophecvr]:

 > Automatic linking to whatever a build system happens to find is not a
 great behavior, IMO.
 > (This is not exclusive to meson though, of course.)

 Yea well that really depends on what. They did provide the opportunity to
 disable this behaviour which in some cases must be done in other case not.
 Here with opengl it is a not. When using nvidia graphics card gstreamer1
 must be build with opengl support as soon any applications needs to play
 video streams. gstreamer without opengl support is useless. Macos has his
 own opengl support. Also macos has is own checks on presence off all
 required functions. Yes when using x11 the functions in the libgstgl.dylib
 that we will build (most probably ?) for the applications using x11 will
 not be required.However they maybe present in the library and will not
 conflict at all. Even better actually the builded lib will be ok for x11
 and non x11 applications. Since the non x11 will use the cocoa related
 functions the x11 the x11 related functions. The macos test when building
 checks for all required functions and does not botter if it is x11 or
 cocoa. So for gstreamer1 plugins base the portfile just need a little
 change. below how the portfile should be.


 {{{
 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c
 -basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

 PortSystem          1.0
 PortGroup           compiler_blacklist_versions 1.0
 PortGroup           gobject_introspection 1.0
 PortGroup           meson 1.0

 # https://bugzilla.gnome.org/show_bug.cgi?id=636134
 PortGroup           muniversal 1.0

 name                gstreamer1-gst-plugins-base
 set my_name         gst-plugins-base
 # please only commit stable updates (even numbered releases)
 version             1.24.1
 revision            0
 description         This is gst-plugins, a set of plug-ins for GStreamer.
 long_description    ${description}
 maintainers         nomaintainer
 categories          gnome
 license             LGPL-2+
 homepage
 https://gstreamer.freedesktop.org/modules/${my_name}.html
 master_sites        https://gstreamer.freedesktop.org/src/${my_name}/
 distname            ${my_name}-${version}
 use_xz              yes

 checksums           rmd160  2b6ab7dd6e5a5301b0f020d05628f7348337a41e \
                     sha256
 884045d1d7c5d6bb8605e45c7ee0e9f1341888e81c2b7c42dff52bb98ede8ec3 \
                     size    2418392

 set py_ver          3.12
 set py_ver_nodot    [string map {. {}} ${py_ver}]
 set python.bin      ${prefix}/bin/python${py_ver}

 depends_build-append \
                     port:gtk-doc \
                     port:pkgconfig \
                     port:python${py_ver_nodot}

 depends_lib-append  path:lib/pkgconfig/gobject-introspection-1.0.pc
 :gobject-introspection \
                     port:graphene \
                     port:gstreamer1 \
                     path:include/turbojpeg.h:libjpeg-turbo \
                     port:libopus \
                     port:libpng \
                     port:orc \
                     path:lib/pkgconfig/pango.pc:pango \
                     port:zlib

 # Embedded systems are not our primary target, so disable OpenGL|ES
 support.
 configure.args-append \
                     -Dalsa=disabled \
                     -Dcdparanoia=disabled \
                     -Dexamples=disabled \
                     -Dgl-graphene=enabled \
                     -Dlibvisual=disabled \
                     -Dnls=disabled \
                     -Dogg=disabled \
                     -Dqt5=disabled \
                     -Dtheora=disabled \
                     -Dvorbis=disabled \
                     -Dx11=disabled \
                     -Dxshm=disabled \
                     -Dxvideo=disabled

 # gstbasetextoverlay.c:1511: error: 'for' loop initial declaration used
 outside C99 mode
 configure.cflags-append -std=c99

 # gst-libs/gst/gl/gstgldebug.h:28: error: redefinition of typedef
 ‘GstGLAsyncDebug’
 compiler.blacklist-append *gcc-3.* *gcc-4.* clang

 post-patch {
     reinplace "s|/usr/bin/env python3|${python.bin}|" \
         ${worksrcpath}/scripts/extract-release-date-from-doap-file.py \
         ${worksrcpath}/scripts/dist-translations.py \
         ${worksrcpath}/scripts/meson-pkg-config-file-fixup.py \
         ${worksrcpath}/scripts/update-orc-dist-files.py \
         ${worksrcpath}/gst-libs/gst/gl/gl_mkenum.py
 }

 variant x11 {
     depends_lib-append \
                     port:mesa \
                     port:xorg-libX11 \
                     port:xorg-libXext \
                     port:xorg-libXv
     configure.args-replace \
                     -Dx11=disabled \
                     -Dx11=enabled \
                     -Dxshm=disabled \
                     -Dxshm=enabled \
                     -Dxvideo=disabled \
                     -Dxvideo=enabled
 }

 variant ogg description {Build with support for libogg, libvorbis,
 libtheora} {
     depends_lib-append \
                     port:libogg \
                     port:libtheora \
                     port:libvorbis
     configure.args-replace \
                     -Dogg=disabled \
                     -Dogg=enabled \
                     -Dtheora=disabled \
                     -Dtheora=enabled \
                     -Dvorbis=disabled \
                     -Dvorbis=enabled
 }

 variant cdparanoia description {Enable (currently broken) cdparanoia
 plugin} {
     depends_lib-append \
                     port:cdparanoia
     configure.args-replace \
                     -Dcdparanoia=disabled \
                     -Dcdparanoia=enabled
 }

 # Prefer X11 implementation.
 default_variants    +ogg +x11

 gobject_introspection yes

 # Cocoa-GL
 # Only enable on OS X 10.9 or later, if the x11 variant is not enabled.
 # Requires ARC (automatic reference counting, a clang feature enabled
 # by -fobjc-arc), which was not supported when targeting the legacy
 fragile
 # Objective-C runtime used on 32-bit x86 until Xcode 7.3 / clang 3.9
 # (https://llvm.org/viewvc/llvm-project?view=revision&revision=250955).
 # If building universal or for i386 then ensure that a sufficiently recent
 # version of clang is used, since the Xcode clang may be too old.
 platform macosx {
     if {![variant_isset x11] && ${os.major} >= 13} {
         if {(${universal_possible} && [variant_isset universal]) ||
 ${build_arch} eq "i386"} {
             compiler.blacklist-append *gcc* {macports-clang-3.[0-8]}
 {clang < 703}
         }
         configure.args-append \
                     -Dgl_winsys=cocoa
     }
 }

 test.run            yes
 test.target         check

 livecheck.type      regex
 livecheck.name      ${my_name}
 livecheck.url       ${master_sites}
 livecheck.regex
 "${my_name}-(\\d+\\\.\\d*\[02468\](?:\\.\\d+)*)${extract.suffix}"
 }}}

 I removed the opengl enabled disabled as this is a required library on
 nvidia graphic cards in all circumstances. For video playing.
 p.s. for mac hardware who are using the metal graphic cards they are using
 something else then opengl or ... well if i'm not wrong meson will sort
 this out. (unless it is mac only hardware).

 Then I left in the last part (without) x11 build and use, I did not test
 it but I do not think that this rule in this case is needed.
 Almost shure when building without i386 support that the rule I left


 {{{
 platform macosx {
     if {![variant_isset x11] && ${os.major} >= 13} {
         if {(${universal_possible} && [variant_isset universal]) ||
 ${build_arch} eq "i386"} {
             compiler.blacklist-append *gcc* {macports-clang-3.[0-8]}
 {clang < 703}
         }
         configure.args-append \
                     -Dgl_winsys=cocoa
     }
 }
 }}}
  -Dgl_winsys=cocoa maybe removed.

 Maybe it is required for i386 build arch but then it just needed to be
 moved one stage up.
 (p.s. I added the mac ports introspection to it like mentioned by was it
 dbevans or ? in a other ticket) But to be honest yes anyway a
 introspection is enabled but by using the PortGroup gobject_introspection
 1.0 there are a little extra adds who should be added. If they are really
 added I don't. (I well also used gobject_introspection yes that is
 required in that PortGroup) It will also enable the introspection in meson
 (change from auto into enabled) .

-- 
Ticket URL: <https://trac.macports.org/ticket/69640#comment:32>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list