Skip to contentSkip to conversation

gstreamer-plugins-bad: add support for meson build of drmallocator and kms/waylandsink

PATCH New Denys Dmytriyenko 1 participant 3 messages Mar 25, 2020 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 gstreamer-plugins-bad: add support for meson build of drmallocator and kms/waylandsink

---
 ...rm-kms-add-support-for-meson-build-system.patch | 140 +++++++++++++++++++++
 .../gstreamer1.0-plugins-bad_1.16.%.bbappend       |  15 +--
 2 files changed, 146 insertions(+), 9 deletions(-)
 create mode 100644 meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-wayland-drm-kms-add-support-for-meson-build-system.patch
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-wayland-drm-kms-add-support-for-meson-build-system.patch new file +140 -0
new file mode 100644
index 0000000..ccb0797
@@ -0,0 +1,140 @@
+From dc24c3386701639d8ba04451bb40317f36cbce0a Mon Sep 17 00:00:00 2001
+From: Denys Dmytriyenko <[email protected]>
+Date: Tue, 24 Mar 2020 21:26:07 -0400
+Subject: [PATCH] wayland,drm,kms: add support for meson build system
+
+Upstream-Status: Inappropriate [depends on drmallocator and kms/waylandsink patches in meta-arago]
+
+Signed-off-by: Denys Dmytriyenko <[email protected]>
+---
+ ext/wayland/meson.build                   |  4 +++-
+ gst-libs/gst/drm/meson.build              | 25 +++++++++++++++++++++++++
+ gst-libs/gst/meson.build                  |  1 +
+ pkgconfig/gstreamer-drm-uninstalled.pc.in |  4 ++--
+ pkgconfig/meson.build                     |  2 ++
+ sys/kms/meson.build                       |  2 +-
+ 6 files changed, 34 insertions(+), 4 deletions(-)
+ create mode 100644 gst-libs/gst/drm/meson.build
+
+diff --git a/ext/wayland/meson.build b/ext/wayland/meson.build
+index 3c377ee..294bf51 100644
+--- a/ext/wayland/meson.build
++++ b/ext/wayland/meson.build
+@@ -2,6 +2,7 @@ wl_sources = [
+     'gstwaylandsink.c',
+     'wlshmallocator.c',
+     'wlbuffer.c',
++    'wldrm.c',
+     'wldisplay.c',
+     'wlwindow.c',
+     'wlvideoformat.c',
+@@ -20,6 +21,7 @@ if use_wayland
+         ['/unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml',
+          'fullscreen-shell-unstable-v1-protocol.c', 'fullscreen-shell-unstable-v1-client-protocol.h'],
+         ['/stable/xdg-shell/xdg-shell.xml', 'xdg-shell-protocol.c', 'xdg-shell-client-protocol.h'],
++        ['/stable/wayland-drm/wayland-drm.xml', 'wayland-drm-protocol.c', 'wayland-drm-client-protocol.h'],
+     ]
+     protocols_files = []
+ 
+@@ -42,7 +44,7 @@ if use_wayland
+         c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],
+         include_directories : [configinc],
+         dependencies : [gst_dep, gstvideo_dep, gstwayland_dep, gstallocators_dep,
+-                        wl_client_dep, wl_protocol_dep, libdrm_dep],
++                        gstdrm_dep, wl_client_dep, wl_protocol_dep, libdrm_dep],
+         install : true,
+         install_dir : plugins_install_dir,
+     )
+diff --git a/gst-libs/gst/drm/meson.build b/gst-libs/gst/drm/meson.build
+new file mode 100644
+index 0000000..3310cc6
+--- /dev/null
++++ b/gst-libs/gst/drm/meson.build
+@@ -0,0 +1,25 @@
++gstdrm_sources = [
++  'gstdrmallocator.c',
++]
++gstdrm_headers = [
++  'gstdrmallocator.h',
++]
++install_headers(gstdrm_headers, subdir : 'gstreamer-1.0/gst/drm')
++
++libdrm_dep = dependency('libdrm', version: '>= 2.4.55', required: get_option('wayland'))
++if libdrm_dep.found()
++  gstdrm = library('gstdrm-' + api_version,
++    gstdrm_sources,
++    c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],
++    include_directories : [configinc, libsinc],
++    version : libversion,
++    soversion : soversion,
++    darwin_versions : osxversion,
++    install : true,
++    dependencies : [gstbase_dep, gstallocators_dep, libdrm_dep],
++  )
++
++  gstdrm_dep = declare_dependency(link_with : gstdrm,
++    include_directories : [libsinc],
++    dependencies : [gstbase_dep, gstallocators_dep, libdrm_dep])
++endif
+diff --git a/gst-libs/gst/meson.build b/gst-libs/gst/meson.build
+index 5d90a91..e069327 100644
+--- a/gst-libs/gst/meson.build
++++ b/gst-libs/gst/meson.build
+@@ -4,6 +4,7 @@ subdir('adaptivedemux')
+ subdir('audio')
+ subdir('basecamerabinsrc')
+ subdir('codecparsers')
++subdir('drm')
+ subdir('insertbin')
+ subdir('interfaces')
+ subdir('isoff')
+diff --git a/pkgconfig/gstreamer-drm-uninstalled.pc.in b/pkgconfig/gstreamer-drm-uninstalled.pc.in
+index 9dcf978..ec705e4 100644
+--- a/pkgconfig/gstreamer-drm-uninstalled.pc.in
++++ b/pkgconfig/gstreamer-drm-uninstalled.pc.in
+@@ -1,7 +1,7 @@
+ prefix=
+ exec_prefix=
+-libdir=${pcfiledir}/../gst-libs/gst/drm
+-includedir=${pcfiledir}/../gst-libs
++libdir=@drmlibdir@
++includedir=@abs_top_builddir@/gst-libs
+ 
+ Name: GStreamer DRM Allocator, Uninstalled
+ Description: DRM Allocator for GStreamer elements, uninstalled
+diff --git a/pkgconfig/meson.build b/pkgconfig/meson.build
+index 7ddfafb..35cd7bf 100644
+--- a/pkgconfig/meson.build
++++ b/pkgconfig/meson.build
+@@ -12,6 +12,7 @@ pkgconf.set('abs_top_builddir', join_paths(meson.current_build_dir(), '..'))
+ pkgconf.set('abs_top_srcdir', join_paths(meson.current_source_dir(), '..'))
+ pkgconf.set('audiolibdir', join_paths(meson.build_root(), gstbadaudio.outdir()))
+ pkgconf.set('codecparserslibdir', join_paths(meson.build_root(), gstcodecparsers.outdir()))
++pkgconf.set('drmlibdir', join_paths(meson.build_root(), gstdrm.outdir()))
+ pkgconf.set('insertbinlibdir', join_paths(meson.build_root(), gstinsertbin.outdir()))
+ pkgconf.set('mpegtslibdir', join_paths(meson.build_root(), gstmpegts.outdir()))
+ pkgconf.set('playerlibdir', join_paths(meson.build_root(), gstplayer.outdir()))
+@@ -24,6 +25,7 @@ pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
+ pkg_libs = [
+   'bad-audio',
+   'codecparsers',
++  'drm',
+   'insertbin',
+   'mpegts',
+   'player',
+diff --git a/sys/kms/meson.build b/sys/kms/meson.build
+index fbc1861..0a000fd 100644
+--- a/sys/kms/meson.build
++++ b/sys/kms/meson.build
+@@ -11,7 +11,7 @@ if libdrm_dep.found()
+     kmssink_sources,
+     c_args : gst_plugins_bad_args,
+     include_directories : [configinc],
+-    dependencies : [gstbase_dep, gstvideo_dep, gstallocators_dep, libdrm_dep],
++    dependencies : [gstbase_dep, gstvideo_dep, gstallocators_dep, gstdrm_dep, libdrm_dep],
+     install : true,
+     install_dir : plugins_install_dir,
+   )
+-- 
+2.7.4
+
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.%.bbappend +6 -9
index b7b9efe..6c2509f 100644
@@ -1,13 +1,7 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-PACKAGECONFIG = "faad"
-PACKAGECONFIG += "kms"
-
-# gstreamer is now also included on Keystone, be mindful of any Graphics dependencies
-PACKAGECONFIG_append_omap-a15 = " ${@bb.utils.contains('DISTRO_FEATURES','wayland','wayland','',d)}"
-PACKAGECONFIG_append_ti43x = " ${@bb.utils.contains('DISTRO_FEATURES','wayland','wayland','',d)}"
-PACKAGECONFIG_append_ti33x = " ${@bb.utils.contains('DISTRO_FEATURES','wayland','wayland','',d)}"
-PACKAGECONFIG_append_k3 = " ${@bb.utils.contains('DISTRO_FEATURES','wayland','wayland','',d)}"
+PACKAGECONFIG_append = " faad kms"
+PACKAGECONFIG_remove_keystone = "wayland"
 
 DEPENDS_append_omap-a15 = " \
     libdrm \
@@ -31,6 +25,7 @@ SRC_URI_append_ti43x = " \
     file://0003-kmssink-Add-omapdrm-and-tidss-in-the-list-of-drivers.patch \
     file://0004-waylandsink-Add-drm-support-in-waylandsink.patch \
     file://0005-waylandsink-Add-input-device-support.patch \
