All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs
@ 2018-07-19 10:07 Carlos Rafael Giani
  2018-07-19 10:07 ` [PATCH v2 2/6] gstreamer1.0-plugin-good: " Carlos Rafael Giani
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Carlos Rafael Giani @ 2018-07-19 10:07 UTC (permalink / raw)
  To: openembedded-core

* Add patches for gbm, libpng, libjpeg to conditionally enable/disable
  them in the configure script
* There is no libvisual recipe in oe-core or in meta-openembedded, so
  the visual packageconfig needs to go
* Reorder the packageconfigs alphabetically

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
---
 ...r-explicitely-enabling-disabling-GBM.patch |  70 ++++++++++++
 ...for-explicitely-enabling-disabling-P.patch | 107 ++++++++++++++++++
 .../gstreamer1.0-plugins-base_1.14.1.bb       |  29 +++--
 3 files changed, 196 insertions(+), 10 deletions(-)
 create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch
 create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch
new file mode 100644
index 0000000000..79e0b78aaf
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch
@@ -0,0 +1,70 @@
+From 7f93afc497010384da9f9d15163c31a862bd1dfa Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani <dv@pseudoterminal.org>
+Date: Thu, 19 Jul 2018 10:30:54 +0200
+Subject: [PATCH 10/11] gl: Add switch for explicitely enabling/disabling GBM
+ support
+
+https://bugzilla.gnome.org/show_bug.cgi?id=796833
+---
+ m4/gst-gl.m4 | 38 +++++++++++++++++++++++++++++---------
+ 1 file changed, 29 insertions(+), 9 deletions(-)
+
+diff --git a/m4/gst-gl.m4 b/m4/gst-gl.m4
+index 1e9724094..20b2233de 100644
+--- a/m4/gst-gl.m4
++++ b/m4/gst-gl.m4
+@@ -117,6 +117,15 @@ AC_ARG_ENABLE([dispmanx],
+        *) AC_MSG_ERROR([bad value ${enableval} for --enable-dispmanx]) ;;
+      esac],[NEED_DISPMANX=auto])
+ 
++AC_ARG_ENABLE([gbm],
++     [  --enable-gbm        Enable Mesa3D GBM support (requires EGL) @<:@default=auto@:>@],
++     [case "${enableval}" in
++       yes)  NEED_GBM=yes ;;
++       no)   NEED_GBM=no ;;
++       auto) NEED_GBM=auto ;;
++       *) AC_MSG_ERROR([bad value ${enableval} for --enable-gbm]) ;;
++     esac],[NEED_GBM=auto])
++
+ AG_GST_PKG_CHECK_MODULES(X11_XCB, x11-xcb)
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LIBS="$LIBS"
+@@ -172,15 +181,26 @@ case $host in
+         AC_CHECK_LIB([EGL], [fbGetDisplay], [HAVE_VIV_FB_EGL=yes])
+     fi
+ 
+-    if test "x$HAVE_EGL" = "xyes"; then
+-        PKG_CHECK_MODULES(DRM, libdrm >= 2.4.55, HAVE_DRM=yes, HAVE_DRM=no)
+-        AC_SUBST(DRM_CFLAGS)
+-        AC_SUBST(DRM_LIBS)
+-        if test "x$HAVE_DRM" = "xyes" -a "x$HAVE_GUDEV" = "xyes"; then
+-          PKG_CHECK_MODULES(GBM, gbm, HAVE_GBM_EGL=yes, HAVE_GBM_EGL=no)
+-          AC_SUBST(GBM_CFLAGS)
+-          AC_SUBST(GBM_LIBS)
+-       fi
++    if test "x$HAVE_EGL" = "xyes" -a "x$NEED_GBM" != "xno"; then
++      PKG_CHECK_MODULES(DRM, libdrm >= 2.4.55, HAVE_DRM=yes, HAVE_DRM=no)
++      AC_SUBST(DRM_CFLAGS)
++      AC_SUBST(DRM_LIBS)
++      if test "x$NEED_GBM" = "xyes"; then
++        if test "x$HAVE_DRM" = "xno"; then
++          AC_MSG_ERROR([GBM support requested but libdrm is not available])
++        fi
++        if test "x$HAVE_GUDEV" = "xno"; then
++          AC_MSG_ERROR([GBM support requested but gudev is not available])
++        fi
++      fi
++      if test "x$HAVE_DRM" = "xyes" -a "x$HAVE_GUDEV" = "xyes"; then
++        PKG_CHECK_MODULES(GBM, gbm, HAVE_GBM_EGL=yes, HAVE_GBM_EGL=no)
++        if test "x$HAVE_GBM_EGL" = "xno" -a "x$NEED_GBM" = "xyes"; then
++          AC_MSG_ERROR([GBM support requested but gbm library is not available])
++        fi
++        AC_SUBST(GBM_CFLAGS)
++        AC_SUBST(GBM_LIBS)
++      fi
+     fi
+ 
+     dnl FIXME: Mali EGL depends on GLESv1 or GLESv2
+-- 
+2.17.1
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch
new file mode 100644
index 0000000000..3e22332dab
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch
@@ -0,0 +1,107 @@
+From 092aadfc1df69c46d920b0cd39f98d363d6988b3 Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani <dv@pseudoterminal.org>
+Date: Thu, 19 Jul 2018 11:16:05 +0200
+Subject: [PATCH 11/11] gl: Add switches for explicitely enabling/disabling PNG
+ and JPEG support
+
+https://bugzilla.gnome.org/show_bug.cgi?id=796833
+---
+ m4/gst-gl.m4 | 66 ++++++++++++++++++++++++++++++++++++----------------
+ 1 file changed, 46 insertions(+), 20 deletions(-)
+
+diff --git a/m4/gst-gl.m4 b/m4/gst-gl.m4
+index 20b2233de..f8809981c 100644
+--- a/m4/gst-gl.m4
++++ b/m4/gst-gl.m4
+@@ -126,6 +126,24 @@ AC_ARG_ENABLE([gbm],
+        *) AC_MSG_ERROR([bad value ${enableval} for --enable-gbm]) ;;
+      esac],[NEED_GBM=auto])
+ 
++AC_ARG_ENABLE([png],
++     [  --enable-png        Enable libpng support @<:@default=auto@:>@],
++     [case "${enableval}" in
++       yes)  NEED_PNG=yes ;;
++       no)   NEED_PNG=no ;;
++       auto) NEED_PNG=auto ;;
++       *) AC_MSG_ERROR([bad value ${enableval} for --enable-png]) ;;
++     esac],[NEED_PNG=auto])
++
++AC_ARG_ENABLE([jpeg],
++     [  --enable-jpeg        Enable libjpeg support @<:@default=auto@:>@],
++     [case "${enableval}" in
++       yes)  NEED_JPEG=yes ;;
++       no)   NEED_JPEG=no ;;
++       auto) NEED_JPEG=auto ;;
++       *) AC_MSG_ERROR([bad value ${enableval} for --enable-jpeg]) ;;
++     esac],[NEED_JPEG=auto])
++
+ AG_GST_PKG_CHECK_MODULES(X11_XCB, x11-xcb)
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LIBS="$LIBS"
+@@ -1043,9 +1061,13 @@ dnl Needed by plugins that use g_module_*() API
+ PKG_CHECK_MODULES(GMODULE_NO_EXPORT, gmodule-no-export-2.0)
+ 
+ dnl libpng is optional
+-PKG_CHECK_MODULES(LIBPNG, libpng >= 1.0, HAVE_PNG=yes, HAVE_PNG=no)
+-if test "x$HAVE_PNG" = "xyes"; then
+-  AC_DEFINE(HAVE_PNG, [1] , [Use libpng])
++if test "x$NEED_PNG" != "xno"; then
++  PKG_CHECK_MODULES(LIBPNG, libpng >= 1.0, HAVE_PNG=yes, HAVE_PNG=no)
++  if test "x$HAVE_PNG" = "xyes"; then
++    AC_DEFINE(HAVE_PNG, [1] , [Use libpng])
++  elif test "x$NEED_PNG" = "xyes"; then
++    AC_MSG_ERROR([libpng support requested but libpng is not available])
++  fi
+ fi
+ AC_SUBST(HAVE_PNG)
+ AC_SUBST(LIBPNG_LIBS)
+@@ -1053,25 +1075,29 @@ AC_SUBST(LIBPNG_CFLAGS)
+ 
+ dnl libjpeg is optional
+ AC_ARG_WITH(jpeg-mmx, [  --with-jpeg-mmx, path to MMX'ified JPEG library])
+-OLD_LIBS="$LIBS"
+-if test x$with_jpeg_mmx != x; then
+-  LIBS="$LIBS -L$with_jpeg_mmx"
+-fi
+-AC_CHECK_LIB(jpeg-mmx, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
+-JPEG_LIBS="$LIBS -ljpeg-mmx"
+-LIBS="$OLD_LIBS"
+-if test x$HAVE_JPEG != xyes; then
+-  JPEG_LIBS="-ljpeg"
+-  AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
+-fi
++if test "x$NEED_JPEG" != "xno"; then
++  OLD_LIBS="$LIBS"
++  if test x$with_jpeg_mmx != x; then
++    LIBS="$LIBS -L$with_jpeg_mmx"
++  fi
++  AC_CHECK_LIB(jpeg-mmx, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
++  JPEG_LIBS="$LIBS -ljpeg-mmx"
++  LIBS="$OLD_LIBS"
++  if test x$HAVE_JPEG != xyes; then
++    JPEG_LIBS="-ljpeg"
++    AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
++  fi
+ 
+-if test x$HAVE_JPEG = xyes; then
+-  AC_DEFINE(HAVE_JPEG, [1], [Use libjpeg])
+-else
+-  JPEG_LIBS=
++  if test x$HAVE_JPEG = xyes; then
++    AC_DEFINE(HAVE_JPEG, [1], [Use libjpeg])
++  elif test "x$NEED_JPEG" = "xyes"; then
++    AC_MSG_ERROR([libjpeg support requested but libjpeg is not available])
++  else
++    JPEG_LIBS=
++  fi
++  AC_SUBST(JPEG_LIBS)
++  AC_SUBST(HAVE_JPEG)
+ fi
+-AC_SUBST(JPEG_LIBS)
+-AC_SUBST(HAVE_JPEG)
+ ])
+ 
+ dnl --------------------------------------------------------------------------
+-- 
+2.17.1
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.1.bb
index 8d7d3c6192..a848fa0e01 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.1.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.1.bb
@@ -17,6 +17,8 @@ SRC_URI = " \
             file://0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch \
             file://0009-glimagesink-Downrank-to-marginal.patch \
             file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
+            file://0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch \
+            file://0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch \
             file://link-with-libvchostif.patch \
             "
 SRC_URI[md5sum] = "c42154ab6f85c59f0e449d8d7e290342"
@@ -30,12 +32,15 @@ inherit gettext
 
 PACKAGES_DYNAMIC =+ "^libgst.*"
 
+# opengl packageconfig factored out to make it easy for distros
+# and BSP layers to pick either (desktop) opengl, gles2, or no GL
 PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
+
 PACKAGECONFIG ??= " \
     ${GSTREAMER_ORC} \
-    ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \
-    gio-unix-2.0 ogg pango theora vorbis zlib jpeg \
     ${PACKAGECONFIG_GL} \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \
+    gio-unix-2.0 jpeg ogg pango png theora vorbis zlib \
     ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
 "
 
@@ -45,26 +50,30 @@ X11DISABLEOPTS = "--disable-x --disable-xvideo --disable-xshm"
 
 PACKAGECONFIG[alsa]         = "--enable-alsa,--disable-alsa,alsa-lib"
 PACKAGECONFIG[cdparanoia]   = "--enable-cdparanoia,--disable-cdparanoia,cdparanoia"
+PACKAGECONFIG[egl]          = "--enable-egl,--disable-egl,virtual/egl"
+PACKAGECONFIG[gbm]          = "--enable-gbm,--disable-gbm,virtual/libgbm libgudev libdrm"
 PACKAGECONFIG[gio-unix-2.0] = "--enable-gio_unix_2_0,--disable-gio_unix_2_0,glib-2.0"
+PACKAGECONFIG[gles2]        = "--enable-gles2,--disable-gles2,virtual/libgles2"
 PACKAGECONFIG[ivorbis]      = "--enable-ivorbis,--disable-ivorbis,tremor"
+PACKAGECONFIG[jpeg]         = "--enable-jpeg,--disable-jpeg,jpeg"
 PACKAGECONFIG[ogg]          = "--enable-ogg,--disable-ogg,libogg"
+PACKAGECONFIG[opengl]       = "--enable-opengl,--disable-opengl,virtual/libgl libglu"
 PACKAGECONFIG[opus]         = "--enable-opus,--disable-opus,libopus"
 PACKAGECONFIG[pango]        = "--enable-pango,--disable-pango,pango"
+PACKAGECONFIG[png]          = "--enable-png,--disable-png,libpng"
 PACKAGECONFIG[theora]       = "--enable-theora,--disable-theora,libtheora"
-PACKAGECONFIG[visual]       = "--enable-libvisual,--disable-libvisual,libvisual"
 PACKAGECONFIG[vorbis]       = "--enable-vorbis,--disable-vorbis,libvorbis"
 PACKAGECONFIG[x11]          = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
-PACKAGECONFIG[zlib]         = "--enable-zlib,--disable-zlib,zlib"
-PACKAGECONFIG[opengl]       = "--enable-opengl,--disable-opengl,virtual/libgl libglu"
-PACKAGECONFIG[gles2]        = "--enable-gles2,--disable-gles2,virtual/libgles2"
-PACKAGECONFIG[egl]          = "--enable-egl,--disable-egl,virtual/egl"
 PACKAGECONFIG[wayland]      = "--enable-wayland,--disable-wayland,wayland-native wayland wayland-protocols libdrm"
-PACKAGECONFIG[jpeg]         = ",,jpeg"
+PACKAGECONFIG[zlib]         = "--enable-zlib,--disable-zlib,zlib"
+
+EXTRA_OECONF += " \
+    --disable-libvisual \
+"
 
+FILES_${PN}-dev += "${libdir}/gstreamer-${LIBV}/include/gst/gl/gstglconfig.h"
 FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict"
 
 do_compile_prepend() {
         export GIR_EXTRA_LIBS_PATH="${B}/gst-libs/gst/tag/.libs:${B}/gst-libs/gst/video/.libs:${B}/gst-libs/gst/audio/.libs:${B}/gst-libs/gst/rtp/.libs:${B}/gst-libs/gst/allocators/.libs"
 }
-
-FILES_${PN}-dev += "${libdir}/gstreamer-${LIBV}/include/gst/gl/gstglconfig.h"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 2/6] gstreamer1.0-plugin-good: Update packageconfigs
  2018-07-19 10:07 [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs Carlos Rafael Giani
@ 2018-07-19 10:07 ` Carlos Rafael Giani
  2018-07-19 10:07 ` [PATCH v2 3/6] gstreamer1.0-plugin-bad: " Carlos Rafael Giani
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Carlos Rafael Giani @ 2018-07-19 10:07 UTC (permalink / raw)
  To: openembedded-core

* There is no twolame recipe in oe-core or in meta-openembedded, so
  disable it
* Reorder the packageconfigs alphabetically

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
---
 .../gstreamer/gstreamer1.0-plugins-good_1.14.1.bb   | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.1.bb
index 36eb3107ae..beae43f915 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.1.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.1.bb
@@ -28,20 +28,24 @@ PACKAGECONFIG ??= " \
     ${GSTREAMER_ORC} \
     ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio x11', d)} \
     ${@bb.utils.contains_any('DISTRO_FEATURES', d.getVar('GTK3DISTROFEATURES'), 'gtk', '', d)} \
-    cairo flac gdk-pixbuf gudev jpeg libpng soup speex taglib v4l2 bz2 zlib mpg123 lame \
+    bz2 cairo flac gdk-pixbuf gudev jpeg lame libpng mpg123 soup speex taglib v4l2 zlib \
 "
 
 X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage"
 
+PACKAGECONFIG[bz2]        = "--enable-bz2,--disable-bz2,bzip2"
 PACKAGECONFIG[cairo]      = "--enable-cairo,--disable-cairo,cairo"
 PACKAGECONFIG[dv1394]     = "--enable-dv1394,--disable-dv1394,libiec61883 libavc1394 libraw1394"
 PACKAGECONFIG[flac]       = "--enable-flac,--disable-flac,flac"
 PACKAGECONFIG[gdk-pixbuf] = "--enable-gdk_pixbuf,--disable-gdk_pixbuf,gdk-pixbuf"
+PACKAGECONFIG[gtk]        = "--enable-gtk3,--disable-gtk3,gtk+3"
 PACKAGECONFIG[gudev]      = "--with-gudev,--without-gudev,libgudev"
 PACKAGECONFIG[jack]       = "--enable-jack,--disable-jack,jack"
 PACKAGECONFIG[jpeg]       = "--enable-jpeg,--disable-jpeg,jpeg"
+PACKAGECONFIG[lame]       = "--enable-lame,--disable-lame,lame"
 PACKAGECONFIG[libpng]     = "--enable-libpng,--disable-libpng,libpng"
 PACKAGECONFIG[libv4l2]    = "--with-libv4l2,--without-libv4l2,v4l-utils"
+PACKAGECONFIG[mpg123]     = "--enable-mpg123,--disable-mpg123,mpg123"
 PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio"
 PACKAGECONFIG[soup]       = "--enable-soup,--disable-soup,libsoup-2.4"
 PACKAGECONFIG[speex]      = "--enable-speex,--disable-speex,speex"
@@ -50,11 +54,7 @@ PACKAGECONFIG[v4l2]       = "--enable-gst_v4l2 --enable-v4l2-probe,--disable-gst
 PACKAGECONFIG[vpx]        = "--enable-vpx,--disable-vpx,libvpx"
 PACKAGECONFIG[wavpack]    = "--enable-wavpack,--disable-wavpack,wavpack"
 PACKAGECONFIG[x11]        = "--enable-x,--disable-x,${X11DEPENDS}"
-PACKAGECONFIG[bz2]        = "--enable-bz2,--disable-bz2,bzip2"
 PACKAGECONFIG[zlib]       = "--enable-zlib,--disable-zlib,zlib"
-PACKAGECONFIG[lame]       = "--enable-lame,--disable-lame,lame"
-PACKAGECONFIG[mpg123]     = "--enable-mpg123,--disable-mpg123,mpg123"
-PACKAGECONFIG[gtk]        = "--enable-gtk3,--disable-gtk3,gtk+3"
 
 # qt5 support is disabled, because it is not present in OE core, and requires more work than
 # just adding a packageconfig (it requires access to moc, uic, rcc, and qmake paths).
@@ -71,9 +71,10 @@ EXTRA_OECONF += " \
     --disable-oss4 \
     --disable-osx_audio \
     --disable-osx_video \
+    --disable-qt \
     --disable-shout2 \
+    --disable-twolame \
     --disable-waveform \
-    --disable-qt \
 "
 
 FILES_${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 3/6] gstreamer1.0-plugin-bad: Update packageconfigs
  2018-07-19 10:07 [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs Carlos Rafael Giani
  2018-07-19 10:07 ` [PATCH v2 2/6] gstreamer1.0-plugin-good: " Carlos Rafael Giani