+    file://0001-wayland-drm-kms-add-support-for-meson-build-system.patch \
 "
 
 SRC_URI_append_ti33x = " \
@@ -43,6 +38,7 @@ SRC_URI_append_omap-a15 = " \
     file://0003-kmssink-Add-omapdrm-and-tidss-in-the-list-of-drivers.patch \
     file://0004-waylandsink-Add-drm-support-in-waylandsink.patch \
     file://0005-waylandsink-Add-input-device-support.patch \
+    file://0001-wayland-drm-kms-add-support-for-meson-build-system.patch \
 "
 
 SRC_URI_append_k3 = " \
@@ -51,8 +47,9 @@ SRC_URI_append_k3 = " \
     file://0003-kmssink-Add-omapdrm-and-tidss-in-the-list-of-drivers.patch \
     file://0004-waylandsink-Add-drm-support-in-waylandsink.patch \
     file://0005-waylandsink-Add-input-device-support.patch \
+    file://0001-wayland-drm-kms-add-support-for-meson-build-system.patch \
 "
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-PR_append = ".arago1"
+PR_append = ".arago2"
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/3 libloki: use BPN instead of PN for SRC_URI and S

---
 meta-arago-extras/recipes-support/loki/libloki_0.1.7.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-arago-extras/recipes-support/loki/libloki_0.1.7.bb +2 -2
index d7d7980..07aaa2f 100644
@@ -4,14 +4,14 @@ LICENSE = "MIT"
 
 LIC_FILES_CHKSUM = "file://README;md5=5f7c1a2bebe34fc290234984d5845b03"
 
-SRC_URI = "http://libloki.sourcearchive.com/downloads/${PV}-3/${PN}_${PV}.orig.tar.gz \
+SRC_URI = "http://libloki.sourcearchive.com/downloads/${PV}-3/${BPN}_${PV}.orig.tar.gz \
            file://0001-include-loki-Threads.h-return-statement-with-a-value.patch \
            file://0002-test-Function-FunctionTest.cpp-reference-to-bad_func.patch"
 
 SRC_URI[md5sum] = "af532c24a7f2e12d0829be8201934d92"
 SRC_URI[sha256sum] = "0c2094ce916b106731c8be61c32f538a22e1c0f8398bd5d6295b13d08e0c41a3"
 
-S = "${WORKDIR}/${PN}-${PV}.orig"
+S = "${WORKDIR}/${BPN}-${PV}.orig"
 
 do_configure () {
     sed -i -e 's|^prefix.*$|prefix := ${D}${prefix}|g' ${S}/Makefile.common
Signature · 1 line
2.7.4
#2 lore raw

PATCH 3/3 wayland/weston: cleanup and simplify

In reply to Denys Dmytriyenko

* Merge weston-config into weston-init
* Drop local overrides
* Avoid machine-specific changes

---
 meta-arago-distro/conf/distro/arago.conf            |  1 -
 .../recipes-graphics/wayland/weston-conf_8.0.0.bb   | 21 ---------------------
 .../recipes-graphics/wayland/weston-init.bbappend   | 13 +++++++++----
 .../{weston-conf => weston-init}/ti43x/weston.ini   |  0
 .../{weston-conf => weston-init}/wayland_env.sh     |  0
 .../wayland/{weston-conf => weston-init}/weston.ini |  0
 .../recipes-graphics/wayland/weston_8.0.0.bbappend  |  8 +-------
 .../wayland/wayland-protocols_%.bbappend            | 11 +++++------
 8 files changed, 15 insertions(+), 39 deletions(-)
 delete mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-conf_8.0.0.bb
 rename meta-arago-distro/recipes-graphics/wayland/{weston-conf => weston-init}/ti43x/weston.ini (100%)
 rename meta-arago-distro/recipes-graphics/wayland/{weston-conf => weston-init}/wayland_env.sh (100%)
 rename meta-arago-distro/recipes-graphics/wayland/{weston-conf => weston-init}/weston.ini (100%)
meta-arago-distro/conf/distro/arago.conf +0 -1
index ac20a83..3215fe7 100644
@@ -95,7 +95,6 @@ DISTRO_FEATURES_append = "${@[""," systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
 QT_PROVIDER ?= "qt5"
 
 # Distro-specific package configuration
-PACKAGECONFIG_pn-weston = "egl kms launch clients"
 PACKAGECONFIG_append_pn-systemd = " coredump"
 
 # Configure Qt5 flags (GLES is still required for qtdeclarative and qtwebkit)
meta-arago-distro/recipes-graphics/wayland/weston-conf_8.0.0.bb deleted +0 -21
deleted file mode 100644
index 16cac2b..0000000
@@ -1,21 +0,0 @@
-SUMMARY = "Weston configuration files"
-HOMEPAGE = "http://wayland.freedesktop.org"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-PR = "r2"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-SRC_URI = "file://wayland_env.sh \
-           file://weston.ini \
-"
-
-# Add custom Arago Wayland Environment script file
-do_install () {
-    install -d ${D}${sysconfdir}/profile.d
-    install -m 0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}
-    install -m 0644 ${WORKDIR}/wayland_env.sh ${D}${sysconfdir}/profile.d/
-}
-
-FILES_${PN} += "${sysconfdir}/profile.d/* ${sysconfdir}/weston.ini"
meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend +9 -4
index cbe0fe3..55b191e 100644
@@ -1,15 +1,20 @@
-PR_append = ".arago9"
-
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
+PR_append = ".arago10"
+
 SRC_URI_append = " \
     file://runWeston \
+    file://wayland_env.sh \
+    file://weston.ini \
 "
 
 do_install_append() {
     install -d ${D}${bindir}
     install -m 755 ${WORKDIR}/runWeston ${D}${bindir}
-    rm -rf ${D}${systemd_system_unitdir}
+
+    install -d ${D}${sysconfdir}/profile.d
+    install -m 0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}
+    install -m 0644 ${WORKDIR}/wayland_env.sh ${D}${sysconfdir}/profile.d/
 }
 