@ 2018-07-19 10:07 ` Carlos Rafael Giani
  2018-07-19 10:07 ` [PATCH v2 4/6] gstreamer1.0-vaapi: Remove unnecessary FILESPATH modification Carlos Rafael Giani
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Carlos Rafael Giani @ 2018-07-19 10:07 UTC (permalink / raw)
  To: openembedded-core

* Add packageconfigs for gl, libde265, lcms2, openh264, tinyalsa, ttml,
  webrtc, webrtcdsp
* Add note about neon being dead (and --disable-neon config switch)
* Remove unnecessary gstglconfig.h line, since that file is no longer
  part of -bad (it is in -base now)
* Update EXTRA_OECONF flags, since new plugins got added to -bad
* Add ttml to the default packageconfigs since its dependencies are
  all in oe-core
---
 .../gstreamer1.0-plugins-bad_1.14.1.bb        | 35 ++++++++++++++-----
 1 file changed, 26 insertions(+), 9 deletions(-)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.1.bb
index 0e477e5a9c..721df60b8d 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.1.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.1.bb
@@ -27,9 +27,14 @@ PACKAGECONFIG ??= " \
     ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
     ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
-    bz2 curl dash dtls hls rsvg sbc smoothstreaming sndfile uvch264 webp \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \
+    bz2 curl dash dtls hls rsvg sbc smoothstreaming sndfile ttml uvch264 webp \
 "
 
+# the gl packageconfig enables OpenGL elements that haven't been ported
+# to -base yet. They depend on the gstgl library in -base, so we do
+# not add GL dependencies here, since these are taken care of in -base.
+
 PACKAGECONFIG[assrender]       = "--enable-assrender,--disable-assrender,libass"
 PACKAGECONFIG[bluez]           = "--enable-bluez,--disable-bluez,${BLUEZ}"
 PACKAGECONFIG[bz2]             = "--enable-bz2,--disable-bz2,bzip2"
@@ -43,13 +48,17 @@ PACKAGECONFIG[faad]            = "--enable-faad,--disable-faad,faad2"
 PACKAGECONFIG[flite]           = "--enable-flite,--disable-flite,flite-alsa"
 PACKAGECONFIG[fluidsynth]      = "--enable-fluidsynth,--disable-fluidsynth,fluidsynth"
 PACKAGECONFIG[hls]             = "--enable-hls --with-hls-crypto=nettle,--disable-hls,nettle"
+PACKAGECONFIG[gl]              = "--enable-gl,--disable-gl,"
 PACKAGECONFIG[kms]             = "--enable-kms,--disable-kms,libdrm"
+PACKAGECONFIG[libde265]        = "--enable-libde265,--disable-libde265,libde265"
 PACKAGECONFIG[libmms]          = "--enable-libmms,--disable-libmms,libmms"
 PACKAGECONFIG[libssh2]         = "--enable-libssh2,--disable-libssh2,libssh2"
+PACKAGECONFIG[lcms2]           = "--enable-lcms2,--disable-lcms2,lcms"
 PACKAGECONFIG[modplug]         = "--enable-modplug,--disable-modplug,libmodplug"
 PACKAGECONFIG[neon]            = "--enable-neon,--disable-neon,neon"
 PACKAGECONFIG[openal]          = "--enable-openal,--disable-openal,openal-soft"
 PACKAGECONFIG[opencv]          = "--enable-opencv,--disable-opencv,opencv"
+PACKAGECONFIG[openh264]        = "--enable-openh264,--disable-openh264,openh264"
 PACKAGECONFIG[openjpeg]        = "--enable-openjpeg,--disable-openjpeg,openjpeg"
 # the opus encoder/decoder elements are now in the -base package,
 # but the opus parser remains in -bad
@@ -61,28 +70,38 @@ PACKAGECONFIG[sbc]             = "--enable-sbc,--disable-sbc,sbc"
 PACKAGECONFIG[smoothstreaming] = "--enable-smoothstreaming,--disable-smoothstreaming,libxml2"
 PACKAGECONFIG[sndfile]         = "--enable-sndfile,--disable-sndfile,libsndfile1"
 PACKAGECONFIG[srtp]            = "--enable-srtp,--disable-srtp,libsrtp"
+PACKAGECONFIG[tinyalsa]        = "--enable-tinyalsa,--disable-tinyalsa,tinyalsa"
+PACKAGECONFIG[ttml]            = "--enable-ttml,--disable-ttml,libxml2 pango cairo"
 PACKAGECONFIG[uvch264]         = "--enable-uvch264,--disable-uvch264,libusb1 libgudev"
 PACKAGECONFIG[voaacenc]        = "--enable-voaacenc,--disable-voaacenc,vo-aacenc"
 PACKAGECONFIG[voamrwbenc]      = "--enable-voamrwbenc,--disable-voamrwbenc,vo-amrwbenc"
 PACKAGECONFIG[vulkan]          = "--enable-vulkan,--disable-vulkan,vulkan"
 PACKAGECONFIG[wayland]         = "--enable-wayland,--disable-wayland,wayland-native wayland wayland-protocols libdrm"
 PACKAGECONFIG[webp]            = "--enable-webp,--disable-webp,libwebp"
+PACKAGECONFIG[webrtc]          = "--enable-webrtc,--disable-webrtc,libnice"
+PACKAGECONFIG[webrtcdsp]       = "--enable-webrtcdsp,--disable-webrtcdsp,webrtc-audio-processing"
 
 # these plugins have no corresponding library in OE-core or meta-openembedded:
 #   openni2 winks direct3d directsound winscreencap acm apple_media iqa
-#   android_media avc bs2b chromaprint daala dts fdkaac gme gsm kate ladspa libde265
-#   lv2 mpeg2enc mplex msdk musepack nvenc ofa openh264 opensles soundtouch spandsp
-#   spc teletextdec tinyalsa vdpau wasapi x265 zbar webrtcdsp
+#   android_media avc bs2b chromaprint daala dts fdkaac gme gsm kate ladspa
+#   lv2 mpeg2enc mplex msdk musepack nvenc ofa openmpt opensles soundtouch
+#   spandsp spc teletextdec vdpau wasapi x265 zbar
+
+# these plugins have been removed from oe-core because their upstream dependencies
+# are no longer maintained or available:
+#   neon
 
 EXTRA_OECONF += " \
     --enable-decklink \
     --enable-dvb \
     --enable-fbdev \
+    --enable-ipcpipeline \
     --enable-netsim \
     --enable-shm \
     --enable-vcd \
     --disable-acm \
     --disable-android_media \
+    --disable-aom \
     --disable-apple_media \
     --disable-avc \
     --disable-bs2b \
@@ -97,26 +116,25 @@ EXTRA_OECONF += " \
     --disable-iqa \
     --disable-kate \
     --disable-ladspa \
-    --disable-libde265 \
     --disable-lv2 \
     --disable-mpeg2enc \
     --disable-mplex \
     --disable-msdk \
     --disable-musepack \
+    --disable-neon \
     --disable-nvenc \
     --disable-ofa \
     --disable-openexr \
-    --disable-openh264 \
+    --disable-openmpt \
     --disable-openni2 \
     --disable-opensles \
     --disable-soundtouch \
     --disable-spandsp \
     --disable-spc \
+    --disable-srt \
     --disable-teletextdec \
-    --disable-tinyalsa \
     --disable-vdpau \
     --disable-wasapi \
-    --disable-webrtcdsp \
     --disable-wildmidi \
     --disable-winks \
     --disable-winscreencap \
@@ -130,7 +148,6 @@ export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}"
 ARM_INSTRUCTION_SET_armv4 = "arm"
 ARM_INSTRUCTION_SET_armv5 = "arm"
 