-SYSTEMD_SERVICE_${PN} = ""
+FILES_${PN} += "${sysconfdir}/profile.d/* ${sysconfdir}/weston.ini"
meta-arago-distro/recipes-graphics/wayland/weston-init/ti43x/weston.ini renamed from meta-arago-distro/recipes-graphics/wayland/weston-conf/ti43x/weston.ini +0 -0
similarity index 100%
rename from meta-arago-distro/recipes-graphics/wayland/weston-conf/ti43x/weston.ini
rename to meta-arago-distro/recipes-graphics/wayland/weston-init/ti43x/weston.ini
meta-arago-distro/recipes-graphics/wayland/weston-init/wayland_env.sh renamed from meta-arago-distro/recipes-graphics/wayland/weston-conf/wayland_env.sh +0 -0
similarity index 100%
rename from meta-arago-distro/recipes-graphics/wayland/weston-conf/wayland_env.sh
rename to meta-arago-distro/recipes-graphics/wayland/weston-init/wayland_env.sh
meta-arago-distro/recipes-graphics/wayland/weston-init/weston.ini renamed from meta-arago-distro/recipes-graphics/wayland/weston-conf/weston.ini +0 -0
similarity index 100%
rename from meta-arago-distro/recipes-graphics/wayland/weston-conf/weston.ini
rename to meta-arago-distro/recipes-graphics/wayland/weston-init/weston.ini
meta-arago-distro/recipes-graphics/wayland/weston_8.0.0.bbappend +1 -7
index 7a937f0..006579b 100644
@@ -1,10 +1,6 @@
-PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/libgbm mtdev"
-
-PR_append = ".arago2"
-
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-RDEPENDS_${PN} += "weston-conf"
+PR_append = ".arago3"
 
 #        file://0002-weston-Allow-visual_id-to-be-0.patch
 SRC_URI += " \
@@ -12,5 +8,3 @@ SRC_URI += " \
         file://0004-weston-Fix-touch-screen-crash-issue.patch \
         file://0001-backend-drm-Select-plane-based-on-current-attached-C.patch \
 "
-
-INHIBIT_PACKAGE_STRIP = "1"
meta-arago-extras/recipes-graphics/wayland/wayland-protocols_%.bbappend +5 -6
index 7edd850..c7803c3 100644
@@ -1,12 +1,11 @@
-PR_append = ".arago1"
-
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-SRC_URI += " \
-      file://0001-wayland-drm-Add-wayland-drm-protocol-to-stable.patch \
-      "
+PR_append = ".arago2"
 
-SRC_URI_append_j7-evm = "file://0002-wayland-drm-Update-to-version-2.patch"
+SRC_URI += " \
+    file://0001-wayland-drm-Add-wayland-drm-protocol-to-stable.patch \
+    file://0002-wayland-drm-Update-to-version-2.patch \
+"
 
 do_install_append() {
 	install -d ${D}${datadir}/wayland-protocols/stable/wayland-drm
Signature · 1 line
2.7.4