-FILES_${PN}-dev += "${libdir}/gstreamer-${LIBV}/include/gst/gl/gstglconfig.h"
 FILES_${PN}-freeverb += "${datadir}/gstreamer-${LIBV}/presets/GstFreeverb.prs"
 FILES_${PN}-opencv += "${datadir}/gst-plugins-bad/${LIBV}/opencv*"
 FILES_${PN}-voamrwbenc += "${datadir}/gstreamer-${LIBV}/presets/GstVoAmrwbEnc.prs"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 4/6] gstreamer1.0-vaapi: Remove unnecessary FILESPATH modification
  2018-07-19 10:07 [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs Carlos Rafael Giani
  2018-07-19 10:07 ` [PATCH v2 2/6] gstreamer1.0-plugin-good: " Carlos Rafael Giani
  2018-07-19 10:07 ` [PATCH v2 3/6] gstreamer1.0-plugin-bad: " Carlos Rafael Giani
@ 2018-07-19 10:07 ` Carlos Rafael Giani
  2018-07-19 10:07 ` [PATCH v2 5/6] gstreamer1.0-vaapi: Add patch for EGL CFLAGS for proper EGL support Carlos Rafael Giani
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Carlos Rafael Giani @ 2018-07-19 10:07 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
---
 meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.14.1.bb | 1 -
 1 file changed, 1 deletion(-)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.14.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.14.1.bb
index 906dc6e6c4..e647458fab 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.14.1.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.14.1.bb
@@ -4,7 +4,6 @@ based plugins for GStreamer and helper libraries: `vaapidecode', \
 `vaapiconvert', and `vaapisink'."
 
 REALPN = "gstreamer-vaapi"
-FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${REALPN}", "${FILE_DIRNAME}/${REALPN}"], d)}"
 
 LICENSE = "LGPLv2.1+"
 LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 5/6] gstreamer1.0-vaapi: Add patch for EGL CFLAGS for proper EGL support
  2018-07-19 10:07 [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs Carlos Rafael Giani
                   ` (2 preceding siblings ...)
  2018-07-19 10:07 ` [PATCH v2 4/6] gstreamer1.0-vaapi: Remove unnecessary FILESPATH modification Carlos Rafael Giani
@ 2018-07-19 10:07 ` Carlos Rafael Giani
  2018-07-19 10:07 ` [PATCH v2 6/6] gstreamer1.0-libav: Replace German umlaut to avoid parsing problems Carlos Rafael Giani
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Carlos Rafael Giani @ 2018-07-19 10:07 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
---
 ...le.am-Add-EGL_CFLAGS-to-libgstvaapi-.patch | 33 +++++++++++++++++++
 .../gstreamer/gstreamer1.0-vaapi_1.14.1.bb    |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-gst-vaapi-Makefile.am-Add-EGL_CFLAGS-to-libgstvaapi-.patch

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-gst-vaapi-Makefile.am-Add-EGL_CFLAGS-to-libgstvaapi-.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-gst-vaapi-Makefile.am-Add-EGL_CFLAGS-to-libgstvaapi-.patch
new file mode 100644
index 0000000000..d7b8984953
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-gst-vaapi-Makefile.am-Add-EGL_CFLAGS-to-libgstvaapi-.patch
@@ -0,0 +1,33 @@
+From 5403a89e6a7ac72a23e0221075c0c19b5f85a021 Mon Sep 17 00:00:00 2001
+From: Fabio Berton <fabio.berton@ossystems.com.br>
+Date: Wed, 13 Jun 2018 09:09:25 -0300
+Subject: [PATCH] gst/vaapi/Makefile.am: Add EGL_CFLAGS to libgstvaapi CFLAGS
+Organization: O.S. Systems Software LTDA.
+
+We need this to pass correctly EGL CFLAGS when building with EGL support.
+
+Upstream-Status: Pending
+
+Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
+---
+ gst/vaapi/Makefile.am | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/gst/vaapi/Makefile.am b/gst/vaapi/Makefile.am
+index b299ac98..d6cab71f 100644
+--- a/gst/vaapi/Makefile.am
++++ b/gst/vaapi/Makefile.am
+@@ -24,6 +24,10 @@ libgstvaapi_LIBS += $(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-glx.la
+ endif
+ 
+ if USE_EGL
++libgstvaapi_CFLAGS += \
++	$(EGL_CFLAGS)	\
++	$(NULL)
++
+ libgstvaapi_LIBS += $(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-egl.la
+ endif
+ 
+-- 
+2.17.1
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.14.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.14.1.bb
index e647458fab..63290326a5 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.14.1.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.14.1.bb
@@ -9,6 +9,7 @@ LICENSE = "LGPLv2.1+"
 LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
 
 SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-${PV}.tar.xz \
+           file://0001-gst-vaapi-Makefile.am-Add-EGL_CFLAGS-to-libgstvaapi-.patch \
           "
 
 SRC_URI[md5sum] = "38c5b2390797b7a0a269a5ab6c8cbe8f"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 6/6] gstreamer1.0-libav: Replace German umlaut to avoid parsing problems
  2018-07-19 10:07 [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs Carlos Rafael Giani
                   ` (3 preceding siblings ...)
  2018-07-19 10:07 ` [PATCH v2 5/6] gstreamer1.0-vaapi: Add patch for EGL CFLAGS for proper EGL support Carlos Rafael Giani
@ 2018-07-19 10:07 ` Carlos Rafael Giani
  2018-07-19 10:32 ` ✗ patchtest: failure for "[v2] gstreamer1.0-plugin-base:..." and 5 more Patchwork
  2018-07-19 11:07 ` [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs Martin Jansa
  6 siblings, 0 replies; 15+ messages in thread
From: Carlos Rafael Giani @ 2018-07-19 10:07 UTC (permalink / raw)
  To: openembedded-core

The umlaut can cause issues related to encoding; avoid by replacing it

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
---
 .../workaround-to-build-gst-libav-for-i586-with-gcc.patch       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch
index 36abf8607e..5355480aa4 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch
@@ -1,5 +1,5 @@
 Description: Workaround to build libav for i586 with gcc 4.9.2 by avoiding memset
-Author: Bernhard Übelacker <bernhardu@vr-web.de>
+Author: Bernhard Uebelacker <bernhardu@vr-web.de>
 
 ---
 Bug-Debian: https://bugs.debian.org/783082
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* ✗ patchtest: failure for "[v2] gstreamer1.0-plugin-base:..." and 5 more
  2018-07-19 10:07 [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs Carlos Rafael Giani
                   ` (4 preceding siblings ...)
  2018-07-19 10:07 ` [PATCH v2 6/6] gstreamer1.0-libav: Replace German umlaut to avoid parsing problems Carlos Rafael Giani
@ 2018-07-19 10:32 ` Patchwork
  2018-07-19 11:07 ` [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs Martin Jansa
  6 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2018-07-19 10:32 UTC (permalink / raw)
  To: Carlos Rafael Giani; +Cc: openembedded-core

== Series Details ==

Series: "[v2] gstreamer1.0-plugin-base:..." and 5 more
Revision: 1
URL   : https://patchwork.openembedded.org/series/13098/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at ff0b682b80)

* Patch            [v2,3/6] gstreamer1.0-plugin-bad: Update packageconfigs
 Issue             Patch is missing Signed-off-by [test_signed_off_by_presence] 
  Suggested fix    Sign off the patch (either manually or with "git commit --amend -s")

* Issue             A patch file has been added, but does not have a Signed-off-by tag [test_signed_off_by_presence] 
  Suggested fix    Sign off the added patch file (meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch)

* Issue             Added patch file is missing Upstream-Status in the header [test_upstream_status_presence_format] 
  Suggested fix    Add Upstream-Status: <Valid status> to the header of meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch
  Standard format  Upstream-Status: <Valid status>
  Valid status     Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs
  2018-07-19 10:07 [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs Carlos Rafael Giani
                   ` (5 preceding siblings ...)
  2018-07-19 10:32 ` ✗ patchtest: failure for "[v2] gstreamer1.0-plugin-base:..." and 5 more Patchwork
@ 2018-07-19 11:07 ` Martin Jansa
  2018-07-19 11:16   ` Carlos Rafael Giani
  6 siblings, 1 reply; 15+ messages in thread
From: Martin Jansa @ 2018-07-19 11:07 UTC (permalink / raw)
  To: Carlos Rafael Giani; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 14017 bytes --]

On Thu, Jul 19, 2018 at 12:07:09PM +0200, Carlos Rafael Giani wrote:
> * Add patches for gbm, libpng, libjpeg to conditionally enable/disable
>   them in the configure script
> * There is no libvisual recipe in oe-core or in meta-openembedded, so
>   the visual packageconfig needs to go

No, it doesn't need to go and shouldn't.

Why are you trying to force people who already have libvisual recipe
(maybe from one of these 2
layers: http://layers.openembedded.org/layerindex/branch/master/recipes/?q=libvisual )
to create gstreamer1.0-plugins-base bbappend just to return the
PACKAGECONFIG and remove the --disable-libvisual from EXTRA_OECONF?
It doesn't make any sense. Extra PACKAGECONFIGs for stuff you might not
use doesn't cause any extra overhead, yes they are less tested than the
stuff which people usually have enabled/disabled, but still having the
PACKAGECONFIG available makes it much easier for project layers to
correctly configure recipes in upstream layers.

> * Reorder the packageconfigs alphabetically
> 
> Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
> ---
>  ...r-explicitely-enabling-disabling-GBM.patch |  70 ++++++++++++
>  ...for-explicitely-enabling-disabling-P.patch | 107 ++++++++++++++++++
>  .../gstreamer1.0-plugins-base_1.14.1.bb       |  29 +++--
>  3 files changed, 196 insertions(+), 10 deletions(-)
>  create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch
>  create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch
> 
> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch
> new file mode 100644
> index 0000000000..79e0b78aaf
> --- /dev/null
> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch
> @@ -0,0 +1,70 @@
> +From 7f93afc497010384da9f9d15163c31a862bd1dfa Mon Sep 17 00:00:00 2001
> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
> +Date: Thu, 19 Jul 2018 10:30:54 +0200
> +Subject: [PATCH 10/11] gl: Add switch for explicitely enabling/disabling GBM
> + support
> +
> +https://bugzilla.gnome.org/show_bug.cgi?id=796833
> +---
> + m4/gst-gl.m4 | 38 +++++++++++++++++++++++++++++---------
> + 1 file changed, 29 insertions(+), 9 deletions(-)
> +
> +diff --git a/m4/gst-gl.m4 b/m4/gst-gl.m4
> +index 1e9724094..20b2233de 100644
> +--- a/m4/gst-gl.m4
> ++++ b/m4/gst-gl.m4
> +@@ -117,6 +117,15 @@ AC_ARG_ENABLE([dispmanx],
> +        *) AC_MSG_ERROR([bad value ${enableval} for --enable-dispmanx]) ;;
> +      esac],[NEED_DISPMANX=auto])
> + 
> ++AC_ARG_ENABLE([gbm],
> ++     [  --enable-gbm        Enable Mesa3D GBM support (requires EGL) @<:@default=auto@:>@],
> ++     [case "${enableval}" in
> ++       yes)  NEED_GBM=yes ;;
> ++       no)   NEED_GBM=no ;;
> ++       auto) NEED_GBM=auto ;;
> ++       *) AC_MSG_ERROR([bad value ${enableval} for --enable-gbm]) ;;
> ++     esac],[NEED_GBM=auto])
> ++
> + AG_GST_PKG_CHECK_MODULES(X11_XCB, x11-xcb)
> + save_CPPFLAGS="$CPPFLAGS"
> + save_LIBS="$LIBS"
> +@@ -172,15 +181,26 @@ case $host in
> +         AC_CHECK_LIB([EGL], [fbGetDisplay], [HAVE_VIV_FB_EGL=yes])
> +     fi
> + 
> +-    if test "x$HAVE_EGL" = "xyes"; then
> +-        PKG_CHECK_MODULES(DRM, libdrm >= 2.4.55, HAVE_DRM=yes, HAVE_DRM=no)
> +-        AC_SUBST(DRM_CFLAGS)
> +-        AC_SUBST(DRM_LIBS)
> +-        if test "x$HAVE_DRM" = "xyes" -a "x$HAVE_GUDEV" = "xyes"; then
> +-          PKG_CHECK_MODULES(GBM, gbm, HAVE_GBM_EGL=yes, HAVE_GBM_EGL=no)
> +-          AC_SUBST(GBM_CFLAGS)
> +-          AC_SUBST(GBM_LIBS)
> +-       fi
> ++    if test "x$HAVE_EGL" = "xyes" -a "x$NEED_GBM" != "xno"; then
> ++      PKG_CHECK_MODULES(DRM, libdrm >= 2.4.55, HAVE_DRM=yes, HAVE_DRM=no)
> ++      AC_SUBST(DRM_CFLAGS)
> ++      AC_SUBST(DRM_LIBS)
> ++      if test "x$NEED_GBM" = "xyes"; then
> ++        if test "x$HAVE_DRM" = "xno"; then
> ++          AC_MSG_ERROR([GBM support requested but libdrm is not available])
> ++        fi
> ++        if test "x$HAVE_GUDEV" = "xno"; then
> ++          AC_MSG_ERROR([GBM support requested but gudev is not available])
> ++        fi
> ++      fi
> ++      if test "x$HAVE_DRM" = "xyes" -a "x$HAVE_GUDEV" = "xyes"; then
> ++        PKG_CHECK_MODULES(GBM, gbm, HAVE_GBM_EGL=yes, HAVE_GBM_EGL=no)
> ++        if test "x$HAVE_GBM_EGL" = "xno" -a "x$NEED_GBM" = "xyes"; then
> ++          AC_MSG_ERROR([GBM support requested but gbm library is not available])
> ++        fi
> ++        AC_SUBST(GBM_CFLAGS)
> ++        AC_SUBST(GBM_LIBS)
> ++      fi
> +     fi
> + 
> +     dnl FIXME: Mali EGL depends on GLESv1 or GLESv2
> +-- 
> +2.17.1
> +
> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch
> new file mode 100644
> index 0000000000..3e22332dab
> --- /dev/null
> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch
> @@ -0,0 +1,107 @@
> +From 092aadfc1df69c46d920b0cd39f98d363d6988b3 Mon Sep 17 00:00:00 2001
> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
> +Date: Thu, 19 Jul 2018 11:16:05 +0200
> +Subject: [PATCH 11/11] gl: Add switches for explicitely enabling/disabling PNG
> + and JPEG support
> +
> +https://bugzilla.gnome.org/show_bug.cgi?id=796833
> +---
> + m4/gst-gl.m4 | 66 ++++++++++++++++++++++++++++++++++++----------------
> + 1 file changed, 46 insertions(+), 20 deletions(-)
> +
> +diff --git a/m4/gst-gl.m4 b/m4/gst-gl.m4
> +index 20b2233de..f8809981c 100644
> +--- a/m4/gst-gl.m4
> ++++ b/m4/gst-gl.m4
> +@@ -126,6 +126,24 @@ AC_ARG_ENABLE([gbm],
> +        *) AC_MSG_ERROR([bad value ${enableval} for --enable-gbm]) ;;
> +      esac],[NEED_GBM=auto])
> + 
> ++AC_ARG_ENABLE([png],
> ++     [  --enable-png        Enable libpng support @<:@default=auto@:>@],
> ++     [case "${enableval}" in
> ++       yes)  NEED_PNG=yes ;;
> ++       no)   NEED_PNG=no ;;
> ++       auto) NEED_PNG=auto ;;
> ++       *) AC_MSG_ERROR([bad value ${enableval} for --enable-png]) ;;
> ++     esac],[NEED_PNG=auto])
> ++
> ++AC_ARG_ENABLE([jpeg],
> ++     [  --enable-jpeg        Enable libjpeg support @<:@default=auto@:>@],
> ++     [case "${enableval}" in
> ++       yes)  NEED_JPEG=yes ;;
> ++       no)   NEED_JPEG=no ;;
> ++       auto) NEED_JPEG=auto ;;
> ++       *) AC_MSG_ERROR([bad value ${enableval} for --enable-jpeg]) ;;
> ++     esac],[NEED_JPEG=auto])
> ++
> + AG_GST_PKG_CHECK_MODULES(X11_XCB, x11-xcb)
> + save_CPPFLAGS="$CPPFLAGS"
> + save_LIBS="$LIBS"
> +@@ -1043,9 +1061,13 @@ dnl Needed by plugins that use g_module_*() API
> + PKG_CHECK_MODULES(GMODULE_NO_EXPORT, gmodule-no-export-2.0)
> + 
> + dnl libpng is optional
> +-PKG_CHECK_MODULES(LIBPNG, libpng >= 1.0, HAVE_PNG=yes, HAVE_PNG=no)
> +-if test "x$HAVE_PNG" = "xyes"; then
> +-  AC_DEFINE(HAVE_PNG, [1] , [Use libpng])
> ++if test "x$NEED_PNG" != "xno"; then
> ++  PKG_CHECK_MODULES(LIBPNG, libpng >= 1.0, HAVE_PNG=yes, HAVE_PNG=no)
> ++  if test "x$HAVE_PNG" = "xyes"; then
> ++    AC_DEFINE(HAVE_PNG, [1] , [Use libpng])
> ++  elif test "x$NEED_PNG" = "xyes"; then
> ++    AC_MSG_ERROR([libpng support requested but libpng is not available])
> ++  fi
> + fi
> + AC_SUBST(HAVE_PNG)
> + AC_SUBST(LIBPNG_LIBS)
> +@@ -1053,25 +1075,29 @@ AC_SUBST(LIBPNG_CFLAGS)
> + 
> + dnl libjpeg is optional
> + AC_ARG_WITH(jpeg-mmx, [  --with-jpeg-mmx, path to MMX'ified JPEG library])
> +-OLD_LIBS="$LIBS"
> +-if test x$with_jpeg_mmx != x; then
> +-  LIBS="$LIBS -L$with_jpeg_mmx"
> +-fi
> +-AC_CHECK_LIB(jpeg-mmx, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
> +-JPEG_LIBS="$LIBS -ljpeg-mmx"
> +-LIBS="$OLD_LIBS"
> +-if test x$HAVE_JPEG != xyes; then
> +-  JPEG_LIBS="-ljpeg"
> +-  AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
> +-fi
> ++if test "x$NEED_JPEG" != "xno"; then
> ++  OLD_LIBS="$LIBS"
> ++  if test x$with_jpeg_mmx != x; then
> ++    LIBS="$LIBS -L$with_jpeg_mmx"
> ++  fi
> ++  AC_CHECK_LIB(jpeg-mmx, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
> ++  JPEG_LIBS="$LIBS -ljpeg-mmx"
> ++  LIBS="$OLD_LIBS"
> ++  if test x$HAVE_JPEG != xyes; then
> ++    JPEG_LIBS="-ljpeg"
> ++    AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
> ++  fi
> + 
> +-if test x$HAVE_JPEG = xyes; then
> +-  AC_DEFINE(HAVE_JPEG, [1], [Use libjpeg])
> +-else
> +-  JPEG_LIBS=
> ++  if test x$HAVE_JPEG = xyes; then
> ++    AC_DEFINE(HAVE_JPEG, [1], [Use libjpeg])
> ++  elif test "x$NEED_JPEG" = "xyes"; then
> ++    AC_MSG_ERROR([libjpeg support requested but libjpeg is not available])
> ++  else
> ++    JPEG_LIBS=
> ++  fi
> ++  AC_SUBST(JPEG_LIBS)
> ++  AC_SUBST(HAVE_JPEG)
> + fi
> +-AC_SUBST(JPEG_LIBS)
> +-AC_SUBST(HAVE_JPEG)
> + ])
> + 
> + dnl --------------------------------------------------------------------------
> +-- 
> +2.17.1
> +
> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.1.bb
> index 8d7d3c6192..a848fa0e01 100644
> --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.1.bb
> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.1.bb
> @@ -17,6 +17,8 @@ SRC_URI = " \
>              file://0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch \
>              file://0009-glimagesink-Downrank-to-marginal.patch \
>              file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
> +            file://0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch \
> +            file://0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch \
>              file://link-with-libvchostif.patch \
>              "
>  SRC_URI[md5sum] = "c42154ab6f85c59f0e449d8d7e290342"
> @@ -30,12 +32,15 @@ inherit gettext
>  
>  PACKAGES_DYNAMIC =+ "^libgst.*"
>  
> +# opengl packageconfig factored out to make it easy for distros
> +# and BSP layers to pick either (desktop) opengl, gles2, or no GL
>  PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
> +
>  PACKAGECONFIG ??= " \
>      ${GSTREAMER_ORC} \
> -    ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \
> -    gio-unix-2.0 ogg pango theora vorbis zlib jpeg \
>      ${PACKAGECONFIG_GL} \
> +    ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \
> +    gio-unix-2.0 jpeg ogg pango png theora vorbis zlib \
>      ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
>  "
>  
> @@ -45,26 +50,30 @@ X11DISABLEOPTS = "--disable-x --disable-xvideo --disable-xshm"
>  
>  PACKAGECONFIG[alsa]         = "--enable-alsa,--disable-alsa,alsa-lib"
>  PACKAGECONFIG[cdparanoia]   = "--enable-cdparanoia,--disable-cdparanoia,cdparanoia"
> +PACKAGECONFIG[egl]          = "--enable-egl,--disable-egl,virtual/egl"
> +PACKAGECONFIG[gbm]          = "--enable-gbm,--disable-gbm,virtual/libgbm libgudev libdrm"
>  PACKAGECONFIG[gio-unix-2.0] = "--enable-gio_unix_2_0,--disable-gio_unix_2_0,glib-2.0"
> +PACKAGECONFIG[gles2]        = "--enable-gles2,--disable-gles2,virtual/libgles2"
>  PACKAGECONFIG[ivorbis]      = "--enable-ivorbis,--disable-ivorbis,tremor"
> +PACKAGECONFIG[jpeg]         = "--enable-jpeg,--disable-jpeg,jpeg"
>  PACKAGECONFIG[ogg]          = "--enable-ogg,--disable-ogg,libogg"
> +PACKAGECONFIG[opengl]       = "--enable-opengl,--disable-opengl,virtual/libgl libglu"
>  PACKAGECONFIG[opus]         = "--enable-opus,--disable-opus,libopus"
>  PACKAGECONFIG[pango]        = "--enable-pango,--disable-pango,pango"
> +PACKAGECONFIG[png]          = "--enable-png,--disable-png,libpng"
>  PACKAGECONFIG[theora]       = "--enable-theora,--disable-theora,libtheora"
> -PACKAGECONFIG[visual]       = "--enable-libvisual,--disable-libvisual,libvisual"
>  PACKAGECONFIG[vorbis]       = "--enable-vorbis,--disable-vorbis,libvorbis"
>  PACKAGECONFIG[x11]          = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
> -PACKAGECONFIG[zlib]         = "--enable-zlib,--disable-zlib,zlib"
> -PACKAGECONFIG[opengl]       = "--enable-opengl,--disable-opengl,virtual/libgl libglu"
> -PACKAGECONFIG[gles2]        = "--enable-gles2,--disable-gles2,virtual/libgles2"
> -PACKAGECONFIG[egl]          = "--enable-egl,--disable-egl,virtual/egl"
>  PACKAGECONFIG[wayland]      = "--enable-wayland,--disable-wayland,wayland-native wayland wayland-protocols libdrm"
> -PACKAGECONFIG[jpeg]         = ",,jpeg"
> +PACKAGECONFIG[zlib]         = "--enable-zlib,--disable-zlib,zlib"
> +
> +EXTRA_OECONF += " \
> +    --disable-libvisual \
> +"
>  
> +FILES_${PN}-dev += "${libdir}/gstreamer-${LIBV}/include/gst/gl/gstglconfig.h"
>  FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict"
>  
>  do_compile_prepend() {
>          export GIR_EXTRA_LIBS_PATH="${B}/gst-libs/gst/tag/.libs:${B}/gst-libs/gst/video/.libs:${B}/gst-libs/gst/audio/.libs:${B}/gst-libs/gst/rtp/.libs:${B}/gst-libs/gst/allocators/.libs"
>  }
> -
> -FILES_${PN}-dev += "${libdir}/gstreamer-${LIBV}/include/gst/gl/gstglconfig.h"
> -- 
> 2.17.1
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs
  2018-07-19 11:07 ` [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs Martin Jansa
@ 2018-07-19 11:16   ` Carlos Rafael Giani
  2018-07-19 12:12     ` Martin Jansa
  0 siblings, 1 reply; 15+ messages in thread
From: Carlos Rafael Giani @ 2018-07-19 11:16 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core

As a general rule, I think adding packageconfigs to an oe-core recipe 
that has dependencies outside of oe-core and meta-openembedded is 
questionable. Take the qt5 packageconfig for example. It is *not* part 
of gstreamer1.0-plugins-good in oe-core, and for good reason - it needs 
extra switches for passing paths to moc, uic etc.

Now, what if a recipe outside of oe-core and meta-openembedded is just 
like that? It needs its own customizations, its own switches. It would 
be better off setting up its own packageconfig, just like what that 
bbappend in meta-qt5 does.

I suppose with libvisual such a central packageconfig would work, but 
isn't the whole idea of oe-core to be lean? And yet, now we start adding 
more and more packageconfigs even though the recipes are in some other 
layers that are not part of the central ones (oe-core and 
meta-openembedded)?

You might as well add dozens of packageconfigs to 
gstreamer1.0-plugins-bad, just in case some obscure layer adds a recipe 
for OpenEXR or spandsp for example.


On 2018-07-19 13:07, Martin Jansa wrote:
> On Thu, Jul 19, 2018 at 12:07:09PM +0200, Carlos Rafael Giani wrote:
>> * Add patches for gbm, libpng, libjpeg to conditionally enable/disable
>>    them in the configure script
>> * There is no libvisual recipe in oe-core or in meta-openembedded, so
>>    the visual packageconfig needs to go
> No, it doesn't need to go and shouldn't.
>
> Why are you trying to force people who already have libvisual recipe
> (maybe from one of these 2
> layers: http://layers.openembedded.org/layerindex/branch/master/recipes/?q=libvisual )
> to create gstreamer1.0-plugins-base bbappend just to return the
> PACKAGECONFIG and remove the --disable-libvisual from EXTRA_OECONF?
> It doesn't make any sense. Extra PACKAGECONFIGs for stuff you might not
> use doesn't cause any extra overhead, yes they are less tested than the
> stuff which people usually have enabled/disabled, but still having the
> PACKAGECONFIG available makes it much easier for project layers to
> correctly configure recipes in upstream layers.
>
>> * Reorder the packageconfigs alphabetically
>>
>> Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
>> ---
>>   ...r-explicitely-enabling-disabling-GBM.patch |  70 ++++++++++++
>>   ...for-explicitely-enabling-disabling-P.patch | 107 ++++++++++++++++++
>>   .../gstreamer1.0-plugins-base_1.14.1.bb       |  29 +++--
>>   3 files changed, 196 insertions(+), 10 deletions(-)
>>   create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch
>>   create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch
>>
>> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch
>> new file mode 100644
>> index 0000000000..79e0b78aaf
>> --- /dev/null
>> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch
>> @@ -0,0 +1,70 @@
>> +From 7f93afc497010384da9f9d15163c31a862bd1dfa Mon Sep 17 00:00:00 2001
>> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
>> +Date: Thu, 19 Jul 2018 10:30:54 +0200
>> +Subject: [PATCH 10/11] gl: Add switch for explicitely enabling/disabling GBM
>> + support
>> +
>> +https://bugzilla.gnome.org/show_bug.cgi?id=796833
>> +---
>> + m4/gst-gl.m4 | 38 +++++++++++++++++++++++++++++---------
>> + 1 file changed, 29 insertions(+), 9 deletions(-)
>> +
>> +diff --git a/m4/gst-gl.m4 b/m4/gst-gl.m4
>> +index 1e9724094..20b2233de 100644
>> +--- a/m4/gst-gl.m4
>> ++++ b/m4/gst-gl.m4
>> +@@ -117,6 +117,15 @@ AC_ARG_ENABLE([dispmanx],
>> +        *) AC_MSG_ERROR([bad value ${enableval} for --enable-dispmanx]) ;;
>> +      esac],[NEED_DISPMANX=auto])
>> +
>> ++AC_ARG_ENABLE([gbm],
>> ++     [  --enable-gbm        Enable Mesa3D GBM support (requires EGL) @<:@default=auto@:>@],
>> ++     [case "${enableval}" in
>> ++       yes)  NEED_GBM=yes ;;
>> ++       no)   NEED_GBM=no ;;
>> ++       auto) NEED_GBM=auto ;;
>> ++       *) AC_MSG_ERROR([bad value ${enableval} for --enable-gbm]) ;;
>> ++     esac],[NEED_GBM=auto])
>> ++
>> + AG_GST_PKG_CHECK_MODULES(X11_XCB, x11-xcb)
>> + save_CPPFLAGS="$CPPFLAGS"
>> + save_LIBS="$LIBS"
>> +@@ -172,15 +181,26 @@ case $host in
>> +         AC_CHECK_LIB([EGL], [fbGetDisplay], [HAVE_VIV_FB_EGL=yes])
>> +     fi
>> +
>> +-    if test "x$HAVE_EGL" = "xyes"; then
>> +-        PKG_CHECK_MODULES(DRM, libdrm >= 2.4.55, HAVE_DRM=yes, HAVE_DRM=no)
>> +-        AC_SUBST(DRM_CFLAGS)
>> +-        AC_SUBST(DRM_LIBS)
>> +-        if test "x$HAVE_DRM" = "xyes" -a "x$HAVE_GUDEV" = "xyes"; then
>> +-          PKG_CHECK_MODULES(GBM, gbm, HAVE_GBM_EGL=yes, HAVE_GBM_EGL=no)
>> +-          AC_SUBST(GBM_CFLAGS)
>> +-          AC_SUBST(GBM_LIBS)
>> +-       fi
>> ++    if test "x$HAVE_EGL" = "xyes" -a "x$NEED_GBM" != "xno"; then
>> ++      PKG_CHECK_MODULES(DRM, libdrm >= 2.4.55, HAVE_DRM=yes, HAVE_DRM=no)
>> ++      AC_SUBST(DRM_CFLAGS)
>> ++      AC_SUBST(DRM_LIBS)
>> ++      if test "x$NEED_GBM" = "xyes"; then
>> ++        if test "x$HAVE_DRM" = "xno"; then
>> ++          AC_MSG_ERROR([GBM support requested but libdrm is not available])
>> ++        fi
>> ++        if test "x$HAVE_GUDEV" = "xno"; then
>> ++          AC_MSG_ERROR([GBM support requested but gudev is not available])
>> ++        fi
>> ++      fi
>> ++      if test "x$HAVE_DRM" = "xyes" -a "x$HAVE_GUDEV" = "xyes"; then
>> ++        PKG_CHECK_MODULES(GBM, gbm, HAVE_GBM_EGL=yes, HAVE_GBM_EGL=no)
>> ++        if test "x$HAVE_GBM_EGL" = "xno" -a "x$NEED_GBM" = "xyes"; then
>> ++          AC_MSG_ERROR([GBM support requested but gbm library is not available])
>> ++        fi
>> ++        AC_SUBST(GBM_CFLAGS)
>> ++        AC_SUBST(GBM_LIBS)
>> ++      fi
>> +     fi
>> +
>> +     dnl FIXME: Mali EGL depends on GLESv1 or GLESv2
>> +--
>> +2.17.1
>> +
>> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch
>> new file mode 100644
>> index 0000000000..3e22332dab
>> --- /dev/null
>> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch
>> @@ -0,0 +1,107 @@
>> +From 092aadfc1df69c46d920b0cd39f98d363d6988b3 Mon Sep 17 00:00:00 2001
>> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
>> +Date: Thu, 19 Jul 2018 11:16:05 +0200
>> +Subject: [PATCH 11/11] gl: Add switches for explicitely enabling/disabling PNG
>> + and JPEG support
>> +
>> +https://bugzilla.gnome.org/show_bug.cgi?id=796833
>> +---
>> + m4/gst-gl.m4 | 66 ++++++++++++++++++++++++++++++++++++----------------
>> + 1 file changed, 46 insertions(+), 20 deletions(-)
>> +
>> +diff --git a/m4/gst-gl.m4 b/m4/gst-gl.m4
>> +index 20b2233de..f8809981c 100644
>> +--- a/m4/gst-gl.m4
>> ++++ b/m4/gst-gl.m4
>> +@@ -126,6 +126,24 @@ AC_ARG_ENABLE([gbm],
>> +        *) AC_MSG_ERROR([bad value ${enableval} for --enable-gbm]) ;;
>> +      esac],[NEED_GBM=auto])
>> +
>> ++AC_ARG_ENABLE([png],
>> ++     [  --enable-png        Enable libpng support @<:@default=auto@:>@],
>> ++     [case "${enableval}" in
>> ++       yes)  NEED_PNG=yes ;;
>> ++       no)   NEED_PNG=no ;;
>> ++       auto) NEED_PNG=auto ;;
>> ++       *) AC_MSG_ERROR([bad value ${enableval} for --enable-png]) ;;
>> ++     esac],[NEED_PNG=auto])
>> ++
>> ++AC_ARG_ENABLE([jpeg],
>> ++     [  --enable-jpeg        Enable libjpeg support @<:@default=auto@:>@],
>> ++     [case "${enableval}" in
>> ++       yes)  NEED_JPEG=yes ;;
>> ++       no)   NEED_JPEG=no ;;
>> ++       auto) NEED_JPEG=auto ;;
>> ++       *) AC_MSG_ERROR([bad value ${enableval} for --enable-jpeg]) ;;
>> ++     esac],[NEED_JPEG=auto])
>> ++
>> + AG_GST_PKG_CHECK_MODULES(X11_XCB, x11-xcb)
>> + save_CPPFLAGS="$CPPFLAGS"
>> + save_LIBS="$LIBS"
>> +@@ -1043,9 +1061,13 @@ dnl Needed by plugins that use g_module_*() API
>> + PKG_CHECK_MODULES(GMODULE_NO_EXPORT, gmodule-no-export-2.0)
>> +
>> + dnl libpng is optional
>> +-PKG_CHECK_MODULES(LIBPNG, libpng >= 1.0, HAVE_PNG=yes, HAVE_PNG=no)
>> +-if test "x$HAVE_PNG" = "xyes"; then
>> +-  AC_DEFINE(HAVE_PNG, [1] , [Use libpng])
>> ++if test "x$NEED_PNG" != "xno"; then
>> ++  PKG_CHECK_MODULES(LIBPNG, libpng >= 1.0, HAVE_PNG=yes, HAVE_PNG=no)
>> ++  if test "x$HAVE_PNG" = "xyes"; then
>> ++    AC_DEFINE(HAVE_PNG, [1] , [Use libpng])
>> ++  elif test "x$NEED_PNG" = "xyes"; then
>> ++    AC_MSG_ERROR([libpng support requested but libpng is not available])
>> ++  fi
>> + fi
>> + AC_SUBST(HAVE_PNG)
>> + AC_SUBST(LIBPNG_LIBS)
>> +@@ -1053,25 +1075,29 @@ AC_SUBST(LIBPNG_CFLAGS)
>> +
>> + dnl libjpeg is optional
>> + AC_ARG_WITH(jpeg-mmx, [  --with-jpeg-mmx, path to MMX'ified JPEG library])
>> +-OLD_LIBS="$LIBS"
>> +-if test x$with_jpeg_mmx != x; then
>> +-  LIBS="$LIBS -L$with_jpeg_mmx"
>> +-fi
>> +-AC_CHECK_LIB(jpeg-mmx, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
>> +-JPEG_LIBS="$LIBS -ljpeg-mmx"
>> +-LIBS="$OLD_LIBS"
>> +-if test x$HAVE_JPEG != xyes; then
>> +-  JPEG_LIBS="-ljpeg"
>> +-  AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
>> +-fi
>> ++if test "x$NEED_JPEG" != "xno"; then
>> ++  OLD_LIBS="$LIBS"
>> ++  if test x$with_jpeg_mmx != x; then
>> ++    LIBS="$LIBS -L$with_jpeg_mmx"
>> ++  fi
>> ++  AC_CHECK_LIB(jpeg-mmx, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
>> ++  JPEG_LIBS="$LIBS -ljpeg-mmx"
>> ++  LIBS="$OLD_LIBS"
>> ++  if test x$HAVE_JPEG != xyes; then
>> ++    JPEG_LIBS="-ljpeg"
>> ++    AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
>> ++  fi
>> +
>> +-if test x$HAVE_JPEG = xyes; then
>> +-  AC_DEFINE(HAVE_JPEG, [1], [Use libjpeg])
>> +-else
>> +-  JPEG_LIBS=
>> ++  if test x$HAVE_JPEG = xyes; then
>> ++    AC_DEFINE(HAVE_JPEG, [1], [Use libjpeg])
>> ++  elif test "x$NEED_JPEG" = "xyes"; then
>> ++    AC_MSG_ERROR([libjpeg support requested but libjpeg is not available])
>> ++  else
>> ++    JPEG_LIBS=
>> ++  fi
>> ++  AC_SUBST(JPEG_LIBS)
>> ++  AC_SUBST(HAVE_JPEG)
>> + fi
>> +-AC_SUBST(JPEG_LIBS)
>> +-AC_SUBST(HAVE_JPEG)
>> + ])
>> +
>> + dnl --------------------------------------------------------------------------
>> +--
>> +2.17.1
>> +
>> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.1.bb
>> index 8d7d3c6192..a848fa0e01 100644
>> --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.1.bb
>> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.1.bb
>> @@ -17,6 +17,8 @@ SRC_URI = " \
>>               file://0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch \
>>               file://0009-glimagesink-Downrank-to-marginal.patch \
>>               file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
>> +            file://0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch \
>> +            file://0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch \
>>               file://link-with-libvchostif.patch \
>>               "
>>   SRC_URI[md5sum] = "c42154ab6f85c59f0e449d8d7e290342"
>> @@ -30,12 +32,15 @@ inherit gettext
>>   
>>   PACKAGES_DYNAMIC =+ "^libgst.*"
>>   
>> +# opengl packageconfig factored out to make it easy for distros
>> +# and BSP layers to pick either (desktop) opengl, gles2, or no GL
>>   PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
>> +
>>   PACKAGECONFIG ??= " \
>>       ${GSTREAMER_ORC} \
>> -    ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \
>> -    gio-unix-2.0 ogg pango theora vorbis zlib jpeg \
>>       ${PACKAGECONFIG_GL} \
>> +    ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \
>> +    gio-unix-2.0 jpeg ogg pango png theora vorbis zlib \
>>       ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
>>   "
>>   
>> @@ -45,26 +50,30 @@ X11DISABLEOPTS = "--disable-x --disable-xvideo --disable-xshm"
>>   
>>   PACKAGECONFIG[alsa]         = "--enable-alsa,--disable-alsa,alsa-lib"
>>   PACKAGECONFIG[cdparanoia]   = "--enable-cdparanoia,--disable-cdparanoia,cdparanoia"
>> +PACKAGECONFIG[egl]          = "--enable-egl,--disable-egl,virtual/egl"
>> +PACKAGECONFIG[gbm]          = "--enable-gbm,--disable-gbm,virtual/libgbm libgudev libdrm"
>>   PACKAGECONFIG[gio-unix-2.0] = "--enable-gio_unix_2_0,--disable-gio_unix_2_0,glib-2.0"
>> +PACKAGECONFIG[gles2]        = "--enable-gles2,--disable-gles2,virtual/libgles2"
>>   PACKAGECONFIG[ivorbis]      = "--enable-ivorbis,--disable-ivorbis,tremor"
>> +PACKAGECONFIG[jpeg]         = "--enable-jpeg,--disable-jpeg,jpeg"
>>   PACKAGECONFIG[ogg]          = "--enable-ogg,--disable-ogg,libogg"
>> +PACKAGECONFIG[opengl]       = "--enable-opengl,--disable-opengl,virtual/libgl libglu"
>>   PACKAGECONFIG[opus]         = "--enable-opus,--disable-opus,libopus"
>>   PACKAGECONFIG[pango]        = "--enable-pango,--disable-pango,pango"
>> +PACKAGECONFIG[png]          = "--enable-png,--disable-png,libpng"
>>   PACKAGECONFIG[theora]       = "--enable-theora,--disable-theora,libtheora"
>> -PACKAGECONFIG[visual]       = "--enable-libvisual,--disable-libvisual,libvisual"
>>   PACKAGECONFIG[vorbis]       = "--enable-vorbis,--disable-vorbis,libvorbis"
>>   PACKAGECONFIG[x11]          = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
>> -PACKAGECONFIG[zlib]         = "--enable-zlib,--disable-zlib,zlib"
>> -PACKAGECONFIG[opengl]       = "--enable-opengl,--disable-opengl,virtual/libgl libglu"
>> -PACKAGECONFIG[gles2]        = "--enable-gles2,--disable-gles2,virtual/libgles2"
>> -PACKAGECONFIG[egl]          = "--enable-egl,--disable-egl,virtual/egl"
>>   PACKAGECONFIG[wayland]      = "--enable-wayland,--disable-wayland,wayland-native wayland wayland-protocols libdrm"
>> -PACKAGECONFIG[jpeg]         = ",,jpeg"
>> +PACKAGECONFIG[zlib]         = "--enable-zlib,--disable-zlib,zlib"
>> +
>> +EXTRA_OECONF += " \
>> +    --disable-libvisual \
>> +"
>>   
>> +FILES_${PN}-dev += "${libdir}/gstreamer-${LIBV}/include/gst/gl/gstglconfig.h"
>>   FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict"
>>   
>>   do_compile_prepend() {
>>           export GIR_EXTRA_LIBS_PATH="${B}/gst-libs/gst/tag/.libs:${B}/gst-libs/gst/video/.libs:${B}/gst-libs/gst/audio/.libs:${B}/gst-libs/gst/rtp/.libs:${B}/gst-libs/gst/allocators/.libs"
>>   }
>> -
>> -FILES_${PN}-dev += "${libdir}/gstreamer-${LIBV}/include/gst/gl/gstglconfig.h"
>> -- 
>> 2.17.1
>>
>> -- 
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs
  2018-07-19 11:16   ` Carlos Rafael Giani
@ 2018-07-19 12:12     ` Martin Jansa
  2018-07-19 12:47       ` Carlos Rafael Giani
  0 siblings, 1 reply; 15+ messages in thread
From: Martin Jansa @ 2018-07-19 12:12 UTC (permalink / raw)
  To: Carlos Rafael Giani; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 18452 bytes --]

On Thu, Jul 19, 2018 at 01:16:51PM +0200, Carlos Rafael Giani wrote:
> As a general rule, I think adding packageconfigs to an oe-core recipe 
> that has dependencies outside of oe-core and meta-openembedded is 
> questionable. Take the qt5 packageconfig for example. It is *not* part 
> of gstreamer1.0-plugins-good in oe-core, and for good reason - it needs 
> extra switches for passing paths to moc, uic etc.

I don't see what's questionable with that. PACKAGECONFIG is just a way
to pass configure options like EXTRA_OECONF just with benefit that it's
easily switched from outside and that it encapsulates build time and
runtime dependencies together with the options.

> Now, what if a recipe outside of oe-core and meta-openembedded is just 
> like that? It needs its own customizations, its own switches. It would 
> be better off setting up its own packageconfig, just like what that 
> bbappend in meta-qt5 does.

If someone submits PACKAGECONFIG addition for something which only
exists in his own layer, I'm fine with that, why should we make it
harder for people to use oe-core or meta-oe recipes?

No I don't like that meta-qt5 has to use own bbappend for gstreamer,
it's necessary in this case because of the paths as you sad, but also
causes:
https://github.com/meta-qt5/meta-qt5/commit/73f99f2370a3dc5b81f42d0af7fe530431599454
which is quite annoying for meta-qt5 users, because this is one of very
few reasons why different meta-qt5 version isn't compatible with
different oe-core. So in order to use Qt 5.11 with oe-core from morty, I
need to BBMASK this bbappend and create the old one for
gstreamer1.0-plugins-bad in our project layer, it would be much nicer
and less error prone with PACKAGECONFIG directly in oe-core.

Also if you look at EXTRA_OECONF you'll see either --disable-qt twice or
--disable-qt followed by --enable-qt (when we depend on configure to let
the last option on command line win) which isn't ideal as well and might
confuse people looking at the log.do_configure.

> I suppose with libvisual such a central packageconfig would work, but 
> isn't the whole idea of oe-core to be lean? And yet, now we start adding 
> more and more packageconfigs even though the recipes are in some other 
> layers that are not part of the central ones (oe-core and 
> meta-openembedded)?

Yes it's supposed to be lean as in number of recipes it needs to carry,
not lean by number of lines (PACKAGECONFIG is 1 line exactly as the
--diable flag in EXTRA_OECONF) or lean in number of ways how people are
able to use it.

Why should meta-openembedded have special status for PACKAGECONFIGs
anyway, if you want to make it harder to customize the build, why stop
there?

> You might as well add dozens of packageconfigs to 
> gstreamer1.0-plugins-bad, just in case some obscure layer adds a recipe 
> for OpenEXR or spandsp for example.

Yes, that's exactly what I often do, last time e.g. with libdrm
http://git.openembedded.org/openembedded-core/commit/?id=dc7d3b2ff79ae324b96a51ec1be557a432ed351d
and e.g. qemu before that, adding PACKAGECONFIG for dependencies which
I haven't submitted to meta-networking yet at that time:
http://git.openembedded.org/openembedded-core/commit/?id=ebb6ef1dbc7e03a4b7030b3056bd0fa59fdd047b
and I haven't submitted the recipe for virglrenderer yet as well and
I don't see any issue with having the PACKAGECONFIG for it already.

Cheers,

> On 2018-07-19 13:07, Martin Jansa wrote:
> > On Thu, Jul 19, 2018 at 12:07:09PM +0200, Carlos Rafael Giani wrote:
> >> * Add patches for gbm, libpng, libjpeg to conditionally enable/disable
> >>    them in the configure script
> >> * There is no libvisual recipe in oe-core or in meta-openembedded, so
> >>    the visual packageconfig needs to go
> > No, it doesn't need to go and shouldn't.
> >
> > Why are you trying to force people who already have libvisual recipe
> > (maybe from one of these 2
> > layers: http://layers.openembedded.org/layerindex/branch/master/recipes/?q=libvisual )
> > to create gstreamer1.0-plugins-base bbappend just to return the
> > PACKAGECONFIG and remove the --disable-libvisual from EXTRA_OECONF?
> > It doesn't make any sense. Extra PACKAGECONFIGs for stuff you might not
> > use doesn't cause any extra overhead, yes they are less tested than the
> > stuff which people usually have enabled/disabled, but still having the
> > PACKAGECONFIG available makes it much easier for project layers to
> > correctly configure recipes in upstream layers.
> >
> >> * Reorder the packageconfigs alphabetically
> >>
> >> Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
> >> ---
> >>   ...r-explicitely-enabling-disabling-GBM.patch |  70 ++++++++++++
> >>   ...for-explicitely-enabling-disabling-P.patch | 107 ++++++++++++++++++
> >>   .../gstreamer1.0-plugins-base_1.14.1.bb       |  29 +++--
> >>   3 files changed, 196 insertions(+), 10 deletions(-)
> >>   create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch
> >>   create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch
> >>
> >> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch
> >> new file mode 100644
> >> index 0000000000..79e0b78aaf
> >> --- /dev/null
> >> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch
> >> @@ -0,0 +1,70 @@
> >> +From 7f93afc497010384da9f9d15163c31a862bd1dfa Mon Sep 17 00:00:00 2001
> >> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
> >> +Date: Thu, 19 Jul 2018 10:30:54 +0200
> >> +Subject: [PATCH 10/11] gl: Add switch for explicitely enabling/disabling GBM
> >> + support
> >> +
> >> +https://bugzilla.gnome.org/show_bug.cgi?id=796833
> >> +---
> >> + m4/gst-gl.m4 | 38 +++++++++++++++++++++++++++++---------
> >> + 1 file changed, 29 insertions(+), 9 deletions(-)
> >> +
> >> +diff --git a/m4/gst-gl.m4 b/m4/gst-gl.m4
> >> +index 1e9724094..20b2233de 100644
> >> +--- a/m4/gst-gl.m4
> >> ++++ b/m4/gst-gl.m4
> >> +@@ -117,6 +117,15 @@ AC_ARG_ENABLE([dispmanx],
> >> +        *) AC_MSG_ERROR([bad value ${enableval} for --enable-dispmanx]) ;;
> >> +      esac],[NEED_DISPMANX=auto])
> >> +
> >> ++AC_ARG_ENABLE([gbm],
> >> ++     [  --enable-gbm        Enable Mesa3D GBM support (requires EGL) @<:@default=auto@:>@],
> >> ++     [case "${enableval}" in
> >> ++       yes)  NEED_GBM=yes ;;
> >> ++       no)   NEED_GBM=no ;;
> >> ++       auto) NEED_GBM=auto ;;
> >> ++       *) AC_MSG_ERROR([bad value ${enableval} for --enable-gbm]) ;;
> >> ++     esac],[NEED_GBM=auto])
> >> ++
> >> + AG_GST_PKG_CHECK_MODULES(X11_XCB, x11-xcb)
> >> + save_CPPFLAGS="$CPPFLAGS"
> >> + save_LIBS="$LIBS"
> >> +@@ -172,15 +181,26 @@ case $host in
> >> +         AC_CHECK_LIB([EGL], [fbGetDisplay], [HAVE_VIV_FB_EGL=yes])
> >> +     fi
> >> +
> >> +-    if test "x$HAVE_EGL" = "xyes"; then
> >> +-        PKG_CHECK_MODULES(DRM, libdrm >= 2.4.55, HAVE_DRM=yes, HAVE_DRM=no)
> >> +-        AC_SUBST(DRM_CFLAGS)
> >> +-        AC_SUBST(DRM_LIBS)
> >> +-        if test "x$HAVE_DRM" = "xyes" -a "x$HAVE_GUDEV" = "xyes"; then
> >> +-          PKG_CHECK_MODULES(GBM, gbm, HAVE_GBM_EGL=yes, HAVE_GBM_EGL=no)
> >> +-          AC_SUBST(GBM_CFLAGS)
> >> +-          AC_SUBST(GBM_LIBS)
> >> +-       fi
> >> ++    if test "x$HAVE_EGL" = "xyes" -a "x$NEED_GBM" != "xno"; then
> >> ++      PKG_CHECK_MODULES(DRM, libdrm >= 2.4.55, HAVE_DRM=yes, HAVE_DRM=no)
> >> ++      AC_SUBST(DRM_CFLAGS)
> >> ++      AC_SUBST(DRM_LIBS)
> >> ++      if test "x$NEED_GBM" = "xyes"; then
> >> ++        if test "x$HAVE_DRM" = "xno"; then
> >> ++          AC_MSG_ERROR([GBM support requested but libdrm is not available])
> >> ++        fi
> >> ++        if test "x$HAVE_GUDEV" = "xno"; then
> >> ++          AC_MSG_ERROR([GBM support requested but gudev is not available])
> >> ++        fi
> >> ++      fi
> >> ++      if test "x$HAVE_DRM" = "xyes" -a "x$HAVE_GUDEV" = "xyes"; then
> >> ++        PKG_CHECK_MODULES(GBM, gbm, HAVE_GBM_EGL=yes, HAVE_GBM_EGL=no)
> >> ++        if test "x$HAVE_GBM_EGL" = "xno" -a "x$NEED_GBM" = "xyes"; then
> >> ++          AC_MSG_ERROR([GBM support requested but gbm library is not available])
> >> ++        fi
> >> ++        AC_SUBST(GBM_CFLAGS)
> >> ++        AC_SUBST(GBM_LIBS)
> >> ++      fi
> >> +     fi
> >> +
> >> +     dnl FIXME: Mali EGL depends on GLESv1 or GLESv2
> >> +--
> >> +2.17.1
> >> +
> >> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch
> >> new file mode 100644
> >> index 0000000000..3e22332dab
> >> --- /dev/null
> >> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch
> >> @@ -0,0 +1,107 @@
> >> +From 092aadfc1df69c46d920b0cd39f98d363d6988b3 Mon Sep 17 00:00:00 2001
> >> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
> >> +Date: Thu, 19 Jul 2018 11:16:05 +0200
> >> +Subject: [PATCH 11/11] gl: Add switches for explicitely enabling/disabling PNG
> >> + and JPEG support
> >> +
> >> +https://bugzilla.gnome.org/show_bug.cgi?id=796833
> >> +---
> >> + m4/gst-gl.m4 | 66 ++++++++++++++++++++++++++++++++++++----------------
> >> + 1 file changed, 46 insertions(+), 20 deletions(-)
> >> +
> >> +diff --git a/m4/gst-gl.m4 b/m4/gst-gl.m4
> >> +index 20b2233de..f8809981c 100644
> >> +--- a/m4/gst-gl.m4
> >> ++++ b/m4/gst-gl.m4
> >> +@@ -126,6 +126,24 @@ AC_ARG_ENABLE([gbm],
> >> +        *) AC_MSG_ERROR([bad value ${enableval} for --enable-gbm]) ;;
> >> +      esac],[NEED_GBM=auto])
> >> +
> >> ++AC_ARG_ENABLE([png],
> >> ++     [  --enable-png        Enable libpng support @<:@default=auto@:>@],
> >> ++     [case "${enableval}" in
> >> ++       yes)  NEED_PNG=yes ;;
> >> ++       no)   NEED_PNG=no ;;
> >> ++       auto) NEED_PNG=auto ;;
> >> ++       *) AC_MSG_ERROR([bad value ${enableval} for --enable-png]) ;;
> >> ++     esac],[NEED_PNG=auto])
> >> ++
> >> ++AC_ARG_ENABLE([jpeg],
> >> ++     [  --enable-jpeg        Enable libjpeg support @<:@default=auto@:>@],
> >> ++     [case "${enableval}" in
> >> ++       yes)  NEED_JPEG=yes ;;
> >> ++       no)   NEED_JPEG=no ;;
> >> ++       auto) NEED_JPEG=auto ;;
> >> ++       *) AC_MSG_ERROR([bad value ${enableval} for --enable-jpeg]) ;;
> >> ++     esac],[NEED_JPEG=auto])
> >> ++
> >> + AG_GST_PKG_CHECK_MODULES(X11_XCB, x11-xcb)
> >> + save_CPPFLAGS="$CPPFLAGS"
> >> + save_LIBS="$LIBS"
> >> +@@ -1043,9 +1061,13 @@ dnl Needed by plugins that use g_module_*() API
> >> + PKG_CHECK_MODULES(GMODULE_NO_EXPORT, gmodule-no-export-2.0)
> >> +
> >> + dnl libpng is optional
> >> +-PKG_CHECK_MODULES(LIBPNG, libpng >= 1.0, HAVE_PNG=yes, HAVE_PNG=no)
> >> +-if test "x$HAVE_PNG" = "xyes"; then
> >> +-  AC_DEFINE(HAVE_PNG, [1] , [Use libpng])
> >> ++if test "x$NEED_PNG" != "xno"; then
> >> ++  PKG_CHECK_MODULES(LIBPNG, libpng >= 1.0, HAVE_PNG=yes, HAVE_PNG=no)
> >> ++  if test "x$HAVE_PNG" = "xyes"; then
> >> ++    AC_DEFINE(HAVE_PNG, [1] , [Use libpng])
> >> ++  elif test "x$NEED_PNG" = "xyes"; then
> >> ++    AC_MSG_ERROR([libpng support requested but libpng is not available])
> >> ++  fi
> >> + fi
> >> + AC_SUBST(HAVE_PNG)
> >> + AC_SUBST(LIBPNG_LIBS)
> >> +@@ -1053,25 +1075,29 @@ AC_SUBST(LIBPNG_CFLAGS)
> >> +
> >> + dnl libjpeg is optional
> >> + AC_ARG_WITH(jpeg-mmx, [  --with-jpeg-mmx, path to MMX'ified JPEG library])
> >> +-OLD_LIBS="$LIBS"
> >> +-if test x$with_jpeg_mmx != x; then
> >> +-  LIBS="$LIBS -L$with_jpeg_mmx"
> >> +-fi
> >> +-AC_CHECK_LIB(jpeg-mmx, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
> >> +-JPEG_LIBS="$LIBS -ljpeg-mmx"
> >> +-LIBS="$OLD_LIBS"
> >> +-if test x$HAVE_JPEG != xyes; then
> >> +-  JPEG_LIBS="-ljpeg"
> >> +-  AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
> >> +-fi
> >> ++if test "x$NEED_JPEG" != "xno"; then
> >> ++  OLD_LIBS="$LIBS"
> >> ++  if test x$with_jpeg_mmx != x; then
> >> ++    LIBS="$LIBS -L$with_jpeg_mmx"
> >> ++  fi
> >> ++  AC_CHECK_LIB(jpeg-mmx, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
> >> ++  JPEG_LIBS="$LIBS -ljpeg-mmx"
> >> ++  LIBS="$OLD_LIBS"
> >> ++  if test x$HAVE_JPEG != xyes; then
> >> ++    JPEG_LIBS="-ljpeg"
> >> ++    AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
> >> ++  fi
> >> +
> >> +-if test x$HAVE_JPEG = xyes; then
> >> +-  AC_DEFINE(HAVE_JPEG, [1], [Use libjpeg])
> >> +-else
> >> +-  JPEG_LIBS=
> >> ++  if test x$HAVE_JPEG = xyes; then
> >> ++    AC_DEFINE(HAVE_JPEG, [1], [Use libjpeg])
> >> ++  elif test "x$NEED_JPEG" = "xyes"; then
> >> ++    AC_MSG_ERROR([libjpeg support requested but libjpeg is not available])
> >> ++  else
> >> ++    JPEG_LIBS=
> >> ++  fi
> >> ++  AC_SUBST(JPEG_LIBS)
> >> ++  AC_SUBST(HAVE_JPEG)
> >> + fi
> >> +-AC_SUBST(JPEG_LIBS)
> >> +-AC_SUBST(HAVE_JPEG)
> >> + ])
> >> +
> >> + dnl --------------------------------------------------------------------------
> >> +--
> >> +2.17.1
> >> +
> >> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.1.bb
> >> index 8d7d3c6192..a848fa0e01 100644
> >> --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.1.bb
> >> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.1.bb
> >> @@ -17,6 +17,8 @@ SRC_URI = " \
> >>               file://0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch \
> >>               file://0009-glimagesink-Downrank-to-marginal.patch \
> >>               file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
> >> +            file://0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch \
> >> +            file://0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch \
> >>               file://link-with-libvchostif.patch \
> >>               "
> >>   SRC_URI[md5sum] = "c42154ab6f85c59f0e449d8d7e290342"
> >> @@ -30,12 +32,15 @@ inherit gettext
> >>   
> >>   PACKAGES_DYNAMIC =+ "^libgst.*"
> >>   
> >> +# opengl packageconfig factored out to make it easy for distros
> >> +# and BSP layers to pick either (desktop) opengl, gles2, or no GL
> >>   PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
> >> +
> >>   PACKAGECONFIG ??= " \
> >>       ${GSTREAMER_ORC} \
> >> -    ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \
> >> -    gio-unix-2.0 ogg pango theora vorbis zlib jpeg \
> >>       ${PACKAGECONFIG_GL} \
> >> +    ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \
> >> +    gio-unix-2.0 jpeg ogg pango png theora vorbis zlib \
> >>       ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
> >>   "
> >>   
> >> @@ -45,26 +50,30 @@ X11DISABLEOPTS = "--disable-x --disable-xvideo --disable-xshm"
> >>   
> >>   PACKAGECONFIG[alsa]         = "--enable-alsa,--disable-alsa,alsa-lib"
> >>   PACKAGECONFIG[cdparanoia]   = "--enable-cdparanoia,--disable-cdparanoia,cdparanoia"
> >> +PACKAGECONFIG[egl]          = "--enable-egl,--disable-egl,virtual/egl"
> >> +PACKAGECONFIG[gbm]          = "--enable-gbm,--disable-gbm,virtual/libgbm libgudev libdrm"
> >>   PACKAGECONFIG[gio-unix-2.0] = "--enable-gio_unix_2_0,--disable-gio_unix_2_0,glib-2.0"
> >> +PACKAGECONFIG[gles2]        = "--enable-gles2,--disable-gles2,virtual/libgles2"
> >>   PACKAGECONFIG[ivorbis]      = "--enable-ivorbis,--disable-ivorbis,tremor"
> >> +PACKAGECONFIG[jpeg]         = "--enable-jpeg,--disable-jpeg,jpeg"
> >>   PACKAGECONFIG[ogg]          = "--enable-ogg,--disable-ogg,libogg"
> >> +PACKAGECONFIG[opengl]       = "--enable-opengl,--disable-opengl,virtual/libgl libglu"
> >>   PACKAGECONFIG[opus]         = "--enable-opus,--disable-opus,libopus"
> >>   PACKAGECONFIG[pango]        = "--enable-pango,--disable-pango,pango"
> >> +PACKAGECONFIG[png]          = "--enable-png,--disable-png,libpng"
> >>   PACKAGECONFIG[theora]       = "--enable-theora,--disable-theora,libtheora"
> >> -PACKAGECONFIG[visual]       = "--enable-libvisual,--disable-libvisual,libvisual"
> >>   PACKAGECONFIG[vorbis]       = "--enable-vorbis,--disable-vorbis,libvorbis"
> >>   PACKAGECONFIG[x11]          = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
> >> -PACKAGECONFIG[zlib]         = "--enable-zlib,--disable-zlib,zlib"
> >> -PACKAGECONFIG[opengl]       = "--enable-opengl,--disable-opengl,virtual/libgl libglu"
> >> -PACKAGECONFIG[gles2]        = "--enable-gles2,--disable-gles2,virtual/libgles2"
> >> -PACKAGECONFIG[egl]          = "--enable-egl,--disable-egl,virtual/egl"
> >>   PACKAGECONFIG[wayland]      = "--enable-wayland,--disable-wayland,wayland-native wayland wayland-protocols libdrm"
> >> -PACKAGECONFIG[jpeg]         = ",,jpeg"
> >> +PACKAGECONFIG[zlib]         = "--enable-zlib,--disable-zlib,zlib"
> >> +
> >> +EXTRA_OECONF += " \
> >> +    --disable-libvisual \
> >> +"
> >>   
> >> +FILES_${PN}-dev += "${libdir}/gstreamer-${LIBV}/include/gst/gl/gstglconfig.h"
> >>   FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict"
> >>   
> >>   do_compile_prepend() {
> >>           export GIR_EXTRA_LIBS_PATH="${B}/gst-libs/gst/tag/.libs:${B}/gst-libs/gst/video/.libs:${B}/gst-libs/gst/audio/.libs:${B}/gst-libs/gst/rtp/.libs:${B}/gst-libs/gst/allocators/.libs"
> >>   }
> >> -
> >> -FILES_${PN}-dev += "${libdir}/gstreamer-${LIBV}/include/gst/gl/gstglconfig.h"
> >> -- 
> >> 2.17.1
> >>
> >> -- 
> >> _______________________________________________
> >> Openembedded-core mailing list
> >> Openembedded-core@lists.openembedded.org
> >> http://lists.openembedded.org/mailman/listinfo/openembedded-core
> 

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs
  2018-07-19 12:12     ` Martin Jansa
@ 2018-07-19 12:47       ` Carlos Rafael Giani
  2018-07-19 13:20         ` Martin Jansa
  0 siblings, 1 reply; 15+ messages in thread
From: Carlos Rafael Giani @ 2018-07-19 12:47 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core



On 2018-07-19 14:12, Martin Jansa wrote:
> On Thu, Jul 19, 2018 at 01:16:51PM +0200, Carlos Rafael Giani wrote:
>> As a general rule, I think adding packageconfigs to an oe-core recipe
>> that has dependencies outside of oe-core and meta-openembedded is
>> questionable. Take the qt5 packageconfig for example. It is *not* part
>> of gstreamer1.0-plugins-good in oe-core, and for good reason - it needs
>> extra switches for passing paths to moc, uic etc.
> I don't see what's questionable with that. PACKAGECONFIG is just a way
> to pass configure options like EXTRA_OECONF just with benefit that it's
> easily switched from outside and that it encapsulates build time and
> runtime dependencies together with the options.
>
>> Now, what if a recipe outside of oe-core and meta-openembedded is just
>> like that? It needs its own customizations, its own switches. It would
>> be better off setting up its own packageconfig, just like what that
>> bbappend in meta-qt5 does.
> If someone submits PACKAGECONFIG addition for something which only
> exists in his own layer, I'm fine with that, why should we make it
> harder for people to use oe-core or meta-oe recipes?

Adding a .bbappend that adds the packageconfig does not sound hard to 
me. However, having packageconfigs whose dependencies may or may not be 
dead (because of the layer being dead) sounds more like a maintenance 
problem.

> No I don't like that meta-qt5 has to use own bbappend for gstreamer,
> it's necessary in this case because of the paths as you sad, but also
> causes:
> https://github.com/meta-qt5/meta-qt5/commit/73f99f2370a3dc5b81f42d0af7fe530431599454
> which is quite annoying for meta-qt5 users, because this is one of very
> few reasons why different meta-qt5 version isn't compatible with
> different oe-core. So in order to use Qt 5.11 with oe-core from morty, I
> need to BBMASK this bbappend and create the old one for
> gstreamer1.0-plugins-bad in our project layer, it would be much nicer
> and less error prone with PACKAGECONFIG directly in oe-core.

Agreed. This is a drawback. Unavoidable in this case, unfortunately.

> Also if you look at EXTRA_OECONF you'll see either --disable-qt twice or
> --disable-qt followed by --enable-qt (when we depend on configure to let
> the last option on command line win) which isn't ideal as well and might
> confuse people looking at the log.do_configure.

Hmm perhaps a bit, but the order matters, so I know that the last one 
"wins". Multiple switches like that are not uncommon in automated build 
environments, so I am used to seeing these.


>> I suppose with libvisual such a central packageconfig would work, but
>> isn't the whole idea of oe-core to be lean? And yet, now we start adding
>> more and more packageconfigs even though the recipes are in some other
>> layers that are not part of the central ones (oe-core and
>> meta-openembedded)?
> Yes it's supposed to be lean as in number of recipes it needs to carry,
> not lean by number of lines (PACKAGECONFIG is 1 line exactly as the
> --diable flag in EXTRA_OECONF) or lean in number of ways how people are
> able to use it.
>
> Why should meta-openembedded have special status for PACKAGECONFIGs
> anyway, if you want to make it harder to customize the build, why stop
> there?

meta-openembedded isn't tied to any particular platform, BSP, distro, 
environment. It does have a special place, since it is a central layer 
for many setups. How many BSP layers, distro layers etc. list both 
oe-core and meta-openembedded as dependency, for example? meta-debian 
and meta-qt5-extra however do not have nearly the same status (and these 
are the places where libvisual is).


>> You might as well add dozens of packageconfigs to
>> gstreamer1.0-plugins-bad, just in case some obscure layer adds a recipe
>> for OpenEXR or spandsp for example.
> Yes, that's exactly what I often do, last time e.g. with libdrm
> http://git.openembedded.org/openembedded-core/commit/?id=dc7d3b2ff79ae324b96a51ec1be557a432ed351d
> and e.g. qemu before that, adding PACKAGECONFIG for dependencies which
> I haven't submitted to meta-networking yet at that time:
> http://git.openembedded.org/openembedded-core/commit/?id=ebb6ef1dbc7e03a4b7030b3056bd0fa59fdd047b
> and I haven't submitted the recipe for virglrenderer yet as well and
> I don't see any issue with having the PACKAGECONFIG for it already.
>

Eh, I don't think I can agree with that approach. Having an openexr 
packageconfig for example implies that this packageconfig is actually 
usable and gstreamer1.0-plugins-bad can be built with it enabled. But 
adding it without an openexr dependency? Sounds broken to me. This is 
why I prefer to keep such features disabled until there is a recipe for 
them in meta-openembedded.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs
  2018-07-19 12:47       ` Carlos Rafael Giani
@ 2018-07-19 13:20         ` Martin Jansa
  2018-07-19 13:38           ` Carlos Rafael Giani
  0 siblings, 1 reply; 15+ messages in thread
From: Martin Jansa @ 2018-07-19 13:20 UTC (permalink / raw)
  To: Carlos Rafael Giani; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 7097 bytes --]

On Thu, Jul 19, 2018 at 02:47:58PM +0200, Carlos Rafael Giani wrote:
> 
> 
> On 2018-07-19 14:12, Martin Jansa wrote:
> > On Thu, Jul 19, 2018 at 01:16:51PM +0200, Carlos Rafael Giani wrote:
> >> As a general rule, I think adding packageconfigs to an oe-core recipe
> >> that has dependencies outside of oe-core and meta-openembedded is
> >> questionable. Take the qt5 packageconfig for example. It is *not* part
> >> of gstreamer1.0-plugins-good in oe-core, and for good reason - it needs
> >> extra switches for passing paths to moc, uic etc.
> > I don't see what's questionable with that. PACKAGECONFIG is just a way
> > to pass configure options like EXTRA_OECONF just with benefit that it's
> > easily switched from outside and that it encapsulates build time and
> > runtime dependencies together with the options.
> >
> >> Now, what if a recipe outside of oe-core and meta-openembedded is just
> >> like that? It needs its own customizations, its own switches. It would
> >> be better off setting up its own packageconfig, just like what that
> >> bbappend in meta-qt5 does.
> > If someone submits PACKAGECONFIG addition for something which only
> > exists in his own layer, I'm fine with that, why should we make it
> > harder for people to use oe-core or meta-oe recipes?
> 
> Adding a .bbappend that adds the packageconfig does not sound hard to 
> me. However, having packageconfigs whose dependencies may or may not be 
> dead (because of the layer being dead) sounds more like a maintenance 
> problem.

It's not too hard, but completely unnecessary when the PACKAGECONFIG was
already there in oe-core and you're removing it for no good reason.
Especially if such PACKAGECONFIG needs to be added by multiple people in
multiple projects instead of just once in the recipe where it belongs.

And it brings annoying issues like the gstreamer bbappend in meta-qt5
without any good reason.

Carrying libdrm PACKAGECONFIGs in my bbappend was simple enough, but
then Ross migrated libdrm from autotools to meson and instead of simply
updating the PACKAGECONFIGs to the format used by meson atomically with
the meson migration in the same commit I had to update the .bbappend,
which caused my layer to require new oe-core again (to have the meson
migration, because the PACKAGECONFIG isn't backwards compatible) and at
that time I've rather submitted all my PACKAGECONFIGs to oe-core instead
of maintenance burden to keep them locally.

> > No I don't like that meta-qt5 has to use own bbappend for gstreamer,
> > it's necessary in this case because of the paths as you sad, but also
> > causes:
> > https://github.com/meta-qt5/meta-qt5/commit/73f99f2370a3dc5b81f42d0af7fe530431599454
> > which is quite annoying for meta-qt5 users, because this is one of very
> > few reasons why different meta-qt5 version isn't compatible with
> > different oe-core. So in order to use Qt 5.11 with oe-core from morty, I
> > need to BBMASK this bbappend and create the old one for
> > gstreamer1.0-plugins-bad in our project layer, it would be much nicer
> > and less error prone with PACKAGECONFIG directly in oe-core.
> 
> Agreed. This is a drawback. Unavoidable in this case, unfortunately.
> 
> > Also if you look at EXTRA_OECONF you'll see either --disable-qt twice or
> > --disable-qt followed by --enable-qt (when we depend on configure to let
> > the last option on command line win) which isn't ideal as well and might
> > confuse people looking at the log.do_configure.
> 
> Hmm perhaps a bit, but the order matters, so I know that the last one 
> "wins". Multiple switches like that are not uncommon in automated build 
> environments, so I am used to seeing these.

Congrats! but it still doesn't mean we should add more of them without
good reasons, right?
 
> >> I suppose with libvisual such a central packageconfig would work, but
> >> isn't the whole idea of oe-core to be lean? And yet, now we start adding
> >> more and more packageconfigs even though the recipes are in some other
> >> layers that are not part of the central ones (oe-core and
> >> meta-openembedded)?
> > Yes it's supposed to be lean as in number of recipes it needs to carry,
> > not lean by number of lines (PACKAGECONFIG is 1 line exactly as the
> > --diable flag in EXTRA_OECONF) or lean in number of ways how people are
> > able to use it.
> >
> > Why should meta-openembedded have special status for PACKAGECONFIGs
> > anyway, if you want to make it harder to customize the build, why stop
> > there?
> 
> meta-openembedded isn't tied to any particular platform, BSP, distro, 
> environment. It does have a special place, since it is a central layer 
> for many setups. How many BSP layers, distro layers etc. list both 
> oe-core and meta-openembedded as dependency, for example? meta-debian 
> and meta-qt5-extra however do not have nearly the same status (and these 
> are the places where libvisual is).

And what about people who have libvisual in their layer (from
meta-debian or meta-qt5-extra or written from scratch) are they also now
responsible for maintaining bbappend PACKAGECONFIG for gstreamer?

> >> You might as well add dozens of packageconfigs to
> >> gstreamer1.0-plugins-bad, just in case some obscure layer adds a recipe
> >> for OpenEXR or spandsp for example.
> > Yes, that's exactly what I often do, last time e.g. with libdrm
> > http://git.openembedded.org/openembedded-core/commit/?id=dc7d3b2ff79ae324b96a51ec1be557a432ed351d
> > and e.g. qemu before that, adding PACKAGECONFIG for dependencies which
> > I haven't submitted to meta-networking yet at that time:
> > http://git.openembedded.org/openembedded-core/commit/?id=ebb6ef1dbc7e03a4b7030b3056bd0fa59fdd047b
> > and I haven't submitted the recipe for virglrenderer yet as well and
> > I don't see any issue with having the PACKAGECONFIG for it already.
> >
> 
> Eh, I don't think I can agree with that approach. Having an openexr 
> packageconfig for example implies that this packageconfig is actually 
> usable and gstreamer1.0-plugins-bad can be built with it enabled. But 
> adding it without an openexr dependency? Sounds broken to me. This is 
> why I prefer to keep such features disabled until there is a recipe for 
> them in meta-openembedded.

It's not broken, it just isn't well tested. Everybody tests only the
explicitly disabled path until someone actually tries to enable it,
which is exactly the same for disabled PACKAGECONFIG and --disable-foo
in EXTRA_OECONF.

I'm not saying that these features should be enabled! Of course not,
they cannot be for features which require extra dependencies from other
layers. I'm just saying that --disable-twolame from
PACKAGECONFIG[twolame] is much better than --disable-twolame from
EXTRA_OECONF, because is easy to enable without the .bbappend and in
most cases it will work if you provide necessary dependencies or show
reasonable error showing what you need to provide.

Cheers,
-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs
  2018-07-19 13:20         ` Martin Jansa
@ 2018-07-19 13:38           ` Carlos Rafael Giani
  2018-07-19 14:02             ` Martin Jansa
  0 siblings, 1 reply; 15+ messages in thread
From: Carlos Rafael Giani @ 2018-07-19 13:38 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core

The main problem I see with all of this - aside from filling the recipes 
with packageconfigs that may or may not become actually usable in the 
future - is that when the packageconfig recipes don't yet exist, you are 
essentially speculating. Even the *names* of the dependencies may turn 
out to be different in the future (foo vs. libfoo for example). Or 
perhaps you need to include more dependencies, like what can happen with 
OpenGL ES (it also needs libEGL).


On 2018-07-19 15:20, Martin Jansa wrote:
> On Thu, Jul 19, 2018 at 02:47:58PM +0200, Carlos Rafael Giani wrote:
>>
>> On 2018-07-19 14:12, Martin Jansa wrote:
>>> On Thu, Jul 19, 2018 at 01:16:51PM +0200, Carlos Rafael Giani wrote:
>>>> As a general rule, I think adding packageconfigs to an oe-core recipe
>>>> that has dependencies outside of oe-core and meta-openembedded is
>>>> questionable. Take the qt5 packageconfig for example. It is *not* part
>>>> of gstreamer1.0-plugins-good in oe-core, and for good reason - it needs
>>>> extra switches for passing paths to moc, uic etc.
>>> I don't see what's questionable with that. PACKAGECONFIG is just a way
>>> to pass configure options like EXTRA_OECONF just with benefit that it's
>>> easily switched from outside and that it encapsulates build time and
>>> runtime dependencies together with the options.
>>>
>>>> Now, what if a recipe outside of oe-core and meta-openembedded is just
>>>> like that? It needs its own customizations, its own switches. It would
>>>> be better off setting up its own packageconfig, just like what that
>>>> bbappend in meta-qt5 does.
>>> If someone submits PACKAGECONFIG addition for something which only
>>> exists in his own layer, I'm fine with that, why should we make it
>>> harder for people to use oe-core or meta-oe recipes?
>> Adding a .bbappend that adds the packageconfig does not sound hard to
>> me. However, having packageconfigs whose dependencies may or may not be
>> dead (because of the layer being dead) sounds more like a maintenance
>> problem.
> It's not too hard, but completely unnecessary when the PACKAGECONFIG was
> already there in oe-core and you're removing it for no good reason.
> Especially if such PACKAGECONFIG needs to be added by multiple people in
> multiple projects instead of just once in the recipe where it belongs.

libvisual is not in oe-core or meta-openembedded, otherwise I would have 
added it. As for zlib etc. I already added them back in in v2 of the 
patches.

> And it brings annoying issues like the gstreamer bbappend in meta-qt5
> without any good reason.
>
> Carrying libdrm PACKAGECONFIGs in my bbappend was simple enough, but
> then Ross migrated libdrm from autotools to meson and instead of simply
> updating the PACKAGECONFIGs to the format used by meson atomically with
> the meson migration in the same commit I had to update the .bbappend,
> which caused my layer to require new oe-core again (to have the meson
> migration, because the PACKAGECONFIG isn't backwards compatible) and at
> that time I've rather submitted all my PACKAGECONFIGs to oe-core instead
> of maintenance burden to keep them locally.

As said, I can then agree to add packageconfigs for recipes that already 
exist somewhere. But adding them speculatively with not-yet-existing 
dependencies is an entirely different matter. I wouldn't do that. 
Instead, I'd keep the --disable-twolame etc. switches around.

> Congrats! but it still doesn't mean we should add more of them without
> good reasons, right?

Sure, but avoiding them is not a high priority for me. They are more of 
an annoyance than an outright problem.


> And what about people who have libvisual in their layer (from
> meta-debian or meta-qt5-extra or written from scratch) are they also now
> responsible for maintaining bbappend PACKAGECONFIG for gstreamer?

Yeah, at least initially. If some layer introduces a recipe that happens 
to have a corresponding plugin in base/good/bad/ugly, it makes sense to 
add a .bbappend at first. Later on, you can patch oe-core if it sounds 
like having this packageconfig in a central place makes sense. To me, 
this sounds like a more modular approach.


>> Eh, I don't think I can agree with that approach. Having an openexr
>> packageconfig for example implies that this packageconfig is actually
>> usable and gstreamer1.0-plugins-bad can be built with it enabled. But
>> adding it without an openexr dependency? Sounds broken to me. This is
>> why I prefer to keep such features disabled until there is a recipe for
>> them in meta-openembedded.
> It's not broken, it just isn't well tested. Everybody tests only the
> explicitly disabled path until someone actually tries to enable it,
> which is exactly the same for disabled PACKAGECONFIG and --disable-foo
> in EXTRA_OECONF.
>
> I'm not saying that these features should be enabled! Of course not,
> they cannot be for features which require extra dependencies from other
> layers. I'm just saying that --disable-twolame from
> PACKAGECONFIG[twolame] is much better than --disable-twolame from
> EXTRA_OECONF, because is easy to enable without the .bbappend and in
> most cases it will work if you provide necessary dependencies or show
> reasonable error showing what you need to provide.
>

It is not about them being enabled, but about what happens if someone 
sees these packageconfigs and tries to enable them. Then, oops, they 
don't work, because the dependency is non-existent. So, if this 
packageconfig _cannot_ work because the dependency doesn't exist yet 
anywhere in any layer, why is this packageconfig there in the first place?

For example, the libneon recipe got removed because upstream is dead. 
Would you still keep its packageconfig around just in case someone 
decides to bring back the recipe for their own personal layer?
(Ironically, I just noticed that I made a mistake by _not_ removing the 
neon packageconfig while still adding --disable-neon to EXTRA_OECONF ..)


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs
  2018-07-19 13:38           ` Carlos Rafael Giani
@ 2018-07-19 14:02             ` Martin Jansa
  2018-07-19 14:21               ` Carlos Rafael Giani
  0 siblings, 1 reply; 15+ messages in thread
From: Martin Jansa @ 2018-07-19 14:02 UTC (permalink / raw)
  To: Carlos Rafael Giani; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 7593 bytes --]

On Thu, Jul 19, 2018 at 03:38:16PM +0200, Carlos Rafael Giani wrote:
> The main problem I see with all of this - aside from filling the recipes 
> with packageconfigs that may or may not become actually usable in the 
> future - is that when the packageconfig recipes don't yet exist, you are 
> essentially speculating. Even the *names* of the dependencies may turn 
> out to be different in the future (foo vs. libfoo for example). Or 
> perhaps you need to include more dependencies, like what can happen with 
> OpenGL ES (it also needs libEGL).
> 
> 
> On 2018-07-19 15:20, Martin Jansa wrote:
> > On Thu, Jul 19, 2018 at 02:47:58PM +0200, Carlos Rafael Giani wrote:
> >>
> >> On 2018-07-19 14:12, Martin Jansa wrote:
> >>> On Thu, Jul 19, 2018 at 01:16:51PM +0200, Carlos Rafael Giani wrote:
> >>>> As a general rule, I think adding packageconfigs to an oe-core recipe
> >>>> that has dependencies outside of oe-core and meta-openembedded is
> >>>> questionable. Take the qt5 packageconfig for example. It is *not* part
> >>>> of gstreamer1.0-plugins-good in oe-core, and for good reason - it needs
> >>>> extra switches for passing paths to moc, uic etc.
> >>> I don't see what's questionable with that. PACKAGECONFIG is just a way
> >>> to pass configure options like EXTRA_OECONF just with benefit that it's
> >>> easily switched from outside and that it encapsulates build time and
> >>> runtime dependencies together with the options.
> >>>
> >>>> Now, what if a recipe outside of oe-core and meta-openembedded is just
> >>>> like that? It needs its own customizations, its own switches. It would
> >>>> be better off setting up its own packageconfig, just like what that
> >>>> bbappend in meta-qt5 does.
> >>> If someone submits PACKAGECONFIG addition for something which only
> >>> exists in his own layer, I'm fine with that, why should we make it
> >>> harder for people to use oe-core or meta-oe recipes?
> >> Adding a .bbappend that adds the packageconfig does not sound hard to
> >> me. However, having packageconfigs whose dependencies may or may not be
> >> dead (because of the layer being dead) sounds more like a maintenance
> >> problem.
> > It's not too hard, but completely unnecessary when the PACKAGECONFIG was
> > already there in oe-core and you're removing it for no good reason.
> > Especially if such PACKAGECONFIG needs to be added by multiple people in
> > multiple projects instead of just once in the recipe where it belongs.
> 
> libvisual is not in oe-core or meta-openembedded, otherwise I would have 
> added it. As for zlib etc. I already added them back in in v2 of the 
> patches.

But you're still _removing_ the PACKAGECONFIG for libvisual.

> > And it brings annoying issues like the gstreamer bbappend in meta-qt5
> > without any good reason.
> >
> > Carrying libdrm PACKAGECONFIGs in my bbappend was simple enough, but
> > then Ross migrated libdrm from autotools to meson and instead of simply
> > updating the PACKAGECONFIGs to the format used by meson atomically with
> > the meson migration in the same commit I had to update the .bbappend,
> > which caused my layer to require new oe-core again (to have the meson
> > migration, because the PACKAGECONFIG isn't backwards compatible) and at
> > that time I've rather submitted all my PACKAGECONFIGs to oe-core instead
> > of maintenance burden to keep them locally.
> 
> As said, I can then agree to add packageconfigs for recipes that already 
> exist somewhere. But adding them speculatively with not-yet-existing 

Except you can never know what exists elsewhere, because not all layers
are public or on layerindex.

> dependencies is an entirely different matter. I wouldn't do that. 
> Instead, I'd keep the --disable-twolame etc. switches around.
> 
> > Congrats! but it still doesn't mean we should add more of them without
> > good reasons, right?
> 
> Sure, but avoiding them is not a high priority for me. They are more of 
> an annoyance than an outright problem.
> 
> 
> > And what about people who have libvisual in their layer (from
> > meta-debian or meta-qt5-extra or written from scratch) are they also now
> > responsible for maintaining bbappend PACKAGECONFIG for gstreamer?
> 
> Yeah, at least initially. If some layer introduces a recipe that happens 
> to have a corresponding plugin in base/good/bad/ugly, it makes sense to 
> add a .bbappend at first. Later on, you can patch oe-core if it sounds 
> like having this packageconfig in a central place makes sense. To me, 
> this sounds like a more modular approach.
> 
> 
> >> Eh, I don't think I can agree with that approach. Having an openexr
> >> packageconfig for example implies that this packageconfig is actually
> >> usable and gstreamer1.0-plugins-bad can be built with it enabled. But
> >> adding it without an openexr dependency? Sounds broken to me. This is
> >> why I prefer to keep such features disabled until there is a recipe for
> >> them in meta-openembedded.
> > It's not broken, it just isn't well tested. Everybody tests only the
> > explicitly disabled path until someone actually tries to enable it,
> > which is exactly the same for disabled PACKAGECONFIG and --disable-foo
> > in EXTRA_OECONF.
> >
> > I'm not saying that these features should be enabled! Of course not,
> > they cannot be for features which require extra dependencies from other
> > layers. I'm just saying that --disable-twolame from
> > PACKAGECONFIG[twolame] is much better than --disable-twolame from
> > EXTRA_OECONF, because is easy to enable without the .bbappend and in
> > most cases it will work if you provide necessary dependencies or show
> > reasonable error showing what you need to provide.
> >
> 
> It is not about them being enabled, but about what happens if someone 

you said "why I prefer to keep such features disabled" in previous
e-mail.

> sees these packageconfigs and tries to enable them. Then, oops, they 
> don't work, because the dependency is non-existent. So, if this 
> packageconfig _cannot_ work because the dependency doesn't exist yet 
> anywhere in any layer, why is this packageconfig there in the first place?

Because it's our best shot on making it configure-able, if someone names
the dependency differently, then the PACKAGECONFIG can be improved later
or that extra dependency can get PROVIDES with the name used in
PACKAGECONFIG. But that's still closer to usable than

EXTRA_OECONF_remove = "--disable-foo"
EXTRA_OECONF_append = " --enable-foo"
DEPENDS_append = " foo"
RDEPENDS_${PN}_append = " foo-utils"

or adding PACKAGECONFIG in bbappend and ending with --disable-foo
followed by --enable-foo in EXTRA_OECONF.

> For example, the libneon recipe got removed because upstream is dead. 
> Would you still keep its packageconfig around just in case someone 
> decides to bring back the recipe for their own personal layer?
> (Ironically, I just noticed that I made a mistake by _not_ removing the 
> neon packageconfig while still adding --disable-neon to EXTRA_OECONF ..)

Yes, I would keep PACKAGECONFIG for it, because for most people it will
result in the same --disable-neon and for someone who had neon
PACKAGECONFIG enabled before it will work after bringing back just the
libneon recipe (without reinventing PACKAGECONFIG knob in gstreamer
bbappend).

I don't want to continue in this discussion, hopefully someone else will
add an opinion as well.

Cheers,
-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs
  2018-07-19 14:02             ` Martin Jansa
@ 2018-07-19 14:21               ` Carlos Rafael Giani
  0 siblings, 0 replies; 15+ messages in thread
From: Carlos Rafael Giani @ 2018-07-19 14:21 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core



On 2018-07-19 16:02, Martin Jansa wrote:
> I don't want to continue in this discussion, hopefully someone else will
> add an opinion as well.
>
> Cheers,

I agree. For a v3 of the patches, I'm OK with reintroducing the 
libvisual packageconfig. As for the rest (--disable-twolame etc.), these 
are a separate discussion, one that goes beyond the scope of these 
patches. I propose we worry about that as part of a separate set of patches.


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-07-19 14:21 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-19 10:07 [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs Carlos Rafael Giani
2018-07-19 10:07 ` [PATCH v2 2/6] gstreamer1.0-plugin-good: " Carlos Rafael Giani
2018-07-19 10:07 ` [PATCH v2 3/6] gstreamer1.0-plugin-bad: " Carlos Rafael Giani
2018-07-19 10:07 ` [PATCH v2 4/6] gstreamer1.0-vaapi: Remove unnecessary FILESPATH modification Carlos Rafael Giani
2018-07-19 10:07 ` [PATCH v2 5/6] gstreamer1.0-vaapi: Add patch for EGL CFLAGS for proper EGL support Carlos Rafael Giani
2018-07-19 10:07 ` [PATCH v2 6/6] gstreamer1.0-libav: Replace German umlaut to avoid parsing problems Carlos Rafael Giani
2018-07-19 10:32 ` ✗ patchtest: failure for "[v2] gstreamer1.0-plugin-base:..." and 5 more Patchwork
2018-07-19 11:07 ` [PATCH v2 1/6] gstreamer1.0-plugin-base: Update packageconfigs Martin Jansa
2018-07-19 11:16   ` Carlos Rafael Giani
2018-07-19 12:12     ` Martin Jansa
2018-07-19 12:47       ` Carlos Rafael Giani
2018-07-19 13:20         ` Martin Jansa
2018-07-19 13:38           ` Carlos Rafael Giani
2018-07-19 14:02             ` Martin Jansa
2018-07-19 14:21               ` Carlos Rafael Giani

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.