diff options
Diffstat (limited to 'meta/recipes-graphics')
167 files changed, 4662 insertions, 1324 deletions
diff --git a/meta/recipes-graphics/cairo/cairo_1.16.0.bb b/meta/recipes-graphics/cairo/cairo_1.16.0.bb index f32e9ba1bc..68f993d7ca 100644 --- a/meta/recipes-graphics/cairo/cairo_1.16.0.bb +++ b/meta/recipes-graphics/cairo/cairo_1.16.0.bb @@ -10,12 +10,12 @@ HOMEPAGE = "http://cairographics.org" BUGTRACKER = "http://bugs.freedesktop.org" SECTION = "libs" -LICENSE = "MPL-1.1 & LGPLv2.1 & GPLv3+" -LICENSE_${PN} = "MPL-1.1 & LGPLv2.1" -LICENSE_${PN}-dev = "MPL-1.1 & LGPLv2.1" -LICENSE_${PN}-doc = "MPL-1.1 & LGPLv2.1" -LICENSE_${PN}-gobject = "MPL-1.1 & LGPLv2.1" -LICENSE_${PN}-script-interpreter = "MPL-1.1 & LGPLv2.1" +LICENSE = "(MPL-1.1 | LGPLv2.1) & GPLv3+" +LICENSE_${PN} = "MPL-1.1 | LGPLv2.1" +LICENSE_${PN}-dev = "MPL-1.1 | LGPLv2.1" +LICENSE_${PN}-doc = "MPL-1.1 | LGPLv2.1" +LICENSE_${PN}-gobject = "MPL-1.1 | LGPLv2.1" +LICENSE_${PN}-script-interpreter = "MPL-1.1 | LGPLv2.1" LICENSE_${PN}-perf-utils = "GPLv3+" LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77" @@ -23,7 +23,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77" DEPENDS = "fontconfig glib-2.0 libpng pixman zlib" SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \ - file://cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff \ + file://cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff \ file://CVE-2018-19876.patch \ file://CVE-2019-6461.patch \ file://CVE-2019-6462.patch \ @@ -40,7 +40,10 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext" PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)}" + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)} \ + trace" +PACKAGECONFIG_class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)}" +PACKAGECONFIG_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)}" PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}" PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb" @@ -49,6 +52,7 @@ PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind" PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl" PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2" PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl" +PACKAGECONFIG[trace] = "--enable-trace,--disable-trace" EXTRA_OECONF += " \ ${@bb.utils.contains('TARGET_FPU', 'soft', '--disable-some-floating-point', '', d)} \ @@ -66,6 +70,10 @@ do_install_append () { rm -rf ${D}${libdir}/cairo/cairo-sphinx* rm -rf ${D}${libdir}/cairo/.debug/cairo-fdr* rm -rf ${D}${libdir}/cairo/.debug/cairo-sphinx* + [ ! -d ${D}${bindir} ] || + rmdir -p --ignore-fail-on-non-empty ${D}${bindir} + [ ! -d ${D}${libdir}/cairo ] || + rmdir -p --ignore-fail-on-non-empty ${D}${libdir}/cairo } PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils" diff --git a/meta/recipes-graphics/clutter/clutter-1.0.inc b/meta/recipes-graphics/clutter/clutter-1.0.inc index 6dbbf4d803..80472178be 100644 --- a/meta/recipes-graphics/clutter/clutter-1.0.inc +++ b/meta/recipes-graphics/clutter/clutter-1.0.inc @@ -1,14 +1,17 @@ SUMMARY = "Graphics library for creating hardware-accelerated user interfaces" +DESCRIPTION = "Clutter is an Open GL based interactive canvas library, \ +designed for creating fast, mainly 2D single window applications such as media \ +box UIs, presentations, kiosk style applications and so on." HOMEPAGE = "http://www.clutter-project.org/" LICENSE = "LGPLv2.1+" -inherit clutter ptest-gnome distro_features_check upstream-version-is-even gobject-introspection +inherit clutter ptest-gnome features_check upstream-version-is-even gobject-introspection # depends on cogl-1.0 which needs opengl REQUIRED_DISTRO_FEATURES ?= "opengl" DEPENDS = "pango glib-2.0 json-glib atk udev cogl-1.0" PACKAGE_BEFORE_PN += "${PN}-examples" -AUTOTOOLS_AUXDIR = "${S}/build" +AUTOTOOLS_AUXDIR = "${S}/build-aux" EDEPENDS_X11 = "virtual/libx11 libxi libxfixes" EDEPENDS_GLX = "virtual/libgl" @@ -21,11 +24,11 @@ ERDEPENDS_EVDEV = "xkeyboard-config" # Disable pretty much everything, override in platform specific set up EXTRA_OECONF += "--disable-quartz-backend \ --disable-win32-backend \ - --disable-gdk-backend \ --disable-cex100-backend \ --disable-tslib-input \ " +PACKAGECONFIG[gdk] = "--enable-gdk-backend,--disable-gdk-backend,gtk+3" PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,${EDEPENDS_X11}" PACKAGECONFIG[glx] = ",,${EDEPENDS_X11} ${EDEPENDS_GLX}" PACKAGECONFIG[egl] = "--enable-egl-backend,--disable-egl-backend,${EDEPENDS_EGL}" @@ -34,7 +37,7 @@ PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,${E PACKAGECONFIG[wayland-compositor] = "--enable-wayland-compositor,--disable-wayland-compositor,wayland" # Default configuration, distros might want to override -PACKAGECONFIG ??= "egl \ +PACKAGECONFIG ??= "egl gdk \ ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx x11', '', d)}" diff --git a/meta/recipes-graphics/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch b/meta/recipes-graphics/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch index f5c18c5828..fef82eaf92 100644 --- a/meta/recipes-graphics/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch +++ b/meta/recipes-graphics/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch @@ -1,4 +1,4 @@ -From 668e1d14af13249384ab324c7d79ec4147f07e48 Mon Sep 17 00:00:00 2001 +From d6ceb5a44b28e0e50ede22b84984d8516897de4b Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen <jussi.kukkonen@intel.com> Date: Mon, 27 Apr 2015 20:12:33 +0300 Subject: [PATCH] Run installed tests with tap output @@ -9,14 +9,15 @@ gnome-desktop-testing-runner properly interprets the results. Upstream-Status: Pending Signed-off-by: Tim Orling <TicoTimo@gmail.com> + --- - build/autotools/glib-tap.mk | 3 ++- + build-aux/autotools/glib-tap.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/build/autotools/glib-tap.mk b/build/autotools/glib-tap.mk -index 7c5f82b..844e17e 100644 ---- a/build/autotools/glib-tap.mk -+++ b/build/autotools/glib-tap.mk +diff --git a/build-aux/autotools/glib-tap.mk b/build-aux/autotools/glib-tap.mk +index a4f0dad..51cfa31 100644 +--- a/build-aux/autotools/glib-tap.mk ++++ b/build-aux/autotools/glib-tap.mk @@ -127,7 +127,8 @@ installed_test_meta_DATA = $(installed_testcases:=.test) %.test: %$(EXEEXT) Makefile $(AM_V_GEN) (echo '[Test]' > $@.tmp; \ @@ -27,6 +28,3 @@ index 7c5f82b..844e17e 100644 mv $@.tmp $@) CLEANFILES += $(installed_test_meta_DATA) --- -2.1.4 - diff --git a/meta/recipes-graphics/clutter/clutter-1.0_1.26.2.bb b/meta/recipes-graphics/clutter/clutter-1.0_1.26.4.bb index 48b050198a..ee549fbdd5 100644 --- a/meta/recipes-graphics/clutter/clutter-1.0_1.26.2.bb +++ b/meta/recipes-graphics/clutter/clutter-1.0_1.26.4.bb @@ -2,8 +2,8 @@ require clutter-1.0.inc LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" -SRC_URI[archive.md5sum] = "a03482cbacf735eca8c996f210a21ee5" -SRC_URI[archive.sha256sum] = "e7233314983055e9018f94f56882e29e7fc34d8d35de030789fdcd9b2d0e2e56" +SRC_URI[archive.md5sum] = "624dd776a5159de0267587b1df6b97b2" +SRC_URI[archive.sha256sum] = "8b48fac159843f556d0a6be3dbfc6b083fc6d9c58a20a49a6b4919ab4263c4e6" SRC_URI += "file://install-examples.patch \ file://run-installed-tests-with-tap-output.patch \ file://0001-Remove-clutter.types-as-it-is-build-configuration-sp.patch \ diff --git a/meta/recipes-graphics/clutter/clutter-gst-3.0.inc b/meta/recipes-graphics/clutter/clutter-gst-3.0.inc index 4c877982b7..fc3eade886 100644 --- a/meta/recipes-graphics/clutter/clutter-gst-3.0.inc +++ b/meta/recipes-graphics/clutter/clutter-gst-3.0.inc @@ -2,7 +2,7 @@ SUMMARY = "GStreamer integration library for Clutter" HOMEPAGE = "http://www.clutter-project.org/" LICENSE = "LGPLv2+" -inherit clutter distro_features_check upstream-version-is-even gobject-introspection +inherit clutter features_check upstream-version-is-even gobject-introspection # depends on clutter-1.0 which depends on cogl-1.0 REQUIRED_DISTRO_FEATURES ?= "opengl" diff --git a/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc b/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc index 11826a6f0c..7bf2278555 100644 --- a/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc +++ b/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc @@ -3,7 +3,7 @@ HOMEPAGE = "http://www.clutter-project.org/" LICENSE = "LGPLv2+" CLUTTERBASEBUILDCLASS = "meson" -inherit clutter distro_features_check upstream-version-is-even gobject-introspection gtk-doc +inherit clutter features_check upstream-version-is-even gobject-introspection gtk-doc # depends on clutter-1.0 which depends on cogl-1.0 REQUIRED_DISTRO_FEATURES ?= "opengl" diff --git a/meta/recipes-graphics/cogl/cogl-1.0.inc b/meta/recipes-graphics/cogl/cogl-1.0.inc index 4436163168..d581ad1c04 100644 --- a/meta/recipes-graphics/cogl/cogl-1.0.inc +++ b/meta/recipes-graphics/cogl/cogl-1.0.inc @@ -1,8 +1,12 @@ SUMMARY = "Modern 3D graphics API with associated utility APIs" -HOMEPAGE = "http://wiki.clutter-project.org/wiki/Cogl" +DESCRIPTION = "Cogl is a small open source library for using 3D graphics \ +hardware for rendering. The API departs from the flat state machine style of \ +OpenGL and is designed to make it easy to write orthogonal components that \ +can render without stepping on each others toes." +HOMEPAGE = "https://gitlab.gnome.org/GNOME/cogl" LICENSE = "MIT" -inherit clutter distro_features_check upstream-version-is-even gobject-introspection +inherit clutter features_check upstream-version-is-even gobject-introspection # cogl-1.0 needs opengl to build REQUIRED_DISTRO_FEATURES ?= "opengl" @@ -17,7 +21,7 @@ EDEPENDS_GL = "virtual/libgl libdrm" EDEPENDS_GLES2 = "virtual/libgles2" EDEPENDS_KMS = "libdrm virtual/egl" EDEPENDS_EGL = "virtual/egl" -EDEPENDS_X11 = "virtual/libx11 libxcomposite libxfixes libxi libxrandr" +EDEPENDS_X11 = "virtual/libx11 libxcomposite libxdamage libxfixes libxrandr" EDEPENDS_WAYLAND = "virtual/egl virtual/libgles2 wayland" # Extra RDEPENDS for PACKAGECONFIG diff --git a/meta/recipes-graphics/cogl/cogl-1.0/0001-configure.ac-don-t-require-eglmesaext.h.patch b/meta/recipes-graphics/cogl/cogl-1.0/0001-configure.ac-don-t-require-eglmesaext.h.patch new file mode 100644 index 0000000000..328984a63f --- /dev/null +++ b/meta/recipes-graphics/cogl/cogl-1.0/0001-configure.ac-don-t-require-eglmesaext.h.patch @@ -0,0 +1,92 @@ +From bb9765a926588ebfe1eb324fbbe8fc22d419eebe Mon Sep 17 00:00:00 2001 +From: Max Krummenacher <max.krummenacher@toradex.com> +Date: Thu, 25 Jun 2020 11:27:40 +0000 +Subject: [PATCH] configure.ac: don't require eglmesaext.h + +E.g. the Vivante EGL implementation does not provide eglmesaext.h. + +The commit moves the check for header file existence outside of the +check for existence of a egl packageconfig and makes the existence +of eglmesaext.h optional. + +fixes commit fb1acfec ("Fix building against libglvnd-provided EGL headers") +Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/cogl/-/merge_requests/28] +Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> +--- + configure.ac | 51 ++++++++++++++++++++++++++++++++------------------- + 1 file changed, 32 insertions(+), 19 deletions(-) + +diff --git a/configure.ac b/configure.ac +index b7ba95d..0d1d8de 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1212,22 +1212,6 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"], + PKG_CHECK_EXISTS([egl], + [COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES egl"], + [ +- AC_CHECK_HEADERS( +- [EGL/egl.h], +- [], +- [AC_MSG_ERROR([Unable to locate required EGL headers])]) +- AC_CHECK_HEADERS( +- [EGL/eglext.h], +- [], +- [AC_MSG_ERROR([Unable to locate required EGL headers])], +- [#include <EGL/egl.h>]) +- AC_CHECK_HEADERS( +- [EGL/eglmesaext.h], +- [], +- [AC_MSG_ERROR([Unable to locate required EGL headers])], +- [#include <EGL/egl.h> +-#include <EGL/eglext.h>]) +- + AC_CHECK_LIB(EGL, [eglInitialize], + [COGL_EXTRA_LDFLAGS="$COGL_EXTRA_LDFLAGS -lEGL"], + [AC_MSG_ERROR([Unable to locate required EGL library])]) +@@ -1236,9 +1220,38 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"], + ] + ) + +- COGL_EGL_INCLUDES="#include <EGL/egl.h> +-#include <EGL/eglext.h> +-#include <EGL/eglmesaext.h>" ++dnl Test for the existence of egl headers. ++dnl egl*.h includes eglplatform.h which on __unix__ defaults to a X11 platform. ++dnl In that case AC_CHECK_HEADERS failes if X11 headers are not available. ++dnl Set the usual include guard define and, if the EGL implementation doesn't ++dnl use that guard fall back to USE_OZONE and EGL_NO_X11 platforms which don't ++dnl require additional headers. ++ AC_CHECK_HEADERS( ++ [EGL/egl.h], ++ [COGL_EGL_INCLUDES="#include <EGL/egl.h>"], ++ [AC_MSG_ERROR([Unable to locate required EGL headers])], ++ [#define __egl_h_ ++ #define USE_OZONE ++ #define EGL_NO_X11]) ++ AC_CHECK_HEADERS( ++ [EGL/eglext.h], ++ [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDES ++#include <EGL/eglext.h>"], ++ [AC_MSG_ERROR([Unable to locate required EGL headers])], ++ [#define __eglext_h_ ++ #define USE_OZONE ++ #define EGL_NO_X11 ++$COGL_EGL_INCLUDES]) ++ AC_CHECK_HEADERS( ++ [EGL/eglmesaext.h], ++ [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDES ++#include <EGL/eglmesaext.h>"], ++ [], ++ [#define __eglmesaext_h_ ++#define USE_OZONE ++#define EGL_NO_X11 ++$COGL_EGL_INCLUDES]) ++ + AC_SUBST([COGL_EGL_INCLUDES]) + ]) + +-- +2.20.1 + diff --git a/meta/recipes-graphics/cogl/cogl-1.0_1.22.4.bb b/meta/recipes-graphics/cogl/cogl-1.0_1.22.4.bb deleted file mode 100644 index 8e61c19f5d..0000000000 --- a/meta/recipes-graphics/cogl/cogl-1.0_1.22.4.bb +++ /dev/null @@ -1,6 +0,0 @@ -require cogl-1.0.inc - -SRC_URI[archive.md5sum] = "31755015a865c4af51ac84f6e53af8ab" -SRC_URI[archive.sha256sum] = "5217bf94cbca3df63268a3b79d017725382b9e592b891d1e7dc6212590ce0de0" - -LIC_FILES_CHKSUM = "file://COPYING;md5=1b1a508d91d25ca607c83f92f3e31c84" diff --git a/meta/recipes-graphics/cogl/cogl-1.0_1.22.8.bb b/meta/recipes-graphics/cogl/cogl-1.0_1.22.8.bb new file mode 100644 index 0000000000..b9446fab38 --- /dev/null +++ b/meta/recipes-graphics/cogl/cogl-1.0_1.22.8.bb @@ -0,0 +1,6 @@ +require cogl-1.0.inc + +SRC_URI += "file://0001-configure.ac-don-t-require-eglmesaext.h.patch" +SRC_URI[archive.sha256sum] = "a805b2b019184710ff53d0496f9f0ce6dcca420c141a0f4f6fcc02131581d759" + +LIC_FILES_CHKSUM = "file://COPYING;md5=1b1a508d91d25ca607c83f92f3e31c84" diff --git a/meta/recipes-graphics/drm/files/0001-xf86drm.c-fix-build-failure.patch b/meta/recipes-graphics/drm/files/0001-xf86drm.c-fix-build-failure.patch new file mode 100644 index 0000000000..60c996ca85 --- /dev/null +++ b/meta/recipes-graphics/drm/files/0001-xf86drm.c-fix-build-failure.patch @@ -0,0 +1,87 @@ +From c7d89412884de2dbfa543720d185027377e62f21 Mon Sep 17 00:00:00 2001 +From: Heiko Thiery <heiko.thiery@gmail.com> +Date: Fri, 5 Jun 2020 23:46:52 +0200 +Subject: [PATCH] xf86drm.c: fix build failure + +./xf86drm.c: In function 'drmNodeIsDRM': +../xf86drm.c:2825:7: error: "__FreeBSD__" is not defined [-Werror=undef] + #elif __FreeBSD__ + ^ +../xf86drm.c: In function 'drmGetMinorNameForFD': +../xf86drm.c:2938:7: error: "__FreeBSD__" is not defined [-Werror=undef] + #elif __FreeBSD__ + ^ +../xf86drm.c: In function 'drmParsePciBusInfo': +../xf86drm.c:3258:7: error: "__FreeBSD__" is not defined [-Werror=undef] + #elif __FreeBSD__ + ^ +../xf86drm.c: In function 'drmParsePciDeviceInfo': +../xf86drm.c:3427:7: error: "__FreeBSD__" is not defined [-Werror=undef] + #elif __FreeBSD__ + ^ +../xf86drm.c: In function 'drmGetDeviceNameFromFd2': +../xf86drm.c:4305:7: error: "__FreeBSD__" is not defined [-Werror=undef] + #elif __FreeBSD__ + ^ + +Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com> + +Upstream-Status: Backport +Signed-off-by: Armin Kuster <akuster@mvista.com> + +--- + xf86drm.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/xf86drm.c b/xf86drm.c +index 07a18c4..50a6f09 100644 +--- a/xf86drm.c ++++ b/xf86drm.c +@@ -2822,7 +2822,7 @@ static bool drmNodeIsDRM(int maj, int min) + snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device/drm", + maj, min); + return stat(path, &sbuf) == 0; +-#elif __FreeBSD__ ++#elif defined(__FreeBSD__) + char name[SPECNAMELEN]; + + if (!devname_r(makedev(maj, min), S_IFCHR, name, sizeof(name))) +@@ -2935,7 +2935,7 @@ static char *drmGetMinorNameForFD(int fd, int type) + + closedir(sysdir); + return NULL; +-#elif __FreeBSD__ ++#elif defined(__FreeBSD__) + struct stat sbuf; + char dname[SPECNAMELEN]; + const char *mname; +@@ -3255,7 +3255,7 @@ static int drmParsePciBusInfo(int maj, int min, drmPciBusInfoPtr info) + info->func = pinfo.func; + + return 0; +-#elif __FreeBSD__ ++#elif defined(__FreeBSD__) + return get_sysctl_pci_bus_info(maj, min, info); + #else + #warning "Missing implementation of drmParsePciBusInfo" +@@ -3424,7 +3424,7 @@ static int drmParsePciDeviceInfo(int maj, int min, + device->subdevice_id = pinfo.subdevice_id; + + return 0; +-#elif __FreeBSD__ ++#elif defined(__FreeBSD__) + drmPciBusInfo info; + struct pci_conf_io pc; + struct pci_match_conf patterns[1]; +@@ -4302,7 +4302,7 @@ drm_public char *drmGetDeviceNameFromFd2(int fd) + free(value); + + return strdup(path); +-#elif __FreeBSD__ ++#elif defined(__FreeBSD__) + return drmGetDeviceNameFromFd(fd); + #else + struct stat sbuf; +-- +1.8.3.1 + diff --git a/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch b/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch deleted file mode 100644 index e3d6c5b853..0000000000 --- a/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch +++ /dev/null @@ -1,35 +0,0 @@ -Upstream-Status: Submitted -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From 46c0fd6c827a8cb4d04e067bf04fab579ac4712e Mon Sep 17 00:00:00 2001 -From: Ross Burton <ross.burton@intel.com> -Date: Mon, 18 Jun 2018 15:07:03 +0100 -Subject: [PATCH] tests/nouveau/threaded: adapt ioctl signature - -POSIX says ioctl() has the signature (int, int, ...) but glibc has decided to -use (int, unsigned long int, ...) instead. - -Use a #ifdef to adapt the replacement function as appropriate. ---- - tests/nouveau/threaded.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/tests/nouveau/threaded.c b/tests/nouveau/threaded.c -index 3669bcd3..e1c27c01 100644 ---- a/tests/nouveau/threaded.c -+++ b/tests/nouveau/threaded.c -@@ -36,7 +36,11 @@ static int failed; - - static int import_fd; - -+#ifdef __GLIBC__ - int ioctl(int fd, unsigned long request, ...) -+#else -+int ioctl(int fd, int request, ...) -+#endif - { - va_list va; - int ret; --- -2.11.0 - diff --git a/meta/recipes-graphics/drm/libdrm_2.4.99.bb b/meta/recipes-graphics/drm/libdrm_2.4.102.bb index fa3eb08f40..ad512d14a9 100644 --- a/meta/recipes-graphics/drm/libdrm_2.4.99.bb +++ b/meta/recipes-graphics/drm/libdrm_2.4.102.bb @@ -10,10 +10,10 @@ LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c5 PROVIDES = "drm" DEPENDS = "libpthread-stubs" -SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.bz2 \ - file://musl-ioctl.patch" -SRC_URI[md5sum] = "72539626815b35159a63d45bc4c14ee6" -SRC_URI[sha256sum] = "4dbf539c7ed25dbb2055090b77ab87508fc46be39a9379d15fed4b5517e1da5e" +SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.xz \ + file://0001-xf86drm.c-fix-build-failure.patch " + +SRC_URI[sha256sum] = "8bcbf9336c28e393d76c1f16d7e79e394a7fce8a2e929d52d3ad7ad8525ba05b" inherit meson pkgconfig manpages diff --git a/meta/recipes-graphics/freetype/freetype_2.10.1.bb b/meta/recipes-graphics/freetype/freetype_2.10.2.bb index b179a0ed47..1034ddc0d7 100644 --- a/meta/recipes-graphics/freetype/freetype_2.10.1.bb +++ b/meta/recipes-graphics/freetype/freetype_2.10.2.bb @@ -15,8 +15,8 @@ LIC_FILES_CHKSUM = "file://docs/LICENSE.TXT;md5=4af6221506f202774ef74f64932878a1 SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BP}.tar.xz \ file://use-right-libtool.patch \ " -SRC_URI[md5sum] = "bd42e75127f8431923679480efb5ba8f" -SRC_URI[sha256sum] = "16dbfa488a21fe827dc27eaf708f42f7aa3bb997d745d31a19781628c36ba26f" +SRC_URI[md5sum] = "7c0d5a39f232d7eb9f9d7da76bf08074" +SRC_URI[sha256sum] = "1543d61025d2e6312e0a1c563652555f17378a204a61e99928c9fcef030a2d8b" UPSTREAM_CHECK_REGEX = "freetype-(?P<pver>\d+(\.\d+)+)" @@ -27,7 +27,7 @@ AUTOTOOLS_SCRIPT_PATH = "${S}/builds/unix" CONFIGURE_SCRIPT = "${S}/configure" EXTRA_AUTORECONF += "--exclude=autoheader --exclude=automake" -PACKAGECONFIG ??= "zlib" +PACKAGECONFIG ??= "zlib pixmap" PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2" # harfbuzz results in a circular dependency so enabling is non-trivial diff --git a/meta/recipes-graphics/glew/glew/0001-Fixed-compilation-with-current-mesa-versions.patch b/meta/recipes-graphics/glew/glew/0001-Fixed-compilation-with-current-mesa-versions.patch deleted file mode 100644 index 64f3e2fd9b..0000000000 --- a/meta/recipes-graphics/glew/glew/0001-Fixed-compilation-with-current-mesa-versions.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 7f65a36866f4e24dd1446fe1c9d21424f28bcabd Mon Sep 17 00:00:00 2001 -From: Deve <deveee@gmail.com> -Date: Wed, 14 Nov 2018 21:07:29 +0100 -Subject: [PATCH] Fixed compilation with current mesa versions. - -As you can see in -https://cgit.freedesktop.org/mesa/mesa/tree/include/GL/glext.h -now the file uses __gl_glext_h_ instead of __glext_h_ -It's precisely caused by commit f7d42ee7d319256608ad60778f6787c140badada - -Backoprt notes: - -* The original patch adjusts auto/src/glew_head.h only -* include/GL/glew.h is not part of git repo and gets created on tarball - creation - -=> patch include/GL/glew.h either to cause the desired fix - -Upstream-Status: Backport [1] - -[1] https://github.com/nigels-com/glew/commit/7f65a36866f4e24dd1446fe1c9d21424f28bcabd - -Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> ---- - auto/src/glew_head.h | 3 ++- - include/GL/glew.h | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/auto/src/glew_head.h b/auto/src/glew_head.h -index c19cefb..8f313d9 100644 ---- a/auto/src/glew_head.h -+++ b/auto/src/glew_head.h -@@ -14,7 +14,7 @@ - #if defined(__REGAL_H__) - #error Regal.h included before glew.h - #endif --#if defined(__glext_h_) || defined(__GLEXT_H_) -+#if defined(__glext_h_) || defined(__GLEXT_H_) || defined(__gl_glext_h_) - #error glext.h included before glew.h - #endif - #if defined(__gl_ATI_h_) -@@ -30,6 +30,7 @@ - #define __X_GL_H - #define __glext_h_ - #define __GLEXT_H_ -+#define __gl_glext_h_ - #define __gl_ATI_h_ - - #if defined(_WIN32) -diff --git a/include/GL/glew.h b/include/GL/glew.h -index b5b6987..a9f9e4b 100644 ---- a/include/GL/glew.h -+++ b/include/GL/glew.h -@@ -93,7 +93,7 @@ - #if defined(__REGAL_H__) - #error Regal.h included before glew.h - #endif --#if defined(__glext_h_) || defined(__GLEXT_H_) -+#if defined(__glext_h_) || defined(__GLEXT_H_) || defined(__gl_glext_h_) - #error glext.h included before glew.h - #endif - #if defined(__gl_ATI_h_) -@@ -109,6 +109,7 @@ - #define __X_GL_H - #define __glext_h_ - #define __GLEXT_H_ -+#define __gl_glext_h_ - #define __gl_ATI_h_ - - #if defined(_WIN32) --- -2.20.1 - diff --git a/meta/recipes-graphics/glew/glew_2.1.0.bb b/meta/recipes-graphics/glew/glew_2.2.0.bb index 18e6909aa7..8948444e08 100644 --- a/meta/recipes-graphics/glew/glew_2.1.0.bb +++ b/meta/recipes-graphics/glew/glew_2.2.0.bb @@ -6,24 +6,23 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2" SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \ - file://no-strip.patch \ - file://0001-Fixed-compilation-with-current-mesa-versions.patch" + file://no-strip.patch" -SRC_URI[md5sum] = "b2ab12331033ddfaa50dc39345343980" -SRC_URI[sha256sum] = "04de91e7e6763039bc11940095cd9c7f880baba82196a7765f727ac05a993c95" +SRC_URI[md5sum] = "3579164bccaef09e36c0af7f4fd5c7c7" +SRC_URI[sha256sum] = "d4fc82893cfb00109578d0a1a2337fb8ca335b3ceccf97b97e5cc7f08e4353e1" UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/glew/files/glew" UPSTREAM_CHECK_REGEX = "/glew/(?P<pver>(\d+[\.\-_]*)+)/" -inherit lib_package pkgconfig distro_features_check +inherit lib_package pkgconfig features_check REQUIRED_DISTRO_FEATURES = "opengl" PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl', 'egl-gles2', d)}" # The opengl and egl-XXX options are exclusive, enable only one. -PACKAGECONFIG[opengl] = "SYSTEM='linux',,virtual/libx11 virtual/libgl libglu libxext libxi libxmu" -PACKAGECONFIG[egl-gles2] = "SYSTEM='linux-egl' GLEW_NO_GLU='-DGLEW_NO_GLU' LDFLAGS.GL='-lEGL -lGLESv2',,virtual/egl virtual/libgles2" +PACKAGECONFIG[opengl] = "SYSTEM='linux',,virtual/libx11 virtual/libgl libglu libxext libxi libxmu,,,egl-gles2" +PACKAGECONFIG[egl-gles2] = "SYSTEM='linux-egl' GLEW_NO_GLU='-DGLEW_NO_GLU' LDFLAGS.GL='-lEGL -lGLESv2',,virtual/egl virtual/libgles2,,,opengl" CFLAGS += "-D_GNU_SOURCE" # Override SYSTEM (via PACKAGECONFIG_CONFARGS) to avoid calling config.guess, diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz/0001-Do-not-disable-introspection-in-cross-builds.patch b/meta/recipes-graphics/harfbuzz/harfbuzz/0001-Do-not-disable-introspection-in-cross-builds.patch new file mode 100644 index 0000000000..d00656fc88 --- /dev/null +++ b/meta/recipes-graphics/harfbuzz/harfbuzz/0001-Do-not-disable-introspection-in-cross-builds.patch @@ -0,0 +1,27 @@ +From df5848f423ec0f4b3e519900014349a0c00b1969 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Mon, 17 Aug 2020 16:36:03 +0200 +Subject: [PATCH] Do not disable introspection in cross builds. + +Yocto can and does support introspection cross builds, through +running target binaries under qemu emulation. + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + src/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/meson.build b/src/meson.build +index 1865633..5e1787c 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -634,7 +634,7 @@ if have_gobject + gir = find_program('g-ir-scanner', required: get_option('introspection')) + build_gir = gir.found() + +- build_gir = build_gir and not meson.is_cross_build() ++ build_gir = build_gir + if not build_gir and get_option('introspection').enabled() + error('Introspection support is requested but it isn\'t available in cross builds') + endif diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz/0001-src-hb-gobject-enums.cc.tmpl-write-out-only-the-file.patch b/meta/recipes-graphics/harfbuzz/harfbuzz/0001-src-hb-gobject-enums.cc.tmpl-write-out-only-the-file.patch new file mode 100644 index 0000000000..d9fccfac0e --- /dev/null +++ b/meta/recipes-graphics/harfbuzz/harfbuzz/0001-src-hb-gobject-enums.cc.tmpl-write-out-only-the-file.patch @@ -0,0 +1,28 @@ +From f316b794265f28e89821dfab0772caac1bb6b056 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Tue, 18 Aug 2020 10:31:47 +0000 +Subject: [PATCH] src/hb-gobject-enums.cc.tmpl: write out only the filename, + not the full path + +This is beneficial for reproducible builds, as build paths can vary +between builds. + +Upstream-Status: Backport [https://github.com/harfbuzz/harfbuzz/commit/e876886d1e877ad90b6f02badefd6ebee1bc0b09] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + src/hb-gobject-enums.cc.tmpl | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/hb-gobject-enums.cc.tmpl b/src/hb-gobject-enums.cc.tmpl +index 2ffd1c9..87a11dd 100644 +--- a/src/hb-gobject-enums.cc.tmpl ++++ b/src/hb-gobject-enums.cc.tmpl +@@ -43,7 +43,7 @@ + /*** END file-header ***/ + + /*** BEGIN file-production ***/ +-/* enumerations from "@filename@" */ ++/* enumerations from "@basename@" */ + /*** END file-production ***/ + + /*** BEGIN file-tail ***/ diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz/version-race.patch b/meta/recipes-graphics/harfbuzz/harfbuzz/version-race.patch new file mode 100644 index 0000000000..2d692f36b5 --- /dev/null +++ b/meta/recipes-graphics/harfbuzz/harfbuzz/version-race.patch @@ -0,0 +1,121 @@ +Upstream-Status: Backport [https://github.com/harfbuzz/harfbuzz/commit/5aff83104e03d6d2617987d24a51e490ab7a5cd1] +Signed-off-by: Ross Burton <ross.burton@arm.com> + +From bc1c93fbe04459a4b12c76c713ba1b750d2d9108 Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross.burton@arm.com> +Date: Mon, 7 Sep 2020 17:11:17 +0100 +Subject: [PATCH 1/2] [build] No need to pass source directory to + gen-hb-version + +The input file is by definition in the source directory, so dirname() +that instead of needing the directory to be passed. + +Needed because a follow-up commit will change when this is called, and the +source directory isn't trivially available at that point. +--- + src/gen-hb-version.py | 6 +++--- + src/meson.build | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/gen-hb-version.py b/src/gen-hb-version.py +index 15e56b93..bf16f88a 100755 +--- a/src/gen-hb-version.py ++++ b/src/gen-hb-version.py +@@ -4,15 +4,15 @@ + + import os, sys, shutil + +-if len (sys.argv) < 5: ++if len (sys.argv) < 4: + sys.exit(__doc__) + + version = sys.argv[1] + major, minor, micro = version.split (".") + + OUTPUT = sys.argv[2] +-CURRENT_SOURCE_DIR = sys.argv[3] +-INPUT = sys.argv[4] ++INPUT = sys.argv[3] ++CURRENT_SOURCE_DIR = os.path.dirname(INPUT) + + with open (INPUT, "r", encoding='utf-8') as template: + with open (OUTPUT, "wb") as output: +diff --git a/src/meson.build b/src/meson.build +index 5d7cd578..2d78c992 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -286,7 +286,7 @@ custom_target('hb-version.h', + input: 'hb-version.h.in', + output: 'hb-version.h', + command: [find_program('gen-hb-version.py'), meson.project_version(), +- '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'], ++ '@OUTPUT@', '@INPUT@'], + ) + + ragel = find_program('ragel', required: false) +-- +2.28.0 + + +From 5aff83104e03d6d2617987d24a51e490ab7a5cd1 Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross.burton@arm.com> +Date: Mon, 7 Sep 2020 10:55:33 +0100 +Subject: [PATCH 2/2] [build] generate hb-version.h once at configure time with + Meson + +Currently with Meson hb-version.h is generated during the build without +any explicit dependencies which can result in build failures due races +over the file. + +Change this to be generated at configure time, so that the file is always +generated once before the build itself. + +Closes #2667 +--- + src/meson.build | 17 ++++++++--------- + 1 file changed, 8 insertions(+), 9 deletions(-) + +diff --git a/src/meson.build b/src/meson.build +index 2d78c992..19290245 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -1,3 +1,10 @@ ++hb_version_h = configure_file( ++ command: [find_program('gen-hb-version.py'), meson.project_version(), '@OUTPUT@', '@INPUT@'], ++ input: 'hb-version.h.in', ++ output: 'hb-version.h', ++ install: true, ++ install_dir: join_paths(get_option('includedir'), meson.project_name())) ++ + # Base and default-included sources and headers + hb_base_sources = files( + 'hb-aat-layout-ankr-table.hh', +@@ -214,9 +221,9 @@ hb_base_headers = files( + 'hb-shape.h', + 'hb-style.h', + 'hb-unicode.h', +- 'hb-version.h', + 'hb.h', + ) ++hb_base_headers += hb_version_h + + # Optional Sources and Headers with external deps + +@@ -281,14 +288,6 @@ hb_gobject_headers = files( + 'hb-gobject-structs.h', + ) + +-custom_target('hb-version.h', +- build_by_default: true, +- input: 'hb-version.h.in', +- output: 'hb-version.h', +- command: [find_program('gen-hb-version.py'), meson.project_version(), +- '@OUTPUT@', '@INPUT@'], +-) +- + ragel = find_program('ragel', required: false) + if not ragel.found() + warning('You have to install ragel if you are going to develop HarfBuzz itself') +-- +2.28.0 + diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz_2.6.1.bb b/meta/recipes-graphics/harfbuzz/harfbuzz_2.6.1.bb deleted file mode 100644 index 99cd4cd708..0000000000 --- a/meta/recipes-graphics/harfbuzz/harfbuzz_2.6.1.bb +++ /dev/null @@ -1,40 +0,0 @@ -SUMMARY = "Text shaping library" -DESCRIPTION = "HarfBuzz is an OpenType text shaping engine." -HOMEPAGE = "http://www.freedesktop.org/wiki/Software/HarfBuzz" -BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=HarfBuzz" -SECTION = "libs" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=e11f5c3149cdec4bb309babb020b32b9 \ - file://src/hb-ucd.cc;beginline=1;endline=15;md5=29d4dcb6410429195df67efe3382d8bc" - -SRC_URI = "http://www.freedesktop.org/software/harfbuzz/release/${BP}.tar.xz" -SRC_URI[md5sum] = "89b758a2eb14d56a94406cf914b62388" -SRC_URI[sha256sum] = "c651fb3faaa338aeb280726837c2384064cdc17ef40539228d88a1260960844f" - -inherit autotools pkgconfig lib_package gtk-doc - -PACKAGECONFIG ??= "cairo fontconfig freetype glib icu" -PACKAGECONFIG[cairo] = "--with-cairo,--without-cairo,cairo" -PACKAGECONFIG[fontconfig] = "--with-fontconfig,--without-fontconfig,fontconfig" -PACKAGECONFIG[freetype] = "--with-freetype,--without-freetype,freetype" -PACKAGECONFIG[glib] = "--with-glib,--without-glib,glib-2.0" -PACKAGECONFIG[graphite] = "--with-graphite2,--without-graphite2,graphite2" -PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu" - -PACKAGES =+ "${PN}-icu ${PN}-icu-dev" - -LEAD_SONAME = "libharfbuzz.so" - -do_install_append() { - # If no tools are installed due to PACKAGECONFIG then this directory is - #still installed, so remove it to stop packaging wanings. - rmdir --ignore-fail-on-non-empty ${D}${bindir} -} - -FILES_${PN}-icu = "${libdir}/libharfbuzz-icu.so.*" -FILES_${PN}-icu-dev = "${libdir}/libharfbuzz-icu.la \ - ${libdir}/libharfbuzz-icu.so \ - ${libdir}/pkgconfig/harfbuzz-icu.pc \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz_2.7.2.bb b/meta/recipes-graphics/harfbuzz/harfbuzz_2.7.2.bb new file mode 100644 index 0000000000..f95273f686 --- /dev/null +++ b/meta/recipes-graphics/harfbuzz/harfbuzz_2.7.2.bb @@ -0,0 +1,52 @@ +SUMMARY = "Text shaping library" +DESCRIPTION = "HarfBuzz is an OpenType text shaping engine." +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/HarfBuzz" +BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=HarfBuzz" +SECTION = "libs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=8f787620b7d3866d9552fd1924c07572 \ + file://src/hb-ucd.cc;beginline=1;endline=15;md5=29d4dcb6410429195df67efe3382d8bc" + +UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" +UPSTREAM_CHECK_REGEX = "harfbuzz-(?P<pver>\d+(\.\d+)+).tar" + +SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.xz \ + file://0001-Do-not-disable-introspection-in-cross-builds.patch \ + file://0001-src-hb-gobject-enums.cc.tmpl-write-out-only-the-file.patch \ + file://version-race.patch \ + " +SRC_URI[sha256sum] = "b8c048d7c2964a12f2c80deb6634dfc836b603dd12bf0d0a3df1627698e220ce" + +inherit meson pkgconfig lib_package gtk-doc gobject-introspection + +GIR_MESON_ENABLE_FLAG = 'enabled' +GIR_MESON_DISABLE_FLAG = 'disabled' +GTKDOC_MESON_ENABLE_FLAG = 'enabled' +GTKDOC_MESON_DISABLE_FLAG = 'disabled' + +PACKAGECONFIG ??= "cairo fontconfig freetype glib icu" +PACKAGECONFIG[cairo] = "-Dcairo=enabled,-Dcairo=disabled,cairo" +PACKAGECONFIG[fontconfig] = "-Dfontconfig=enabled,-Dfontconfig=disabled,fontconfig" +PACKAGECONFIG[freetype] = "-Dfreetype=enabled,-Dfreetype=disabled,freetype" +PACKAGECONFIG[glib] = "-Dglib=enabled,-Dglib=disabled,glib-2.0" +PACKAGECONFIG[graphite] = "-Dgraphite=enabled,-Dgraphite=disabled,graphite2" +PACKAGECONFIG[icu] = "-Dicu=enabled,-Dicu=disabled,icu" + +PACKAGES =+ "${PN}-icu ${PN}-icu-dev ${PN}-subset" + +LEAD_SONAME = "libharfbuzz.so" + +do_install_append() { + # If no tools are installed due to PACKAGECONFIG then this directory is + #still installed, so remove it to stop packaging wanings. + rmdir --ignore-fail-on-non-empty ${D}${bindir} +} + +FILES_${PN}-icu = "${libdir}/libharfbuzz-icu.so.*" +FILES_${PN}-icu-dev = "${libdir}/libharfbuzz-icu.la \ + ${libdir}/libharfbuzz-icu.so \ + ${libdir}/pkgconfig/harfbuzz-icu.pc \ +" +FILES_${PN}-subset = "${libdir}/libharfbuzz-subset.so.*" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb b/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb new file mode 100644 index 0000000000..89480d79d2 --- /dev/null +++ b/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb @@ -0,0 +1,49 @@ +SUMMARY = "IGT GPU Tools" +DESCRIPTION = "IGT GPU Tools is a collection of tools for development and testing of the DRM drivers" + +LIC_FILES_CHKSUM = "file://COPYING;md5=67bfee4df38fa6ecbe3a675c552d4c08" + +LICENSE = "MIT" + +inherit meson + +SRCREV = "d16ad07e7f2a028e14d61f570931c87fa5ce404c" +PV = "1.25+git${SRCPV}" + +SRC_URI = "git://gitlab.freedesktop.org/drm/igt-gpu-tools.git;protocol=https" + +S = "${WORKDIR}/git" + +DEPENDS += "libdrm libpciaccess cairo udev glib-2.0 procps libunwind kmod openssl elfutils alsa-lib json-c bison-native" +RDEPENDS_${PN} += "bash" +RDEPENDS_${PN}-tests += "bash" + +PACKAGE_BEFORE_PN = "${PN}-benchmarks ${PN}-tests" + +PACKAGECONFIG[chamelium] = "-Dchamelium=enabled,-Dchamelium=disabled,gsl xmlrpc-c" + +EXTRA_OEMESON = "-Ddocs=disabled -Drunner=enabled" +COMPATIBLE_HOST = "(x86_64.*|i.86.*|arm.*|aarch64).*-linux" +COMPATIBLE_HOST_libc-musl_class-target = "null" +SECURITY_LDFLAGS = "${SECURITY_X_LDFLAGS}" + +gputools_sysroot_preprocess() { + rm -f ${SYSROOT_DESTDIR}${libdir}/pkgconfig/intel-gen4asm.pc +} +SYSROOT_PREPROCESS_FUNCS += "gputools_sysroot_preprocess" + +do_install_append() { + install -d ${D}/usr/share/${BPN}/scripts + install ${S}/scripts/run-tests.sh ${D}/usr/share/${BPN}/scripts + install -d ${D}/usr/share/${BPN}/runner + install -D ${B}/runner/igt_runner ${D}/usr/share/${BPN}/runner + install -D ${B}/runner/igt_resume ${D}/usr/share/${BPN}/runner +} + +FILES_${PN}-benchmarks += "${libexecdir}/${BPN}/benchmarks" +FILES_${PN}-tests += "\ + ${libexecdir}/${BPN}/*\ + ${datadir}/${BPN}/1080p-right.png\ + ${datadir}/${BPN}/1080p-left.png\ + ${datadir}/${BPN}/pass.png\ + ${datadir}/${BPN}/test-list.txt" diff --git a/meta/recipes-graphics/images/core-image-weston.bb b/meta/recipes-graphics/images/core-image-weston.bb index e36655ffc5..fa7e9ef421 100644 --- a/meta/recipes-graphics/images/core-image-weston.bb +++ b/meta/recipes-graphics/images/core-image-weston.bb @@ -4,9 +4,11 @@ IMAGE_FEATURES += "splash package-management ssh-server-dropbear hwcodecs" LICENSE = "MIT" -inherit core-image distro_features_check +inherit core-image features_check REQUIRED_DISTRO_FEATURES = "wayland" CORE_IMAGE_BASE_INSTALL += "weston weston-init weston-examples gtk+3-demo clutter-1.0-examples" CORE_IMAGE_BASE_INSTALL += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'weston-xwayland matchbox-terminal', '', d)}" + +QB_MEM = "-m 512" diff --git a/meta/recipes-graphics/images/core-image-x11.bb b/meta/recipes-graphics/images/core-image-x11.bb index cd5374949d..52407759f9 100644 --- a/meta/recipes-graphics/images/core-image-x11.bb +++ b/meta/recipes-graphics/images/core-image-x11.bb @@ -4,7 +4,7 @@ IMAGE_FEATURES += "splash package-management x11-base" LICENSE = "MIT" -inherit core-image distro_features_check +inherit core-image features_check REQUIRED_DISTRO_FEATURES = "x11" diff --git a/meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.3.bb b/meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.5.bb index 1cf854de62..9729fb5dd5 100644 --- a/meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.3.bb +++ b/meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.5.bb @@ -8,18 +8,18 @@ LIC_FILES_CHKSUM = "file://cdjpeg.h;endline=13;md5=8184bcc7c4ac7b9edc6a7bc00f231 file://djpeg.c;endline=11;md5=c59e19811c006cb38f82d6477134d314 \ " DEPENDS_append_x86-64_class-target = " nasm-native" -DEPENDS_append_x86_class-target = " nasm-native" +DEPENDS_append_x86_class-target = " nasm-native" SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ file://0001-libjpeg-turbo-fix-package_qa-error.patch \ " -SRC_URI[md5sum] = "bd07fddf26f9def7bab02739eb655116" -SRC_URI[sha256sum] = "4246de500544d4ee408ee57048aa4aadc6f165fc17f141da87669f20ed3241b7" +SRC_URI[md5sum] = "3a7dc293918775fc933f81e2bce36464" +SRC_URI[sha256sum] = "16f8f6f2715b3a38ab562a84357c793dd56ae9899ce130563c72cd93d8357b5d" UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libjpeg-turbo/files/" UPSTREAM_CHECK_REGEX = "/libjpeg-turbo/files/(?P<pver>(\d+[\.\-_]*)+)/" -PE= "1" +PE = "1" # Drop-in replacement for jpeg PROVIDES = "jpeg" @@ -29,6 +29,8 @@ RCONFLICTS_${PN} += "jpeg" inherit cmake pkgconfig +export NASMENV = "--debug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}" + # Add nasm-native dependency consistently for all build arches is hard EXTRA_OECMAKE_append_class-native = " -DWITH_SIMD=False" EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_SIMD=False" diff --git a/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch b/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch deleted file mode 100644 index a7a08f14e6..0000000000 --- a/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch +++ /dev/null @@ -1,117 +0,0 @@ -From a91c588b5a4122506e7fe949c37d530621bdd997 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org> -Date: Tue, 11 Jul 2017 14:50:37 -0500 -Subject: [PATCH] Detect gst_bo_map/_unmap and use it (or avoid it) -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Those functions are not available on libMali, thus breaking -builds and creating havoc. - -Removing the specific parts of the code that deal with -gbm_bo_map() and gbm_bo_unmap() renders the kmscube utility -a little less useful, but still valuable. - -Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> -Cc: Rob Clark <robdclark@gmail.com> -Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> - -Upstream-Status: Submitted [https://lists.freedesktop.org/archives/mesa-dev/2017-July/163020.html] -Signed-off-by: Zoltan Kuscsik <zoltan.kuscsik@solution57.com> ---- - Makefile.am | 5 ++++- - configure.ac | 3 +++ - gst-decoder.c | 7 ++++++- - kmscube.c | 4 ++++ - 4 files changed, 17 insertions(+), 2 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index ba064e4..3a0a50b 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -43,7 +43,6 @@ kmscube_SOURCES = \ - common.c \ - common.h \ - cube-smooth.c \ -- cube-tex.c \ - drm-atomic.c \ - drm-common.c \ - drm-common.h \ -@@ -68,3 +67,7 @@ texturator_SOURCES = \ - drm-common.c \ - drm-legacy.c \ - texturator.c -+ -+if ENABLE_GBM_MAP -+kmscube_SOURCES += cube-tex.c -+endif -diff --git a/configure.ac b/configure.ac -index 6be6541..3d20121 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -49,5 +49,8 @@ if test "x$HAVE_GST" = "xyes"; then - fi - AM_CONDITIONAL(ENABLE_GST, [test "x$HAVE_GST" = "xyes"]) - -+AC_CHECK_LIB([gbm], [gbm_bo_map], [HAVE_GBM_BO_MAP=yes], []) -+AM_CONDITIONAL(ENABLE_GBM_MAP, [test "x$HAVE_GBM_BO_MAP" = "xyes"]) -+ - AC_CONFIG_FILES([Makefile]) - AC_OUTPUT -diff --git a/gst-decoder.c b/gst-decoder.c -index 5431014..0aa7a55 100644 ---- a/gst-decoder.c -+++ b/gst-decoder.c -@@ -332,6 +332,7 @@ set_last_frame(struct decoder *dec, EGLImage frame, GstSample *samp) - dec->last_samp = samp; - } - -+#if HAVE_GBM_BO_MAP - // TODO this could probably be a helper re-used by cube-tex: - static int - buf_to_fd(const struct gbm *gbm, int size, void *ptr) -@@ -357,6 +358,7 @@ buf_to_fd(const struct gbm *gbm, int size, void *ptr) - - return fd; - } -+#endif - - static EGLImage - buffer_to_image(struct decoder *dec, GstBuffer *buf) -@@ -410,12 +412,15 @@ buffer_to_image(struct decoder *dec, GstBuffer *buf) - - if (is_dmabuf_mem) { - dmabuf_fd = dup(gst_dmabuf_memory_get_fd(mem)); -- } else { -+ } -+#if HAVE_GBM_BO_MAP -+ else { - GstMapInfo map_info; - gst_buffer_map(buf, &map_info, GST_MAP_READ); - dmabuf_fd = buf_to_fd(dec->gbm, map_info.size, map_info.data); - gst_buffer_unmap(buf, &map_info); - } -+#endif - - if (dmabuf_fd < 0) { - GST_ERROR("could not obtain DMABUF FD"); -diff --git a/kmscube.c b/kmscube.c -index 81803be..e93da67 100644 ---- a/kmscube.c -+++ b/kmscube.c -@@ -166,7 +166,11 @@ int main(int argc, char *argv[]) - else if (mode == VIDEO) - egl = init_cube_video(gbm, video, samples); - else -+#if HAVE_GBM_BO_MAP - egl = init_cube_tex(gbm, mode, samples); -+#else -+ printf("gbm_bo_map() support missing\n"); -+#endif - - if (!egl) { - printf("failed to initialize EGL\n"); --- -2.22.0 - diff --git a/meta/recipes-graphics/kmscube/kmscube_git.bb b/meta/recipes-graphics/kmscube/kmscube_git.bb index 2b6837fef6..c72fbc61a9 100644 --- a/meta/recipes-graphics/kmscube/kmscube_git.bb +++ b/meta/recipes-graphics/kmscube/kmscube_git.bb @@ -6,14 +6,13 @@ DEPENDS = "virtual/libgles2 virtual/egl libdrm" LIC_FILES_CHKSUM = "file://kmscube.c;beginline=1;endline=23;md5=8b309d4ee67b7315ff7381270dd631fb" -SRCREV = "f632b23a528ed6b4e1fddd774db005c30ab65568" -SRC_URI = "git://gitlab.freedesktop.org/mesa/kmscube;branch=master;protocol=https \ - file://detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch" +SRCREV = "4660a7dca6512b6e658759d00cff7d4ad2a2059d" +SRC_URI = "git://gitlab.freedesktop.org/mesa/kmscube;branch=master;protocol=https" UPSTREAM_CHECK_COMMITS = "1" S = "${WORKDIR}/git" -inherit meson pkgconfig distro_features_check +inherit meson pkgconfig features_check REQUIRED_DISTRO_FEATURES = "opengl" diff --git a/meta/recipes-graphics/libepoxy/files/0001-dispatch_common.h-define-also-EGL_NO_X11.patch b/meta/recipes-graphics/libepoxy/files/0001-dispatch_common.h-define-also-EGL_NO_X11.patch new file mode 100644 index 0000000000..7262945181 --- /dev/null +++ b/meta/recipes-graphics/libepoxy/files/0001-dispatch_common.h-define-also-EGL_NO_X11.patch @@ -0,0 +1,26 @@ +From 6f15cc28d17cfdd86f5974f06ad97b8afedd5627 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Fri, 25 Oct 2019 11:09:34 +0000 +Subject: [PATCH] dispatch_common.h: define also EGL_NO_X11 + +MESA_EGL_NO_X11_HEADERS was renamed to EGL_NO_X11 in: +https://github.com/mesa3d/mesa/commit/6202a13b71e18dc31ba7e2f4ea915b67eacc1ddb + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +Upstream-Status: Pending +--- + src/dispatch_common.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/dispatch_common.h b/src/dispatch_common.h +index dcb3a35..c206253 100644 +--- a/src/dispatch_common.h ++++ b/src/dispatch_common.h +@@ -52,6 +52,7 @@ + * should do the same + */ + # define MESA_EGL_NO_X11_HEADERS 1 ++# define EGL_NO_X11 1 + # endif + #include "epoxy/egl.h" + #endif diff --git a/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb b/meta/recipes-graphics/libepoxy/libepoxy_1.5.4.bb index 825453ab28..6646ef79fe 100644 --- a/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb +++ b/meta/recipes-graphics/libepoxy/libepoxy_1.5.4.bb @@ -1,4 +1,8 @@ SUMMARY = "OpenGL function pointer management library" +DESCRIPTION = "It hides the complexity of dlopen(), dlsym(), \ +glXGetProcAddress(), eglGetProcAddress(), etc. from the app developer, with \ +very little knowledge needed on their part. They get to read GL specs and \ +write code using undecorated function names like glCompileShader()." HOMEPAGE = "https://github.com/anholt/libepoxy/" SECTION = "libs" @@ -6,16 +10,15 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=58ef4c80d401e07bd9ee8b6b58cf464b" SRC_URI = "https://github.com/anholt/${BPN}/releases/download/${PV}/${BP}.tar.xz \ + file://0001-dispatch_common.h-define-also-EGL_NO_X11.patch \ " -SRC_URI[md5sum] = "e2845de8d2782b2d31c01ae8d7cd4cbb" -SRC_URI[sha256sum] = "002958c5528321edd53440235d3c44e71b5b1e09b9177e8daf677450b6c4433d" +SRC_URI[md5sum] = "00f47ad447321f9dc59f85bc1c9d0467" +SRC_URI[sha256sum] = "0bd2cc681dfeffdef739cb29913f8c3caa47a88a451fd2bc6e606c02997289d2" UPSTREAM_CHECK_URI = "https://github.com/anholt/libepoxy/releases" -inherit meson pkgconfig distro_features_check +inherit meson pkgconfig features_check REQUIRED_DISTRO_FEATURES = "opengl" -REQUIRED_DISTRO_FEATURES_class-native = "" -REQUIRED_DISTRO_FEATURES_class-nativesdk = "" PACKAGECONFIG[egl] = "-Degl=yes, -Degl=no, virtual/egl" PACKAGECONFIG[x11] = "-Dglx=yes, -Dglx=no -Dx11=false, virtual/libx11 virtual/libgl" @@ -28,11 +31,3 @@ PACKAGECONFIG_class-nativesdk = "egl x11" BBCLASSEXTEND = "native nativesdk" -# This will ensure that dlopen will attempt only GL libraries provided by host -do_install_append_class-native() { - chrpath --delete ${D}${libdir}/*.so -} - -do_install_append_class-nativesdk() { - chrpath --delete ${D}${libdir}/*.so -} diff --git a/meta/recipes-graphics/libfakekey/libfakekey_git.bb b/meta/recipes-graphics/libfakekey/libfakekey_git.bb index 4b803dbae5..ab6f5ac9ed 100644 --- a/meta/recipes-graphics/libfakekey/libfakekey_git.bb +++ b/meta/recipes-graphics/libfakekey/libfakekey_git.bb @@ -17,7 +17,7 @@ SRC_URI = "git://git.yoctoproject.org/${BPN}" S = "${WORKDIR}/git" -inherit autotools pkgconfig gettext distro_features_check +inherit autotools pkgconfig gettext features_check # The libxtst requires x11 in DISTRO_FEATURES REQUIRED_DISTRO_FEATURES = "x11" diff --git a/meta/recipes-graphics/libmatchbox/libmatchbox_1.12.bb b/meta/recipes-graphics/libmatchbox/libmatchbox_1.12.bb index ce45e48147..1a31677978 100644 --- a/meta/recipes-graphics/libmatchbox/libmatchbox_1.12.bb +++ b/meta/recipes-graphics/libmatchbox/libmatchbox_1.12.bb @@ -1,4 +1,8 @@ SUMMARY = "Matchbox window manager core library" +DESCRIPTION = "Matchbox is an Open Source base environment for the X Window \ +System running on non-desktop embedded platforms such as handhelds, set-top \ +boxes, kiosks and anything else for which screen space, input mechanisms or \ +system resources are limited." SECTION = "x11/libs" HOMEPAGE = "http://matchbox-project.org/" BUGTRACKER = "http://bugzilla.yoctoproject.com/" @@ -17,7 +21,7 @@ SRC_URI = "git://git.yoctoproject.org/${BPN}" S = "${WORKDIR}/git" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.12.bb index 3a0654b866..83dce86801 100644 --- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb +++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.12.bb @@ -8,7 +8,11 @@ BUGTRACKER = "http://bugzilla.libsdl.org/" SECTION = "libs" LICENSE = "Zlib" -LIC_FILES_CHKSUM = "file://COPYING.txt;md5=504a9454ceb89fd75a2583473b11409e" +LIC_FILES_CHKSUM = "file://COPYING.txt;md5=2d4af6adb4d89aad0cdedbcc18c9a32f" + +# arm-neon adds MIT license +LICENSE_append = " ${@bb.utils.contains('PACKAGECONFIG', 'arm-neon', '& MIT', '', d)}" +LIC_FILES_CHKSUM_append = " ${@bb.utils.contains('PACKAGECONFIG', 'arm-neon', 'file://src/video/arm/pixman-arm-neon-asm.h;md5=9a9cc1e51abbf1da58f4d9528ec9d49b;beginline=1;endline=24', '', d)}" PROVIDES = "virtual/libsdl2" @@ -18,8 +22,8 @@ SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \ S = "${WORKDIR}/SDL2-${PV}" -SRC_URI[md5sum] = "5a2114f2a6f348bdab5bf52b994811db" -SRC_URI[sha256sum] = "b4656c13a1f0d0023ae2f4a9cf08ec92fffb464e0f24238337784159b8b91d57" +SRC_URI[md5sum] = "783b6f2df8ff02b19bb5ce492b99c8ff" +SRC_URI[sha256sum] = "349268f695c02efbc9b9148a70b85e58cefbbf704abd3e91be654db7f1e2c863" inherit autotools lib_package binconfig-disabled pkgconfig @@ -34,20 +38,23 @@ EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \ --enable-sdl-dlopen \ --disable-rpath \ --disable-sndio \ + --disable-fcitx --disable-ibus \ " # 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.filter('DISTRO_FEATURES', 'opengl', d)}" -PACKAGECONFIG_class-native = "x11" -PACKAGECONFIG_class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" +PACKAGECONFIG_class-native = "x11 ${PACKAGECONFIG_GL}" +PACKAGECONFIG_class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${PACKAGECONFIG_GL}" PACKAGECONFIG ??= " \ ${PACKAGECONFIG_GL} \ ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \ + ${@bb.utils.contains("TUNE_FEATURES", "neon","arm-neon","",d)} \ " PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib," +PACKAGECONFIG[arm-neon] = "--enable-arm-neon,--disable-arm-neon" PACKAGECONFIG[directfb] = "--enable-video-directfb,--disable-video-directfb,directfb" PACKAGECONFIG[gles2] = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2" PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" diff --git a/meta/recipes-graphics/libva/libva-initial_2.8.0.bb b/meta/recipes-graphics/libva/libva-initial_2.8.0.bb new file mode 100644 index 0000000000..f90bb510c4 --- /dev/null +++ b/meta/recipes-graphics/libva/libva-initial_2.8.0.bb @@ -0,0 +1,8 @@ +require libva.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f" +SRC_URI[sha256sum] = "adbb1244d278908f89ccfcf254a442de6d71934565a492cb6f03caf2ed4d1ec3" + +do_install_append () { + rm -f ${D}${libdir}/*.so* +} diff --git a/meta/recipes-graphics/libva/libva-utils/0001-Build-sfcsample-only-when-X11-backend-is-enabled.patch b/meta/recipes-graphics/libva/libva-utils/0001-Build-sfcsample-only-when-X11-backend-is-enabled.patch deleted file mode 100644 index 01fb71913b..0000000000 --- a/meta/recipes-graphics/libva/libva-utils/0001-Build-sfcsample-only-when-X11-backend-is-enabled.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 8fc14e4bc81885b80c3072e549c2e6f59533d7ef Mon Sep 17 00:00:00 2001 -From: Anuj Mittal <anuj.mittal@intel.com> -Date: Fri, 8 Feb 2019 11:45:55 +0800 -Subject: [PATCH] Build sfcsample only when X11 backend is enabled - -See: https://github.com/intel/libva-utils/pull/149, and -https://github.com/intel/libva-utils/issues/150 - -Upstream-Status: Submitted - -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> ---- - Makefile.am | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/Makefile.am b/Makefile.am -index d28175a..e294e25 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -24,10 +24,11 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} - - AUTOMAKE_OPTIONS = foreign - --SUBDIRS = common decode encode vainfo videoprocess vendor/intel vendor/intel/sfcsample -+SUBDIRS = common decode encode vainfo videoprocess vendor/intel - - if USE_X11 - SUBDIRS += putsurface -+SUBDIRS += vendor/intel/sfcsample - else - if USE_WAYLAND - SUBDIRS += putsurface --- -2.17.1 - diff --git a/meta/recipes-graphics/libva/libva-utils_2.5.0.bb b/meta/recipes-graphics/libva/libva-utils_2.8.0.bb index fc013d75c3..78e3805339 100644 --- a/meta/recipes-graphics/libva/libva-utils_2.5.0.bb +++ b/meta/recipes-graphics/libva/libva-utils_2.8.0.bb @@ -14,22 +14,19 @@ SECTION = "x11" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=b148fc8adf19dc9aec17cf9cd29a9a5e" -SRC_URI = "https://github.com/intel/${BPN}/releases/download/${PV}/${BP}.tar.bz2 \ - file://0001-Build-sfcsample-only-when-X11-backend-is-enabled.patch \ - " +SRC_URI = "git://github.com/intel/libva-utils.git;branch=v2.8-branch" +SRCREV = "af101a46d24c3f71a12b9f1ddb0c63626b19b3d8" +S = "${WORKDIR}/git" -SRC_URI[md5sum] = "c1fada26c286654859eff33b2562cb79" -SRC_URI[sha256sum] = "9238c9d5110d60f935683390b8383fdac3507346384cd5f117a23c6db1d72a17" - -UPSTREAM_CHECK_URI = "https://github.com/intel/libva-utils/releases" +UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))$" DEPENDS = "libva" -inherit autotools pkgconfig distro_features_check +inherit meson pkgconfig features_check # depends on libva which requires opengl REQUIRED_DISTRO_FEATURES = "opengl" PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}" -PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxext libxfixes" -PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland" +PACKAGECONFIG[x11] = "-Dx11=true, -Dx11=false,virtual/libx11 libxext libxfixes" +PACKAGECONFIG[wayland] = "-Dwayland=true, -Dwayland=false,wayland-native wayland" diff --git a/meta/recipes-graphics/libva/libva.inc b/meta/recipes-graphics/libva/libva.inc new file mode 100644 index 0000000000..e7bec80c14 --- /dev/null +++ b/meta/recipes-graphics/libva/libva.inc @@ -0,0 +1,27 @@ +SUMMARY = "Video Acceleration (VA) API for Linux" +DESCRIPTION = "Video Acceleration API (VA API) is a library (libVA) \ +and API specification which enables and provides access to graphics \ +hardware (GPU) acceleration for video processing on Linux and UNIX \ +based operating systems. Accelerated processing includes video \ +decoding, video encoding, subpicture blending and rendering. The \ +specification was originally designed by Intel for its GMA (Graphics \ +Media Accelerator) series of GPU hardware, the API is however not \ +limited to GPUs or Intel specific hardware, as other hardware and \ +manufacturers can also freely use this API for hardware accelerated \ +video decoding." + +HOMEPAGE = "https://01.org/linuxmedia/vaapi" +BUGTRACKER = "https://github.com/intel/libva/issues" + +SECTION = "x11" +LICENSE = "MIT" + +SRC_URI = "https://github.com/intel/libva/releases/download/${PV}/libva-${PV}.tar.bz2" + +S = "${WORKDIR}/libva-${PV}" + +UPSTREAM_CHECK_URI = "https://github.com/intel/libva/releases" + +DEPENDS = "libdrm" + +inherit meson pkgconfig diff --git a/meta/recipes-graphics/libva/libva_2.5.0.bb b/meta/recipes-graphics/libva/libva_2.5.0.bb deleted file mode 100644 index e75648b2be..0000000000 --- a/meta/recipes-graphics/libva/libva_2.5.0.bb +++ /dev/null @@ -1,46 +0,0 @@ -SUMMARY = "Video Acceleration (VA) API for Linux" -DESCRIPTION = "Video Acceleration API (VA API) is a library (libVA) \ -and API specification which enables and provides access to graphics \ -hardware (GPU) acceleration for video processing on Linux and UNIX \ -based operating systems. Accelerated processing includes video \ -decoding, video encoding, subpicture blending and rendering. The \ -specification was originally designed by Intel for its GMA (Graphics \ -Media Accelerator) series of GPU hardware, the API is however not \ -limited to GPUs or Intel specific hardware, as other hardware and \ -manufacturers can also freely use this API for hardware accelerated \ -video decoding." - -HOMEPAGE = "https://01.org/linuxmedia/vaapi" -BUGTRACKER = "https://github.com/intel/libva/issues" - -SECTION = "x11" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f" - -SRC_URI = "https://github.com/intel/${BPN}/releases/download/${PV}/${BP}.tar.bz2" - -SRC_URI[md5sum] = "3688212fb7a87947070f3729e91ff7cf" -SRC_URI[sha256sum] = "3aa89cd369a506ac4dbe5de7c0ef5da4f3d220bf986403f02fa1f6f702af6878" - -UPSTREAM_CHECK_URI = "https://github.com/intel/libva/releases" - -DEPENDS = "libdrm virtual/mesa" - -inherit autotools pkgconfig distro_features_check - -REQUIRED_DISTRO_FEATURES = "opengl" - -EXTRA_OECONF = "ac_cv_prog_WAYLAND_SCANNER=wayland-scanner" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}" -PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxext libxfixes" -PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland" - -PACKAGES =+ "${PN}-x11 ${PN}-glx ${PN}-wayland" - -RDEPENDS_${PN}-x11 =+ "${PN}" -RDEPENDS_${PN}-glx =+ "${PN}-x11" - -FILES_${PN}-x11 =+ "${libdir}/libva-x11*${SOLIBS}" -FILES_${PN}-glx =+ "${libdir}/libva-glx*${SOLIBS}" -FILES_${PN}-wayland =+ "${libdir}/libva-wayland*${SOLIBS}" diff --git a/meta/recipes-graphics/libva/libva_2.8.0.bb b/meta/recipes-graphics/libva/libva_2.8.0.bb new file mode 100644 index 0000000000..621ceea86c --- /dev/null +++ b/meta/recipes-graphics/libva/libva_2.8.0.bb @@ -0,0 +1,23 @@ +require libva.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f" +SRC_URI[sha256sum] = "adbb1244d278908f89ccfcf254a442de6d71934565a492cb6f03caf2ed4d1ec3" + +PACKAGECONFIG ??= " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'glx', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'x11 wayland', d)} \ +" + +PACKAGECONFIG[x11] = "-Dwith_x11=yes,-Dwith_x11=no,virtual/libx11 libxext libxfixes" +PACKAGECONFIG[glx] = "-Dwith_glx=yes,-Dwith_glx=no,virtual/mesa" + +PACKAGECONFIG[wayland] = "-Dwith_wayland=yes,-Dwith_wayland=no,wayland-native wayland" + +PACKAGES =+ "${PN}-x11 ${PN}-glx ${PN}-wayland" + +RDEPENDS_${PN}-x11 =+ "${PN}" +RDEPENDS_${PN}-glx =+ "${PN}-x11" + +FILES_${PN}-x11 =+ "${libdir}/libva-x11*${SOLIBS}" +FILES_${PN}-glx =+ "${libdir}/libva-glx*${SOLIBS}" +FILES_${PN}-wayland =+ "${libdir}/libva-wayland*${SOLIBS}" diff --git a/meta/recipes-graphics/matchbox-session/matchbox-session_0.1.bb b/meta/recipes-graphics/matchbox-session/matchbox-session_0.1.bb index cbaf054365..57a3024ea9 100644 --- a/meta/recipes-graphics/matchbox-session/matchbox-session_0.1.bb +++ b/meta/recipes-graphics/matchbox-session/matchbox-session_0.1.bb @@ -1,4 +1,5 @@ SUMMARY = "Custom Matchbox session files" +DESCRIPTION = "Very simple session manager for matchbox tools" HOMEPAGE = "http://www.matchbox-project.org/" BUGTRACKER = "http://bugzilla.yoctoproject.org/" diff --git a/meta/recipes-graphics/matchbox-wm/matchbox-wm/0001-Fix-build-with-gcc-10.patch b/meta/recipes-graphics/matchbox-wm/matchbox-wm/0001-Fix-build-with-gcc-10.patch new file mode 100644 index 0000000000..541b5c9c84 --- /dev/null +++ b/meta/recipes-graphics/matchbox-wm/matchbox-wm/0001-Fix-build-with-gcc-10.patch @@ -0,0 +1,41 @@ +From 8a8f8446e803cad04d7bbceaab78ee45d9778c3c Mon Sep 17 00:00:00 2001 +From: Adrian Bunk <bunk@stusta.de> +Date: Tue, 12 May 2020 09:44:05 +0300 +Subject: Fix build with gcc 10 + +Upstream-Status: Pending +Signed-off-by: Adrian Bunk <bunk@stusta.de> +--- + src/mbtheme.h | 2 +- + src/structs.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/mbtheme.h b/src/mbtheme.h +index aa9a7c5..ad03bde 100644 +--- a/src/mbtheme.h ++++ b/src/mbtheme.h +@@ -46,7 +46,7 @@ typedef struct _mb_theme_param + + } MBThemeParam; + +-enum { ++typedef enum { + LAYER_GRADIENT_HORIZ = 1, + LAYER_GRADIENT_VERT, + LAYER_LABEL, +diff --git a/src/structs.h b/src/structs.h +index 24985e7..8f53e72 100644 +--- a/src/structs.h ++++ b/src/structs.h +@@ -148,7 +148,7 @@ + + /* Atoms, if you change these check ewmh_init() first */ + +-enum { ++typedef enum { + WM_STATE = 0, + WM_CHANGE_STATE, + WM_PROTOCOLS, +-- +2.17.1 + diff --git a/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb b/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb index 815a75f36d..a08eb252ce 100644 --- a/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb +++ b/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb @@ -13,11 +13,12 @@ DEPENDS = "libmatchbox virtual/libx11 libxext libxrender startup-notification ex # SRCREV tagged 1.2.2 SRCREV = "27da947e7fbdf9659f7e5bd1e92af92af6c03970" SRC_URI = "git://git.yoctoproject.org/matchbox-window-manager \ + file://0001-Fix-build-with-gcc-10.patch \ file://kbdconfig" S = "${WORKDIR}/git" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" diff --git a/meta/recipes-graphics/menu-cache/files/0001-Support-gcc10-compilation.patch b/meta/recipes-graphics/menu-cache/files/0001-Support-gcc10-compilation.patch new file mode 100644 index 0000000000..aeae864cd4 --- /dev/null +++ b/meta/recipes-graphics/menu-cache/files/0001-Support-gcc10-compilation.patch @@ -0,0 +1,111 @@ +From 1ce739649b4d66339a03fc0ec9ee7a2f7c141780 Mon Sep 17 00:00:00 2001 +From: Mamoru TASAKA <mtasaka@fedoraproject.org> +Date: Fri, 24 Jan 2020 13:33:00 +0900 +Subject: Support gcc10 compilation + +gcc10 now defaults to -fno-common, and with gcc10 menu-cache compilation fails like + +/bin/ld: menu-merge.o:menu-cache-gen/menu-tags.h:167: multiple definition of `DirDirs'; main.o:menu-cache-gen/menu-tags.h:167: first defined here +/bin/ld: menu-merge.o:menu-cache-gen/menu-tags.h:164: multiple definition of `AppDirs'; main.o:menu-cache-gen/menu-tags.h:164: first defined here +/bin/ld: menu-merge.o:menu-cache-gen/menu-tags.h:52: multiple definition of `menuTag_Layout'; main.o:menu-cache-gen/menu-tags.h:52: first defined here +.... + +This patch fixes compilation with gcc10: properly declaring variables in header with "extern", and also removing some unneeded variables in header files. + +Upstream-Status: Submitted [https://github.com/lxde/menu-cache/pull/19] +Signed-off-by: Adrian Bunk <bunk@stusta.de> +--- + menu-cache-gen/menu-tags.h | 55 ++++++++++++-------------------------- + 1 file changed, 17 insertions(+), 38 deletions(-) + +diff --git a/menu-cache-gen/menu-tags.h b/menu-cache-gen/menu-tags.h +index f3fd7d3..f71c0bc 100644 +--- a/menu-cache-gen/menu-tags.h ++++ b/menu-cache-gen/menu-tags.h +@@ -22,38 +22,17 @@ + #include <libfm/fm-extra.h> + #include <menu-cache.h> + +-FmXmlFileTag menuTag_Menu; +-FmXmlFileTag menuTag_AppDir; +-FmXmlFileTag menuTag_DefaultAppDirs; +-FmXmlFileTag menuTag_DirectoryDir; +-FmXmlFileTag menuTag_DefaultDirectoryDirs; +-FmXmlFileTag menuTag_Include; +-FmXmlFileTag menuTag_Exclude; +-FmXmlFileTag menuTag_Filename; +-FmXmlFileTag menuTag_Or; +-FmXmlFileTag menuTag_And; +-FmXmlFileTag menuTag_Not; +-FmXmlFileTag menuTag_Category; +-FmXmlFileTag menuTag_MergeFile; +-FmXmlFileTag menuTag_MergeDir; +-FmXmlFileTag menuTag_DefaultMergeDirs; +-FmXmlFileTag menuTag_Directory; +-FmXmlFileTag menuTag_Name; +-FmXmlFileTag menuTag_Deleted; +-FmXmlFileTag menuTag_NotDeleted; +-FmXmlFileTag menuTag_OnlyUnallocated; +-FmXmlFileTag menuTag_NotOnlyUnallocated; +-FmXmlFileTag menuTag_All; +-FmXmlFileTag menuTag_LegacyDir; +-FmXmlFileTag menuTag_KDELegacyDirs; +-FmXmlFileTag menuTag_Move; +-FmXmlFileTag menuTag_Old; +-FmXmlFileTag menuTag_New; +-FmXmlFileTag menuTag_Layout; +-FmXmlFileTag menuTag_DefaultLayout; +-FmXmlFileTag menuTag_Menuname; +-FmXmlFileTag menuTag_Separator; +-FmXmlFileTag menuTag_Merge; ++extern FmXmlFileTag menuTag_AppDir; ++extern FmXmlFileTag menuTag_DirectoryDir; ++extern FmXmlFileTag menuTag_Include; ++extern FmXmlFileTag menuTag_Exclude; ++extern FmXmlFileTag menuTag_Filename; ++extern FmXmlFileTag menuTag_Or; ++extern FmXmlFileTag menuTag_And; ++extern FmXmlFileTag menuTag_Not; ++extern FmXmlFileTag menuTag_Category; ++extern FmXmlFileTag menuTag_All; ++extern FmXmlFileTag menuTag_LegacyDir; + + typedef enum { + MERGE_NONE, /* starting value */ +@@ -152,19 +131,19 @@ typedef struct { + } MenuRule; + + /* requested language(s) */ +-char **languages; ++extern char **languages; + + /* list of menu files to monitor */ +-GSList *MenuFiles; ++extern GSList *MenuFiles; + + /* list of menu dirs to monitor */ +-GSList *MenuDirs; ++extern GSList *MenuDirs; + + /* list of available app dirs */ +-GSList *AppDirs; ++extern GSList *AppDirs; + + /* list of available dir dirs */ +-GSList *DirDirs; ++extern GSList *DirDirs; + + /* parse and merge menu files */ + MenuMenu *get_merged_menu(const char *file, FmXmlFile **xmlfile, GError **error); +@@ -177,7 +156,7 @@ gboolean save_menu_cache(MenuMenu *layout, const char *menuname, const char *fil + void _free_layout_items(GList *data); + + /* verbosity level */ +-gint verbose; ++extern gint verbose; + + #define DBG if (verbose) g_debug + #define VDBG if (verbose > 1) g_debug +-- +2.17.1 + diff --git a/meta/recipes-graphics/menu-cache/menu-cache_1.1.0.bb b/meta/recipes-graphics/menu-cache/menu-cache_1.1.0.bb index ddbbd94066..fc4e0a4d84 100644 --- a/meta/recipes-graphics/menu-cache/menu-cache_1.1.0.bb +++ b/meta/recipes-graphics/menu-cache/menu-cache_1.1.0.bb @@ -8,7 +8,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0964c689fcf4c21c6797ea87408416b6" SECTION = "x11/libs" DEPENDS = "glib-2.0 libfm-extra" -SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/menu-cache-${PV}.tar.xz" +SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/menu-cache-${PV}.tar.xz \ + file://0001-Support-gcc10-compilation.patch \ +" SRC_URI[md5sum] = "99999a0bca48b980105208760c8fd893" SRC_URI[sha256sum] = "ed02eb459dcb398f69b9fa5bf4dd813020405afc84331115469cdf7be9273ec7" diff --git a/meta/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch b/meta/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch new file mode 100644 index 0000000000..8bedbac669 --- /dev/null +++ b/meta/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch @@ -0,0 +1,31 @@ +From 8973e297f2f9b17498b9dc0e37a19481d4bb7df9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 16 Oct 2020 11:03:47 -0700 +Subject: [PATCH] futex.h: Define __NR_futex if it does not exist + +__NR_futex is not defines by newer architectures e.g. arc, riscv32 as +they only have 64bit variant of time_t. Glibc defines SYS_futex interface based on +__NR_futex, since this is used in applications, such applications start +to fail to build for these newer architectures. This patch defines a +fallback to alias __NR_futex to __NR_futex_tim64 so SYS_futex keeps +working + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/util/futex.h | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/src/util/futex.h ++++ b/src/util/futex.h +@@ -34,6 +34,10 @@ + #include <sys/syscall.h> + #include <sys/time.h> + ++#if !defined(SYS_futex) && defined(SYS_futex_time64) ++# define SYS_futex SYS_futex_time64 ++#endif ++ + static inline long sys_futex(void *addr1, int op, int val1, const struct timespec *timeout, void *addr2, int val3) + { + return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3); diff --git a/meta/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch b/meta/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch new file mode 100644 index 0000000000..15485feb71 --- /dev/null +++ b/meta/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch @@ -0,0 +1,27 @@ +From bb2f0bea553d51d659a9bc46f7ae186885405151 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 13 Jan 2020 15:23:47 -0800 +Subject: [PATCH] meson misdetects 64bit atomics on mips/clang + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/util/u_atomic.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/util/u_atomic.c b/src/util/u_atomic.c +index e4bffa8..58e1ddd 100644 +--- a/src/util/u_atomic.c ++++ b/src/util/u_atomic.c +@@ -21,7 +21,7 @@ + * IN THE SOFTWARE. + */ + +-#if defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD) ++#if !defined(__clang__) && defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD) + + #include <stdint.h> + #include <pthread.h> +-- +2.24.1 + diff --git a/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch index 9fba5da4b2..085254323c 100644 --- a/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch +++ b/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch @@ -1,8 +1,7 @@ -From ea966884e39aae9571c038fab55f3c1663d17850 Mon Sep 17 00:00:00 2001 -From: Fabio Berton <fabio.berton@ossystems.com.br> -Date: Wed, 12 Jun 2019 13:40:20 -0300 +From 0d9ed002eff176b902da266d89829a9b0cb10946 Mon Sep 17 00:00:00 2001 +From: Alistair Francis <alistair@alistair23.me> +Date: Thu, 14 Nov 2019 13:04:49 -0800 Subject: [PATCH] meson.build: check for all linux host_os combinations -Organization: O.S. Systems Software LTDA. Make sure that we are also looking for our host_os combinations like linux-musl etc. when assuming support for DRM/KMS. @@ -14,29 +13,31 @@ Upstream-Status: Pending Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> +Signed-off-by: Alistair Francis <alistair@alistair23.me> + --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build -index 567a81afd6f..b33b430aed4 100644 +index 898d025..09e3759 100644 --- a/meson.build +++ b/meson.build -@@ -107,7 +107,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2 +@@ -124,7 +124,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2 # Only build shared_glapi if at least one OpenGL API is enabled - with_shared_glapi = get_option('shared-glapi') and with_any_opengl + with_shared_glapi = with_shared_glapi and with_any_opengl --system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux'].contains(host_machine.system()) +-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos'].contains(host_machine.system()) +system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux') dri_drivers = get_option('dri-drivers') if dri_drivers.contains('auto') -@@ -845,7 +845,7 @@ if cc.compiles('int foo(void) __attribute__((__noreturn__));', +@@ -884,7 +884,7 @@ if cc.compiles('__uint128_t foo(void) { return 0; }', endif # TODO: this is very incomplete --if ['linux', 'cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system()) +-if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd'].contains(host_machine.system()) +if ['cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system()) or host_machine.system().startswith('linux') pre_args += '-D_GNU_SOURCE' - endif - + elif host_machine.system() == 'sunos' + pre_args += '-D__EXTENSIONS__' diff --git a/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch b/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch new file mode 100644 index 0000000000..ee171ad1c8 --- /dev/null +++ b/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch @@ -0,0 +1,46 @@ +From 65857eaee12a21a631750ffcd9e64e0afbbc3af0 Mon Sep 17 00:00:00 2001 +From: Alistair Francis <alistair@alistair23.me> +Date: Thu, 14 Nov 2019 13:08:31 -0800 +Subject: [PATCH] meson.build: make TLS ELF optional + +USE_ELF_TLS has replaced GLX_USE_TLS so this patch is the original "make +TLS GLX optional again" patch updated to the latest mesa. + +Upstream-Status: Inappropriate [configuration] +Signed-off-by: Alistair Francis <alistair@alistair23.me> + +--- + meson.build | 2 +- + meson_options.txt | 6 ++++++ + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index c51dde9..c16f78f 100644 +--- a/meson.build ++++ b/meson.build +@@ -392,7 +392,7 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat + endif + + # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS. +-if not ['windows', 'freebsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29) ++if not ['windows', 'freebsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29) and get_option('elf-tls') + pre_args += '-DUSE_ELF_TLS' + endif + +diff --git a/meson_options.txt b/meson_options.txt +index ab43150..d7b1555 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -355,6 +355,12 @@ option( + value : true, + description : 'Enable direct rendering in GLX and EGL for DRI', + ) ++option( ++ 'elf-tls', ++ type : 'boolean', ++ value : true, ++ description : 'Enable TLS support in ELF', ++) + option( + 'prefer-iris', + type : 'boolean', diff --git a/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch b/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch deleted file mode 100644 index 641bacf1d9..0000000000 --- a/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch +++ /dev/null @@ -1,52 +0,0 @@ -From cee8e48c5344124e5d84307cb0c48ee0c9b3e684 Mon Sep 17 00:00:00 2001 -From: Fabio Berton <fabio.berton@ossystems.com.br> -Date: Wed, 12 Jun 2019 14:15:57 -0300 -Subject: [PATCH] meson.build: make TLS GLX optional again -Organization: O.S. Systems Software LTDA. - -This was optional with autotools, and needs to be disabled -when using musl C library, for instance. - -Upstream-Status: Pending - -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> -Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> -Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> ---- - meson.build | 4 +++- - meson_options.txt | 7 +++++++ - 2 files changed, 10 insertions(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index b33b430aed4..0e50bb26c0a 100644 ---- a/meson.build -+++ b/meson.build -@@ -369,7 +369,9 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat - endif - endif - --pre_args += '-DGLX_USE_TLS' -+if get_option('glx-tls') -+ pre_args += '-DGLX_USE_TLS' -+endif - if with_glx != 'disabled' - if not (with_platform_x11 and with_any_opengl) - error('Cannot build GLX support without X11 platform support and at least one OpenGL API') -diff --git a/meson_options.txt b/meson_options.txt -index 1f72faabee8..fcd49efea27 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -339,6 +339,13 @@ option( - value : true, - description : 'Enable direct rendering in GLX and EGL for DRI', - ) -+option( -+ 'glx-tls', -+ type : 'boolean', -+ value : true, -+ description : 'Enable TLS support in GLX', -+) -+ - option( - 'I-love-half-baked-turnips', - type : 'boolean', diff --git a/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch b/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch index 3458c19199..a0536c87ac 100644 --- a/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch +++ b/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch @@ -1,37 +1,37 @@ -From f1482e88c2295b9c7288f5b273335a8e18039de8 Mon Sep 17 00:00:00 2001 +From 7eaa21a79ce6d6e92f6bf98c28b68e3fcb4d7874 Mon Sep 17 00:00:00 2001 From: Fabio Berton <fabio.berton@ossystems.com.br> Date: Wed, 12 Jun 2019 14:18:31 -0300 Subject: [PATCH] Allow enable DRI without DRI drivers -Organization: O.S. Systems Software LTDA. Upstream-Status: Pending Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> + --- meson.build | 2 +- meson_options.txt | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build -index 0e50bb26c0a..de065c290d6 100644 +index a954118..62864c6 100644 --- a/meson.build +++ b/meson.build -@@ -137,7 +137,7 @@ with_dri_r200 = dri_drivers.contains('r200') +@@ -154,7 +154,7 @@ with_dri_r200 = dri_drivers.contains('r200') with_dri_nouveau = dri_drivers.contains('nouveau') with_dri_swrast = dri_drivers.contains('swrast') -with_dri = dri_drivers.length() != 0 and dri_drivers != [''] -+with_dri = get_option('dri') or (_drivers.length() != 0 and _drivers != ['']) ++with_dri = get_option('dri') or (dri_drivers.length() != 0 and dri_drivers != ['']) gallium_drivers = get_option('gallium-drivers') if gallium_drivers.contains('auto') diff --git a/meson_options.txt b/meson_options.txt -index fcd49efea27..0529200b3bb 100644 +index 637ff14..700c34c 100644 --- a/meson_options.txt +++ b/meson_options.txt -@@ -34,6 +34,12 @@ option( +@@ -35,6 +35,12 @@ option( choices : ['auto', 'true', 'false'], description : 'enable support for dri3' ) diff --git a/meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch b/meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch new file mode 100644 index 0000000000..8d614e571a --- /dev/null +++ b/meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch @@ -0,0 +1,147 @@ +From 41cd8836d785c79381764e7de59319f87959a5cf Mon Sep 17 00:00:00 2001 +From: Alistair Francis <alistair@alistair23.me> +Date: Thu, 14 Nov 2019 09:06:02 -0800 +Subject: [PATCH] Revert "mesa: Enable asm unconditionally, now that + gen_matypes is gone." + +This reverts commit 20294dceebc23236e33b22578245f7e6f41b6997. + +Upstream-Status: Inappropriate [configuration] +Signed-off-by: Alistair Francis <alistair@alistair23.me> + +--- + meson.build | 94 ++++++++++++++++++++++++++++++----------------- + meson_options.txt | 6 +++ + 2 files changed, 67 insertions(+), 33 deletions(-) + +diff --git a/meson.build b/meson.build +index 62864c6..b53be8d 100644 +--- a/meson.build ++++ b/meson.build +@@ -49,6 +49,7 @@ with_vulkan_icd_dir = get_option('vulkan-icd-dir') + with_tests = get_option('build-tests') + with_valgrind = get_option('valgrind') + with_libunwind = get_option('libunwind') ++with_asm = get_option('asm') + with_glx_read_only_text = get_option('glx-read-only-text') + with_glx_direct = get_option('glx-direct') + with_osmesa = get_option('osmesa') +@@ -1093,41 +1094,68 @@ dep_ws2_32 = cc.find_library('ws2_32', required : with_platform_windows) + + # TODO: shared/static? Is this even worth doing? + ++# When cross compiling we generally need to turn off the use of assembly, ++# because mesa's assembly relies on building an executable for the host system, ++# and running it to get information about struct sizes. There is at least one ++# case of cross compiling where we can use asm, and that's x86_64 -> x86 when ++# host OS == build OS, since in that case the build machine can run the host's ++# binaries. ++if with_asm and meson.is_cross_build() ++ if build_machine.system() != host_machine.system() ++ # TODO: It may be possible to do this with an exe_wrapper (like wine). ++ message('Cross compiling from one OS to another, disabling assembly.') ++ with_asm = false ++ elif not (build_machine.cpu_family().startswith('x86') and host_machine.cpu_family() == 'x86') ++ # FIXME: Gentoo always sets -m32 for x86_64 -> x86 builds, resulting in an ++ # x86 -> x86 cross compile. We use startswith rather than == to handle this ++ # case. ++ # TODO: There may be other cases where the 64 bit version of the ++ # architecture can run 32 bit binaries (aarch64 and armv7 for example) ++ message(''' ++ Cross compiling to different architectures, and the host cannot run ++ the build machine's binaries. Disabling assembly. ++ ''') ++ with_asm = false ++ endif ++endif ++ + with_asm_arch = '' +-if host_machine.cpu_family() == 'x86' +- if system_has_kms_drm or host_machine.system() == 'gnu' +- with_asm_arch = 'x86' +- pre_args += ['-DUSE_X86_ASM', '-DUSE_MMX_ASM', '-DUSE_3DNOW_ASM', +- '-DUSE_SSE_ASM'] +- +- if with_glx_read_only_text +- pre_args += ['-DGLX_X86_READONLY_TEXT'] ++if with_asm ++ if host_machine.cpu_family() == 'x86' ++ if system_has_kms_drm or host_machine.system() == 'gnu' ++ with_asm_arch = 'x86' ++ pre_args += ['-DUSE_X86_ASM', '-DUSE_MMX_ASM', '-DUSE_3DNOW_ASM', ++ '-DUSE_SSE_ASM'] ++ ++ if with_glx_read_only_text ++ pre_args += ['-DGLX_X86_READONLY_TEXT'] ++ endif ++ endif ++ elif host_machine.cpu_family() == 'x86_64' ++ if system_has_kms_drm ++ with_asm_arch = 'x86_64' ++ pre_args += ['-DUSE_X86_64_ASM'] ++ endif ++ elif host_machine.cpu_family() == 'arm' ++ if system_has_kms_drm ++ with_asm_arch = 'arm' ++ pre_args += ['-DUSE_ARM_ASM'] ++ endif ++ elif host_machine.cpu_family() == 'aarch64' ++ if system_has_kms_drm ++ with_asm_arch = 'aarch64' ++ pre_args += ['-DUSE_AARCH64_ASM'] ++ endif ++ elif host_machine.cpu_family() == 'sparc64' ++ if system_has_kms_drm ++ with_asm_arch = 'sparc' ++ pre_args += ['-DUSE_SPARC_ASM'] ++ endif ++ elif host_machine.cpu_family().startswith('ppc64') and host_machine.endian() == 'little' ++ if system_has_kms_drm ++ with_asm_arch = 'ppc64le' ++ pre_args += ['-DUSE_PPC64LE_ASM'] + endif +- endif +-elif host_machine.cpu_family() == 'x86_64' +- if system_has_kms_drm +- with_asm_arch = 'x86_64' +- pre_args += ['-DUSE_X86_64_ASM'] +- endif +-elif host_machine.cpu_family() == 'arm' +- if system_has_kms_drm +- with_asm_arch = 'arm' +- pre_args += ['-DUSE_ARM_ASM'] +- endif +-elif host_machine.cpu_family() == 'aarch64' +- if system_has_kms_drm +- with_asm_arch = 'aarch64' +- pre_args += ['-DUSE_AARCH64_ASM'] +- endif +-elif host_machine.cpu_family() == 'sparc64' +- if system_has_kms_drm +- with_asm_arch = 'sparc' +- pre_args += ['-DUSE_SPARC_ASM'] +- endif +-elif host_machine.cpu_family().startswith('ppc64') and host_machine.endian() == 'little' +- if system_has_kms_drm +- with_asm_arch = 'ppc64le' +- pre_args += ['-DUSE_PPC64LE_ASM'] + endif + endif + +diff --git a/meson_options.txt b/meson_options.txt +index 700c34c..62e8472 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -241,6 +241,12 @@ option( + value : false, + description : 'Enable GLVND support.' + ) ++option( ++ 'asm', ++ type : 'boolean', ++ value : true, ++ description : 'Build assembly code if possible' ++) + option( + 'glx-read-only-text', + type : 'boolean', diff --git a/meta/recipes-graphics/mesa/files/0005-vc4-use-intmax_t-for-formatted-output-of-timespec-me.patch b/meta/recipes-graphics/mesa/files/0005-vc4-use-intmax_t-for-formatted-output-of-timespec-me.patch new file mode 100644 index 0000000000..dacb1ea1c8 --- /dev/null +++ b/meta/recipes-graphics/mesa/files/0005-vc4-use-intmax_t-for-formatted-output-of-timespec-me.patch @@ -0,0 +1,51 @@ +From 281a636353666bfdd373c62591e744087e750e89 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 4 Dec 2019 14:15:28 -0800 +Subject: [PATCH] vc4: use intmax_t for formatted output of timespec members + +32bit architectures which have 64bit time_t does not fit the assumption +of time_t being same as system long int + +Fixes +error: format specifies type 'long' but the argument has type 'time_t' (aka 'long long') [-Werror,-Wformat] + time.tv_sec); + ^~~~~~~~~~~ + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2966] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + src/gallium/drivers/v3d/v3d_bufmgr.c | 4 ++-- + src/gallium/drivers/vc4/vc4_bufmgr.c | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/gallium/drivers/v3d/v3d_bufmgr.c b/src/gallium/drivers/v3d/v3d_bufmgr.c +index 31a0803..cc2e2af 100644 +--- a/src/gallium/drivers/v3d/v3d_bufmgr.c ++++ b/src/gallium/drivers/v3d/v3d_bufmgr.c +@@ -80,8 +80,8 @@ v3d_bo_dump_stats(struct v3d_screen *screen) + + struct timespec time; + clock_gettime(CLOCK_MONOTONIC, &time); +- fprintf(stderr, " now: %ld\n", +- (long)time.tv_sec); ++ fprintf(stderr, " now: %jd\n", ++ (intmax_t)time.tv_sec); + } + } + +diff --git a/src/gallium/drivers/vc4/vc4_bufmgr.c b/src/gallium/drivers/vc4/vc4_bufmgr.c +index a786e8e..975d49e 100644 +--- a/src/gallium/drivers/vc4/vc4_bufmgr.c ++++ b/src/gallium/drivers/vc4/vc4_bufmgr.c +@@ -99,8 +99,8 @@ vc4_bo_dump_stats(struct vc4_screen *screen) + + struct timespec time; + clock_gettime(CLOCK_MONOTONIC, &time); +- fprintf(stderr, " now: %ld\n", +- (long)time.tv_sec); ++ fprintf(stderr, " now: %jd\n", ++ (intmax_t)time.tv_sec); + } + } + diff --git a/meta/recipes-graphics/mesa/libglu_9.0.1.bb b/meta/recipes-graphics/mesa/libglu_9.0.1.bb index 068fb19e26..703f131f79 100644 --- a/meta/recipes-graphics/mesa/libglu_9.0.1.bb +++ b/meta/recipes-graphics/mesa/libglu_9.0.1.bb @@ -21,7 +21,7 @@ S = "${WORKDIR}/glu-${PV}" DEPENDS = "virtual/libgl" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # Requires libGL.so which is provided by mesa when x11 in DISTRO_FEATURES REQUIRED_DISTRO_FEATURES = "x11 opengl" diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb b/meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb index 129a47df48..38bdbded29 100644 --- a/meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb +++ b/meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb @@ -22,7 +22,7 @@ SRC_URI = "https://mesa.freedesktop.org/archive/demos/${BPN}-${PV}.tar.bz2 \ SRC_URI[md5sum] = "6b65a02622765522176d00f553086fa3" SRC_URI[sha256sum] = "01e99c94a0184e63e796728af89bfac559795fb2a0d6f506fa900455ca5fff7d" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # depends on virtual/egl, virtual/libgl ... REQUIRED_DISTRO_FEATURES = "opengl x11" diff --git a/meta/recipes-graphics/mesa/mesa-gl_19.1.6.bb b/meta/recipes-graphics/mesa/mesa-gl_19.1.6.bb deleted file mode 100644 index d4b1c1c454..0000000000 --- a/meta/recipes-graphics/mesa/mesa-gl_19.1.6.bb +++ /dev/null @@ -1,10 +0,0 @@ -require mesa_${PV}.bb - -SUMMARY += " (OpenGL only, no EGL/GLES)" - -PROVIDES = "virtual/libgl virtual/mesa" - -S = "${WORKDIR}/mesa-${PV}" - -PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" -PACKAGECONFIG_class-target = "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" diff --git a/meta/recipes-graphics/mesa/mesa-gl_20.1.8.bb b/meta/recipes-graphics/mesa/mesa-gl_20.1.8.bb new file mode 100644 index 0000000000..e50782be1c --- /dev/null +++ b/meta/recipes-graphics/mesa/mesa-gl_20.1.8.bb @@ -0,0 +1,15 @@ +require mesa.inc + +SUMMARY += " (OpenGL only, no EGL/GLES)" + +PROVIDES = "virtual/libgl virtual/mesa" + +S = "${WORKDIR}/mesa-${PV}" + +# At least one DRI rendering engine is required to build mesa. +# When no X11 is available, use osmesa for the rendering engine. +PACKAGECONFIG ??= "opengl dri ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa', d)}" +PACKAGECONFIG_class-target = "opengl dri ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa', d)}" + +# When NOT using X11, we need to make sure we have swrast available. +DRIDRIVERS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', ',swrast', d)}" diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 9e5808ee27..9fc62e95e1 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -10,10 +10,32 @@ HOMEPAGE = "http://mesa3d.org" BUGTRACKER = "https://bugs.freedesktop.org" SECTION = "x11" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4" +LIC_FILES_CHKSUM = "file://docs/license.html;md5=c1843d93c460bbf778d6037ce324f9f7" PE = "2" +SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ + file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ + file://0002-meson.build-make-TLS-ELF-optional.patch \ + file://0003-Allow-enable-DRI-without-DRI-drivers.patch \ + file://0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch \ + file://0005-vc4-use-intmax_t-for-formatted-output-of-timespec-me.patch \ + file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ + file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \ + " + +SRC_URI[sha256sum] = "df21351494f7caaec5a3ccc16f14f15512e98d2ecde178bba1d134edc899b961" + +UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)" + +#because we cannot rely on the fact that all apps will use pkgconfig, +#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER +do_install_append() { + if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then + sed -i -e 's/^#elif defined(__unix__) && defined(EGL_NO_X11)$/#elif defined(__unix__) \&\& defined(EGL_NO_X11) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h + fi +} + DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native" EXTRANATIVEPATH += "chrpath-native" PROVIDES = " \ @@ -24,7 +46,7 @@ PROVIDES = " \ virtual/mesa \ " -inherit meson pkgconfig python3native gettext distro_features_check +inherit meson pkgconfig python3native gettext features_check # Unset these to stop python trying to report the target Python setup _PYTHON_SYSCONFIGDATA_NAME[unexport] = "1" @@ -46,6 +68,19 @@ export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}" MESA_LLVM_RELEASE ?= "${LLVMVERSION}" +# set the MESA_BUILD_TYPE to either 'release' (default) or 'debug' +# by default the upstream mesa sources build a debug release +# here we assume the user will want a release build by default +MESA_BUILD_TYPE ?= "release" +def check_buildtype(d): + _buildtype = d.getVar('MESA_BUILD_TYPE') + if _buildtype not in ['release', 'debug']: + bb.fatal("unknown build type (%s), please set MESA_BUILD_TYPE to either 'release' or 'debug'" % _buildtype) + if _buildtype == 'debug': + return 'debugoptimized' + return 'plain' +MESON_BUILDTYPE = "${@check_buildtype(d)}" + EXTRA_OEMESON = " \ -Dshared-glapi=true \ -Dgallium-opencl=disabled \ @@ -54,15 +89,15 @@ EXTRA_OEMESON = " \ " PACKAGECONFIG_class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri gallium', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri gallium virgl', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \ - glx-tls \ + elf-tls \ " -PACKAGECONFIG_class-native ?= "gbm dri egl opengl glx-tls" -PACKAGECONFIG_class-nativesdk ?= "gbm dri egl opengl glx-tls" +PACKAGECONFIG_class-native ?= "gbm dri egl opengl elf-tls x11" +PACKAGECONFIG_class-nativesdk ?= "gbm dri egl opengl elf-tls x11" -PACKAGECONFIG_remove_libc-musl = "glx-tls" +PACKAGECONFIG_remove_libc-musl = "elf-tls" # "gbm" requires "dri", "opengl" PACKAGECONFIG[gbm] = "-Dgbm=true,-Dgbm=false" @@ -70,7 +105,7 @@ PACKAGECONFIG[gbm] = "-Dgbm=true,-Dgbm=false" X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr" # "x11" requires "opengl" PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}" -PACKAGECONFIG[glx-tls] = "-Dglx-tls=true, -Dglx-tls=false" +PACKAGECONFIG[elf-tls] = "-Delf-tls=true, -Delf-tls=false" PACKAGECONFIG[xvmc] = "-Dgallium-xvmc=true,-Dgallium-xvmc=false,libxvmc" PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols" @@ -87,6 +122,7 @@ PACKAGECONFIG[dri3] = "-Ddri3=true, -Ddri3=false, xorgproto libxshmfence" VULKAN_DRIVERS = "" VULKAN_DRIVERS_append_x86_class-target = ",intel" VULKAN_DRIVERS_append_x86-64_class-target = ",intel" +VULKAN_DRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${VULKAN_DRIVERS}, -Dvulkan-drivers=''," PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false" @@ -119,15 +155,19 @@ GALLIUMDRIVERS_LLVM33_ENABLED = "${@oe.utils.version_less_or_equal('MESA_LLVM_RE GALLIUMDRIVERS_LLVM = "r300,svga,nouveau${@',${GALLIUMDRIVERS_LLVM33}' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}" PACKAGECONFIG[r600] = "" +PACKAGECONFIG[virgl] = "" GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}" GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}" -GALLIUMDRIVERS_append = ",virgl" +GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'virgl', ',virgl', '', d)}" PACKAGECONFIG[gallium] = "-Dgallium-drivers=${GALLIUMDRIVERS}, -Dgallium-drivers=''" PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true, -Dllvm=false, llvm${MESA_LLVM_RELEASE} llvm-native \ ${@'elfutils' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}" PACKAGECONFIG[xa] = "-Dgallium-xa=true, -Dgallium-xa=false" +PACKAGECONFIG[va] = "-Dgallium-va=true,-Dgallium-va=false,libva-initial" + +PACKAGECONFIG[vdpau] = "-Dgallium-vdpau=true,-Dgallium-vdpau=false,libvdpau" PACKAGECONFIG[lima] = "" GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}" @@ -147,6 +187,7 @@ EXTRA_OEMESON_append = " -Dasm=false" FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer" CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS" +CFLAGS_append_armv6 = " -DMISSING_64BIT_ATOMICS" # Remove the mesa dependency on mesa-dev, as mesa is empty RDEPENDS_${PN}-dev = "" @@ -164,6 +205,7 @@ PACKAGES =+ "libegl-mesa libegl-mesa-dev \ libgles3-mesa libgles3-mesa-dev \ libxatracker libxatracker-dev \ mesa-megadriver mesa-vulkan-drivers \ + mesa-vdpau-drivers \ " do_install_append () { @@ -193,18 +235,20 @@ python __anonymous() { ("gles", "libgles3",)): if not p[0] in pkgconfig: continue - fullp = p[1] + "-mesa" - pkgs = " ".join(p[1:]) + mlprefix = d.getVar("MLPREFIX") + fullp = mlprefix + p[1] + "-mesa" + mlprefix = d.getVar("MLPREFIX") + pkgs = " ".join(mlprefix + x for x in p[1:]) d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1") d.appendVar("RREPLACES_" + fullp, pkgs) d.appendVar("RPROVIDES_" + fullp, pkgs) d.appendVar("RCONFLICTS_" + fullp, pkgs) - d.appendVar("RRECOMMENDS_" + fullp, " mesa-megadriver") + d.appendVar("RRECOMMENDS_" + fullp, " ${MLPREFIX}mesa-megadriver") # For -dev, the first element is both the Debian and original name fullp += "-dev" - pkgs = p[1] + "-dev" + pkgs = mlprefix + p[1] + "-dev" d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1") d.appendVar("RREPLACES_" + fullp, pkgs) d.appendVar("RPROVIDES_" + fullp, pkgs) @@ -241,6 +285,7 @@ PACKAGES_DYNAMIC += "^mesa-driver-.*" FILES_mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d/00-mesa-defaults.conf" FILES_mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${datadir}/vulkan" +FILES_${PN}-vdpau-drivers = "${libdir}/vdpau/*.so.*" FILES_libegl-mesa = "${libdir}/libEGL.so.*" FILES_libgbm = "${libdir}/libgbm.so.*" FILES_libgles1-mesa = "${libdir}/libGLESv1*.so.*" @@ -250,7 +295,7 @@ FILES_libglapi = "${libdir}/libglapi.so.*" FILES_libosmesa = "${libdir}/libOSMesa.so.*" FILES_libxatracker = "${libdir}/libxatracker.so.*" -FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan" +FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan ${libdir}/vdpau/*.so" FILES_libegl-mesa-dev = "${libdir}/libEGL.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc" FILES_libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h" FILES_libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc" diff --git a/meta/recipes-graphics/mesa/mesa_19.1.6.bb b/meta/recipes-graphics/mesa/mesa_19.1.6.bb deleted file mode 100644 index 19221e9e25..0000000000 --- a/meta/recipes-graphics/mesa/mesa_19.1.6.bb +++ /dev/null @@ -1,20 +0,0 @@ -require ${BPN}.inc - -SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ - file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ - file://0002-meson.build-make-TLS-GLX-optional-again.patch \ - file://0003-Allow-enable-DRI-without-DRI-drivers.patch \ - " - -SRC_URI[md5sum] = "7dbb40b8d10e89bee0a5bfc85350647b" -SRC_URI[sha256sum] = "2a369b7b48545c6486e7e44913ad022daca097c8bd937bf30dcf3f17a94d3496" - -UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)" - -#because we cannot rely on the fact that all apps will use pkgconfig, -#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER -do_install_append() { - if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then - sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h - fi -} diff --git a/meta/recipes-graphics/mesa/mesa_20.1.8.bb b/meta/recipes-graphics/mesa/mesa_20.1.8.bb new file mode 100644 index 0000000000..96e8aa38d6 --- /dev/null +++ b/meta/recipes-graphics/mesa/mesa_20.1.8.bb @@ -0,0 +1,2 @@ +require ${BPN}.inc + diff --git a/meta/recipes-graphics/mx/mx.inc b/meta/recipes-graphics/mx/mx.inc index d304837484..714a06f0af 100644 --- a/meta/recipes-graphics/mx/mx.inc +++ b/meta/recipes-graphics/mx/mx.inc @@ -1,7 +1,7 @@ SUMMARY = "Clutter based UI widget library" LICENSE = "LGPLv2.1" -inherit clutter autotools distro_features_check gobject-introspection gtk-doc +inherit clutter autotools features_check gobject-introspection gtk-doc # depends on clutter-1.0 which depends on cogl-1.0 REQUIRED_DISTRO_FEATURES = "opengl" diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb b/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb index 87c700e023..2e7b47dd40 100644 --- a/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb +++ b/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb @@ -6,7 +6,7 @@ SUMMARY = "Clutter package groups" PR = "r6" -inherit packagegroup distro_features_check +inherit packagegroup features_check # rdepends on clutter-* REQUIRED_DISTRO_FEATURES = "opengl" diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb b/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb index 7ea72d55a7..9ca2705a5f 100644 --- a/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb +++ b/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb @@ -2,7 +2,7 @@ SUMMARY = "Basic X11 session" DESCRIPTION = "Packages required to set up a basic working X11 session" PR = "r1" -inherit packagegroup distro_features_check +inherit packagegroup features_check # rdepends on matchbox-wm REQUIRED_DISTRO_FEATURES = "x11" diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb b/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb index 97dcac5f79..a0b944a678 100644 --- a/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb +++ b/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb @@ -7,7 +7,7 @@ PR = "r40" PACKAGE_ARCH = "${MACHINE_ARCH}" -inherit packagegroup distro_features_check +inherit packagegroup features_check # rdepends on XSERVER REQUIRED_DISTRO_FEATURES = "x11" diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb b/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb index 001db9e5e2..cddf1932f3 100644 --- a/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb +++ b/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb @@ -4,7 +4,7 @@ PR = "r40" -inherit packagegroup distro_features_check +inherit packagegroup features_check REQUIRED_DISTRO_FEATURES = "x11" PACKAGES = "${PN} ${PN}-utils" diff --git a/meta/recipes-graphics/pango/pango/0001-Skip-thai-break-tests-without-libthai.patch b/meta/recipes-graphics/pango/pango/0001-Skip-thai-break-tests-without-libthai.patch deleted file mode 100644 index 3f9ebff33e..0000000000 --- a/meta/recipes-graphics/pango/pango/0001-Skip-thai-break-tests-without-libthai.patch +++ /dev/null @@ -1,36 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From 12beb39925b5a4574a7cfd86073b59bceb49f791 Mon Sep 17 00:00:00 2001 -From: Matthias Clasen <mclasen@redhat.com> -Date: Wed, 4 Sep 2019 15:51:06 -0400 -Subject: [PATCH] Skip thai break tests without libthai - -If we don't have libthai, these tests fail. - -Closes: https://gitlab.gnome.org/GNOME/pango/issues/420 ---- - tests/meson.build | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/tests/meson.build b/tests/meson.build -index 4c22c12c..c617331f 100644 ---- a/tests/meson.build -+++ b/tests/meson.build -@@ -89,9 +89,12 @@ test_breaks_data = [ - 'breaks/one', - 'breaks/two', - 'breaks/three', -- 'breaks/four', - ] - -+if thai_dep.found() -+ test_breaks_data += [ 'breaks/four', ] -+endif -+ - test_items_data = [ - 'itemize/one', - ] --- -2.20.1 - diff --git a/meta/recipes-graphics/pango/pango_1.44.6.bb b/meta/recipes-graphics/pango/pango_1.46.2.bb index 8138ef72c1..c41d1e8a9b 100644 --- a/meta/recipes-graphics/pango/pango_1.44.6.bb +++ b/meta/recipes-graphics/pango/pango_1.46.2.bb @@ -15,10 +15,8 @@ GNOMEBASEBUILDCLASS = "meson" inherit gnomebase gtk-doc ptest-gnome upstream-version-is-even gobject-introspection -SRC_URI += "file://run-ptest \ - file://0001-Skip-thai-break-tests-without-libthai.patch" -SRC_URI[archive.md5sum] = "db0a3243ba33e02aaa775412f8e5f412" -SRC_URI[archive.sha256sum] = "3e1e41ba838737e200611ff001e3b304c2ca4cdbba63d200a20db0b0ddc0f86c" +SRC_URI += " file://run-ptest" +SRC_URI[archive.sha256sum] = "d89fab5f26767261b493279b65cfb9eb0955cd44c07c5628d36094609fc51841" DEPENDS = "glib-2.0 glib-2.0-native fontconfig freetype virtual/libiconv cairo harfbuzz fribidi" @@ -32,6 +30,10 @@ PACKAGECONFIG[thai] = ",,libthai" GTKDOC_MESON_OPTION = "gtk_doc" GIR_MESON_OPTION = 'introspection' +do_configure_prepend_toolchain-clang() { + sed -i -e "/Werror=implicit-fallthrough/d" ${S}/meson.build +} + LEAD_SONAME = "libpango-1.0*" FILES_${PN} = "${bindir}/* ${libdir}/libpango*${SOLIBS}" diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb index d489f82b14..d35117a4f9 100644 --- a/meta/recipes-graphics/piglit/piglit_git.bb +++ b/meta/recipes-graphics/piglit/piglit_git.bb @@ -1,4 +1,6 @@ SUMMARY = "OpenGL driver testing framework" +DESCRIPTION = "Piglit is an open-source test suite for OpenGL and OpenCL \ +implementations." LICENSE = "MIT & LGPLv2+ & GPLv3 & GPLv2+ & BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0" @@ -8,7 +10,7 @@ SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https \ " UPSTREAM_CHECK_COMMITS = "1" -SRCREV = "0d1a47a4c10d4dd7225bd6510f8191684b31235e" +SRCREV = "2a6a8f954dcd3f748055f28e019d2eca64635332" # (when PV goes above 1.0 remove the trailing r) PV = "1.0+gitr${SRCPV}" @@ -19,7 +21,7 @@ X11_RDEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa-demos', '', d) DEPENDS = "libpng waffle libxkbcommon virtual/libgl python3-mako-native python3-numpy-native python3-six-native virtual/egl" -inherit cmake pkgconfig python3native distro_features_check bash-completion +inherit cmake pkgconfig python3native features_check bash-completion # depends on virtual/libgl REQUIRED_DISTRO_FEATURES += "opengl" @@ -42,6 +44,7 @@ do_configure_prepend() { fi } +# Forcibly strip because Piglit is *huge* OECMAKE_TARGET_INSTALL = "install/strip" RDEPENDS_${PN} = "waffle waffle-bin python3 python3-mako python3-json \ @@ -53,5 +56,9 @@ RDEPENDS_${PN} = "waffle waffle-bin python3 python3-mako python3-json \ INSANE_SKIP_${PN} += "dev-so already-stripped" +# As nothing builds against Piglit we don't need to have anything in the +# sysroot, especially when this is ~2GB of test suite +SYSROOT_DIRS_remove = "${libdir}" + # Can't be built with ccache CCACHE_DISABLE = "1" diff --git a/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb b/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb index cdfe38a221..c3c237eee7 100644 --- a/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb +++ b/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb @@ -2,7 +2,7 @@ SUMMARY = "A clock combined with a game of pong" LICENSE = "GPLv2+" DEPENDS = "virtual/libx11 xdmcp xau" -inherit distro_features_check pkgconfig +inherit features_check pkgconfig # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" diff --git a/meta/recipes-graphics/startup-notification/startup-notification-0.12/time_t.patch b/meta/recipes-graphics/startup-notification/startup-notification-0.12/time_t.patch new file mode 100644 index 0000000000..e5dff007d4 --- /dev/null +++ b/meta/recipes-graphics/startup-notification/startup-notification-0.12/time_t.patch @@ -0,0 +1,108 @@ +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@arm.com> + +From a7e49fefde18ea8d5bada8096d32f23bcfb5a6dc Mon Sep 17 00:00:00 2001 +From: "Federico G. Schwindt" <fgsch@openbsd.org> +Date: Mon, 17 Feb 2014 15:48:12 +0100 +Subject: [PATCH 1/3] Fix crash on 32bit architectures where time_t is 64 bit + +This is an ABI change on platforms where sizeof(time_t) doesn't equal +sizeof(long). For most platforms this change shouldn't make a difference +at present. OpenBSD recently switched to 64bit time_t on all architectures +to avoid time_t overflow in 2038 on 32bit machines. + +This fix extends to consumers of startup-notification, for instance +the window manager of XFCE, which is how I got involved in this. +See http://mail.xfce.org/pipermail/xfce4-dev/2014-February/030611.html +and follow-ups. The XFCE devs pointed out that my patch to fix a +crash in XFCE's window manager depends on this startup-notification patch. + +Signed-off-by: Julien Danjou <julien@danjou.info> +--- + libsn/sn-monitor.c | 8 ++++---- + libsn/sn-monitor.h | 8 ++++---- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/libsn/sn-monitor.c b/libsn/sn-monitor.c +index 2a9ad16..f419bc1 100644 +--- a/libsn/sn-monitor.c ++++ b/libsn/sn-monitor.c +@@ -364,8 +364,8 @@ sn_startup_sequence_get_screen (SnStartupSequence *sequence) + **/ + void + sn_startup_sequence_get_initiated_time (SnStartupSequence *sequence, +- long *tv_sec, +- long *tv_usec) ++ time_t *tv_sec, ++ suseconds_t *tv_usec) + { + if (tv_sec) + *tv_sec = sequence->initiation_time.tv_sec; +@@ -386,8 +386,8 @@ sn_startup_sequence_get_initiated_time (SnStartupSequence *sequence, + **/ + void + sn_startup_sequence_get_last_active_time (SnStartupSequence *sequence, +- long *tv_sec, +- long *tv_usec) ++ time_t *tv_sec, ++ suseconds_t *tv_usec) + { + /* for now the same as get_initiated_time */ + if (tv_sec) +diff --git a/libsn/sn-monitor.h b/libsn/sn-monitor.h +index b58581f..2f639df 100644 +--- a/libsn/sn-monitor.h ++++ b/libsn/sn-monitor.h +@@ -77,11 +77,11 @@ const char* sn_startup_sequence_get_application_id (SnStartupSequence *se + int sn_startup_sequence_get_screen (SnStartupSequence *sequence); + + void sn_startup_sequence_get_initiated_time (SnStartupSequence *sequence, +- long *tv_sec, +- long *tv_usec); ++ time_t *tv_sec, ++ suseconds_t *tv_usec); + void sn_startup_sequence_get_last_active_time (SnStartupSequence *sequence, +- long *tv_sec, +- long *tv_usec); ++ time_t *tv_sec, ++ suseconds_t *tv_usec); + + void sn_startup_sequence_complete (SnStartupSequence *sequence); + +-- +2.26.2 + +From ea9f7e4cc6fd8c08d175ed7774ed2c5bd11c8ef0 Mon Sep 17 00:00:00 2001 +From: Colin Walters <walters@verbum.org> +Date: Mon, 17 Feb 2014 14:37:09 -0500 +Subject: [PATCH 2/3] Add include of <sys/select.h> for previous patch + +Unfortunately while the standard says that <sys/types.h> is the +correct header to get suseconds_t, at least with glibc, that requires +-DXOPEN_SOURCE. Which is problematic for a public header, because +then all *users* of startup-notification will be required to define +that. + +Poking around a bit, it looks like at least with glibc, <sys/select.h> +will give us an unconditional define. + +Signed-off-by: Julien Danjou <julien@danjou.info> +--- + libsn/sn-monitor.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libsn/sn-monitor.h b/libsn/sn-monitor.h +index 2f639df..cea4e12 100644 +--- a/libsn/sn-monitor.h ++++ b/libsn/sn-monitor.h +@@ -28,6 +28,7 @@ + #define __SN_MONITOR_H__ + + #include <libsn/sn-common.h> ++#include <sys/select.h> + + SN_BEGIN_DECLS + +-- +2.26.2 + diff --git a/meta/recipes-graphics/startup-notification/startup-notification_0.12.bb b/meta/recipes-graphics/startup-notification/startup-notification_0.12.bb index 6c1b93cd0a..d10bddb529 100644 --- a/meta/recipes-graphics/startup-notification/startup-notification_0.12.bb +++ b/meta/recipes-graphics/startup-notification/startup-notification_0.12.bb @@ -17,12 +17,13 @@ SECTION = "libs" DEPENDS = "virtual/libx11 libsm xcb-util" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" SRC_URI = "http://www.freedesktop.org/software/startup-notification/releases/${BPN}-${PV}.tar.gz \ file://obsolete_automake_macros.patch \ + file://time_t.patch \ " SRC_URI[md5sum] = "2cd77326d4dcaed9a5a23a1232fb38e9" diff --git a/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb b/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb index 70b32cf8f1..3e1ba196b5 100644 --- a/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb +++ b/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb @@ -9,7 +9,7 @@ LICENSE = "BitstreamVera" LIC_FILES_CHKSUM = "file://COPYRIGHT.TXT;md5=27d7484b1e18d0ee4ce538644a3f04be" PR = "r7" -inherit fontcache +inherit allarch fontcache FONT_PACKAGES = "${PN}" diff --git a/meta/recipes-graphics/virglrenderer/virglrenderer/0001-meson.build-use-python3-directly-for-python.patch b/meta/recipes-graphics/virglrenderer/virglrenderer/0001-meson.build-use-python3-directly-for-python.patch new file mode 100644 index 0000000000..0fd1d511d6 --- /dev/null +++ b/meta/recipes-graphics/virglrenderer/virglrenderer/0001-meson.build-use-python3-directly-for-python.patch @@ -0,0 +1,27 @@ +From 63788c63ed39a3ce9994f4315d8997e1a9300d4d Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Mon, 6 Jan 2020 12:44:42 +0100 +Subject: [PATCH] meson.build: use 'python3' directly for python + +This avoids a dependency on target python (due to meson probing +its configuration). + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 682d7c8..19d2eae 100644 +--- a/meson.build ++++ b/meson.build +@@ -60,7 +60,7 @@ foreach w : warnings + endif + endforeach + +-prog_python = import('python').find_installation('python3') ++prog_python = 'python3' + + libdrm_dep = dependency('libdrm', version : '>=2.4.50') + thread_dep = dependency('threads') diff --git a/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.0.bb b/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.0.bb deleted file mode 100644 index d2b11c103a..0000000000 --- a/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.0.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "VirGL virtual OpenGL renderer" -HOMEPAGE = "https://virgil3d.github.io/" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=c81c08eeefd9418fca8f88309a76db10" - -DEPENDS = "libdrm mesa libepoxy" -SRCREV = "48cc96c9aebb9d0164830a157efc8916f08f00c0" -SRC_URI = "git://anongit.freedesktop.org/virglrenderer \ - file://0001-gallium-Expand-libc-check-to-be-platform-OS-check.patch \ - " - -S = "${WORKDIR}/git" - -inherit autotools pkgconfig distro_features_check - -BBCLASSEXTEND = "native nativesdk" - -REQUIRED_DISTRO_FEATURES = "opengl" -REQUIRED_DISTRO_FEATURES_class-native = "" -REQUIRED_DISTRO_FEATURES_class-nativesdk = "" diff --git a/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.2.bb b/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.2.bb new file mode 100644 index 0000000000..52821195d1 --- /dev/null +++ b/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.2.bb @@ -0,0 +1,24 @@ +SUMMARY = "VirGL virtual OpenGL renderer" +DESCRIPTION = "Virgil is a research project to investigate the possibility of \ +creating a virtual 3D GPU for use inside qemu virtual machines, that allows \ +the guest operating system to use the capabilities of the host GPU to \ +accelerate 3D rendering." +HOMEPAGE = "https://virgil3d.github.io/" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=c81c08eeefd9418fca8f88309a76db10" + +DEPENDS = "libdrm virtual/libgl libepoxy" +SRCREV = "7d204f3927be65fb3365dce01dbcd04d447a4985" +SRC_URI = "git://anongit.freedesktop.org/virglrenderer \ + file://0001-gallium-Expand-libc-check-to-be-platform-OS-check.patch \ + file://0001-meson.build-use-python3-directly-for-python.patch \ + " + +S = "${WORKDIR}/git" + +inherit meson pkgconfig features_check + +BBCLASSEXTEND = "native nativesdk" + +REQUIRED_DISTRO_FEATURES = "opengl" diff --git a/meta/recipes-graphics/vulkan/assimp/0001-Use-ASSIMP_LIB_INSTALL_DIR-to-search-library.patch b/meta/recipes-graphics/vulkan/assimp/0001-Use-ASSIMP_LIB_INSTALL_DIR-to-search-library.patch new file mode 100644 index 0000000000..34c5bfa857 --- /dev/null +++ b/meta/recipes-graphics/vulkan/assimp/0001-Use-ASSIMP_LIB_INSTALL_DIR-to-search-library.patch @@ -0,0 +1,68 @@ +From 58f576d6f240b08957a402960cdf06c74201ac7b Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Thu, 12 Dec 2019 22:16:15 -0800 +Subject: [PATCH] Use ASSIMP_LIB_INSTALL_DIR to search library + +Use ASSIMP_LIB_INSTALL_DIR rather than hardcoded /lib to search library + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> + +--- + assimpTargets-release.cmake.in | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/assimpTargets-release.cmake.in b/assimpTargets-release.cmake.in +index f3db8f1..b8a066a 100644 +--- a/assimpTargets-release.cmake.in ++++ b/assimpTargets-release.cmake.in +@@ -42,11 +42,11 @@ if(MSVC) + # Import target "assimp::assimp" for configuration "Release" + set_property(TARGET assimp::assimp APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(assimp::assimp PROPERTIES +- IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/${importLibraryName}" ++ IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/@ASSIMP_LIB_INSTALL_DIR@/${importLibraryName}" + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/${sharedLibraryName}" + ) + list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp ) +- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${importLibraryName}") ++ list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/@ASSIMP_LIB_INSTALL_DIR@/${importLibraryName}") + list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/bin/${sharedLibraryName}" ) + else() + set(staticLibraryName "assimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_STATIC_LIBRARY_SUFFIX@") +@@ -54,10 +54,10 @@ if(MSVC) + # Import target "assimp::assimp" for configuration "Release" + set_property(TARGET assimp::assimp APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(assimp::assimp PROPERTIES +- IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/${staticLibraryName}" ++ IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/@ASSIMP_LIB_INSTALL_DIR@/${staticLibraryName}" + ) + list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp ) +- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${staticLibraryName}") ++ list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/@ASSIMP_LIB_INSTALL_DIR@/${staticLibraryName}") + endif() + + else() +@@ -70,17 +70,17 @@ else() + endif() + set_target_properties(assimp::assimp PROPERTIES + IMPORTED_SONAME_RELEASE "${sharedLibraryName}" +- IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/${sharedLibraryName}" ++ IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/@ASSIMP_LIB_INSTALL_DIR@/${sharedLibraryName}" + ) + list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp ) +- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${sharedLibraryName}" ) ++ list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/@ASSIMP_LIB_INSTALL_DIR@/${sharedLibraryName}" ) + else() + set(staticLibraryName "libassimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_STATIC_LIBRARY_SUFFIX@") + set_target_properties(assimp::assimp PROPERTIES +- IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/${staticLibraryName}" ++ IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/@ASSIMP_LIB_INSTALL_DIR@/${staticLibraryName}" + ) + list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp ) +- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${staticLibraryName}" ) ++ list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/@ASSIMP_LIB_INSTALL_DIR@/${staticLibraryName}" ) + endif() + endif() + diff --git a/meta/recipes-graphics/vulkan/assimp/0001-closes-https-github.com-assimp-assimp-issues-2733-up.patch b/meta/recipes-graphics/vulkan/assimp/0001-closes-https-github.com-assimp-assimp-issues-2733-up.patch new file mode 100644 index 0000000000..87a1658710 --- /dev/null +++ b/meta/recipes-graphics/vulkan/assimp/0001-closes-https-github.com-assimp-assimp-issues-2733-up.patch @@ -0,0 +1,1664 @@ +From 7fc220b2350d78942fb3935cad0b1564418ebe8f Mon Sep 17 00:00:00 2001 +From: Kim Kulling <kim.kulling@googlemail.com> +Date: Tue, 19 Nov 2019 20:30:40 +0100 +Subject: [PATCH] closes https://github.com/assimp/assimp/issues/2733: update + of zlip to fix gcc build for v9.2.0 32 bit + +Upstream-Status: Backport [https://github.com/assimp/assimp/commit/f78446b14aff46db2ef27d062a275b6a01fd68b1] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + contrib/zip/.gitignore | 2 + + contrib/zip/CMakeLists.txt | 83 +++++- + contrib/zip/README.md | 12 +- + contrib/zip/appveyor.yml | 2 +- + contrib/zip/src/miniz.h | 457 ++++++++++++++++++++++++++++---- + contrib/zip/src/zip.c | 62 +++-- + contrib/zip/src/zip.h | 457 ++++++++++++++++---------------- + contrib/zip/test/CMakeLists.txt | 27 +- + contrib/zip/test/test.c | 38 ++- + contrib/zip/test/test_miniz.c | 25 +- + 10 files changed, 821 insertions(+), 344 deletions(-) + +diff --git a/contrib/zip/.gitignore b/contrib/zip/.gitignore +index a7904a1e..49b2cb2f 100644 +--- a/contrib/zip/.gitignore ++++ b/contrib/zip/.gitignore +@@ -1,6 +1,7 @@ + /build/ + /test/build/ + /xcodeproj/ ++.vscode/ + + # Object files + *.o +@@ -54,3 +55,4 @@ zip.dir/ + test/test.exe.vcxproj.filters + test/test.exe.vcxproj + test/test.exe.dir/ ++ +diff --git a/contrib/zip/CMakeLists.txt b/contrib/zip/CMakeLists.txt +index b46dbb1d..77916d2e 100644 +--- a/contrib/zip/CMakeLists.txt ++++ b/contrib/zip/CMakeLists.txt +@@ -1,10 +1,14 @@ +-cmake_minimum_required(VERSION 2.8) +-project(zip) +-enable_language(C) ++cmake_minimum_required(VERSION 3.0) ++ ++project(zip ++ LANGUAGES C ++ VERSION "0.1.15") + set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) + ++option(CMAKE_DISABLE_TESTING "Disable test creation" OFF) ++ + if (MSVC) +- # Use secure functions by defaualt and suppress warnings about "deprecated" functions ++ # Use secure functions by default and suppress warnings about "deprecated" functions + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_NONSTDC_NO_WARNINGS=1 /D _CRT_SECURE_NO_WARNINGS=1") +@@ -12,28 +16,80 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR + "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR + "${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -Wextra -Werror -pedantic") ++ if(ENABLE_COVERAGE) ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage") ++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage") ++ endif() + endif (MSVC) + + # zip + set(SRC src/miniz.h src/zip.h src/zip.c) + add_library(${PROJECT_NAME} ${SRC}) +-target_include_directories(${PROJECT_NAME} INTERFACE src) ++target_include_directories(${PROJECT_NAME} PUBLIC ++ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src> ++ $<INSTALL_INTERFACE:include> ++) + + # test + if (NOT CMAKE_DISABLE_TESTING) + enable_testing() + add_subdirectory(test) + find_package(Sanitizers) +- add_sanitizers(${PROJECT_NAME} test.exe) +- add_sanitizers(${PROJECT_NAME} test_miniz.exe) ++ add_sanitizers(${PROJECT_NAME} ${test_out} ${test_miniz_out}) + endif() + ++#### ++# Installation (https://github.com/forexample/package-example) { ++ ++set(CONFIG_INSTALL_DIR "lib/cmake/${PROJECT_NAME}") ++set(INCLUDE_INSTALL_DIR "include") ++ ++set(GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") ++ ++# Configuration ++set(VERSION_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}ConfigVersion.cmake") ++set(PROJECT_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}Config.cmake") ++set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") ++set(NAMESPACE "${PROJECT_NAME}::") ++ ++# Include module with fuction 'write_basic_package_version_file' ++include(CMakePackageConfigHelpers) ++ ++# Note: PROJECT_VERSION is used as a VERSION ++write_basic_package_version_file( ++ "${VERSION_CONFIG}" COMPATIBILITY SameMajorVersion ++) ++ ++# Use variables: ++# * TARGETS_EXPORT_NAME ++# * PROJECT_NAME ++configure_package_config_file( ++ "cmake/Config.cmake.in" ++ "${PROJECT_CONFIG}" ++ INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}" ++) ++ ++install( ++ FILES "${PROJECT_CONFIG}" "${VERSION_CONFIG}" ++ DESTINATION "${CONFIG_INSTALL_DIR}" ++) ++ ++install( ++ EXPORT "${TARGETS_EXPORT_NAME}" ++ NAMESPACE "${NAMESPACE}" ++ DESTINATION "${CONFIG_INSTALL_DIR}" ++) ++ ++# } ++ + install(TARGETS ${PROJECT_NAME} ++ EXPORT ${TARGETS_EXPORT_NAME} + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +- COMPONENT library) +-install(FILES ${PROJECT_SOURCE_DIR}/src/zip.h DESTINATION include) ++ INCLUDES DESTINATION ${INCLUDE_INSTALL_DIR} ++) ++install(FILES ${PROJECT_SOURCE_DIR}/src/zip.h DESTINATION ${INCLUDE_INSTALL_DIR}/zip) + + # uninstall target (https://gitlab.kitware.com/cmake/community/wikis/FAQ#can-i-do-make-uninstall-with-cmake) + if(NOT TARGET uninstall) +@@ -45,3 +101,12 @@ if(NOT TARGET uninstall) + add_custom_target(uninstall + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake) + endif() ++ ++find_package(Doxygen) ++if(DOXYGEN_FOUND) ++ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) ++ add_custom_target(doc ++ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile ++ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ++ COMMENT "Generating API documentation with Doxygen" VERBATIM) ++endif() +diff --git a/contrib/zip/README.md b/contrib/zip/README.md +index d5fb8cd2..14eb9a34 100644 +--- a/contrib/zip/README.md ++++ b/contrib/zip/README.md +@@ -71,7 +71,7 @@ int arg = 2; + zip_extract("foo.zip", "/tmp", on_extract_entry, &arg); + ``` + +-* Extract a zip entry into memory. ++* Extract a zip entry into memory. + ```c + void *buf = NULL; + size_t bufsize; +@@ -89,7 +89,7 @@ zip_close(zip); + free(buf); + ``` + +-* Extract a zip entry into memory (no internal allocation). ++* Extract a zip entry into memory (no internal allocation). + ```c + unsigned char *buf; + size_t bufsize; +@@ -110,7 +110,7 @@ zip_close(zip); + free(buf); + ``` + +-* Extract a zip entry into memory using callback. ++* Extract a zip entry into memory using callback. + ```c + struct buffer_t { + char *data; +@@ -144,7 +144,7 @@ free(buf.data); + ``` + + +-* Extract a zip entry into a file. ++* Extract a zip entry into a file. + ```c + struct zip_t *zip = zip_open("foo.zip", 0, 'r'); + { +@@ -157,7 +157,7 @@ struct zip_t *zip = zip_open("foo.zip", 0, 'r'); + zip_close(zip); + ``` + +-* List of all zip entries ++* List of all zip entries + ```c + struct zip_t *zip = zip_open("foo.zip", 0, 'r'); + int i, n = zip_total_entries(zip); +@@ -174,7 +174,7 @@ for (i = 0; i < n; ++i) { + zip_close(zip); + ``` + +-## Bindings ++# Bindings + Compile zip library as a dynamic library. + ```shell + $ mkdir build +diff --git a/contrib/zip/appveyor.yml b/contrib/zip/appveyor.yml +index 0be6373c..ea17f5de 100644 +--- a/contrib/zip/appveyor.yml ++++ b/contrib/zip/appveyor.yml +@@ -1,4 +1,4 @@ +-version: zip-0.1.9.{build} ++version: zip-0.1.15.{build} + build_script: + - cmd: >- + cd c:\projects\zip +diff --git a/contrib/zip/src/miniz.h b/contrib/zip/src/miniz.h +index 2c27a94d..c4fcfb83 100644 +--- a/contrib/zip/src/miniz.h ++++ b/contrib/zip/src/miniz.h +@@ -221,6 +221,7 @@ + #ifndef MINIZ_HEADER_INCLUDED + #define MINIZ_HEADER_INCLUDED + ++#include <stdint.h> + #include <stdlib.h> + + // Defines to completely disable specific portions of miniz.c: +@@ -284,7 +285,8 @@ + /* Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES only if not set */ + #if !defined(MINIZ_USE_UNALIGNED_LOADS_AND_STORES) + #if MINIZ_X86_OR_X64_CPU +-/* Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES to 1 on CPU's that permit efficient integer loads and stores from unaligned addresses. */ ++/* Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES to 1 on CPU's that permit efficient ++ * integer loads and stores from unaligned addresses. */ + #define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1 + #define MINIZ_UNALIGNED_USE_MEMCPY + #else +@@ -354,6 +356,44 @@ enum { + MZ_FIXED = 4 + }; + ++/* miniz error codes. Be sure to update mz_zip_get_error_string() if you add or ++ * modify this enum. */ ++typedef enum { ++ MZ_ZIP_NO_ERROR = 0, ++ MZ_ZIP_UNDEFINED_ERROR, ++ MZ_ZIP_TOO_MANY_FILES, ++ MZ_ZIP_FILE_TOO_LARGE, ++ MZ_ZIP_UNSUPPORTED_METHOD, ++ MZ_ZIP_UNSUPPORTED_ENCRYPTION, ++ MZ_ZIP_UNSUPPORTED_FEATURE, ++ MZ_ZIP_FAILED_FINDING_CENTRAL_DIR, ++ MZ_ZIP_NOT_AN_ARCHIVE, ++ MZ_ZIP_INVALID_HEADER_OR_CORRUPTED, ++ MZ_ZIP_UNSUPPORTED_MULTIDISK, ++ MZ_ZIP_DECOMPRESSION_FAILED, ++ MZ_ZIP_COMPRESSION_FAILED, ++ MZ_ZIP_UNEXPECTED_DECOMPRESSED_SIZE, ++ MZ_ZIP_CRC_CHECK_FAILED, ++ MZ_ZIP_UNSUPPORTED_CDIR_SIZE, ++ MZ_ZIP_ALLOC_FAILED, ++ MZ_ZIP_FILE_OPEN_FAILED, ++ MZ_ZIP_FILE_CREATE_FAILED, ++ MZ_ZIP_FILE_WRITE_FAILED, ++ MZ_ZIP_FILE_READ_FAILED, ++ MZ_ZIP_FILE_CLOSE_FAILED, ++ MZ_ZIP_FILE_SEEK_FAILED, ++ MZ_ZIP_FILE_STAT_FAILED, ++ MZ_ZIP_INVALID_PARAMETER, ++ MZ_ZIP_INVALID_FILENAME, ++ MZ_ZIP_BUF_TOO_SMALL, ++ MZ_ZIP_INTERNAL_ERROR, ++ MZ_ZIP_FILE_NOT_FOUND, ++ MZ_ZIP_ARCHIVE_TOO_LARGE, ++ MZ_ZIP_VALIDATION_FAILED, ++ MZ_ZIP_WRITE_CALLBACK_FAILED, ++ MZ_ZIP_TOTAL_ERRORS ++} mz_zip_error; ++ + // Method + #define MZ_DEFLATED 8 + +@@ -696,6 +736,7 @@ typedef size_t (*mz_file_read_func)(void *pOpaque, mz_uint64 file_ofs, + void *pBuf, size_t n); + typedef size_t (*mz_file_write_func)(void *pOpaque, mz_uint64 file_ofs, + const void *pBuf, size_t n); ++typedef mz_bool (*mz_file_needs_keepalive)(void *pOpaque); + + struct mz_zip_internal_state_tag; + typedef struct mz_zip_internal_state_tag mz_zip_internal_state; +@@ -707,13 +748,27 @@ typedef enum { + MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED = 3 + } mz_zip_mode; + +-typedef struct mz_zip_archive_tag { ++typedef enum { ++ MZ_ZIP_TYPE_INVALID = 0, ++ MZ_ZIP_TYPE_USER, ++ MZ_ZIP_TYPE_MEMORY, ++ MZ_ZIP_TYPE_HEAP, ++ MZ_ZIP_TYPE_FILE, ++ MZ_ZIP_TYPE_CFILE, ++ MZ_ZIP_TOTAL_TYPES ++} mz_zip_type; ++ ++typedef struct { + mz_uint64 m_archive_size; + mz_uint64 m_central_directory_file_ofs; +- mz_uint m_total_files; ++ ++ /* We only support up to UINT32_MAX files in zip64 mode. */ ++ mz_uint32 m_total_files; + mz_zip_mode m_zip_mode; ++ mz_zip_type m_zip_type; ++ mz_zip_error m_last_error; + +- mz_uint m_file_offset_alignment; ++ mz_uint64 m_file_offset_alignment; + + mz_alloc_func m_pAlloc; + mz_free_func m_pFree; +@@ -722,6 +777,7 @@ typedef struct mz_zip_archive_tag { + + mz_file_read_func m_pRead; + mz_file_write_func m_pWrite; ++ mz_file_needs_keepalive m_pNeeds_keepalive; + void *m_pIO_opaque; + + mz_zip_internal_state *m_pState; +@@ -1263,6 +1319,9 @@ mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bits, + int strategy); + #endif // #ifndef MINIZ_NO_ZLIB_APIS + ++#define MZ_UINT16_MAX (0xFFFFU) ++#define MZ_UINT32_MAX (0xFFFFFFFFU) ++ + #ifdef __cplusplus + } + #endif +@@ -1311,6 +1370,11 @@ typedef unsigned char mz_validate_uint64[sizeof(mz_uint64) == 8 ? 1 : -1]; + ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U)) + #endif + ++#define MZ_READ_LE64(p) \ ++ (((mz_uint64)MZ_READ_LE32(p)) | \ ++ (((mz_uint64)MZ_READ_LE32((const mz_uint8 *)(p) + sizeof(mz_uint32))) \ ++ << 32U)) ++ + #ifdef _MSC_VER + #define MZ_FORCEINLINE __forceinline + #elif defined(__GNUC__) +@@ -4160,6 +4224,17 @@ enum { + MZ_ZIP_LOCAL_DIR_HEADER_SIZE = 30, + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE = 46, + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE = 22, ++ ++ /* ZIP64 archive identifier and record sizes */ ++ MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIG = 0x06064b50, ++ MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIG = 0x07064b50, ++ MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE = 56, ++ MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE = 20, ++ MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID = 0x0001, ++ MZ_ZIP_DATA_DESCRIPTOR_ID = 0x08074b50, ++ MZ_ZIP_DATA_DESCRIPTER_SIZE64 = 24, ++ MZ_ZIP_DATA_DESCRIPTER_SIZE32 = 16, ++ + // Central directory header record offsets + MZ_ZIP_CDH_SIG_OFS = 0, + MZ_ZIP_CDH_VERSION_MADE_BY_OFS = 4, +@@ -4199,6 +4274,31 @@ enum { + MZ_ZIP_ECDH_CDIR_SIZE_OFS = 12, + MZ_ZIP_ECDH_CDIR_OFS_OFS = 16, + MZ_ZIP_ECDH_COMMENT_SIZE_OFS = 20, ++ ++ /* ZIP64 End of central directory locator offsets */ ++ MZ_ZIP64_ECDL_SIG_OFS = 0, /* 4 bytes */ ++ MZ_ZIP64_ECDL_NUM_DISK_CDIR_OFS = 4, /* 4 bytes */ ++ MZ_ZIP64_ECDL_REL_OFS_TO_ZIP64_ECDR_OFS = 8, /* 8 bytes */ ++ MZ_ZIP64_ECDL_TOTAL_NUMBER_OF_DISKS_OFS = 16, /* 4 bytes */ ++ ++ /* ZIP64 End of central directory header offsets */ ++ MZ_ZIP64_ECDH_SIG_OFS = 0, /* 4 bytes */ ++ MZ_ZIP64_ECDH_SIZE_OF_RECORD_OFS = 4, /* 8 bytes */ ++ MZ_ZIP64_ECDH_VERSION_MADE_BY_OFS = 12, /* 2 bytes */ ++ MZ_ZIP64_ECDH_VERSION_NEEDED_OFS = 14, /* 2 bytes */ ++ MZ_ZIP64_ECDH_NUM_THIS_DISK_OFS = 16, /* 4 bytes */ ++ MZ_ZIP64_ECDH_NUM_DISK_CDIR_OFS = 20, /* 4 bytes */ ++ MZ_ZIP64_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS = 24, /* 8 bytes */ ++ MZ_ZIP64_ECDH_CDIR_TOTAL_ENTRIES_OFS = 32, /* 8 bytes */ ++ MZ_ZIP64_ECDH_CDIR_SIZE_OFS = 40, /* 8 bytes */ ++ MZ_ZIP64_ECDH_CDIR_OFS_OFS = 48, /* 8 bytes */ ++ MZ_ZIP_VERSION_MADE_BY_DOS_FILESYSTEM_ID = 0, ++ MZ_ZIP_DOS_DIR_ATTRIBUTE_BITFLAG = 0x10, ++ MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED = 1, ++ MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_COMPRESSED_PATCH_FLAG = 32, ++ MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION = 64, ++ MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_LOCAL_DIR_IS_MASKED = 8192, ++ MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8 = 1 << 11 + }; + + typedef struct { +@@ -4211,7 +4311,24 @@ struct mz_zip_internal_state_tag { + mz_zip_array m_central_dir; + mz_zip_array m_central_dir_offsets; + mz_zip_array m_sorted_central_dir_offsets; ++ ++ /* The flags passed in when the archive is initially opened. */ ++ uint32_t m_init_flags; ++ ++ /* MZ_TRUE if the archive has a zip64 end of central directory headers, etc. ++ */ ++ mz_bool m_zip64; ++ ++ /* MZ_TRUE if we found zip64 extended info in the central directory (m_zip64 ++ * will also be slammed to true too, even if we didn't find a zip64 end of ++ * central dir header, etc.) */ ++ mz_bool m_zip64_has_extended_info_fields; ++ ++ /* These fields are used by the file, FILE, memory, and memory/heap read/write ++ * helpers. */ + MZ_FILE *m_pFile; ++ mz_uint64 m_file_archive_start_ofs; ++ + void *m_pMem; + size_t m_mem_size; + size_t m_mem_capacity; +@@ -4363,6 +4480,13 @@ static mz_bool mz_zip_set_file_times(const char *pFilename, time_t access_time, + #endif /* #ifndef MINIZ_NO_STDIO */ + #endif /* #ifndef MINIZ_NO_TIME */ + ++static MZ_FORCEINLINE mz_bool mz_zip_set_error(mz_zip_archive *pZip, ++ mz_zip_error err_num) { ++ if (pZip) ++ pZip->m_last_error = err_num; ++ return MZ_FALSE; ++} ++ + static mz_bool mz_zip_reader_init_internal(mz_zip_archive *pZip, + mz_uint32 flags) { + (void)flags; +@@ -4480,127 +4604,346 @@ mz_zip_reader_sort_central_dir_offsets_by_filename(mz_zip_archive *pZip) { + } + } + +-static mz_bool mz_zip_reader_read_central_dir(mz_zip_archive *pZip, +- mz_uint32 flags) { +- mz_uint cdir_size, num_this_disk, cdir_disk_index; +- mz_uint64 cdir_ofs; ++static mz_bool mz_zip_reader_locate_header_sig(mz_zip_archive *pZip, ++ mz_uint32 record_sig, ++ mz_uint32 record_size, ++ mz_int64 *pOfs) { + mz_int64 cur_file_ofs; +- const mz_uint8 *p; + mz_uint32 buf_u32[4096 / sizeof(mz_uint32)]; + mz_uint8 *pBuf = (mz_uint8 *)buf_u32; +- mz_bool sort_central_dir = +- ((flags & MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY) == 0); +- // Basic sanity checks - reject files which are too small, and check the first +- // 4 bytes of the file to make sure a local header is there. +- if (pZip->m_archive_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) ++ ++ /* Basic sanity checks - reject files which are too small */ ++ if (pZip->m_archive_size < record_size) + return MZ_FALSE; +- // Find the end of central directory record by scanning the file from the end +- // towards the beginning. ++ ++ /* Find the record by scanning the file from the end towards the beginning. */ + cur_file_ofs = + MZ_MAX((mz_int64)pZip->m_archive_size - (mz_int64)sizeof(buf_u32), 0); + for (;;) { + int i, + n = (int)MZ_MIN(sizeof(buf_u32), pZip->m_archive_size - cur_file_ofs); ++ + if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, n) != (mz_uint)n) + return MZ_FALSE; +- for (i = n - 4; i >= 0; --i) +- if (MZ_READ_LE32(pBuf + i) == MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG) +- break; ++ ++ for (i = n - 4; i >= 0; --i) { ++ mz_uint s = MZ_READ_LE32(pBuf + i); ++ if (s == record_sig) { ++ if ((pZip->m_archive_size - (cur_file_ofs + i)) >= record_size) ++ break; ++ } ++ } ++ + if (i >= 0) { + cur_file_ofs += i; + break; + } ++ ++ /* Give up if we've searched the entire file, or we've gone back "too far" ++ * (~64kb) */ + if ((!cur_file_ofs) || ((pZip->m_archive_size - cur_file_ofs) >= +- (0xFFFF + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE))) ++ (MZ_UINT16_MAX + record_size))) + return MZ_FALSE; ++ + cur_file_ofs = MZ_MAX(cur_file_ofs - (sizeof(buf_u32) - 3), 0); + } +- // Read and verify the end of central directory record. ++ ++ *pOfs = cur_file_ofs; ++ return MZ_TRUE; ++} ++ ++static mz_bool mz_zip_reader_read_central_dir(mz_zip_archive *pZip, ++ mz_uint flags) { ++ mz_uint cdir_size = 0, cdir_entries_on_this_disk = 0, num_this_disk = 0, ++ cdir_disk_index = 0; ++ mz_uint64 cdir_ofs = 0; ++ mz_int64 cur_file_ofs = 0; ++ const mz_uint8 *p; ++ ++ mz_uint32 buf_u32[4096 / sizeof(mz_uint32)]; ++ mz_uint8 *pBuf = (mz_uint8 *)buf_u32; ++ mz_bool sort_central_dir = ++ ((flags & MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY) == 0); ++ mz_uint32 zip64_end_of_central_dir_locator_u32 ++ [(MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE + sizeof(mz_uint32) - 1) / ++ sizeof(mz_uint32)]; ++ mz_uint8 *pZip64_locator = (mz_uint8 *)zip64_end_of_central_dir_locator_u32; ++ ++ mz_uint32 zip64_end_of_central_dir_header_u32 ++ [(MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / ++ sizeof(mz_uint32)]; ++ mz_uint8 *pZip64_end_of_central_dir = ++ (mz_uint8 *)zip64_end_of_central_dir_header_u32; ++ ++ mz_uint64 zip64_end_of_central_dir_ofs = 0; ++ ++ /* Basic sanity checks - reject files which are too small, and check the first ++ * 4 bytes of the file to make sure a local header is there. */ ++ if (pZip->m_archive_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) ++ return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE); ++ ++ if (!mz_zip_reader_locate_header_sig( ++ pZip, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG, ++ MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE, &cur_file_ofs)) ++ return mz_zip_set_error(pZip, MZ_ZIP_FAILED_FINDING_CENTRAL_DIR); ++ ++ /* Read and verify the end of central directory record. */ + if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) != + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) +- return MZ_FALSE; +- if ((MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_SIG_OFS) != +- MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG) || +- ((pZip->m_total_files = +- MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS)) != +- MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS))) +- return MZ_FALSE; ++ return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); ++ ++ if (MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_SIG_OFS) != ++ MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG) ++ return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE); ++ ++ if (cur_file_ofs >= (MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE + ++ MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE)) { ++ if (pZip->m_pRead(pZip->m_pIO_opaque, ++ cur_file_ofs - MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE, ++ pZip64_locator, ++ MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE) == ++ MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE) { ++ if (MZ_READ_LE32(pZip64_locator + MZ_ZIP64_ECDL_SIG_OFS) == ++ MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIG) { ++ zip64_end_of_central_dir_ofs = MZ_READ_LE64( ++ pZip64_locator + MZ_ZIP64_ECDL_REL_OFS_TO_ZIP64_ECDR_OFS); ++ if (zip64_end_of_central_dir_ofs > ++ (pZip->m_archive_size - MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE)) ++ return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE); ++ ++ if (pZip->m_pRead(pZip->m_pIO_opaque, zip64_end_of_central_dir_ofs, ++ pZip64_end_of_central_dir, ++ MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE) == ++ MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE) { ++ if (MZ_READ_LE32(pZip64_end_of_central_dir + MZ_ZIP64_ECDH_SIG_OFS) == ++ MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIG) { ++ pZip->m_pState->m_zip64 = MZ_TRUE; ++ } ++ } ++ } ++ } ++ } + ++ pZip->m_total_files = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS); ++ cdir_entries_on_this_disk = ++ MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS); + num_this_disk = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_THIS_DISK_OFS); + cdir_disk_index = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_DISK_CDIR_OFS); ++ cdir_size = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_SIZE_OFS); ++ cdir_ofs = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_OFS_OFS); ++ ++ if (pZip->m_pState->m_zip64) { ++ mz_uint32 zip64_total_num_of_disks = ++ MZ_READ_LE32(pZip64_locator + MZ_ZIP64_ECDL_TOTAL_NUMBER_OF_DISKS_OFS); ++ mz_uint64 zip64_cdir_total_entries = MZ_READ_LE64( ++ pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_TOTAL_ENTRIES_OFS); ++ mz_uint64 zip64_cdir_total_entries_on_this_disk = MZ_READ_LE64( ++ pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS); ++ mz_uint64 zip64_size_of_end_of_central_dir_record = MZ_READ_LE64( ++ pZip64_end_of_central_dir + MZ_ZIP64_ECDH_SIZE_OF_RECORD_OFS); ++ mz_uint64 zip64_size_of_central_directory = ++ MZ_READ_LE64(pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_SIZE_OFS); ++ ++ if (zip64_size_of_end_of_central_dir_record < ++ (MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE - 12)) ++ return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); ++ ++ if (zip64_total_num_of_disks != 1U) ++ return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK); ++ ++ /* Check for miniz's practical limits */ ++ if (zip64_cdir_total_entries > MZ_UINT32_MAX) ++ return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES); ++ ++ pZip->m_total_files = (mz_uint32)zip64_cdir_total_entries; ++ ++ if (zip64_cdir_total_entries_on_this_disk > MZ_UINT32_MAX) ++ return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES); ++ ++ cdir_entries_on_this_disk = ++ (mz_uint32)zip64_cdir_total_entries_on_this_disk; ++ ++ /* Check for miniz's current practical limits (sorry, this should be enough ++ * for millions of files) */ ++ if (zip64_size_of_central_directory > MZ_UINT32_MAX) ++ return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_CDIR_SIZE); ++ ++ cdir_size = (mz_uint32)zip64_size_of_central_directory; ++ ++ num_this_disk = MZ_READ_LE32(pZip64_end_of_central_dir + ++ MZ_ZIP64_ECDH_NUM_THIS_DISK_OFS); ++ ++ cdir_disk_index = MZ_READ_LE32(pZip64_end_of_central_dir + ++ MZ_ZIP64_ECDH_NUM_DISK_CDIR_OFS); ++ ++ cdir_ofs = ++ MZ_READ_LE64(pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_OFS_OFS); ++ } ++ ++ if (pZip->m_total_files != cdir_entries_on_this_disk) ++ return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK); ++ + if (((num_this_disk | cdir_disk_index) != 0) && + ((num_this_disk != 1) || (cdir_disk_index != 1))) +- return MZ_FALSE; ++ return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK); + +- if ((cdir_size = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_SIZE_OFS)) < +- pZip->m_total_files * MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) +- return MZ_FALSE; ++ if (cdir_size < pZip->m_total_files * MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) ++ return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + +- cdir_ofs = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_OFS_OFS); + if ((cdir_ofs + (mz_uint64)cdir_size) > pZip->m_archive_size) +- return MZ_FALSE; ++ return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + pZip->m_central_directory_file_ofs = cdir_ofs; + + if (pZip->m_total_files) { + mz_uint i, n; +- +- // Read the entire central directory into a heap block, and allocate another +- // heap block to hold the unsorted central dir file record offsets, and +- // another to hold the sorted indices. ++ /* Read the entire central directory into a heap block, and allocate another ++ * heap block to hold the unsorted central dir file record offsets, and ++ * possibly another to hold the sorted indices. */ + if ((!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir, cdir_size, + MZ_FALSE)) || + (!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir_offsets, + pZip->m_total_files, MZ_FALSE))) +- return MZ_FALSE; ++ return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + + if (sort_central_dir) { + if (!mz_zip_array_resize(pZip, + &pZip->m_pState->m_sorted_central_dir_offsets, + pZip->m_total_files, MZ_FALSE)) +- return MZ_FALSE; ++ return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + } + + if (pZip->m_pRead(pZip->m_pIO_opaque, cdir_ofs, + pZip->m_pState->m_central_dir.m_p, + cdir_size) != cdir_size) +- return MZ_FALSE; ++ return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + +- // Now create an index into the central directory file records, do some +- // basic sanity checking on each record, and check for zip64 entries (which +- // are not yet supported). ++ /* Now create an index into the central directory file records, do some ++ * basic sanity checking on each record */ + p = (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p; + for (n = cdir_size, i = 0; i < pZip->m_total_files; ++i) { +- mz_uint total_header_size, comp_size, decomp_size, disk_index; ++ mz_uint total_header_size, disk_index, bit_flags, filename_size, ++ ext_data_size; ++ mz_uint64 comp_size, decomp_size, local_header_ofs; ++ + if ((n < MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) || + (MZ_READ_LE32(p) != MZ_ZIP_CENTRAL_DIR_HEADER_SIG)) +- return MZ_FALSE; ++ return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); ++ + MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, + i) = + (mz_uint32)(p - (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p); ++ + if (sort_central_dir) + MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_sorted_central_dir_offsets, + mz_uint32, i) = i; ++ + comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS); + decomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS); +- if (((!MZ_READ_LE32(p + MZ_ZIP_CDH_METHOD_OFS)) && +- (decomp_size != comp_size)) || +- (decomp_size && !comp_size) || (decomp_size == 0xFFFFFFFF) || +- (comp_size == 0xFFFFFFFF)) +- return MZ_FALSE; ++ local_header_ofs = MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS); ++ filename_size = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS); ++ ext_data_size = MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS); ++ ++ if ((!pZip->m_pState->m_zip64_has_extended_info_fields) && ++ (ext_data_size) && ++ (MZ_MAX(MZ_MAX(comp_size, decomp_size), local_header_ofs) == ++ MZ_UINT32_MAX)) { ++ /* Attempt to find zip64 extended information field in the entry's extra ++ * data */ ++ mz_uint32 extra_size_remaining = ext_data_size; ++ ++ if (extra_size_remaining) { ++ const mz_uint8 *pExtra_data; ++ void *buf = NULL; ++ ++ if (MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_size + ext_data_size > ++ n) { ++ buf = MZ_MALLOC(ext_data_size); ++ if (buf == NULL) ++ return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); ++ ++ if (pZip->m_pRead(pZip->m_pIO_opaque, ++ cdir_ofs + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + ++ filename_size, ++ buf, ext_data_size) != ext_data_size) { ++ MZ_FREE(buf); ++ return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); ++ } ++ ++ pExtra_data = (mz_uint8 *)buf; ++ } else { ++ pExtra_data = p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_size; ++ } ++ ++ do { ++ mz_uint32 field_id; ++ mz_uint32 field_data_size; ++ ++ if (extra_size_remaining < (sizeof(mz_uint16) * 2)) { ++ MZ_FREE(buf); ++ return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); ++ } ++ ++ field_id = MZ_READ_LE16(pExtra_data); ++ field_data_size = MZ_READ_LE16(pExtra_data + sizeof(mz_uint16)); ++ ++ if ((field_data_size + sizeof(mz_uint16) * 2) > ++ extra_size_remaining) { ++ MZ_FREE(buf); ++ return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); ++ } ++ ++ if (field_id == MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID) { ++ /* Ok, the archive didn't have any zip64 headers but it uses a ++ * zip64 extended information field so mark it as zip64 anyway ++ * (this can occur with infozip's zip util when it reads ++ * compresses files from stdin). */ ++ pZip->m_pState->m_zip64 = MZ_TRUE; ++ pZip->m_pState->m_zip64_has_extended_info_fields = MZ_TRUE; ++ break; ++ } ++ ++ pExtra_data += sizeof(mz_uint16) * 2 + field_data_size; ++ extra_size_remaining = ++ extra_size_remaining - sizeof(mz_uint16) * 2 - field_data_size; ++ } while (extra_size_remaining); ++ ++ MZ_FREE(buf); ++ } ++ } ++ ++ /* I've seen archives that aren't marked as zip64 that uses zip64 ext ++ * data, argh */ ++ if ((comp_size != MZ_UINT32_MAX) && (decomp_size != MZ_UINT32_MAX)) { ++ if (((!MZ_READ_LE32(p + MZ_ZIP_CDH_METHOD_OFS)) && ++ (decomp_size != comp_size)) || ++ (decomp_size && !comp_size)) ++ return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); ++ } ++ + disk_index = MZ_READ_LE16(p + MZ_ZIP_CDH_DISK_START_OFS); +- if ((disk_index != num_this_disk) && (disk_index != 1)) +- return MZ_FALSE; +- if (((mz_uint64)MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS) + +- MZ_ZIP_LOCAL_DIR_HEADER_SIZE + comp_size) > pZip->m_archive_size) +- return MZ_FALSE; ++ if ((disk_index == MZ_UINT16_MAX) || ++ ((disk_index != num_this_disk) && (disk_index != 1))) ++ return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK); ++ ++ if (comp_size != MZ_UINT32_MAX) { ++ if (((mz_uint64)MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS) + ++ MZ_ZIP_LOCAL_DIR_HEADER_SIZE + comp_size) > pZip->m_archive_size) ++ return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); ++ } ++ ++ bit_flags = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS); ++ if (bit_flags & MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_LOCAL_DIR_IS_MASKED) ++ return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_ENCRYPTION); ++ + if ((total_header_size = MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + + MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) + + MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS) + + MZ_READ_LE16(p + MZ_ZIP_CDH_COMMENT_LEN_OFS)) > + n) +- return MZ_FALSE; ++ return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); ++ + n -= total_header_size; + p += total_header_size; + } +diff --git a/contrib/zip/src/zip.c b/contrib/zip/src/zip.c +index ff3a8fe1..1abcfd8f 100644 +--- a/contrib/zip/src/zip.c ++++ b/contrib/zip/src/zip.c +@@ -24,7 +24,6 @@ + ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) && \ + (P)[1] == ':') + #define FILESYSTEM_PREFIX_LEN(P) (HAS_DEVICE(P) ? 2 : 0) +-#define ISSLASH(C) ((C) == '/' || (C) == '\\') + + #else + +@@ -48,7 +47,7 @@ int symlink(const char *target, const char *linkpath); // needed on Linux + #endif + + #ifndef ISSLASH +-#define ISSLASH(C) ((C) == '/') ++#define ISSLASH(C) ((C) == '/' || (C) == '\\') + #endif + + #define CLEANUP(ptr) \ +@@ -78,26 +77,34 @@ static const char *base_name(const char *name) { + return base; + } + +-static int mkpath(const char *path) { +- char const *p; ++static int mkpath(char *path) { ++ char *p; + char npath[MAX_PATH + 1]; + int len = 0; + int has_device = HAS_DEVICE(path); + + memset(npath, 0, MAX_PATH + 1); +- +-#ifdef _WIN32 +- // only on windows fix the path +- npath[0] = path[0]; +- npath[1] = path[1]; +- len = 2; +-#endif // _WIN32 +- ++ if (has_device) { ++ // only on windows ++ npath[0] = path[0]; ++ npath[1] = path[1]; ++ len = 2; ++ } + for (p = path + len; *p && len < MAX_PATH; p++) { + if (ISSLASH(*p) && ((!has_device && len > 0) || (has_device && len > 2))) { +- if (MKDIR(npath) == -1) +- if (errno != EEXIST) ++#if defined(_WIN32) || defined(__WIN32__) || defined(_MSC_VER) || \ ++ defined(__MINGW32__) ++#else ++ if ('\\' == *p) { ++ *p = '/'; ++ } ++#endif ++ ++ if (MKDIR(npath) == -1) { ++ if (errno != EEXIST) { + return -1; ++ } ++ } + } + npath[len++] = *p; + } +@@ -279,7 +286,14 @@ int zip_entry_open(struct zip_t *zip, const char *entryname) { + zip->entry.header_offset = zip->archive.m_archive_size; + memset(zip->entry.header, 0, MZ_ZIP_LOCAL_DIR_HEADER_SIZE * sizeof(mz_uint8)); + zip->entry.method = 0; ++ ++ // UNIX or APPLE ++#if MZ_PLATFORM == 3 || MZ_PLATFORM == 19 ++ // regular file with rw-r--r-- persmissions ++ zip->entry.external_attr = (mz_uint32)(0100644) << 16; ++#else + zip->entry.external_attr = 0; ++#endif + + num_alignment_padding_bytes = + mz_zip_writer_compute_padding_needed_for_file_alignment(pzip); +@@ -660,7 +674,7 @@ ssize_t zip_entry_noallocread(struct zip_t *zip, void *buf, size_t bufsize) { + } + + if (!mz_zip_reader_extract_to_mem_no_alloc(pzip, (mz_uint)zip->entry.index, +- buf, bufsize, 0, NULL, 0)) { ++ buf, bufsize, 0, NULL, 0)) { + return -1; + } + +@@ -670,10 +684,7 @@ ssize_t zip_entry_noallocread(struct zip_t *zip, void *buf, size_t bufsize) { + int zip_entry_fread(struct zip_t *zip, const char *filename) { + mz_zip_archive *pzip = NULL; + mz_uint idx; +-#if defined(_MSC_VER) +-#else + mz_uint32 xattr = 0; +-#endif + mz_zip_archive_file_stat info; + + if (!zip) { +@@ -875,12 +886,19 @@ int zip_extract(const char *zipname, const char *dir, + goto out; + } + +- if ((((info.m_version_made_by >> 8) == 3) || ((info.m_version_made_by >> 8) == 19)) // if zip is produced on Unix or macOS (3 and 19 from section 4.4.2.2 of zip standard) +- && info.m_external_attr & (0x20 << 24)) { // and has sym link attribute (0x80 is file, 0x40 is directory) ++ if ((((info.m_version_made_by >> 8) == 3) || ++ ((info.m_version_made_by >> 8) == ++ 19)) // if zip is produced on Unix or macOS (3 and 19 from ++ // section 4.4.2.2 of zip standard) ++ && info.m_external_attr & ++ (0x20 << 24)) { // and has sym link attribute (0x80 is file, 0x40 ++ // is directory) + #if defined(_WIN32) || defined(__WIN32__) || defined(_MSC_VER) || \ + defined(__MINGW32__) +-#else +- if (info.m_uncomp_size > MAX_PATH || !mz_zip_reader_extract_to_mem_no_alloc(&zip_archive, i, symlink_to, MAX_PATH, 0, NULL, 0)) { ++#else ++ if (info.m_uncomp_size > MAX_PATH || ++ !mz_zip_reader_extract_to_mem_no_alloc(&zip_archive, i, symlink_to, ++ MAX_PATH, 0, NULL, 0)) { + goto out; + } + symlink_to[info.m_uncomp_size] = '\0'; +diff --git a/contrib/zip/src/zip.h b/contrib/zip/src/zip.h +index 5f39df50..a48d64d6 100644 +--- a/contrib/zip/src/zip.h ++++ b/contrib/zip/src/zip.h +@@ -20,241 +20,240 @@ extern "C" { + #endif + + #if !defined(_SSIZE_T_DEFINED) && !defined(_SSIZE_T_DEFINED_) && \ +- !defined(_SSIZE_T) && !defined(_SSIZE_T_) && !defined(__ssize_t_defined) +-#define _SSIZE_T ++ !defined(__DEFINED_ssize_t) && !defined(__ssize_t_defined) && \ ++ !defined(_SSIZE_T) && !defined(_SSIZE_T_) ++ + // 64-bit Windows is the only mainstream platform + // where sizeof(long) != sizeof(void*) + #ifdef _WIN64 +-typedef long long ssize_t; /* byte count or error */ ++typedef long long ssize_t; /* byte count or error */ + #else +-typedef long ssize_t; /* byte count or error */ ++typedef long ssize_t; /* byte count or error */ + #endif ++ ++#define _SSIZE_T_DEFINED ++#define _SSIZE_T_DEFINED_ ++#define __DEFINED_ssize_t ++#define __ssize_t_defined ++#define _SSIZE_T ++#define _SSIZE_T_ ++ + #endif + + #ifndef MAX_PATH + #define MAX_PATH 32767 /* # chars in a path name including NULL */ + #endif + ++/** ++ * @mainpage ++ * ++ * Documenation for @ref zip. ++ */ ++ ++/** ++ * @addtogroup zip ++ * @{ ++ */ ++ ++/** ++ * Default zip compression level. ++ */ ++ + #define ZIP_DEFAULT_COMPRESSION_LEVEL 6 + +-/* +- This data structure is used throughout the library to represent zip archive +- - forward declaration. +-*/ ++/** ++ * @struct zip_t ++ * ++ * This data structure is used throughout the library to represent zip archive - ++ * forward declaration. ++ */ + struct zip_t; + +-/* +- Opens zip archive with compression level using the given mode. +- +- Args: +- zipname: zip archive file name. +- level: compression level (0-9 are the standard zlib-style levels). +- mode: file access mode. +- 'r': opens a file for reading/extracting (the file must exists). +- 'w': creates an empty file for writing. +- 'a': appends to an existing archive. +- +- Returns: +- The zip archive handler or NULL on error +-*/ ++/** ++ * Opens zip archive with compression level using the given mode. ++ * ++ * @param zipname zip archive file name. ++ * @param level compression level (0-9 are the standard zlib-style levels). ++ * @param mode file access mode. ++ * - 'r': opens a file for reading/extracting (the file must exists). ++ * - 'w': creates an empty file for writing. ++ * - 'a': appends to an existing archive. ++ * ++ * @return the zip archive handler or NULL on error ++ */ + extern struct zip_t *zip_open(const char *zipname, int level, char mode); + +-/* +- Closes the zip archive, releases resources - always finalize. +- +- Args: +- zip: zip archive handler. +-*/ ++/** ++ * Closes the zip archive, releases resources - always finalize. ++ * ++ * @param zip zip archive handler. ++ */ + extern void zip_close(struct zip_t *zip); + +-/* +- Opens an entry by name in the zip archive. +- For zip archive opened in 'w' or 'a' mode the function will append +- a new entry. In readonly mode the function tries to locate the entry +- in global dictionary. +- +- Args: +- zip: zip archive handler. +- entryname: an entry name in local dictionary. +- +- Returns: +- The return code - 0 on success, negative number (< 0) on error. +-*/ ++/** ++ * Opens an entry by name in the zip archive. ++ * ++ * For zip archive opened in 'w' or 'a' mode the function will append ++ * a new entry. In readonly mode the function tries to locate the entry ++ * in global dictionary. ++ * ++ * @param zip zip archive handler. ++ * @param entryname an entry name in local dictionary. ++ * ++ * @return the return code - 0 on success, negative number (< 0) on error. ++ */ + extern int zip_entry_open(struct zip_t *zip, const char *entryname); + +-/* +- Opens a new entry by index in the zip archive. +- This function is only valid if zip archive was opened in 'r' (readonly) mode. +- +- Args: +- zip: zip archive handler. +- index: index in local dictionary. +- +- Returns: +- The return code - 0 on success, negative number (< 0) on error. +-*/ ++/** ++ * Opens a new entry by index in the zip archive. ++ * ++ * This function is only valid if zip archive was opened in 'r' (readonly) mode. ++ * ++ * @param zip zip archive handler. ++ * @param index index in local dictionary. ++ * ++ * @return the return code - 0 on success, negative number (< 0) on error. ++ */ + extern int zip_entry_openbyindex(struct zip_t *zip, int index); + +-/* +- Closes a zip entry, flushes buffer and releases resources. +- +- Args: +- zip: zip archive handler. +- +- Returns: +- The return code - 0 on success, negative number (< 0) on error. +-*/ ++/** ++ * Closes a zip entry, flushes buffer and releases resources. ++ * ++ * @param zip zip archive handler. ++ * ++ * @return the return code - 0 on success, negative number (< 0) on error. ++ */ + extern int zip_entry_close(struct zip_t *zip); + +-/* +- Returns a local name of the current zip entry. +- The main difference between user's entry name and local entry name +- is optional relative path. +- Following .ZIP File Format Specification - the path stored MUST not contain +- a drive or device letter, or a leading slash. +- All slashes MUST be forward slashes '/' as opposed to backwards slashes '\' +- for compatibility with Amiga and UNIX file systems etc. +- +- Args: +- zip: zip archive handler. +- +- Returns: +- The pointer to the current zip entry name, or NULL on error. +-*/ ++/** ++ * Returns a local name of the current zip entry. ++ * ++ * The main difference between user's entry name and local entry name ++ * is optional relative path. ++ * Following .ZIP File Format Specification - the path stored MUST not contain ++ * a drive or device letter, or a leading slash. ++ * All slashes MUST be forward slashes '/' as opposed to backwards slashes '\' ++ * for compatibility with Amiga and UNIX file systems etc. ++ * ++ * @param zip: zip archive handler. ++ * ++ * @return the pointer to the current zip entry name, or NULL on error. ++ */ + extern const char *zip_entry_name(struct zip_t *zip); + +-/* +- Returns an index of the current zip entry. +- +- Args: +- zip: zip archive handler. +- +- Returns: +- The index on success, negative number (< 0) on error. +-*/ ++/** ++ * Returns an index of the current zip entry. ++ * ++ * @param zip zip archive handler. ++ * ++ * @return the index on success, negative number (< 0) on error. ++ */ + extern int zip_entry_index(struct zip_t *zip); + +-/* +- Determines if the current zip entry is a directory entry. +- +- Args: +- zip: zip archive handler. +- +- Returns: +- The return code - 1 (true), 0 (false), negative number (< 0) on error. +-*/ ++/** ++ * Determines if the current zip entry is a directory entry. ++ * ++ * @param zip zip archive handler. ++ * ++ * @return the return code - 1 (true), 0 (false), negative number (< 0) on ++ * error. ++ */ + extern int zip_entry_isdir(struct zip_t *zip); + +-/* +- Returns an uncompressed size of the current zip entry. +- +- Args: +- zip: zip archive handler. +- +- Returns: +- The uncompressed size in bytes. +-*/ ++/** ++ * Returns an uncompressed size of the current zip entry. ++ * ++ * @param zip zip archive handler. ++ * ++ * @return the uncompressed size in bytes. ++ */ + extern unsigned long long zip_entry_size(struct zip_t *zip); + +-/* +- Returns CRC-32 checksum of the current zip entry. +- +- Args: +- zip: zip archive handler. +- +- Returns: +- The CRC-32 checksum. +-*/ ++/** ++ * Returns CRC-32 checksum of the current zip entry. ++ * ++ * @param zip zip archive handler. ++ * ++ * @return the CRC-32 checksum. ++ */ + extern unsigned int zip_entry_crc32(struct zip_t *zip); + +-/* +- Compresses an input buffer for the current zip entry. +- +- Args: +- zip: zip archive handler. +- buf: input buffer. +- bufsize: input buffer size (in bytes). +- +- Returns: +- The return code - 0 on success, negative number (< 0) on error. +-*/ ++/** ++ * Compresses an input buffer for the current zip entry. ++ * ++ * @param zip zip archive handler. ++ * @param buf input buffer. ++ * @param bufsize input buffer size (in bytes). ++ * ++ * @return the return code - 0 on success, negative number (< 0) on error. ++ */ + extern int zip_entry_write(struct zip_t *zip, const void *buf, size_t bufsize); + +-/* +- Compresses a file for the current zip entry. +- +- Args: +- zip: zip archive handler. +- filename: input file. +- +- Returns: +- The return code - 0 on success, negative number (< 0) on error. +-*/ ++/** ++ * Compresses a file for the current zip entry. ++ * ++ * @param zip zip archive handler. ++ * @param filename input file. ++ * ++ * @return the return code - 0 on success, negative number (< 0) on error. ++ */ + extern int zip_entry_fwrite(struct zip_t *zip, const char *filename); + +-/* +- Extracts the current zip entry into output buffer. +- The function allocates sufficient memory for a output buffer. +- +- Args: +- zip: zip archive handler. +- buf: output buffer. +- bufsize: output buffer size (in bytes). +- +- Note: +- - remember to release memory allocated for a output buffer. +- - for large entries, please take a look at zip_entry_extract function. +- +- Returns: +- The return code - the number of bytes actually read on success. +- Otherwise a -1 on error. +-*/ ++/** ++ * Extracts the current zip entry into output buffer. ++ * ++ * The function allocates sufficient memory for a output buffer. ++ * ++ * @param zip zip archive handler. ++ * @param buf output buffer. ++ * @param bufsize output buffer size (in bytes). ++ * ++ * @note remember to release memory allocated for a output buffer. ++ * for large entries, please take a look at zip_entry_extract function. ++ * ++ * @return the return code - the number of bytes actually read on success. ++ * Otherwise a -1 on error. ++ */ + extern ssize_t zip_entry_read(struct zip_t *zip, void **buf, size_t *bufsize); + +-/* +- Extracts the current zip entry into a memory buffer using no memory +- allocation. +- +- Args: +- zip: zip archive handler. +- buf: preallocated output buffer. +- bufsize: output buffer size (in bytes). +- +- Note: +- - ensure supplied output buffer is large enough. +- - zip_entry_size function (returns uncompressed size for the current entry) +- can be handy to estimate how big buffer is needed. +- - for large entries, please take a look at zip_entry_extract function. +- +- Returns: +- The return code - the number of bytes actually read on success. +- Otherwise a -1 on error (e.g. bufsize is not large enough). +-*/ +-extern ssize_t zip_entry_noallocread(struct zip_t *zip, void *buf, size_t bufsize); +- +-/* +- Extracts the current zip entry into output file. +- +- Args: +- zip: zip archive handler. +- filename: output file. +- +- Returns: +- The return code - 0 on success, negative number (< 0) on error. +-*/ ++/** ++ * Extracts the current zip entry into a memory buffer using no memory ++ * allocation. ++ * ++ * @param zip zip archive handler. ++ * @param buf preallocated output buffer. ++ * @param bufsize output buffer size (in bytes). ++ * ++ * @note ensure supplied output buffer is large enough. ++ * zip_entry_size function (returns uncompressed size for the current ++ * entry) can be handy to estimate how big buffer is needed. for large ++ * entries, please take a look at zip_entry_extract function. ++ * ++ * @return the return code - the number of bytes actually read on success. ++ * Otherwise a -1 on error (e.g. bufsize is not large enough). ++ */ ++extern ssize_t zip_entry_noallocread(struct zip_t *zip, void *buf, ++ size_t bufsize); ++ ++/** ++ * Extracts the current zip entry into output file. ++ * ++ * @param zip zip archive handler. ++ * @param filename output file. ++ * ++ * @return the return code - 0 on success, negative number (< 0) on error. ++ */ + extern int zip_entry_fread(struct zip_t *zip, const char *filename); + +-/* +- Extracts the current zip entry using a callback function (on_extract). +- +- Args: +- zip: zip archive handler. +- on_extract: callback function. +- arg: opaque pointer (optional argument, +- which you can pass to the on_extract callback) +- +- Returns: +- The return code - 0 on success, negative number (< 0) on error. ++/** ++ * Extracts the current zip entry using a callback function (on_extract). ++ * ++ * @param zip zip archive handler. ++ * @param on_extract callback function. ++ * @param arg opaque pointer (optional argument, which you can pass to the ++ * on_extract callback) ++ * ++ * @return the return code - 0 on success, negative number (< 0) on error. + */ + extern int + zip_entry_extract(struct zip_t *zip, +@@ -262,53 +261,49 @@ zip_entry_extract(struct zip_t *zip, + const void *data, size_t size), + void *arg); + +-/* +- Returns the number of all entries (files and directories) in the zip archive. +- +- Args: +- zip: zip archive handler. +- +- Returns: +- The return code - the number of entries on success, +- negative number (< 0) on error. +-*/ ++/** ++ * Returns the number of all entries (files and directories) in the zip archive. ++ * ++ * @param zip zip archive handler. ++ * ++ * @return the return code - the number of entries on success, negative number ++ * (< 0) on error. ++ */ + extern int zip_total_entries(struct zip_t *zip); + +-/* +- Creates a new archive and puts files into a single zip archive. +- +- Args: +- zipname: zip archive file. +- filenames: input files. +- len: number of input files. +- +- Returns: +- The return code - 0 on success, negative number (< 0) on error. +-*/ ++/** ++ * Creates a new archive and puts files into a single zip archive. ++ * ++ * @param zipname zip archive file. ++ * @param filenames input files. ++ * @param len: number of input files. ++ * ++ * @return the return code - 0 on success, negative number (< 0) on error. ++ */ + extern int zip_create(const char *zipname, const char *filenames[], size_t len); + +-/* +- Extracts a zip archive file into directory. +- +- If on_extract_entry is not NULL, the callback will be called after +- successfully extracted each zip entry. +- Returning a negative value from the callback will cause abort and return an +- error. The last argument (void *arg) is optional, which you can use to pass +- data to the on_extract_entry callback. +- +- Args: +- zipname: zip archive file. +- dir: output directory. +- on_extract_entry: on extract callback. +- arg: opaque pointer. +- +- Returns: +- The return code - 0 on success, negative number (< 0) on error. +-*/ ++/** ++ * Extracts a zip archive file into directory. ++ * ++ * If on_extract_entry is not NULL, the callback will be called after ++ * successfully extracted each zip entry. ++ * Returning a negative value from the callback will cause abort and return an ++ * error. The last argument (void *arg) is optional, which you can use to pass ++ * data to the on_extract_entry callback. ++ * ++ * @param zipname zip archive file. ++ * @param dir output directory. ++ * @param on_extract_entry on extract callback. ++ * @param arg opaque pointer. ++ * ++ * @return the return code - 0 on success, negative number (< 0) on error. ++ */ + extern int zip_extract(const char *zipname, const char *dir, + int (*on_extract_entry)(const char *filename, void *arg), + void *arg); + ++/** @} */ ++ + #ifdef __cplusplus + } + #endif +diff --git a/contrib/zip/test/CMakeLists.txt b/contrib/zip/test/CMakeLists.txt +index 9b2a8db1..cc060b00 100644 +--- a/contrib/zip/test/CMakeLists.txt ++++ b/contrib/zip/test/CMakeLists.txt +@@ -1,19 +1,16 @@ + cmake_minimum_required(VERSION 2.8) + +-if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang") +- if(ENABLE_COVERAGE) +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g ") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ftest-coverage") +- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage") +- endif() +-endif () +- + # test +-include_directories(../src) +-add_executable(test.exe test.c ../src/zip.c) +-add_executable(test_miniz.exe test_miniz.c) ++set(test_out test.out) ++set(test_miniz_out test_miniz.out) ++ ++add_executable(${test_out} test.c) ++target_link_libraries(${test_out} zip) ++add_executable(${test_miniz_out} test_miniz.c) ++target_link_libraries(${test_miniz_out} zip) ++ ++add_test(NAME ${test_out} COMMAND ${test_out}) ++add_test(NAME ${test_miniz_out} COMMAND ${test_miniz_out}) + +-add_test(NAME test COMMAND test.exe) +-add_test(NAME test_miniz COMMAND test_miniz.exe) ++set(test_out ${test_out} PARENT_SCOPE) ++set(test_miniz_out ${test_miniz_out} PARENT_SCOPE) +diff --git a/contrib/zip/test/test.c b/contrib/zip/test/test.c +index 45443053..a9b2ddab 100644 +--- a/contrib/zip/test/test.c ++++ b/contrib/zip/test/test.c +@@ -29,6 +29,8 @@ + #define XFILE "7.txt\0" + #define XMODE 0100777 + ++#define UNIXMODE 0100644 ++ + #define UNUSED(x) (void)x + + static int total_entries = 0; +@@ -102,7 +104,8 @@ static void test_read(void) { + assert(0 == zip_entry_close(zip)); + free(buf); + buf = NULL; +- ++ bufsize = 0; ++ + assert(0 == zip_entry_open(zip, "test/test-2.txt")); + assert(strlen(TESTDATA2) == zip_entry_size(zip)); + assert(CRC32DATA2 == zip_entry_crc32(zip)); +@@ -131,7 +134,8 @@ static void test_read(void) { + assert(0 == zip_entry_close(zip)); + free(buf); + buf = NULL; +- ++ bufsize = 0; ++ + buftmp = strlen(TESTDATA1); + buf = calloc(buftmp, sizeof(char)); + assert(0 == zip_entry_open(zip, "test/test-1.txt")); +@@ -433,6 +437,35 @@ static void test_mtime(void) { + remove(ZIPNAME); + } + ++static void test_unix_permissions(void) { ++#if defined(_WIN64) || defined(_WIN32) || defined(__WIN32__) ++#else ++ // UNIX or APPLE ++ struct MZ_FILE_STAT_STRUCT file_stats; ++ ++ remove(ZIPNAME); ++ ++ struct zip_t *zip = zip_open(ZIPNAME, ZIP_DEFAULT_COMPRESSION_LEVEL, 'w'); ++ assert(zip != NULL); ++ ++ assert(0 == zip_entry_open(zip, RFILE)); ++ assert(0 == zip_entry_write(zip, TESTDATA1, strlen(TESTDATA1))); ++ assert(0 == zip_entry_close(zip)); ++ ++ zip_close(zip); ++ ++ remove(RFILE); ++ ++ assert(0 == zip_extract(ZIPNAME, ".", NULL, NULL)); ++ ++ assert(0 == MZ_FILE_STAT(RFILE, &file_stats)); ++ assert(UNIXMODE == file_stats.st_mode); ++ ++ remove(RFILE); ++ remove(ZIPNAME); ++#endif ++} ++ + int main(int argc, char *argv[]) { + UNUSED(argc); + UNUSED(argv); +@@ -453,6 +486,7 @@ int main(int argc, char *argv[]) { + test_write_permissions(); + test_exe_permissions(); + test_mtime(); ++ test_unix_permissions(); + + remove(ZIPNAME); + return 0; +diff --git a/contrib/zip/test/test_miniz.c b/contrib/zip/test/test_miniz.c +index ebc0564d..babcaecd 100644 +--- a/contrib/zip/test/test_miniz.c ++++ b/contrib/zip/test/test_miniz.c +@@ -23,16 +23,39 @@ int main(int argc, char *argv[]) { + uint step = 0; + int cmp_status; + uLong src_len = (uLong)strlen(s_pStr); +- uLong cmp_len = compressBound(src_len); + uLong uncomp_len = src_len; ++ uLong cmp_len; + uint8 *pCmp, *pUncomp; ++ size_t sz; + uint total_succeeded = 0; + (void)argc, (void)argv; + + printf("miniz.c version: %s\n", MZ_VERSION); + + do { ++ pCmp = (uint8 *)tdefl_compress_mem_to_heap(s_pStr, src_len, &cmp_len, 0); ++ if (!pCmp) { ++ printf("tdefl_compress_mem_to_heap failed\n"); ++ return EXIT_FAILURE; ++ } ++ if (src_len <= cmp_len) { ++ printf("tdefl_compress_mem_to_heap failed: from %u to %u bytes\n", ++ (mz_uint32)uncomp_len, (mz_uint32)cmp_len); ++ free(pCmp); ++ return EXIT_FAILURE; ++ } ++ ++ sz = tdefl_compress_mem_to_mem(pCmp, cmp_len, s_pStr, src_len, 0); ++ if (sz != cmp_len) { ++ printf("tdefl_compress_mem_to_mem failed: expected %u, got %u\n", ++ (mz_uint32)cmp_len, (mz_uint32)sz); ++ free(pCmp); ++ return EXIT_FAILURE; ++ } ++ + // Allocate buffers to hold compressed and uncompressed data. ++ free(pCmp); ++ cmp_len = compressBound(src_len); + pCmp = (mz_uint8 *)malloc((size_t)cmp_len); + pUncomp = (mz_uint8 *)malloc((size_t)src_len); + if ((!pCmp) || (!pUncomp)) { diff --git a/meta/recipes-graphics/vulkan/assimp_4.1.0.bb b/meta/recipes-graphics/vulkan/assimp_5.0.1.bb index 194cbe33cc..5a8c62e64d 100644 --- a/meta/recipes-graphics/vulkan/assimp_4.1.0.bb +++ b/meta/recipes-graphics/vulkan/assimp_5.0.1.bb @@ -8,10 +8,13 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2119edef0916b0bd511cb3c731076271" DEPENDS = "zlib" -SRC_URI = "git://github.com/assimp/assimp.git" +SRC_URI = "git://github.com/assimp/assimp.git;branch=assimp_5.0_release \ + file://0001-closes-https-github.com-assimp-assimp-issues-2733-up.patch \ + file://0001-Use-ASSIMP_LIB_INSTALL_DIR-to-search-library.patch \ + " UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(\d+(\.\d+)+))" -SRCREV = "80799bdbf90ce626475635815ee18537718a05b1" +SRCREV = "8f0c6b04b2257a520aaab38421b2e090204b69df" S = "${WORKDIR}/git" diff --git a/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch b/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch index 93bcfbf851..153e662733 100644 --- a/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch +++ b/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch @@ -1,4 +1,4 @@ -From 0a27144d43b70121f57f6036514d069ca9d2b971 Mon Sep 17 00:00:00 2001 +From 663d51cd31fd98411e25f37aaf52b591d9639bf5 Mon Sep 17 00:00:00 2001 From: "Maxin B. John" <maxin.john@intel.com> Date: Mon, 30 Jul 2018 17:23:29 +0300 Subject: [PATCH] Don't build demos with questionably licensed data @@ -38,11 +38,11 @@ Signed-off-by: Maxin B. John <maxin.john@intel.com> 1 file changed, 14 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt -index 8eee3a4..698d3b3 100644 +index a53c834..71a12e7 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt -@@ -47,18 +47,12 @@ set(EXAMPLES - computeshader +@@ -55,9 +55,6 @@ set(EXAMPLES + conditionalrender conservativeraster debugmarker - deferred @@ -51,16 +51,17 @@ index 8eee3a4..698d3b3 100644 descriptorsets displacement distancefieldfonts - dynamicuniformbuffer +@@ -65,9 +62,6 @@ set(EXAMPLES gears geometryshader + gltfscene - hdr - imgui - indirectdraw + inlineuniformblocks inputattachments instancing - mesh -@@ -70,8 +64,6 @@ set(EXAMPLES +@@ -83,23 +77,16 @@ set(EXAMPLES parallaxmapping particlefire pbrbasic @@ -69,9 +70,8 @@ index 8eee3a4..698d3b3 100644 pipelines pipelinestatistics pushconstants -@@ -79,15 +71,10 @@ set(EXAMPLES + pushdescriptors radialblur - raytracing renderheadless - scenerendering screenshot @@ -85,7 +85,7 @@ index 8eee3a4..698d3b3 100644 stencilbuffer subpasses terraintessellation -@@ -101,7 +88,6 @@ set(EXAMPLES +@@ -113,7 +100,6 @@ set(EXAMPLES texturesparseresidency triangle viewportarray @@ -94,5 +94,5 @@ index 8eee3a4..698d3b3 100644 buildExamples() -- -2.4.0 +2.17.1 diff --git a/meta/recipes-graphics/vulkan/vulkan-demos_git.bb b/meta/recipes-graphics/vulkan/vulkan-demos_git.bb index d2041d7d4c..4175a56157 100644 --- a/meta/recipes-graphics/vulkan/vulkan-demos_git.bb +++ b/meta/recipes-graphics/vulkan/vulkan-demos_git.bb @@ -5,23 +5,23 @@ DEPENDS = "zlib" LIC_FILES_CHKSUM = "file://LICENSE.md;md5=dcf473723faabf17baa9b5f2207599d0 \ file://examples/triangle/triangle.cpp;endline=12;md5=bccd1bf9cadd9e10086cf7872157e4fa" -SRCREV_glm = "01f9ab5b6d21e5062ac0f6e0f205c7fa2ca9d769" -SRCREV_gli = "8e43030b3e12bb58a4663d85adc5c752f89099c0" +SRCREV_glm = "1ad55c5016339b83b7eec98c31007e0aee57d2bf" +SRCREV_ktx = "726d14d02c95bb21ec9e43807751b491d295dd3c" SRC_URI = "git://github.com/SaschaWillems/Vulkan.git \ git://github.com/g-truc/glm;destsuffix=git/external/glm;name=glm \ - git://github.com/g-truc/gli;destsuffix=git/external/gli;name=gli \ + git://github.com/KhronosGroup/KTX-Software;destsuffix=git/external/ktx;name=ktx;lfs=0 \ file://0001-Don-t-build-demos-with-questionably-licensed-data.patch \ -" + " UPSTREAM_CHECK_COMMITS = "1" -SRCREV = "ae0b59c6e2e8630a2ae26f4a0b7a72cbe7547948" +SRCREV = "4818f85916bf88c1ca8c2ed1a46e0e758651489e" UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for" S = "${WORKDIR}/git" REQUIRED_DISTRO_FEATURES = 'vulkan' -inherit cmake distro_features_check -DEPENDS = "vulkan-loader assimp" +inherit cmake features_check +DEPENDS = "vulkan-loader assimp wayland-protocols wayland-native" do_install_append () { # Remove assets that have uncertain licenses @@ -39,6 +39,6 @@ EXTRA_OECMAKE = "-DRESOURCE_INSTALL_DIR=${datadir}/vulkan-demos" ANY_OF_DISTRO_FEATURES = "x11 wayland" # Can only pick one of [wayland,xcb] -PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', 'xcb' ,d)}" +PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', 'xcb', d)}" PACKAGECONFIG[wayland] = "-DUSE_WAYLAND_WSI=ON, -DUSE_WAYLAND_WSI=OFF, wayland" PACKAGECONFIG[xcb] = ",,libxcb" diff --git a/meta/recipes-graphics/vulkan/vulkan-headers_1.1.108.bb b/meta/recipes-graphics/vulkan/vulkan-headers_1.2.135.0.bb index 284c19d797..d21c3d62b9 100644 --- a/meta/recipes-graphics/vulkan/vulkan-headers_1.1.108.bb +++ b/meta/recipes-graphics/vulkan/vulkan-headers_1.2.135.0.bb @@ -5,9 +5,10 @@ SECTION = "libs" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" -SRC_URI = "git://github.com/KhronosGroup/Vulkan-Headers.git;branch=sdk-${PV}" +# was sdk-1.2.135 branch but it was removed upstream, commit is in master branch though +SRC_URI = "git://github.com/KhronosGroup/Vulkan-Headers.git;branch=master" -SRCREV = "097a1045098213919fd56442f52c716fc78eeb27" +SRCREV = "fb7f9c9bcd1d1544ea203a1f3d4253d0e90c5a90" S = "${WORKDIR}/git" diff --git a/meta/recipes-graphics/vulkan/vulkan-loader_1.1.108.bb b/meta/recipes-graphics/vulkan/vulkan-loader_1.2.135.0.bb index 2fd6c44480..8bab58f0b9 100644 --- a/meta/recipes-graphics/vulkan/vulkan-loader_1.1.108.bb +++ b/meta/recipes-graphics/vulkan/vulkan-loader_1.2.135.0.bb @@ -9,14 +9,14 @@ SECTION = "libs" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7dbefed23242760aa3475ee42801c5ac" -SRC_URI = "git://github.com/KhronosGroup/Vulkan-Loader.git;branch=sdk-${PV}" -SRCREV = "ecb0b1e69fb2f4d3cae262e6da24c170ce62ae13" +SRC_URI = "git://github.com/KhronosGroup/Vulkan-Loader.git;branch=sdk-1.2.135" +SRCREV = "86429d9e7f3542e88fb98ffa7d8a82c10c9828ac" S = "${WORKDIR}/git" REQUIRED_DISTRO_FEATURES = "vulkan" -inherit cmake distro_features_check +inherit cmake features_check ANY_OF_DISTRO_FEATURES = "x11 wayland" DEPENDS += "vulkan-headers" @@ -24,6 +24,7 @@ DEPENDS += "vulkan-headers" EXTRA_OECMAKE = "\ -DBUILD_TESTS=OFF \ -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 \ + -DASSEMBLER_WORKS=FALSE \ " # must choose x11 or wayland or both diff --git a/meta/recipes-graphics/vulkan/vulkan-tools_1.1.108.bb b/meta/recipes-graphics/vulkan/vulkan-tools_1.2.135.0.bb index 26cdee3c14..085c0e27e9 100644 --- a/meta/recipes-graphics/vulkan/vulkan-tools_1.1.108.bb +++ b/meta/recipes-graphics/vulkan/vulkan-tools_1.2.135.0.bb @@ -5,12 +5,12 @@ SECTION = "libs" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" -SRC_URI = "git://github.com/KhronosGroup/Vulkan-Tools.git;branch=sdk-${PV}" -SRCREV = "3ccd7f6ebae3e1919adf837718c04feb6c2acc61" +SRC_URI = "git://github.com/KhronosGroup/Vulkan-Tools.git;branch=sdk-1.2.135" +SRCREV = "6d8197fd6c91d352a601587ffdde28f4cd7bc399" S = "${WORKDIR}/git" -inherit cmake distro_features_check +inherit cmake features_check ANY_OF_DISTRO_FEATURES = "x11 wayland" REQUIRED_DISTRO_FEATURES = "vulkan" diff --git a/meta/recipes-graphics/waffle/waffle_1.6.0.bb b/meta/recipes-graphics/waffle/waffle_1.6.1.bb index 8a1d5748f6..3f3c0e9028 100644 --- a/meta/recipes-graphics/waffle/waffle_1.6.0.bb +++ b/meta/recipes-graphics/waffle/waffle_1.6.1.bb @@ -4,12 +4,14 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4c5154407c2490750dd461c50ad94797 \ file://include/waffle/waffle.h;endline=24;md5=61dbf8697f61c78645e75a93c585b1bf" SRC_URI = "http://waffle-gl.org/files/release/${BPN}-${PV}/${BPN}-${PV}.tar.xz" -SRC_URI[md5sum] = "61bfc1a478e840825f33ddb4057115e7" -SRC_URI[sha256sum] = "d9c899f710c50cfdd00f5f4cdfeaef0687d8497362239bdde93bed6c909c81d7" +SRC_URI[md5sum] = "c91529e579483f44fb330052872b9c73" +SRC_URI[sha256sum] = "31565649ff0e2d8dff1b8f7f2264ab7a78452063c7e04adfc4ce03e64b655080" UPSTREAM_CHECK_URI = "http://www.waffle-gl.org/releases.html" -inherit meson distro_features_check lib_package bash-completion +inherit meson features_check lib_package bash-completion + +DEPENDS_append = " python3" # This should be overridden per-machine to reflect the capabilities of the GL # stack. diff --git a/meta/recipes-graphics/wayland/libinput/determinism.patch b/meta/recipes-graphics/wayland/libinput/determinism.patch new file mode 100644 index 0000000000..cb554030cf --- /dev/null +++ b/meta/recipes-graphics/wayland/libinput/determinism.patch @@ -0,0 +1,21 @@ +This finds our outer git tree and that version information breaks +determinism of this recipe. Disable it. + +RP 2020/2/6 + +Upstream-Status: Pending +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Index: libinput-1.14.3/meson.build +=================================================================== +--- libinput-1.14.3.orig/meson.build ++++ libinput-1.14.3/meson.build +@@ -387,7 +387,7 @@ pkgconfig.generate( + libraries : lib_libinput + ) + +-git_version_h = vcs_tag(command : ['git', 'describe'], ++git_version_h = vcs_tag(command : ['false'], + fallback : 'unknown', + input : 'src/libinput-git-version.h.in', + output :'libinput-git-version.h') diff --git a/meta/recipes-graphics/wayland/libinput/run-ptest b/meta/recipes-graphics/wayland/libinput/run-ptest new file mode 100644 index 0000000000..5a84c568b9 --- /dev/null +++ b/meta/recipes-graphics/wayland/libinput/run-ptest @@ -0,0 +1,9 @@ +#!/bin/sh + +/usr/libexec/libinput/libinput-test-suite +if [ $? -eq 0 ]; then + echo 'PASS: libinput-test-suite' +else + echo 'FAIL: libinput-test-suite' +fi + diff --git a/meta/recipes-graphics/wayland/libinput_1.14.1.bb b/meta/recipes-graphics/wayland/libinput_1.14.1.bb deleted file mode 100644 index 38bc8d2c33..0000000000 --- a/meta/recipes-graphics/wayland/libinput_1.14.1.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "Library to handle input devices in Wayland compositors" -HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/" -SECTION = "libs" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=1f2ea9ebff3a2c6d458faf58492efb63" - -DEPENDS = "libevdev udev mtdev" - -SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz" -SRC_URI[md5sum] = "da29a704dc6f7ea2d5aac754db046340" -SRC_URI[sha256sum] = "e333a3242835c019ca37d2cef8b51a87d3138eb47444119c0153dc7a8656ee70" - -UPSTREAM_CHECK_REGEX = "libinput-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" - -inherit meson pkgconfig lib_package - -PACKAGECONFIG ??= "" -PACKAGECONFIG[libwacom] = "-Dlibwacom=true,-Dlibwacom=false,libwacom" -PACKAGECONFIG[gui] = "-Ddebug-gui=true,-Ddebug-gui=false,cairo gtk+3" - -UDEVDIR = "`pkg-config --variable=udevdir udev`" - -EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} \ - -Ddocumentation=false \ - -Dtests=false \ - -Dzshcompletiondir=no" - -# package name changed in 1.8.1 upgrade: make sure package upgrades work -RPROVIDES_${PN} = "libinput" -RREPLACES_${PN} = "libinput" -RCONFLICTS_${PN} = "libinput" diff --git a/meta/recipes-graphics/wayland/libinput_1.16.1.bb b/meta/recipes-graphics/wayland/libinput_1.16.1.bb new file mode 100644 index 0000000000..1497609183 --- /dev/null +++ b/meta/recipes-graphics/wayland/libinput_1.16.1.bb @@ -0,0 +1,49 @@ +SUMMARY = "Library to handle input devices in Wayland compositors" +DESCRIPTION = "libinput is a library to handle input devices in Wayland \ +compositors and to provide a generic X.Org input driver. It provides \ +device detection, device handling, input device event processing and \ +abstraction so minimize the amount of custom input code compositors need to \ +provide the common set of functionality that users expect." +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/" +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=1f2ea9ebff3a2c6d458faf58492efb63" + +DEPENDS = "libevdev udev mtdev libcheck" + +SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \ + file://run-ptest \ + file://determinism.patch \ + " +SRC_URI[sha256sum] = "7ba7d1aeedd15168bb21d17e9e628aa1c27957963a423a3fea3938a501758539" + +UPSTREAM_CHECK_REGEX = "libinput-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" + +inherit meson pkgconfig lib_package ptest + +# Patch out build directory, otherwise it leaks into ptest binary +do_configure_append() { + sed -i -e "s,${WORKDIR},,g" config.h + if [ -e "litest-config.h" ]; then + sed -i -e "s,${WORKDIR},,g" litest-config.h + fi +} + +PACKAGECONFIG ??= "" +PACKAGECONFIG[libwacom] = "-Dlibwacom=true,-Dlibwacom=false,libwacom" +PACKAGECONFIG[gui] = "-Ddebug-gui=true,-Ddebug-gui=false,cairo gtk+3" + +UDEVDIR = "`pkg-config --variable=udevdir udev`" + +EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} \ + -Ddocumentation=false \ + ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dtests=true -Dinstall-tests=true', '-Dtests=false -Dinstall-tests=false', d)} \ + -Dzshcompletiondir=no" + +# package name changed in 1.8.1 upgrade: make sure package upgrades work +RPROVIDES_${PN} = "libinput" +RREPLACES_${PN} = "libinput" +RCONFLICTS_${PN} = "libinput" + +FILES_${PN}-ptest += "${libexecdir}/libinput/libinput-test-suite" diff --git a/meta/recipes-graphics/wayland/mtdev_1.1.5.bb b/meta/recipes-graphics/wayland/mtdev_1.1.6.bb index ccd0ebbfce..7c1cb5e4ec 100644 --- a/meta/recipes-graphics/wayland/mtdev_1.1.5.bb +++ b/meta/recipes-graphics/wayland/mtdev_1.1.6.bb @@ -12,7 +12,7 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=ea6bd0268bb0fcd6b27698616ceee5d6" SRC_URI = "http://bitmath.org/code/${BPN}/${BP}.tar.bz2" -SRC_URI[md5sum] = "52c9610b6002f71d1642dc1a1cca5ec1" -SRC_URI[sha256sum] = "6677d5708a7948840de734d8b4675d5980d4561171c5a8e89e54adf7a13eba7f" +SRC_URI[md5sum] = "bf8ef2482e84a00b5db8fbd3ce00e249" +SRC_URI[sha256sum] = "15d7b28da8ac71d8bc8c9287c2045fd174267bc740bec10cfda332dc1204e0e0" inherit autotools pkgconfig diff --git a/meta/recipes-graphics/wayland/wayland-protocols_1.18.bb b/meta/recipes-graphics/wayland/wayland-protocols_1.20.bb index c8bec66a40..3fb78f658c 100644 --- a/meta/recipes-graphics/wayland/wayland-protocols_1.18.bb +++ b/meta/recipes-graphics/wayland/wayland-protocols_1.20.bb @@ -11,8 +11,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ " -SRC_URI[md5sum] = "af38f22d8e233c2f2e00ddc8dcc94694" -SRC_URI[sha256sum] = "3d73b7e7661763dc09d7d9107678400101ecff2b5b1e531674abfa81e04874b3" +SRC_URI[md5sum] = "b0836533a3f2dc6585b1dae00341157f" +SRC_URI[sha256sum] = "9782b7a1a863d82d7c92478497d13c758f52e7da4f197aa16443f73de77e4de7" UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" diff --git a/meta/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch b/meta/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch new file mode 100644 index 0000000000..c2ceae4a47 --- /dev/null +++ b/meta/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch @@ -0,0 +1,34 @@ +From e6783c99f051c6d8252db5f388d805cef0e16357 Mon Sep 17 00:00:00 2001 +From: Joshua Watt <JPEWhacker@gmail.com> +Date: Thu, 20 Feb 2020 15:20:45 -0600 +Subject: [PATCH] build: Fix strndup detection on MinGW + +GCC and meson conspire together to incorrectly detect that strndup() +exists on MinGW as __builtin_strndup, when no such function exists. As a +work around, meson will skip looking for __builtin functions if an +'#include' is in the prefix, so add '#include <string.h>' when looking +for strndup(). + +See: https://github.com/mesonbuild/meson/issues/3672 + +Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> +Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/wayland/merge_requests/63] +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/meson.build ++++ b/meson.build +@@ -36,11 +36,11 @@ have_funcs = [ + 'posix_fallocate', + 'prctl', + 'memfd_create', +- 'strndup', + ] + foreach f: have_funcs + config_h.set('HAVE_' + f.underscorify().to_upper(), cc.has_function(f)) + endforeach ++config_h.set('HAVE_STRNDUP', cc.has_function('strndup') and cc.has_header_symbol('string.h', 'strndup')) + + if get_option('libraries') + ffi_dep = dependency('libffi') diff --git a/meta/recipes-graphics/wayland/wayland/0001-meson-tests-add-missing-dependencies-on-protocol-hea.patch b/meta/recipes-graphics/wayland/wayland/0001-meson-tests-add-missing-dependencies-on-protocol-hea.patch new file mode 100644 index 0000000000..61de0e04e8 --- /dev/null +++ b/meta/recipes-graphics/wayland/wayland/0001-meson-tests-add-missing-dependencies-on-protocol-hea.patch @@ -0,0 +1,115 @@ +From b2c74f6a3dbe0aee2413800837314136947a4985 Mon Sep 17 00:00:00 2001 +From: Jan Beich <jbeich@FreeBSD.org> +Date: Sat, 15 Feb 2020 02:03:45 +0000 +Subject: [PATCH] meson/tests: add missing dependencies on protocol headers + +In file included from ../tests/connection-test.c:43: +In file included from ../tests/test-compositor.h:30: +../src/wayland-client.h:40:10: fatal error: 'wayland-client-protocol.h' file not found + #include "wayland-client-protocol.h" + ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +In file included from ../tests/display-test.c:45: +In file included from ../src/wayland-server.h:104: +src/wayland-server-protocol.h:4454:2: error: unterminated /* comment + /** + ^ +In file included from ../tests/cpp-compile-test.cpp:2: +In file included from src/wayland-server-protocol.h:8: +In file included from ../src/wayland-server.h:104: +src/wayland-server-protocol.h:3:2: error: unterminated conditional directive + #ifndef WAYLAND_SERVER_PROTOCOL_H + ^ +../tests/headers-protocol-test.c:33:2: error: including wayland-server-protocol.h did not include wayland-server.h! + #error including wayland-server-protocol.h did not include wayland-server.h! + ^ +In file included from ../tests/headers-protocol-test.c:26: +In file included from src/wayland-client-protocol.h:8: +In file included from ../src/wayland-client.h:40: +src/wayland-client-protocol.h:1358:2: error: unterminated conditional directive + #ifndef WL_SHM_FORMAT_ENUM + ^ +In file included from ../tests/protocol-logger-test.c:34: +In file included from ../src/wayland-client.h:40: +src/wayland-client-protocol.h:2613:1: error: unterminated /* comment +/** +^ +../tests/resources-test.c:49:36: error: use of undeclared identifier 'wl_seat_interface' + res = wl_resource_create(client, &wl_seat_interface, 4, 0); + ^ +Upstream-Status: Backport +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + tests/meson.build | 26 ++++++++++++++++++-------- + 1 file changed, 18 insertions(+), 8 deletions(-) + +diff --git a/tests/meson.build b/tests/meson.build +index c28a2a3..f1af7b4 100644 +--- a/tests/meson.build ++++ b/tests/meson.build +@@ -69,7 +69,7 @@ test( + executable( + 'cpp-compile-test', + 'cpp-compile-test.cpp', +- wayland_server_protocol_core_h, ++ wayland_server_protocol_h, + include_directories: src_inc + ) + ) +@@ -91,17 +91,25 @@ tests = { + 'array-test': [], + 'client-test': [ wayland_server_protocol_h ], + 'display-test': [ ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, + tests_server_protocol_h, + tests_client_protocol_c, + tests_protocol_c, + ], +- 'connection-test': [ wayland_server_protocol_h ], ++ 'connection-test': [ ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, ++ ], + 'event-loop-test': [ wayland_server_protocol_h ], + 'fixed-test': [], + 'interface-test': [ wayland_client_protocol_h ], + 'list-test': [], + 'map-test': [], +- 'sanity-test' : [ wayland_server_protocol_h ], ++ 'sanity-test' : [ ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, ++ ], + 'socket-test': [ + wayland_client_protocol_h, + wayland_server_protocol_h, +@@ -116,7 +124,7 @@ tests = { + files('../src/wayland-server.c'), + wayland_server_protocol_h, + ], +- 'resources-test': [ wayland_server_protocol_core_h ], ++ 'resources-test': [ wayland_server_protocol_h ], + 'message-test': [ + wayland_client_protocol_h, + wayland_server_protocol_h, +@@ -126,14 +134,16 @@ tests = { + wayland_server_protocol_h, + ], + 'protocol-logger-test': [ +- wayland_server_protocol_core_h, +- wayland_client_protocol_core_h, ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, + ], + 'headers-test': [ ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, + 'headers-protocol-test.c', +- 'headers-protocol-core-test.c', +- wayland_server_protocol_core_h, + wayland_client_protocol_core_h, ++ wayland_server_protocol_core_h, ++ 'headers-protocol-core-test.c', + ], + 'os-wrappers-test': [], + } diff --git a/meta/recipes-graphics/wayland/wayland/0002-Do-not-hardcode-the-path-to-wayland-scanner.patch b/meta/recipes-graphics/wayland/wayland/0002-Do-not-hardcode-the-path-to-wayland-scanner.patch new file mode 100644 index 0000000000..2199548bdf --- /dev/null +++ b/meta/recipes-graphics/wayland/wayland/0002-Do-not-hardcode-the-path-to-wayland-scanner.patch @@ -0,0 +1,26 @@ +From cbb28635a1079d68e62dbaa1e21791a20dbbbaf4 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Mon, 17 Feb 2020 21:46:18 +0100 +Subject: [PATCH] Do not hardcode the path to wayland-scanner + +This results in host contamination during builds. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + src/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/meson.build b/src/meson.build +index 294aee0..7e410fa 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -49,7 +49,7 @@ pkgconfig.generate( + 'datarootdir=' + join_paths('${prefix}', get_option('datadir')), + 'pkgdatadir=' + join_paths('${datarootdir}', meson.project_name()), + 'bindir=' + join_paths('${prefix}', get_option('bindir')), +- 'wayland_scanner=${bindir}/wayland-scanner' ++ 'wayland_scanner=wayland-scanner' + ], + filebase: 'wayland-scanner' + ) diff --git a/meta/recipes-graphics/wayland/wayland/0002-meson.build-find-the-native-wayland-scanner-directly.patch b/meta/recipes-graphics/wayland/wayland/0002-meson.build-find-the-native-wayland-scanner-directly.patch new file mode 100644 index 0000000000..f98037a850 --- /dev/null +++ b/meta/recipes-graphics/wayland/wayland/0002-meson.build-find-the-native-wayland-scanner-directly.patch @@ -0,0 +1,27 @@ +From 2582d2653ba80917d7bc47088e1a5f49530fddaa Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Sun, 16 Feb 2020 16:29:53 +0100 +Subject: [PATCH] meson.build: find the native wayland-scanner directly in PATH + +Otherwise, meson attempts to use the target pkg-config and fails. + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + src/meson.build | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/meson.build b/src/meson.build +index 3e8c9bf..294aee0 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -55,8 +55,7 @@ pkgconfig.generate( + ) + + if meson.is_cross_build() +- scanner_dep = dependency('wayland-scanner', native: true, version: '>=1.14.0') +- wayland_scanner_for_build = find_program(scanner_dep.get_pkgconfig_variable('wayland_scanner')) ++ wayland_scanner_for_build = find_program('wayland-scanner') + else + wayland_scanner_for_build = wayland_scanner + endif diff --git a/meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch b/meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch deleted file mode 100644 index ad3526d984..0000000000 --- a/meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch +++ /dev/null @@ -1,32 +0,0 @@ -Fix wayland-client and wayland-scanner pc files - -Upstream-Status: Pending - -Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> - -Index: wayland-1.14.0/src/wayland-client.pc.in -=================================================================== ---- wayland-1.14.0.orig/src/wayland-client.pc.in -+++ wayland-1.14.0/src/wayland-client.pc.in -@@ -1,7 +1,7 @@ - prefix=@prefix@ - exec_prefix=@exec_prefix@ - datarootdir=@datarootdir@ --pkgdatadir=@datadir@/@PACKAGE@ -+pkgdatadir=${pc_sysrootdir}@datadir@/@PACKAGE@ - libdir=@libdir@ - includedir=@includedir@ - -Index: wayland-1.14.0/src/wayland-scanner.pc.in -=================================================================== ---- wayland-1.14.0.orig/src/wayland-scanner.pc.in -+++ wayland-1.14.0/src/wayland-scanner.pc.in -@@ -2,7 +2,7 @@ prefix=@prefix@ - exec_prefix=@exec_prefix@ - datarootdir=@datarootdir@ - pkgdatadir=@datadir@/@PACKAGE@ --wayland_scanner=@bindir@/wayland-scanner -+wayland_scanner=wayland-scanner - - Name: Wayland Scanner - Description: Wayland scanner diff --git a/meta/recipes-graphics/wayland/wayland/run-ptest b/meta/recipes-graphics/wayland/wayland/run-ptest new file mode 100644 index 0000000000..7e8d9de046 --- /dev/null +++ b/meta/recipes-graphics/wayland/wayland/run-ptest @@ -0,0 +1,17 @@ +#!/bin/sh + +export WAYLAND_SCANNER=wayland-scanner +export TEST_DATA_DIR=tests/data +export TEST_OUTPUT_DIR=tests/output +export SED=sed +export WAYLAND_EGL_LIB=/usr/lib/libwayland-egl.so.1 +export NM=nm + +for i in `ls tests/*-test tests/wayland-egl-symbols-check tests/scanner-test.sh`; do + $i + if [ $? -eq 0 ]; then + echo "PASS: $i" + else + echo "FAIL: $i" + fi +done diff --git a/meta/recipes-graphics/wayland/wayland_1.17.0.bb b/meta/recipes-graphics/wayland/wayland_1.18.0.bb index d34bb39747..00be3aac27 100644 --- a/meta/recipes-graphics/wayland/wayland_1.17.0.bb +++ b/meta/recipes-graphics/wayland/wayland_1.18.0.bb @@ -10,20 +10,27 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \ file://src/wayland-server.c;endline=24;md5=b8e046164a766bb1ede8ba38e9dcd7ce" -DEPENDS = "expat libxml2 libffi wayland-native" +DEPENDS = "expat libffi wayland-native" SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ - file://fixpathinpcfiles.patch \ + file://run-ptest \ + file://0002-meson.build-find-the-native-wayland-scanner-directly.patch \ + file://0002-Do-not-hardcode-the-path-to-wayland-scanner.patch \ + file://0001-build-Fix-strndup-detection-on-MinGW.patch \ + file://0001-meson-tests-add-missing-dependencies-on-protocol-hea.patch \ " -SRC_URI[md5sum] = "d91f970aea11fd549eae023d06f91af3" -SRC_URI[sha256sum] = "72aa11b8ac6e22f4777302c9251e8fec7655dc22f9d94ee676c6b276f95f91a4" +SRC_URI[md5sum] = "23317697b6e3ff2e1ac8c5ba3ed57b65" +SRC_URI[sha256sum] = "4675a79f091020817a98fd0484e7208c8762242266967f55a67776936c2e294d" UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" -inherit autotools pkgconfig +inherit meson pkgconfig ptest -EXTRA_OECONF = "--disable-documentation --with-host-scanner" -EXTRA_OECONF_class-native = "--disable-documentation --disable-libraries" +PACKAGECONFIG ??= "dtd-validation" +PACKAGECONFIG[dtd-validation] = "-Ddtd_validation=true,-Ddtd_validation=false,libxml2,," + +EXTRA_OEMESON = "-Ddocumentation=false" +EXTRA_OEMESON_class-native = "-Ddocumentation=false -Dlibraries=false" # Wayland installs a M4 macro for other projects to use, which uses the target # pkg-config to find files. Replace pkg-config with pkg-config-native. @@ -33,6 +40,15 @@ do_install_append_class-native() { -i ${D}/${datadir}/aclocal/wayland-scanner.m4 } +do_install_ptest() { + mkdir -p ${D}${PTEST_PATH}/tests/data + cp -rf ${B}/tests/*-test ${B}/tests/*-checker ${D}${PTEST_PATH}/tests + cp -rf ${B}/tests/*-checker ${D}${PTEST_PATH} + cp -rf ${S}/tests/scanner-test.sh ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/data/* ${D}${PTEST_PATH}/tests/data/ + cp -rf ${S}/egl/wayland-egl-symbols-check ${D}${PTEST_PATH}/tests/ +} + sysroot_stage_all_append_class-target () { rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4 cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/ @@ -42,3 +58,5 @@ FILES_${PN} = "${libdir}/*${SOLIBS}" FILES_${PN}-dev += "${bindir} ${datadir}/wayland" BBCLASSEXTEND = "native nativesdk" + +RDEPENDS_${PN}-ptest += "binutils sed" diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb index 8b6689717c..07cec75fb3 100644 --- a/meta/recipes-graphics/wayland/weston-init.bb +++ b/meta/recipes-graphics/wayland/weston-init.bb @@ -5,19 +5,33 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384 PACKAGE_ARCH = "${MACHINE_ARCH}" SRC_URI = "file://init \ + file://weston.env \ file://weston.ini \ file://weston@.service \ + file://weston@.socket \ file://71-weston-drm.rules \ + file://weston-autologin \ file://weston-start" S = "${WORKDIR}" +DEFAULTBACKEND ??= "" +DEFAULTBACKEND_qemuall ?= "fbdev" +DEFAULTBACKEND_qemuarm64 = "drm" +DEFAULTBACKEND_qemux86 = "drm" +DEFAULTBACKEND_qemux86-64 = "drm" + do_install() { install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini + install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston # Install Weston systemd service and accompanying udev rule install -D -p -m0644 ${WORKDIR}/weston@.service ${D}${systemd_system_unitdir}/weston@.service + install -D -p -m0644 ${WORKDIR}/weston@.socket ${D}${systemd_system_unitdir}/weston@.socket + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then + install -D -p -m0644 ${WORKDIR}/weston-autologin ${D}${sysconfdir}/pam.d/weston-autologin + fi sed -i -e s:/etc:${sysconfdir}:g \ -e s:/usr/bin:${bindir}:g \ -e s:/var:${localstatedir}:g \ @@ -28,9 +42,12 @@ do_install() { install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start + if [ -n "${DEFAULTBACKEND}" ]; then + sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" ${D}${sysconfdir}/xdg/weston/weston.ini + fi } -inherit update-rc.d distro_features_check systemd +inherit update-rc.d features_check systemd # rdepends on weston which depends on virtual/egl REQUIRED_DISTRO_FEATURES = "opengl" @@ -40,9 +57,9 @@ RDEPENDS_${PN} = "weston kbd" INITSCRIPT_NAME = "weston" INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." -FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_system_unitdir}/weston@.service" +FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_system_unitdir}/weston@.service ${systemd_system_unitdir}/weston@.socket ${sysconfdir}/default/weston ${sysconfdir}/pam.d/" -CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini" +CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/default/weston" SYSTEMD_SERVICE_${PN} = "weston@%i.service" SYSTEMD_AUTO_ENABLE = "disable" diff --git a/meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini b/meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini deleted file mode 100644 index 17ebd7fdab..0000000000 --- a/meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini +++ /dev/null @@ -1,2 +0,0 @@ -[core] -backend=fbdev-backend.so diff --git a/meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini b/meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini deleted file mode 100644 index 17ebd7fdab..0000000000 --- a/meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini +++ /dev/null @@ -1,2 +0,0 @@ -[core] -backend=fbdev-backend.so diff --git a/meta/recipes-graphics/wayland/weston-init/weston-autologin b/meta/recipes-graphics/wayland/weston-init/weston-autologin new file mode 100644 index 0000000000..f6e6d106de --- /dev/null +++ b/meta/recipes-graphics/wayland/weston-init/weston-autologin @@ -0,0 +1,11 @@ +auth required pam_nologin.so +auth required pam_unix.so try_first_pass nullok + +account required pam_nologin.so +account required pam_unix.so + +session required pam_env.so +session required pam_unix.so +-session optional pam_systemd.so type=wayland class=user desktop=weston +-session optional pam_loginuid.so + diff --git a/meta/recipes-graphics/wayland/weston-init/weston.env b/meta/recipes-graphics/wayland/weston-init/weston.env new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/meta/recipes-graphics/wayland/weston-init/weston.env diff --git a/meta/recipes-graphics/wayland/weston-init/weston.ini b/meta/recipes-graphics/wayland/weston-init/weston.ini index 1eecf48bc1..b48726d59c 100644 --- a/meta/recipes-graphics/wayland/weston-init/weston.ini +++ b/meta/recipes-graphics/wayland/weston-init/weston.ini @@ -1,9 +1,10 @@ # configuration file for Weston -#[core] +[core] #modules=xwayland.so,cms-colord.so #shell=desktop-shell.so #gbm-format=xrgb2101010 +require-input=false #[shell] #background-image=/usr/share/backgrounds/gnome/Aqua.jpg @@ -67,8 +68,8 @@ #min_accel_factor = 0.16 #max_accel_factor = 1.0 -#[screen-share] -#command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize +[screen-share] +command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize #[xwayland] #path=/usr/bin/Xwayland diff --git a/meta/recipes-graphics/wayland/weston-init/weston@.service b/meta/recipes-graphics/wayland/weston-init/weston@.service index 9ecf2ab069..ce8f4fb71a 100644 --- a/meta/recipes-graphics/wayland/weston-init/weston@.service +++ b/meta/recipes-graphics/wayland/weston-init/weston@.service @@ -1,37 +1,65 @@ +# This is a system unit for launching Weston with auto-login as the +# user configured here. +# +# Weston must be built with systemd support, and your weston.ini must load +# the plugin systemd-notify.so. [Unit] -Description=Weston Wayland Compositor (on tty7) -RequiresMountsFor=/run -Conflicts=getty@tty7.service plymouth-quit.service -After=systemd-user-sessions.service getty@tty7.service plymouth-quit-wait.service +Description=Weston, a Wayland compositor, as a system service +Documentation=man:weston(1) man:weston.ini(5) +Documentation=http://wayland.freedesktop.org/ + +# Make sure we are started after logins are permitted. +After=systemd-user-sessions.service + +# If Plymouth is used, we want to start when it is on its way out. +After=plymouth-quit-wait.service + +# D-Bus is necessary for contacting logind. Logind is required. +Wants=dbus.socket +After=dbus.socket + +# Since we are part of the graphical session, make sure we are started before +# it is complete. +Before=graphical.target + +# Prevent starting on systems without virtual consoles, Weston requires one +# for now. +ConditionPathExists=/dev/tty0 [Service] -User=%i -PermissionsStartOnly=true +# Requires systemd-notify.so Weston plugin. +Type=notify +EnvironmentFile=/etc/default/weston +ExecStart=/usr/bin/weston --modules=systemd-notify.so -# Log us in via PAM so we get our XDG & co. environment and -# are treated as logged in so we can use the tty: -PAMName=login +# Optional watchdog setup +TimeoutStartSec=60 +WatchdogSec=20 -# Grab tty7 -UtmpIdentifier=tty7 +# The user to run Weston as. +User=%I + +# Make sure working directory is users home directory +WorkingDirectory=/home/%i + +# Set up a full user session for the user, required by Weston. +PAMName=weston-autologin + +# A virtual terminal is needed. TTYPath=/dev/tty7 TTYReset=yes TTYVHangup=yes TTYVTDisallocate=yes -# stderr to journal so our logging doesn't get thrown into /dev/null -StandardOutput=tty -StandardInput=tty +# Fail to start if not controlling the tty. +StandardInput=tty-fail +StandardOutput=journal StandardError=journal -EnvironmentFile=-/etc/default/weston - -# Weston does not successfully change VT, nor does systemd place us on -# the VT it just activated for us. Switch manually: -ExecStartPre=/usr/bin/chvt 7 -ExecStart=/usr/bin/weston --log=${XDG_RUNTIME_DIR}/weston.log $OPTARGS - -IgnoreSIGPIPE=no +# Log this user with utmp, letting it show up with commands 'w' and 'who'. +UtmpIdentifier=tty7 +UtmpMode=user -#[Install] -#Alias=multi-user.target.wants/weston.service +[Install] +WantedBy=graphical.target +DefaultInstance=tty7 diff --git a/meta/recipes-graphics/wayland/weston-init/weston@.socket b/meta/recipes-graphics/wayland/weston-init/weston@.socket new file mode 100644 index 0000000000..f1790d74a8 --- /dev/null +++ b/meta/recipes-graphics/wayland/weston-init/weston@.socket @@ -0,0 +1,10 @@ +[Unit] +Description=Weston Wayland socket +After=user-runtime-dir@1000.service + +[Socket] +ListenStream=/run/user/1000/wayland-%I + +[Install] +WantedBy=sockets.target + diff --git a/meta/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch b/meta/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch new file mode 100644 index 0000000000..6fe86ff3f0 --- /dev/null +++ b/meta/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch @@ -0,0 +1,47 @@ +From 58760e09eed662a72da939ff4802d605489cff8e Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko <denys@ti.com> +Date: Tue, 8 Sep 2020 19:37:42 -0400 +Subject: [PATCH] tests: include fcntl.h for open(), O_RDWR, O_CLOEXEC and + O_CREAT + +musl libc (unlike glibc) requires explicitly incuding fcntl.h to define open(), +O_RDWR, O_CLOEXEC and O_CREAT. Otherwise the build fails with the errors: + +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c: In function 'wait_for_lock': +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:7: warning: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration] +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~ +| | popen +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:23: error: 'O_RDWR' undeclared (first use in this function) +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~~~ +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:23: note: each undeclared identifier is reported only once for each function it appears in +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:32: error: 'O_CLOEXEC' undeclared (first use in this function) +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~~~~~~ +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:44: error: 'O_CREAT' undeclared (first use in this function) +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~~~~ + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/493/diffs?commit_id=b10c0e843dcb8148bbe869bb15261955b94ac98c] + +Signed-off-by: Denys Dmytriyenko <denys@ti.com> +--- + tests/weston-test-fixture-compositor.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/weston-test-fixture-compositor.c b/tests/weston-test-fixture-compositor.c +index 0c9855f..e0e32c9 100644 +--- a/tests/weston-test-fixture-compositor.c ++++ b/tests/weston-test-fixture-compositor.c +@@ -31,6 +31,7 @@ + #include <unistd.h> + #include <sys/file.h> + #include <errno.h> ++#include <fcntl.h> + + #include "shared/helpers.h" + #include "weston-test-fixture-compositor.h" +-- +2.7.4 + diff --git a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch index e50845b17a..3279a728cc 100644 --- a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +++ b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch @@ -1,7 +1,8 @@ -From 682b7d79a7b81ec8e38760381104b24ad549e8c0 Mon Sep 17 00:00:00 2001 +From a1548c742bf2dedbb47282d8a00407b60bbab669 Mon Sep 17 00:00:00 2001 From: Tom Hochstein <tom.hochstein@nxp.com> Date: Wed, 22 Feb 2017 15:53:30 +0200 Subject: [PATCH] weston-launch: Provide a default version that doesn't require + PAM weston-launch requires PAM for starting weston as a non-root user. @@ -16,6 +17,7 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Ming Liu <ming.liu@toradex.com> + --- libweston/meson.build | 16 ++++++++++++---- libweston/weston-launch.c | 21 +++++++++++++++++++++ @@ -23,10 +25,10 @@ Signed-off-by: Ming Liu <ming.liu@toradex.com> 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/libweston/meson.build b/libweston/meson.build -index d8d3fc0..326683f 100644 +index 08d23ec..cb9fd3f 100644 --- a/libweston/meson.build +++ b/libweston/meson.build -@@ -199,16 +199,24 @@ dep_vertex_clipping = declare_dependency( +@@ -216,16 +216,24 @@ dep_vertex_clipping = declare_dependency( ) if get_option('weston-launch') @@ -52,11 +54,11 @@ index d8d3fc0..326683f 100644 'weston-launch.c', - dependencies: [dep_pam, systemd_dep, dep_libdrm], + dependencies: deps_weston_launch, - include_directories: include_directories('..'), + include_directories: common_inc, install: true ) diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c -index 4962bd6..fc531c5 100644 +index 521cb2c..2d42d33 100644 --- a/libweston/weston-launch.c +++ b/libweston/weston-launch.c @@ -51,7 +51,9 @@ @@ -96,7 +98,7 @@ index 4962bd6..fc531c5 100644 static int setup_launcher_socket(struct weston_launch *wl) -@@ -431,6 +437,7 @@ quit(struct weston_launch *wl, int status) +@@ -466,6 +472,7 @@ quit(struct weston_launch *wl, int status) close(wl->signalfd); close(wl->sock[0]); @@ -104,15 +106,15 @@ index 4962bd6..fc531c5 100644 if (wl->new_user) { err = pam_close_session(wl->ph, 0); if (err) -@@ -438,6 +445,7 @@ quit(struct weston_launch *wl, int status) +@@ -473,6 +480,7 @@ quit(struct weston_launch *wl, int status) err, pam_strerror(wl->ph, err)); pam_end(wl->ph, err); } +#endif - if (ioctl(wl->tty, KDSKBMUTE, 0) && - ioctl(wl->tty, KDSKBMODE, wl->kb_mode)) -@@ -660,6 +668,7 @@ setup_session(struct weston_launch *wl, char **child_argv) + /* + * Get a fresh handle to the tty as the previous one is in +@@ -710,6 +718,7 @@ setup_session(struct weston_launch *wl, char **child_argv) setenv("HOME", wl->pw->pw_dir, 1); setenv("SHELL", wl->pw->pw_shell, 1); @@ -120,7 +122,7 @@ index 4962bd6..fc531c5 100644 env = pam_getenvlist(wl->ph); if (env) { for (i = 0; env[i]; ++i) { -@@ -668,6 +677,7 @@ setup_session(struct weston_launch *wl, char **child_argv) +@@ -718,6 +727,7 @@ setup_session(struct weston_launch *wl, char **child_argv) } free(env); } @@ -128,7 +130,7 @@ index 4962bd6..fc531c5 100644 /* * We open a new session, so it makes sense -@@ -739,8 +749,10 @@ static void +@@ -789,8 +799,10 @@ static void help(const char *name) { fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); @@ -139,7 +141,7 @@ index 4962bd6..fc531c5 100644 fprintf(stderr, " -t, --tty Start session on alternative tty,\n" " e.g. -t /dev/tty4, requires -u option.\n"); fprintf(stderr, " -v, --verbose Be verbose\n"); -@@ -754,7 +766,9 @@ main(int argc, char *argv[]) +@@ -804,7 +816,9 @@ main(int argc, char *argv[]) int i, c; char *tty = NULL; struct option opts[] = { @@ -149,7 +151,7 @@ index 4962bd6..fc531c5 100644 { "tty", required_argument, NULL, 't' }, { "verbose", no_argument, NULL, 'v' }, { "help", no_argument, NULL, 'h' }, -@@ -766,11 +780,16 @@ main(int argc, char *argv[]) +@@ -816,11 +830,16 @@ main(int argc, char *argv[]) while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { switch (c) { case 'u': @@ -166,7 +168,7 @@ index 4962bd6..fc531c5 100644 break; case 't': tty = optarg; -@@ -822,8 +841,10 @@ main(int argc, char *argv[]) +@@ -872,8 +891,10 @@ main(int argc, char *argv[]) if (setup_tty(&wl, tty) < 0) exit(EXIT_FAILURE); @@ -178,7 +180,7 @@ index 4962bd6..fc531c5 100644 if (setup_launcher_socket(&wl) < 0) exit(EXIT_FAILURE); diff --git a/meson_options.txt b/meson_options.txt -index d5bf1d5..254eb2b 100644 +index 239bd2d..99e4ec3 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -73,6 +73,13 @@ option( @@ -195,6 +197,3 @@ index d5bf1d5..254eb2b 100644 'xwayland', type: 'boolean', value: true, --- -2.7.4 - diff --git a/meta/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch b/meta/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch new file mode 100644 index 0000000000..a4444e5d18 --- /dev/null +++ b/meta/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch @@ -0,0 +1,23 @@ +Fix atomic modesetting with musl + +atomic modesetting seems to fail with drm weston backend and this patch fixes +it, below errors are seen before weston exits + +atomic: couldn't commit new state: Invalid argument + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/issues/158] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- a/libweston/backend-drm/kms.c ++++ b/libweston/backend-drm/kms.c +@@ -1168,8 +1168,8 @@ drm_pending_state_apply_atomic(struct dr + wl_list_for_each(plane, &b->plane_list, link) { + drm_debug(b, "\t\t[atomic] starting with plane %lu disabled\n", + (unsigned long) plane->plane_id); +- plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); +- plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); ++ //plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); ++ //plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); + } + + flags |= DRM_MODE_ATOMIC_ALLOW_MODESET; diff --git a/meta/recipes-graphics/wayland/weston_7.0.0.bb b/meta/recipes-graphics/wayland/weston_9.0.0.bb index d21275414e..75f9fb05fd 100644 --- a/meta/recipes-graphics/wayland/weston_7.0.0.bb +++ b/meta/recipes-graphics/wayland/weston_9.0.0.bb @@ -10,28 +10,37 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ file://weston.desktop \ file://xwayland.weston-start \ file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ + file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ " -SRC_URI[md5sum] = "cbfda483bc2501d0831af3f33c707850" -SRC_URI[sha256sum] = "a00a6d207b6a45f95f4401c604772a307c3767e5e2beecf3d879110c43909a64" + +SRC_URI_append_libc-musl = " file://dont-use-plane-add-prop.patch " + +SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe" UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" -inherit meson pkgconfig useradd distro_features_check +inherit meson pkgconfig useradd features_check # depends on virtual/egl REQUIRED_DISTRO_FEATURES = "opengl" -DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg" +DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false" -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \ +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ - clients launch" + launch \ + image-jpeg \ + screenshare \ + shell-desktop \ + shell-fullscreen \ + shell-ivi" + # # Compositor choices # @@ -64,9 +73,19 @@ PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-color # Clients support PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" # Virtual remote output with GStreamer on DRM backend -PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer-1.0" +PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0" # Weston with PAM support PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" +# Weston with screen-share support +PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" +# Traditional desktop shell +PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false" +# Fullscreen shell +PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false" +# In-Vehicle Infotainment (IVI) shell +PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" +# JPEG image loading support +PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" do_install_append() { # Weston doesn't need the .la files to load modules, so wipe them @@ -93,7 +112,8 @@ do_install_append() { PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" -FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}" +FILES_${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" +FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/capability.conf b/meta/recipes-graphics/x11-common/xserver-nodm-init/capability.conf new file mode 100644 index 0000000000..7ab7460816 --- /dev/null +++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/capability.conf @@ -0,0 +1,2 @@ +cap_sys_admin @USER@ +none * diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm index 6c548551b8..116bb278bc 100755 --- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm +++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm @@ -38,6 +38,14 @@ case "$1" in if [ -e /dev/hidraw0 ]; then chmod o+rw /dev/hidraw* fi + # Make sure that the Xorg has the cap_sys_admin capability which is + # needed for setting the drm master + if ! grep -q "^auth.*pam_cap\.so" /etc/pam.d/su; then + echo "auth optional pam_cap.so" >>/etc/pam.d/su + fi + if ! /usr/sbin/getcap $XSERVER | grep -q cap_sys_admin; then + /usr/sbin/setcap cap_sys_admin+eip $XSERVER + fi fi # Using su rather than sudo as latest 1.8.1 cause failure [YOCTO #1211] diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb b/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb index a77c56445c..c2995f99ff 100644 --- a/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb +++ b/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb @@ -10,6 +10,7 @@ SRC_URI = "file://xserver-nodm \ file://gplv2-license.patch \ file://xserver-nodm.service.in \ file://xserver-nodm.conf.in \ + file://capability.conf \ " S = "${WORKDIR}" @@ -17,9 +18,9 @@ S = "${WORKDIR}" # Since we refer to ROOTLESS_X which is normally enabled per-machine PACKAGE_ARCH = "${MACHINE_ARCH}" -inherit update-rc.d systemd distro_features_check +inherit update-rc.d systemd features_check -REQUIRED_DISTRO_FEATURES = "x11" +REQUIRED_DISTRO_FEATURES = "x11 ${@oe.utils.conditional('ROOTLESS_X', '1', 'pam', '', d)}" PACKAGECONFIG ??= "blank" # dpms and screen saver will be on only if 'blank' is in PACKAGECONFIG @@ -40,6 +41,8 @@ do_install() { if [ "${ROOTLESS_X}" = "1" ] ; then XUSER_HOME="/home/xuser" XUSER="xuser" + install -D capability.conf ${D}${sysconfdir}/security/capability.conf + sed -i "s:@USER@:${XUSER}:" ${D}${sysconfdir}/security/capability.conf else XUSER_HOME=${ROOT_HOME} XUSER="root" @@ -60,7 +63,7 @@ do_install() { fi } -RDEPENDS_${PN} = "xinit ${@oe.utils.conditional('ROOTLESS_X', '1', 'xuser-account', '', d)}" +RDEPENDS_${PN} = "xinit ${@oe.utils.conditional('ROOTLESS_X', '1', 'xuser-account libcap libcap-bin', '', d)}" INITSCRIPT_NAME = "xserver-nodm" INITSCRIPT_PARAMS = "start 9 5 . stop 20 0 1 2 3 6 ." diff --git a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb index 9873d3f33f..d2a16643fe 100644 --- a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb +++ b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb @@ -7,12 +7,12 @@ DEPENDS = "virtual/libx11 libxi libxrandr" PV = "0.7.5+git${SRCPV}" PR = "r6" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" -SRCREV = "03dadf55109bd43d3380f040debe9f82f66f2f35" -SRC_URI = "git://github.com/tias/xinput_calibrator.git \ +SRCREV = "18ec53f1cada39f905614ebfaffed5c7754ecf46" +SRC_URI = "git://github.com/kreijack/xinput_calibrator.git;branch=libinput \ file://30xinput_calibrate.sh \ file://Allow-xinput_calibrator_pointercal.sh-to-be-run-as-n.patch \ file://0001-calibrator.hh-Include-string-to-get-std-string.patch \ diff --git a/meta/recipes-graphics/xorg-app/mkfontdir_1.0.7.bb b/meta/recipes-graphics/xorg-app/mkfontdir_1.0.7.bb deleted file mode 100644 index a453e24876..0000000000 --- a/meta/recipes-graphics/xorg-app/mkfontdir_1.0.7.bb +++ /dev/null @@ -1,22 +0,0 @@ -require xorg-app-common.inc - -SUMMARY = "A program to create an index of X font files in a directory" - -DESCRIPTION = "For each directory argument, mkfontdir reads all of the \ -font files in the directory. The font names and related data are written \ -out to the files \"fonts.dir\", \"fonts.scale\", and \"fonts.alias\". \ -The X server and font server use these files to find the available font \ -files." - -PE = "1" -PR = "${INC_PR}.0" - -RDEPENDS_${PN} += "mkfontscale" -RDEPENDS_${PN}_class-native += "mkfontscale-native" - -BBCLASSEXTEND = "native" - -LIC_FILES_CHKSUM = "file://COPYING;md5=b4fcf2b90cadbfc15009b9e124dc3a3f" - -SRC_URI[md5sum] = "18c429148c96c2079edda922a2b67632" -SRC_URI[sha256sum] = "56d52a482df130484e51fd066d1b6eda7c2c02ddbc91fe6e2be1b9c4e7306530" diff --git a/meta/recipes-graphics/xorg-app/mkfontscale_1.1.3.bb b/meta/recipes-graphics/xorg-app/mkfontscale_1.2.1.bb index 2a6bec1649..a767ee847b 100644 --- a/meta/recipes-graphics/xorg-app/mkfontscale_1.1.3.bb +++ b/meta/recipes-graphics/xorg-app/mkfontscale_1.2.1.bb @@ -10,9 +10,12 @@ is used by the mkfontdir program." DEPENDS = "util-macros-native zlib libfontenc freetype xorgproto" +PROVIDES += "mkfontdir" +RPROVIDES_${PN} += "mkfontdir" + BBCLASSEXTEND = "native" -LIC_FILES_CHKSUM = "file://COPYING;md5=2e0d129d05305176d1a790e0ac1acb7f" +LIC_FILES_CHKSUM = "file://COPYING;md5=99b1e1269aba5179139b9e4380fc0934" -SRC_URI[md5sum] = "987c438e79f5ddb84a9c5726a1610819" -SRC_URI[sha256sum] = "1e98df69ee5f4542d711e140e1d93e2c3f2775407ccbb7849110d52b91782a6a" +SRC_URI[md5sum] = "215940de158b1a3d8b3f8b442c606e2f" +SRC_URI[sha256sum] = "ca0495eb974a179dd742bfa6199d561bda1c8da4a0c5a667f21fd82aaab6bac7" diff --git a/meta/recipes-graphics/xorg-app/x11perf_1.6.1.bb b/meta/recipes-graphics/xorg-app/x11perf_1.6.1.bb index 33c0c8a95c..c4d443bfb9 100644 --- a/meta/recipes-graphics/xorg-app/x11perf_1.6.1.bb +++ b/meta/recipes-graphics/xorg-app/x11perf_1.6.1.bb @@ -13,6 +13,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=428ca4d67a41fcd4fc3283dce9bbda7e \ PE = "1" +inherit multilib_script + +MULTILIB_SCRIPTS = "${PN}:${bindir}/x11perfcomp" + do_install_append_class-target () { sed -i -e 's:${HOSTTOOLS_DIR}/::g' ${D}${bindir}/x11perfcomp } diff --git a/meta/recipes-graphics/xorg-app/xev/diet-x11.patch b/meta/recipes-graphics/xorg-app/xev/diet-x11.patch index 53c0ac2e61..361369b291 100644 --- a/meta/recipes-graphics/xorg-app/xev/diet-x11.patch +++ b/meta/recipes-graphics/xorg-app/xev/diet-x11.patch @@ -1,14 +1,19 @@ +From b9b2b8d1af283a13cdccea55562cf332de48dcb9 Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross@openedhand.com> +Date: Wed, 28 Mar 2007 16:10:50 +0000 +Subject: [PATCH] Add xev + Upstream-Status: Inappropriate [disable feature] --- - xev.c | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) + xev.c | 64 +---------------------------------------------------------- + 1 file changed, 1 insertion(+), 63 deletions(-) -Index: xev-1.2.3/xev.c -=================================================================== ---- xev-1.2.3.orig/xev.c -+++ xev-1.2.3/xev.c -@@ -125,17 +125,6 @@ do_KeyPress(XEvent *eventp) +diff --git a/xev.c b/xev.c +index ea69234..6d5eb30 100644 +--- a/xev.c ++++ b/xev.c +@@ -175,17 +175,6 @@ do_KeyPress(XEvent *eventp) nbytes = XLookupString(e, str, 256, &ks, NULL); /* not supposed to call XmbLookupString on a key release event */ @@ -26,24 +31,24 @@ Index: xev-1.2.3/xev.c if (ks == NoSymbol) ksname = "NoSymbol"; -@@ -168,16 +157,6 @@ do_KeyPress(XEvent *eventp) +@@ -220,16 +209,6 @@ do_KeyPress(XEvent *eventp) } /* not supposed to call XmbLookupString on a key release event */ - if (e->type == KeyPress && xic) { -- printf(" XmbLookupString gives %d bytes: ", nmbbytes); +- output(Indent, "XmbLookupString gives %d bytes: ", nmbbytes); - if (nmbbytes > 0) { - dump(buf, nmbbytes); -- printf(" \"%s\"\n", buf); +- output(NewLine, " \"%s\"", buf); - } - else { -- printf("\n"); +- output_new_line(); - } - } - printf(" XFilterEvent returns: %s\n", + output(Indent | NewLine, "XFilterEvent returns: %s", XFilterEvent(eventp, e->window) ? "True" : "False"); -@@ -1141,7 +1120,7 @@ parse_event_mask(const char *s, long eve +@@ -1211,7 +1190,7 @@ parse_event_mask(const char *s, long event_masks[]) if (s) return True; } @@ -52,7 +57,7 @@ Index: xev-1.2.3/xev.c if (s != NULL) fprintf(stderr, "%s: unrecognized event mask '%s'\n", ProgramName, s); -@@ -1288,37 +1267,6 @@ main(int argc, char **argv) +@@ -1361,37 +1340,6 @@ main(int argc, char **argv) fprintf(stderr, "%s: XSetLocaleModifiers failed\n", ProgramName); } @@ -90,7 +95,7 @@ Index: xev-1.2.3/xev.c screen = DefaultScreen(dpy); attr.event_mask = event_masks[EVENT_MASK_INDEX_CORE]; -@@ -1373,16 +1321,6 @@ main(int argc, char **argv) +@@ -1446,16 +1394,6 @@ main(int argc, char **argv) printf("Outer window is 0x%lx, inner window is 0x%lx\n", w, subw); } diff --git a/meta/recipes-graphics/xorg-app/xev_1.2.3.bb b/meta/recipes-graphics/xorg-app/xev_1.2.4.bb index 6a69e747a6..9407fa65f1 100644 --- a/meta/recipes-graphics/xorg-app/xev_1.2.3.bb +++ b/meta/recipes-graphics/xorg-app/xev_1.2.4.bb @@ -14,5 +14,4 @@ DEPENDS += "libxrandr xorgproto" SRC_URI += "file://diet-x11.patch" -SRC_URI[md5sum] = "eec82a5d4b599736f0fa637e96136746" -SRC_URI[sha256sum] = "66bc4f1cfa1946d62612737815c34164e4ce40fcebd2c9e1d7e7a1117ad3ad09" +SRC_URI[sha256sum] = "d700e08bfe751ed2dbf802baa204b056d0e49348b6eb3c6f9cb035d8ae4885e2" diff --git a/meta/recipes-graphics/xorg-app/xinit/0001-Make-manpage-multilib-identical.patch b/meta/recipes-graphics/xorg-app/xinit/0001-Make-manpage-multilib-identical.patch new file mode 100644 index 0000000000..649905574c --- /dev/null +++ b/meta/recipes-graphics/xorg-app/xinit/0001-Make-manpage-multilib-identical.patch @@ -0,0 +1,28 @@ +From d642e60d8963f1b90569cd0ab5c29ac2c9bfe939 Mon Sep 17 00:00:00 2001 +From: Jeremy Puhlman <jpuhlman@mvista.com> +Date: Fri, 6 Mar 2020 22:28:14 +0000 +Subject: [PATCH] Make manpage multilib identical + +Upstream-Status: Submitted + +Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> +--- + man/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/man/Makefile.am b/man/Makefile.am +index 9c6569f..608e933 100644 +--- a/man/Makefile.am ++++ b/man/Makefile.am +@@ -12,7 +12,7 @@ MAN_SUBSTS+= -e 's|__XSERVERNAME__|$(XSERVERNAME)|g' \ + -e 's|__XCONFIGFILEMAN__|$(XCONFIGFILEMAN)|g' \ + -e 's|__xinitdir__|$(XINITDIR)|g' \ + -e 's|__bindir__|$(bindir)|g' \ +- -e 's|__libdir__|$(libdir)|g' \ ++ -e 's|__libdir__|$(prefix)/lib*|g' \ + -e 's|__configdir__|$(XINITDIR)|g' + + +-- +2.23.0 + diff --git a/meta/recipes-graphics/xorg-app/xinit_1.4.1.bb b/meta/recipes-graphics/xorg-app/xinit_1.4.1.bb index 5626ebbd52..301ea1c243 100644 --- a/meta/recipes-graphics/xorg-app/xinit_1.4.1.bb +++ b/meta/recipes-graphics/xorg-app/xinit_1.4.1.bb @@ -12,9 +12,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=18f01e7b39807bebe2b8df101a039b68" PE = "1" +SRC_URI += "file://0001-Make-manpage-multilib-identical.patch" + SRC_URI[md5sum] = "6d506ab2efc17a08e87778654e099d37" SRC_URI[sha256sum] = "de9b8f617b68a70f6caf87da01fcf0ebd2b75690cdcba9c921d0ef54fa54abb9" EXTRA_OECONF = "ac_cv_path_MCOOKIE=${bindir}/mcookie" +PACKAGECONFIG ??= "rxvt" +PACKAGECONFIG[rxvt] = "--with-xterm=rxvt,,,rxvt-unicode" + RDEPENDS_${PN} += "util-linux-mcookie" diff --git a/meta/recipes-graphics/xorg-app/xkbcomp_1.4.2.bb b/meta/recipes-graphics/xorg-app/xkbcomp_1.4.3.bb index eaf8eaaf74..2fa79c8438 100644 --- a/meta/recipes-graphics/xorg-app/xkbcomp_1.4.2.bb +++ b/meta/recipes-graphics/xorg-app/xkbcomp_1.4.3.bb @@ -13,5 +13,7 @@ DEPENDS += "libxkbfile" BBCLASSEXTEND = "native" -SRC_URI[md5sum] = "12610df19df2af3797f2c130ee2bce97" -SRC_URI[sha256sum] = "6dd8bcb9be7e85bd7294abe261b8c7b0539d2fc93e41b80fb8bd013767ce8424" +EXTRA_OECONF += "--disable-selective-werror" + +SRC_URI[md5sum] = "6e4751d99373f85d459ab4dff28893f5" +SRC_URI[sha256sum] = "06242c169fc11caf601cac46d781d467748c6a330e15b36dce46520b8ac8d435" diff --git a/meta/recipes-graphics/xorg-app/xorg-app-common.inc b/meta/recipes-graphics/xorg-app/xorg-app-common.inc index 3529cb26ef..cb8cf4f5fa 100644 --- a/meta/recipes-graphics/xorg-app/xorg-app-common.inc +++ b/meta/recipes-graphics/xorg-app/xorg-app-common.inc @@ -8,10 +8,8 @@ DEPENDS = "util-macros-native virtual/libx11" # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" -INC_PR = "r8" - SRC_URI = "${XORG_MIRROR}/individual/app/${BPN}-${PV}.tar.bz2" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check FILES_${PN} += " ${libdir}/X11/${BPN} ${datadir}/X11/app-defaults/" diff --git a/meta/recipes-graphics/xorg-app/xrandr_1.5.1.bb b/meta/recipes-graphics/xorg-app/xrandr_1.5.1.bb index 6583ea2371..57b43ff28c 100644 --- a/meta/recipes-graphics/xorg-app/xrandr_1.5.1.bb +++ b/meta/recipes-graphics/xorg-app/xrandr_1.5.1.bb @@ -15,3 +15,5 @@ SRC_URI = "${XORG_MIRROR}/individual/app/${BPN}-${PV}.tar.xz" SRC_URI[md5sum] = "fe40f7a4fd39dd3a02248d3e0b1972e4" SRC_URI[sha256sum] = "7bc76daf9d72f8aff885efad04ce06b90488a1a169d118dea8a2b661832e8762" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.29.0.bb b/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.30.0.bb index f87083e575..d02988caa4 100644 --- a/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.29.0.bb +++ b/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.30.0.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5e6b20ea2ef94a998145f0ea3f788ee0" DEPENDS += "libinput" -SRC_URI[md5sum] = "d600e8e2e30747b8ce49ec5294ff0ab6" -SRC_URI[sha256sum] = "c28b56a21754b972db31798e6a4cf4dc9d69208d08f8fe41701a94def5e94bee" +SRC_URI[md5sum] = "11dcfa2cc39f790731a9545fcdeea717" +SRC_URI[sha256sum] = "f9c7f9fd41ae14061e0e9c3bd45fa170e5e21027a2bc5810034e1e748db996c0" FILES_${PN} += "${datadir}/X11/xorg.conf.d" diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics/64bit_time_t_support.patch b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics/64bit_time_t_support.patch new file mode 100644 index 0000000000..4bb7fb3e23 --- /dev/null +++ b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics/64bit_time_t_support.patch @@ -0,0 +1,51 @@ +This patch avoids using time field of input_event structure which is not available +on 32bit arches supporting 64bit time_t structs, Patch makes it compatible with new +and keeps old input.h implementation functional as well. + +See https://sourceware.org/glibc/wiki/Y2038ProofnessDesign + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- a/src/eventcomm.c ++++ b/src/eventcomm.c +@@ -575,10 +575,12 @@ SynapticsReadEvent(InputInfoPtr pInfo, s + ev->type = EV_SYN; + ev->code = SYN_REPORT; + ev->value = 0; +- ev->time = last_event_time; +- } else if (ev->type == EV_SYN) +- last_event_time = ev->time; +- ++ ev->input_event_sec = last_event_time.tv_sec; ++ ev->input_event_usec = last_event_time.tv_usec; ++ } else if (ev->type == EV_SYN) { ++ last_event_time.tv_sec = ev->input_event_sec; ++ last_event_time.tv_usec = ev->input_event_usec; ++ } + return TRUE; + } + +@@ -725,7 +727,7 @@ EventReadHwState(InputInfoPtr pInfo, + case SYN_REPORT: + hw->numFingers = count_fingers(pInfo, comm); + if (proto_data->have_monotonic_clock) +- hw->millis = 1000 * ev.time.tv_sec + ev.time.tv_usec / 1000; ++ hw->millis = 1000 * ev.input_event_sec + ev.input_event_usec / 1000; + else + hw->millis = GetTimeInMillis(); + SynapticsCopyHwState(hwRet, hw); +--- a/src/eventcomm.h ++++ b/src/eventcomm.h +@@ -34,6 +34,11 @@ + #include <xf86Xinput.h> + #include "synproto.h" + ++#ifndef input_event_sec ++#define input_event_sec time.tv_sec ++#define input_event_usec time.tv_usec ++#endif ++ + /* for auto-dev: */ + #define DEV_INPUT_EVENT "/dev/input" + #define EVENT_DEV_NAME "event" diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.1.bb b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.1.bb index dc31890f69..388350c96e 100644 --- a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.1.bb +++ b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.1.bb @@ -10,6 +10,8 @@ advanced features of the touchpad to become available." LIC_FILES_CHKSUM = "file://COPYING;md5=55aacd3535a741824955c5eb8f061398" +SRC_URI += "file://64bit_time_t_support.patch" + SRC_URI[md5sum] = "cfb79d3c975151f9bbf30b727c260cb9" SRC_URI[sha256sum] = "7af83526eff1c76e8b9e1553b34245c203d029028d8044dd9dcf71eef1001576" diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-Sync-i915_pciids-upto-8717c6b7414f.patch b/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-Sync-i915_pciids-upto-8717c6b7414f.patch new file mode 100644 index 0000000000..ef3b1afb1f --- /dev/null +++ b/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-Sync-i915_pciids-upto-8717c6b7414f.patch @@ -0,0 +1,505 @@ +From 05909fea93f29b2b6e1d554dd64201551bd7a022 Mon Sep 17 00:00:00 2001 +From: Liwei Song <liwei.song@windriver.com> +Date: Fri, 17 Apr 2020 16:11:59 +0800 +Subject: [PATCH] Sync i915_pciids upto 8717c6b7414f + +Import the kernel's i915_pciids.h, up to: + +commit 8717c6b7414ffb890672276dccc284c23078ac0e +Author: Lee Shawn C <shawn.c.lee@intel.com> +Date: Tue Dec 10 23:04:15 2019 +0800 + + drm/i915/cml: Separate U series pci id from origianl list. + +Upstream-Status: Submitted [https://patchwork.kernel.org/patch/11494645/] + +Signed-off-by: Liwei Song <liwei.song@windriver.com> +--- + src/i915_pciids.h | 265 ++++++++++++++++++++++++++++++++++----------- + src/intel_module.c | 2 +- + test/dri3-test.c | 2 +- + 3 files changed, 206 insertions(+), 63 deletions(-) + +diff --git a/src/i915_pciids.h b/src/i915_pciids.h +index fd965ffbb92e..1d2c12219f44 100644 +--- a/src/i915_pciids.h ++++ b/src/i915_pciids.h +@@ -108,8 +108,10 @@ + INTEL_VGA_DEVICE(0x2e42, info), /* B43_G */ \ + INTEL_VGA_DEVICE(0x2e92, info) /* B43_G.1 */ + +-#define INTEL_PINEVIEW_IDS(info) \ +- INTEL_VGA_DEVICE(0xa001, info), \ ++#define INTEL_PINEVIEW_G_IDS(info) \ ++ INTEL_VGA_DEVICE(0xa001, info) ++ ++#define INTEL_PINEVIEW_M_IDS(info) \ + INTEL_VGA_DEVICE(0xa011, info) + + #define INTEL_IRONLAKE_D_IDS(info) \ +@@ -166,7 +168,18 @@ + #define INTEL_IVB_Q_IDS(info) \ + INTEL_QUANTA_VGA_DEVICE(info) /* Quanta transcode */ + ++#define INTEL_HSW_ULT_GT1_IDS(info) \ ++ INTEL_VGA_DEVICE(0x0A02, info), /* ULT GT1 desktop */ \ ++ INTEL_VGA_DEVICE(0x0A0A, info), /* ULT GT1 server */ \ ++ INTEL_VGA_DEVICE(0x0A0B, info), /* ULT GT1 reserved */ \ ++ INTEL_VGA_DEVICE(0x0A06, info) /* ULT GT1 mobile */ ++ ++#define INTEL_HSW_ULX_GT1_IDS(info) \ ++ INTEL_VGA_DEVICE(0x0A0E, info) /* ULX GT1 mobile */ ++ + #define INTEL_HSW_GT1_IDS(info) \ ++ INTEL_HSW_ULT_GT1_IDS(info), \ ++ INTEL_HSW_ULX_GT1_IDS(info), \ + INTEL_VGA_DEVICE(0x0402, info), /* GT1 desktop */ \ + INTEL_VGA_DEVICE(0x040a, info), /* GT1 server */ \ + INTEL_VGA_DEVICE(0x040B, info), /* GT1 reserved */ \ +@@ -175,20 +188,26 @@ + INTEL_VGA_DEVICE(0x0C0A, info), /* SDV GT1 server */ \ + INTEL_VGA_DEVICE(0x0C0B, info), /* SDV GT1 reserved */ \ + INTEL_VGA_DEVICE(0x0C0E, info), /* SDV GT1 reserved */ \ +- INTEL_VGA_DEVICE(0x0A02, info), /* ULT GT1 desktop */ \ +- INTEL_VGA_DEVICE(0x0A0A, info), /* ULT GT1 server */ \ +- INTEL_VGA_DEVICE(0x0A0B, info), /* ULT GT1 reserved */ \ + INTEL_VGA_DEVICE(0x0D02, info), /* CRW GT1 desktop */ \ + INTEL_VGA_DEVICE(0x0D0A, info), /* CRW GT1 server */ \ + INTEL_VGA_DEVICE(0x0D0B, info), /* CRW GT1 reserved */ \ + INTEL_VGA_DEVICE(0x0D0E, info), /* CRW GT1 reserved */ \ + INTEL_VGA_DEVICE(0x0406, info), /* GT1 mobile */ \ + INTEL_VGA_DEVICE(0x0C06, info), /* SDV GT1 mobile */ \ +- INTEL_VGA_DEVICE(0x0A06, info), /* ULT GT1 mobile */ \ +- INTEL_VGA_DEVICE(0x0A0E, info), /* ULX GT1 mobile */ \ + INTEL_VGA_DEVICE(0x0D06, info) /* CRW GT1 mobile */ + ++#define INTEL_HSW_ULT_GT2_IDS(info) \ ++ INTEL_VGA_DEVICE(0x0A12, info), /* ULT GT2 desktop */ \ ++ INTEL_VGA_DEVICE(0x0A1A, info), /* ULT GT2 server */ \ ++ INTEL_VGA_DEVICE(0x0A1B, info), /* ULT GT2 reserved */ \ ++ INTEL_VGA_DEVICE(0x0A16, info) /* ULT GT2 mobile */ ++ ++#define INTEL_HSW_ULX_GT2_IDS(info) \ ++ INTEL_VGA_DEVICE(0x0A1E, info) /* ULX GT2 mobile */ \ ++ + #define INTEL_HSW_GT2_IDS(info) \ ++ INTEL_HSW_ULT_GT2_IDS(info), \ ++ INTEL_HSW_ULX_GT2_IDS(info), \ + INTEL_VGA_DEVICE(0x0412, info), /* GT2 desktop */ \ + INTEL_VGA_DEVICE(0x041a, info), /* GT2 server */ \ + INTEL_VGA_DEVICE(0x041B, info), /* GT2 reserved */ \ +@@ -197,9 +216,6 @@ + INTEL_VGA_DEVICE(0x0C1A, info), /* SDV GT2 server */ \ + INTEL_VGA_DEVICE(0x0C1B, info), /* SDV GT2 reserved */ \ + INTEL_VGA_DEVICE(0x0C1E, info), /* SDV GT2 reserved */ \ +- INTEL_VGA_DEVICE(0x0A12, info), /* ULT GT2 desktop */ \ +- INTEL_VGA_DEVICE(0x0A1A, info), /* ULT GT2 server */ \ +- INTEL_VGA_DEVICE(0x0A1B, info), /* ULT GT2 reserved */ \ + INTEL_VGA_DEVICE(0x0D12, info), /* CRW GT2 desktop */ \ + INTEL_VGA_DEVICE(0x0D1A, info), /* CRW GT2 server */ \ + INTEL_VGA_DEVICE(0x0D1B, info), /* CRW GT2 reserved */ \ +@@ -207,11 +223,17 @@ + INTEL_VGA_DEVICE(0x0416, info), /* GT2 mobile */ \ + INTEL_VGA_DEVICE(0x0426, info), /* GT2 mobile */ \ + INTEL_VGA_DEVICE(0x0C16, info), /* SDV GT2 mobile */ \ +- INTEL_VGA_DEVICE(0x0A16, info), /* ULT GT2 mobile */ \ +- INTEL_VGA_DEVICE(0x0A1E, info), /* ULX GT2 mobile */ \ + INTEL_VGA_DEVICE(0x0D16, info) /* CRW GT2 mobile */ + ++#define INTEL_HSW_ULT_GT3_IDS(info) \ ++ INTEL_VGA_DEVICE(0x0A22, info), /* ULT GT3 desktop */ \ ++ INTEL_VGA_DEVICE(0x0A2A, info), /* ULT GT3 server */ \ ++ INTEL_VGA_DEVICE(0x0A2B, info), /* ULT GT3 reserved */ \ ++ INTEL_VGA_DEVICE(0x0A26, info), /* ULT GT3 mobile */ \ ++ INTEL_VGA_DEVICE(0x0A2E, info) /* ULT GT3 reserved */ ++ + #define INTEL_HSW_GT3_IDS(info) \ ++ INTEL_HSW_ULT_GT3_IDS(info), \ + INTEL_VGA_DEVICE(0x0422, info), /* GT3 desktop */ \ + INTEL_VGA_DEVICE(0x042a, info), /* GT3 server */ \ + INTEL_VGA_DEVICE(0x042B, info), /* GT3 reserved */ \ +@@ -220,16 +242,11 @@ + INTEL_VGA_DEVICE(0x0C2A, info), /* SDV GT3 server */ \ + INTEL_VGA_DEVICE(0x0C2B, info), /* SDV GT3 reserved */ \ + INTEL_VGA_DEVICE(0x0C2E, info), /* SDV GT3 reserved */ \ +- INTEL_VGA_DEVICE(0x0A22, info), /* ULT GT3 desktop */ \ +- INTEL_VGA_DEVICE(0x0A2A, info), /* ULT GT3 server */ \ +- INTEL_VGA_DEVICE(0x0A2B, info), /* ULT GT3 reserved */ \ + INTEL_VGA_DEVICE(0x0D22, info), /* CRW GT3 desktop */ \ + INTEL_VGA_DEVICE(0x0D2A, info), /* CRW GT3 server */ \ + INTEL_VGA_DEVICE(0x0D2B, info), /* CRW GT3 reserved */ \ + INTEL_VGA_DEVICE(0x0D2E, info), /* CRW GT3 reserved */ \ + INTEL_VGA_DEVICE(0x0C26, info), /* SDV GT3 mobile */ \ +- INTEL_VGA_DEVICE(0x0A26, info), /* ULT GT3 mobile */ \ +- INTEL_VGA_DEVICE(0x0A2E, info), /* ULT GT3 reserved */ \ + INTEL_VGA_DEVICE(0x0D26, info) /* CRW GT3 mobile */ + + #define INTEL_HSW_IDS(info) \ +@@ -245,35 +262,59 @@ + INTEL_VGA_DEVICE(0x0157, info), \ + INTEL_VGA_DEVICE(0x0155, info) + +-#define INTEL_BDW_GT1_IDS(info) \ +- INTEL_VGA_DEVICE(0x1602, info), /* GT1 ULT */ \ ++#define INTEL_BDW_ULT_GT1_IDS(info) \ + INTEL_VGA_DEVICE(0x1606, info), /* GT1 ULT */ \ +- INTEL_VGA_DEVICE(0x160B, info), /* GT1 Iris */ \ +- INTEL_VGA_DEVICE(0x160E, info), /* GT1 ULX */ \ ++ INTEL_VGA_DEVICE(0x160B, info) /* GT1 Iris */ ++ ++#define INTEL_BDW_ULX_GT1_IDS(info) \ ++ INTEL_VGA_DEVICE(0x160E, info) /* GT1 ULX */ ++ ++#define INTEL_BDW_GT1_IDS(info) \ ++ INTEL_BDW_ULT_GT1_IDS(info), \ ++ INTEL_BDW_ULX_GT1_IDS(info), \ ++ INTEL_VGA_DEVICE(0x1602, info), /* GT1 ULT */ \ + INTEL_VGA_DEVICE(0x160A, info), /* GT1 Server */ \ + INTEL_VGA_DEVICE(0x160D, info) /* GT1 Workstation */ + +-#define INTEL_BDW_GT2_IDS(info) \ +- INTEL_VGA_DEVICE(0x1612, info), /* GT2 Halo */ \ ++#define INTEL_BDW_ULT_GT2_IDS(info) \ + INTEL_VGA_DEVICE(0x1616, info), /* GT2 ULT */ \ +- INTEL_VGA_DEVICE(0x161B, info), /* GT2 ULT */ \ +- INTEL_VGA_DEVICE(0x161E, info), /* GT2 ULX */ \ ++ INTEL_VGA_DEVICE(0x161B, info) /* GT2 ULT */ ++ ++#define INTEL_BDW_ULX_GT2_IDS(info) \ ++ INTEL_VGA_DEVICE(0x161E, info) /* GT2 ULX */ ++ ++#define INTEL_BDW_GT2_IDS(info) \ ++ INTEL_BDW_ULT_GT2_IDS(info), \ ++ INTEL_BDW_ULX_GT2_IDS(info), \ ++ INTEL_VGA_DEVICE(0x1612, info), /* GT2 Halo */ \ + INTEL_VGA_DEVICE(0x161A, info), /* GT2 Server */ \ + INTEL_VGA_DEVICE(0x161D, info) /* GT2 Workstation */ + ++#define INTEL_BDW_ULT_GT3_IDS(info) \ ++ INTEL_VGA_DEVICE(0x1626, info), /* ULT */ \ ++ INTEL_VGA_DEVICE(0x162B, info) /* Iris */ \ ++ ++#define INTEL_BDW_ULX_GT3_IDS(info) \ ++ INTEL_VGA_DEVICE(0x162E, info) /* ULX */ ++ + #define INTEL_BDW_GT3_IDS(info) \ ++ INTEL_BDW_ULT_GT3_IDS(info), \ ++ INTEL_BDW_ULX_GT3_IDS(info), \ + INTEL_VGA_DEVICE(0x1622, info), /* ULT */ \ +- INTEL_VGA_DEVICE(0x1626, info), /* ULT */ \ +- INTEL_VGA_DEVICE(0x162B, info), /* Iris */ \ +- INTEL_VGA_DEVICE(0x162E, info), /* ULX */\ + INTEL_VGA_DEVICE(0x162A, info), /* Server */ \ + INTEL_VGA_DEVICE(0x162D, info) /* Workstation */ + ++#define INTEL_BDW_ULT_RSVD_IDS(info) \ ++ INTEL_VGA_DEVICE(0x1636, info), /* ULT */ \ ++ INTEL_VGA_DEVICE(0x163B, info) /* Iris */ ++ ++#define INTEL_BDW_ULX_RSVD_IDS(info) \ ++ INTEL_VGA_DEVICE(0x163E, info) /* ULX */ ++ + #define INTEL_BDW_RSVD_IDS(info) \ ++ INTEL_BDW_ULT_RSVD_IDS(info), \ ++ INTEL_BDW_ULX_RSVD_IDS(info), \ + INTEL_VGA_DEVICE(0x1632, info), /* ULT */ \ +- INTEL_VGA_DEVICE(0x1636, info), /* ULT */ \ +- INTEL_VGA_DEVICE(0x163B, info), /* Iris */ \ +- INTEL_VGA_DEVICE(0x163E, info), /* ULX */ \ + INTEL_VGA_DEVICE(0x163A, info), /* Server */ \ + INTEL_VGA_DEVICE(0x163D, info) /* Workstation */ + +@@ -289,25 +330,40 @@ + INTEL_VGA_DEVICE(0x22b2, info), \ + INTEL_VGA_DEVICE(0x22b3, info) + ++#define INTEL_SKL_ULT_GT1_IDS(info) \ ++ INTEL_VGA_DEVICE(0x1906, info) /* ULT GT1 */ ++ ++#define INTEL_SKL_ULX_GT1_IDS(info) \ ++ INTEL_VGA_DEVICE(0x190E, info) /* ULX GT1 */ ++ + #define INTEL_SKL_GT1_IDS(info) \ +- INTEL_VGA_DEVICE(0x1906, info), /* ULT GT1 */ \ +- INTEL_VGA_DEVICE(0x190E, info), /* ULX GT1 */ \ ++ INTEL_SKL_ULT_GT1_IDS(info), \ ++ INTEL_SKL_ULX_GT1_IDS(info), \ + INTEL_VGA_DEVICE(0x1902, info), /* DT GT1 */ \ + INTEL_VGA_DEVICE(0x190B, info), /* Halo GT1 */ \ + INTEL_VGA_DEVICE(0x190A, info) /* SRV GT1 */ + +-#define INTEL_SKL_GT2_IDS(info) \ ++#define INTEL_SKL_ULT_GT2_IDS(info) \ + INTEL_VGA_DEVICE(0x1916, info), /* ULT GT2 */ \ +- INTEL_VGA_DEVICE(0x1921, info), /* ULT GT2F */ \ +- INTEL_VGA_DEVICE(0x191E, info), /* ULX GT2 */ \ ++ INTEL_VGA_DEVICE(0x1921, info) /* ULT GT2F */ ++ ++#define INTEL_SKL_ULX_GT2_IDS(info) \ ++ INTEL_VGA_DEVICE(0x191E, info) /* ULX GT2 */ ++ ++#define INTEL_SKL_GT2_IDS(info) \ ++ INTEL_SKL_ULT_GT2_IDS(info), \ ++ INTEL_SKL_ULX_GT2_IDS(info), \ + INTEL_VGA_DEVICE(0x1912, info), /* DT GT2 */ \ + INTEL_VGA_DEVICE(0x191B, info), /* Halo GT2 */ \ + INTEL_VGA_DEVICE(0x191A, info), /* SRV GT2 */ \ + INTEL_VGA_DEVICE(0x191D, info) /* WKS GT2 */ + ++#define INTEL_SKL_ULT_GT3_IDS(info) \ ++ INTEL_VGA_DEVICE(0x1926, info) /* ULT GT3 */ ++ + #define INTEL_SKL_GT3_IDS(info) \ ++ INTEL_SKL_ULT_GT3_IDS(info), \ + INTEL_VGA_DEVICE(0x1923, info), /* ULT GT3 */ \ +- INTEL_VGA_DEVICE(0x1926, info), /* ULT GT3 */ \ + INTEL_VGA_DEVICE(0x1927, info), /* ULT GT3 */ \ + INTEL_VGA_DEVICE(0x192B, info), /* Halo GT3 */ \ + INTEL_VGA_DEVICE(0x192D, info) /* SRV GT3 */ +@@ -336,45 +392,91 @@ + INTEL_VGA_DEVICE(0x3184, info), \ + INTEL_VGA_DEVICE(0x3185, info) + +-#define INTEL_KBL_GT1_IDS(info) \ +- INTEL_VGA_DEVICE(0x5913, info), /* ULT GT1.5 */ \ +- INTEL_VGA_DEVICE(0x5915, info), /* ULX GT1.5 */ \ ++#define INTEL_KBL_ULT_GT1_IDS(info) \ + INTEL_VGA_DEVICE(0x5906, info), /* ULT GT1 */ \ ++ INTEL_VGA_DEVICE(0x5913, info) /* ULT GT1.5 */ ++ ++#define INTEL_KBL_ULX_GT1_IDS(info) \ + INTEL_VGA_DEVICE(0x590E, info), /* ULX GT1 */ \ ++ INTEL_VGA_DEVICE(0x5915, info) /* ULX GT1.5 */ ++ ++#define INTEL_KBL_GT1_IDS(info) \ ++ INTEL_KBL_ULT_GT1_IDS(info), \ ++ INTEL_KBL_ULX_GT1_IDS(info), \ + INTEL_VGA_DEVICE(0x5902, info), /* DT GT1 */ \ + INTEL_VGA_DEVICE(0x5908, info), /* Halo GT1 */ \ + INTEL_VGA_DEVICE(0x590B, info), /* Halo GT1 */ \ + INTEL_VGA_DEVICE(0x590A, info) /* SRV GT1 */ + +-#define INTEL_KBL_GT2_IDS(info) \ ++#define INTEL_KBL_ULT_GT2_IDS(info) \ + INTEL_VGA_DEVICE(0x5916, info), /* ULT GT2 */ \ ++ INTEL_VGA_DEVICE(0x5921, info) /* ULT GT2F */ ++ ++#define INTEL_KBL_ULX_GT2_IDS(info) \ ++ INTEL_VGA_DEVICE(0x591E, info) /* ULX GT2 */ ++ ++#define INTEL_KBL_GT2_IDS(info) \ ++ INTEL_KBL_ULT_GT2_IDS(info), \ ++ INTEL_KBL_ULX_GT2_IDS(info), \ + INTEL_VGA_DEVICE(0x5917, info), /* Mobile GT2 */ \ +- INTEL_VGA_DEVICE(0x5921, info), /* ULT GT2F */ \ +- INTEL_VGA_DEVICE(0x591E, info), /* ULX GT2 */ \ + INTEL_VGA_DEVICE(0x5912, info), /* DT GT2 */ \ + INTEL_VGA_DEVICE(0x591B, info), /* Halo GT2 */ \ + INTEL_VGA_DEVICE(0x591A, info), /* SRV GT2 */ \ + INTEL_VGA_DEVICE(0x591D, info) /* WKS GT2 */ + ++#define INTEL_KBL_ULT_GT3_IDS(info) \ ++ INTEL_VGA_DEVICE(0x5926, info) /* ULT GT3 */ ++ + #define INTEL_KBL_GT3_IDS(info) \ ++ INTEL_KBL_ULT_GT3_IDS(info), \ + INTEL_VGA_DEVICE(0x5923, info), /* ULT GT3 */ \ +- INTEL_VGA_DEVICE(0x5926, info), /* ULT GT3 */ \ + INTEL_VGA_DEVICE(0x5927, info) /* ULT GT3 */ + + #define INTEL_KBL_GT4_IDS(info) \ + INTEL_VGA_DEVICE(0x593B, info) /* Halo GT4 */ + + /* AML/KBL Y GT2 */ +-#define INTEL_AML_GT2_IDS(info) \ ++#define INTEL_AML_KBL_GT2_IDS(info) \ + INTEL_VGA_DEVICE(0x591C, info), /* ULX GT2 */ \ + INTEL_VGA_DEVICE(0x87C0, info) /* ULX GT2 */ + ++/* AML/CFL Y GT2 */ ++#define INTEL_AML_CFL_GT2_IDS(info) \ ++ INTEL_VGA_DEVICE(0x87CA, info) ++ ++/* CML GT1 */ ++#define INTEL_CML_GT1_IDS(info) \ ++ INTEL_VGA_DEVICE(0x9BA5, info), \ ++ INTEL_VGA_DEVICE(0x9BA8, info), \ ++ INTEL_VGA_DEVICE(0x9BA4, info), \ ++ INTEL_VGA_DEVICE(0x9BA2, info) ++ ++#define INTEL_CML_U_GT1_IDS(info) \ ++ INTEL_VGA_DEVICE(0x9B21, info), \ ++ INTEL_VGA_DEVICE(0x9BAA, info), \ ++ INTEL_VGA_DEVICE(0x9BAC, info) ++ ++/* CML GT2 */ ++#define INTEL_CML_GT2_IDS(info) \ ++ INTEL_VGA_DEVICE(0x9BC5, info), \ ++ INTEL_VGA_DEVICE(0x9BC8, info), \ ++ INTEL_VGA_DEVICE(0x9BC4, info), \ ++ INTEL_VGA_DEVICE(0x9BC2, info), \ ++ INTEL_VGA_DEVICE(0x9BC6, info), \ ++ INTEL_VGA_DEVICE(0x9BE6, info), \ ++ INTEL_VGA_DEVICE(0x9BF6, info) ++ ++#define INTEL_CML_U_GT2_IDS(info) \ ++ INTEL_VGA_DEVICE(0x9B41, info), \ ++ INTEL_VGA_DEVICE(0x9BCA, info), \ ++ INTEL_VGA_DEVICE(0x9BCC, info) ++ + #define INTEL_KBL_IDS(info) \ + INTEL_KBL_GT1_IDS(info), \ + INTEL_KBL_GT2_IDS(info), \ + INTEL_KBL_GT3_IDS(info), \ + INTEL_KBL_GT4_IDS(info), \ +- INTEL_AML_GT2_IDS(info) ++ INTEL_AML_KBL_GT2_IDS(info) + + /* CFL S */ + #define INTEL_CFL_S_GT1_IDS(info) \ +@@ -390,6 +492,9 @@ + INTEL_VGA_DEVICE(0x3E9A, info) /* SRV GT2 */ + + /* CFL H */ ++#define INTEL_CFL_H_GT1_IDS(info) \ ++ INTEL_VGA_DEVICE(0x3E9C, info) ++ + #define INTEL_CFL_H_GT2_IDS(info) \ + INTEL_VGA_DEVICE(0x3E9B, info), /* Halo GT2 */ \ + INTEL_VGA_DEVICE(0x3E94, info) /* Halo GT2 */ +@@ -407,30 +512,43 @@ + + /* WHL/CFL U GT1 */ + #define INTEL_WHL_U_GT1_IDS(info) \ +- INTEL_VGA_DEVICE(0x3EA1, info) ++ INTEL_VGA_DEVICE(0x3EA1, info), \ ++ INTEL_VGA_DEVICE(0x3EA4, info) + + /* WHL/CFL U GT2 */ + #define INTEL_WHL_U_GT2_IDS(info) \ +- INTEL_VGA_DEVICE(0x3EA0, info) ++ INTEL_VGA_DEVICE(0x3EA0, info), \ ++ INTEL_VGA_DEVICE(0x3EA3, info) + + /* WHL/CFL U GT3 */ + #define INTEL_WHL_U_GT3_IDS(info) \ +- INTEL_VGA_DEVICE(0x3EA2, info), \ +- INTEL_VGA_DEVICE(0x3EA3, info), \ +- INTEL_VGA_DEVICE(0x3EA4, info) ++ INTEL_VGA_DEVICE(0x3EA2, info) + + #define INTEL_CFL_IDS(info) \ + INTEL_CFL_S_GT1_IDS(info), \ + INTEL_CFL_S_GT2_IDS(info), \ ++ INTEL_CFL_H_GT1_IDS(info), \ + INTEL_CFL_H_GT2_IDS(info), \ + INTEL_CFL_U_GT2_IDS(info), \ + INTEL_CFL_U_GT3_IDS(info), \ + INTEL_WHL_U_GT1_IDS(info), \ + INTEL_WHL_U_GT2_IDS(info), \ +- INTEL_WHL_U_GT3_IDS(info) ++ INTEL_WHL_U_GT3_IDS(info), \ ++ INTEL_AML_CFL_GT2_IDS(info), \ ++ INTEL_CML_GT1_IDS(info), \ ++ INTEL_CML_GT2_IDS(info), \ ++ INTEL_CML_U_GT1_IDS(info), \ ++ INTEL_CML_U_GT2_IDS(info) + + /* CNL */ ++#define INTEL_CNL_PORT_F_IDS(info) \ ++ INTEL_VGA_DEVICE(0x5A54, info), \ ++ INTEL_VGA_DEVICE(0x5A5C, info), \ ++ INTEL_VGA_DEVICE(0x5A44, info), \ ++ INTEL_VGA_DEVICE(0x5A4C, info) ++ + #define INTEL_CNL_IDS(info) \ ++ INTEL_CNL_PORT_F_IDS(info), \ + INTEL_VGA_DEVICE(0x5A51, info), \ + INTEL_VGA_DEVICE(0x5A59, info), \ + INTEL_VGA_DEVICE(0x5A41, info), \ +@@ -440,22 +558,47 @@ + INTEL_VGA_DEVICE(0x5A42, info), \ + INTEL_VGA_DEVICE(0x5A4A, info), \ + INTEL_VGA_DEVICE(0x5A50, info), \ +- INTEL_VGA_DEVICE(0x5A40, info), \ +- INTEL_VGA_DEVICE(0x5A54, info), \ +- INTEL_VGA_DEVICE(0x5A5C, info), \ +- INTEL_VGA_DEVICE(0x5A44, info), \ +- INTEL_VGA_DEVICE(0x5A4C, info) ++ INTEL_VGA_DEVICE(0x5A40, info) + + /* ICL */ +-#define INTEL_ICL_11_IDS(info) \ ++#define INTEL_ICL_PORT_F_IDS(info) \ + INTEL_VGA_DEVICE(0x8A50, info), \ +- INTEL_VGA_DEVICE(0x8A51, info), \ + INTEL_VGA_DEVICE(0x8A5C, info), \ +- INTEL_VGA_DEVICE(0x8A5D, info), \ ++ INTEL_VGA_DEVICE(0x8A59, info), \ ++ INTEL_VGA_DEVICE(0x8A58, info), \ + INTEL_VGA_DEVICE(0x8A52, info), \ + INTEL_VGA_DEVICE(0x8A5A, info), \ + INTEL_VGA_DEVICE(0x8A5B, info), \ ++ INTEL_VGA_DEVICE(0x8A57, info), \ ++ INTEL_VGA_DEVICE(0x8A56, info), \ + INTEL_VGA_DEVICE(0x8A71, info), \ +- INTEL_VGA_DEVICE(0x8A70, info) ++ INTEL_VGA_DEVICE(0x8A70, info), \ ++ INTEL_VGA_DEVICE(0x8A53, info), \ ++ INTEL_VGA_DEVICE(0x8A54, info) ++ ++#define INTEL_ICL_11_IDS(info) \ ++ INTEL_ICL_PORT_F_IDS(info), \ ++ INTEL_VGA_DEVICE(0x8A51, info), \ ++ INTEL_VGA_DEVICE(0x8A5D, info) ++ ++/* EHL/JSL */ ++#define INTEL_EHL_IDS(info) \ ++ INTEL_VGA_DEVICE(0x4500, info), \ ++ INTEL_VGA_DEVICE(0x4571, info), \ ++ INTEL_VGA_DEVICE(0x4551, info), \ ++ INTEL_VGA_DEVICE(0x4541, info), \ ++ INTEL_VGA_DEVICE(0x4E71, info), \ ++ INTEL_VGA_DEVICE(0x4E61, info), \ ++ INTEL_VGA_DEVICE(0x4E51, info) ++ ++/* TGL */ ++#define INTEL_TGL_12_IDS(info) \ ++ INTEL_VGA_DEVICE(0x9A49, info), \ ++ INTEL_VGA_DEVICE(0x9A40, info), \ ++ INTEL_VGA_DEVICE(0x9A59, info), \ ++ INTEL_VGA_DEVICE(0x9A60, info), \ ++ INTEL_VGA_DEVICE(0x9A68, info), \ ++ INTEL_VGA_DEVICE(0x9A70, info), \ ++ INTEL_VGA_DEVICE(0x9A78, info) + + #endif /* _I915_PCIIDS_H */ +diff --git a/src/intel_module.c b/src/intel_module.c +index a71c2e40b774..e0b94c190254 100644 +--- a/src/intel_module.c ++++ b/src/intel_module.c +@@ -357,7 +357,7 @@ static const struct pci_id_match intel_device_match[] = { + INTEL_I945GM_IDS(&intel_i945_info), + + INTEL_G33_IDS(&intel_g33_info), +- INTEL_PINEVIEW_IDS(&intel_g33_info), ++ INTEL_PINEVIEW_G_IDS(&intel_g33_info), + + INTEL_I965G_IDS(&intel_i965_info), + INTEL_I965GM_IDS(&intel_i965_info), +diff --git a/test/dri3-test.c b/test/dri3-test.c +index 78e105a8b64a..5265a30cea1b 100644 +--- a/test/dri3-test.c ++++ b/test/dri3-test.c +@@ -76,7 +76,7 @@ static const struct pci_id_match ids[] = { + INTEL_I945GM_IDS(031), + + INTEL_G33_IDS(033), +- INTEL_PINEVIEW_IDS(033), ++ INTEL_PINEVIEW_G_IDS(033), + + INTEL_I965G_IDS(040), + INTEL_I965GM_IDS(040), +-- +2.17.1 + diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-i810-Avoid-duplicate-definition-of-I810PatternROP.patch b/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-i810-Avoid-duplicate-definition-of-I810PatternROP.patch new file mode 100644 index 0000000000..765d9ec090 --- /dev/null +++ b/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-i810-Avoid-duplicate-definition-of-I810PatternROP.patch @@ -0,0 +1,27 @@ +From c2d730cf79eb3e4bea41f5ed8a8a21092ced8b03 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Hanno=20B=C3=B6ck?= <hanno@gentoo.org> +Date: Sun, 2 Feb 2020 14:18:39 +0100 +Subject: [PATCH] i810: Avoid duplicate definition of I810PatternROP + +Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/driver/xf86-video-intel/-/commit/652d93cbbdc159c0883f1b626ea48e28bac63ae3] +Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/legacy/i810/i810.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/legacy/i810/i810.h b/src/legacy/i810/i810.h +index 347188c9..19be049c 100644 +--- a/src/legacy/i810/i810.h ++++ b/src/legacy/i810/i810.h +@@ -322,6 +322,6 @@ extern void I810InitMC(ScreenPtr pScreen); + extern const OptionInfoRec *I810AvailableOptions(int chipid, int busid); + + extern const int I810CopyROP[16]; +-const int I810PatternROP[16]; ++extern const int I810PatternROP[16]; + + #endif /* _I810_H_ */ +-- +2.28.0 + diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel/01_Fix-build-on-i686.patch b/meta/recipes-graphics/xorg-driver/xf86-video-intel/01_Fix-build-on-i686.patch deleted file mode 100644 index 52916f8b4a..0000000000 --- a/meta/recipes-graphics/xorg-driver/xf86-video-intel/01_Fix-build-on-i686.patch +++ /dev/null @@ -1,55 +0,0 @@ -From a414d4e24461da1cb4cef8ee910bc57bab360ceb Mon Sep 17 00:00:00 2001 -From: Adam Jackson <ajax@redhat.com> -Date: Tue, 6 Mar 2018 12:07:46 -0500 -Subject: [PATCH] Fix build on i686 - -Presumably this only matters for i686 because amd64 implies sse2, but: - -BUILDSTDERR: In file included from gen4_vertex.c:34: -BUILDSTDERR: gen4_vertex.c: In function 'emit_vertex': -BUILDSTDERR: sna_render_inline.h:40:26: error: inlining failed in call to always_inline 'vertex_emit_2s': target specific option mismatch -BUILDSTDERR: static force_inline void vertex_emit_2s(struct sna *sna, int16_t x, int16_t y) -BUILDSTDERR: ^~~~~~~~~~~~~~ -BUILDSTDERR: gen4_vertex.c:308:25: note: called from here -BUILDSTDERR: #define OUT_VERTEX(x,y) vertex_emit_2s(sna, x,y) /* XXX assert(!too_large(x, y)); */ -BUILDSTDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ -BUILDSTDERR: gen4_vertex.c:360:2: note: in expansion of macro 'OUT_VERTEX' -BUILDSTDERR: OUT_VERTEX(dstX, dstY); -BUILDSTDERR: ^~~~~~~~~~ - -The bug here appears to be that emit_vertex() is declared 'sse2' but -vertex_emit_2s is merely always_inline. gcc8 decides that since you said -always_inline you need to have explicitly cloned it for every -permutation of targets. Merely saying inline seems to do the job of -cloning vertex_emit_2s as much as necessary. - -So to reiterate: if you say always-inline, it won't, but if you just say -maybe inline, it will. Thanks gcc, that's helpful. - -- ajax - -Patch taken from Fedora. - -Upstream-Status: Pending -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> - ---- - src/sna/compiler.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/sna/compiler.h b/src/sna/compiler.h -index 3c176a16..bc447c7a 100644 ---- a/src/sna/compiler.h -+++ b/src/sna/compiler.h -@@ -32,7 +32,7 @@ - #define likely(expr) (__builtin_expect (!!(expr), 1)) - #define unlikely(expr) (__builtin_expect (!!(expr), 0)) - #define noinline __attribute__((noinline)) --#define force_inline inline __attribute__((always_inline)) -+#define force_inline inline - #define fastcall __attribute__((regparm(3))) - #define must_check __attribute__((warn_unused_result)) - #define constant __attribute__((const)) --- -2.16.2 - diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb b/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb index bf9009bda0..161371b118 100644 --- a/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb +++ b/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb @@ -9,14 +9,14 @@ Infrastructure (DRI)." LIC_FILES_CHKSUM = "file://COPYING;md5=8730ad58d11c7bbad9a7066d69f7808e" -SRCREV = "33ee0c3b21ea279e08d0863fcb2e874f0974b00e" +SRCREV = "f66d39544bb8339130c96d282a80f87ca1606caf" PV = "2.99.917+git${SRCPV}" S = "${WORKDIR}/git" SRC_URI = "git://anongit.freedesktop.org/xorg/driver/xf86-video-intel \ - " - -SRC_URI_append_qemux86 = "file://01_Fix-build-on-i686.patch" + file://0001-Sync-i915_pciids-upto-8717c6b7414f.patch \ + file://0001-i810-Avoid-duplicate-definition-of-I810PatternROP.patch \ +" UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" diff --git a/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc b/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc index e657c65b4c..493b90a298 100644 --- a/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc +++ b/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc @@ -5,7 +5,6 @@ SECTION = "x11/drivers" LICENSE = "MIT-X" PE = "2" -INC_PR = "r21" DEPENDS = "virtual/xserver xorgproto util-macros" @@ -13,7 +12,9 @@ SRC_URI = "${XORG_MIRROR}/individual/driver/${BPN}-${PV}.tar.bz2" FILES_${PN} += " ${libdir}/xorg/modules/drivers/*.so" -inherit autotools pkgconfig distro_features_check +XORGBUILDCLASS ??= "autotools" +inherit ${XORGBUILDCLASS} pkgconfig features_check + # depends on virtual/xserver REQUIRED_DISTRO_FEATURES = "x11" diff --git a/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb b/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb index a39609b5da..713fcfb935 100644 --- a/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb +++ b/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb @@ -7,7 +7,7 @@ require xorg-font-common.inc LICENSE = "PD" LIC_FILES_CHKSUM = "file://COPYING;md5=9da93f2daf2d5572faa2bfaf0dbd9e76" PE = "1" -PR = "${INC_PR}.1" +PR = "r3" DEPENDS = "mkfontscale-native mkfontdir-native font-util-native" RDEPENDS_${PN} = "" @@ -19,3 +19,7 @@ SRC_URI[sha256sum] = "bd96e16143a044b19e87f217cf6a3763a70c561d1076aad6f6d862ec41 inherit allarch EXTRA_OECONF += "--with-encodingsdir=${datadir}/fonts/X11/encodings" + +# postinst from .inc doesn't apply to this recipe +pkg_postinst_${PN} () { +} diff --git a/meta/recipes-graphics/xorg-font/font-alias-1.0.3/nocompiler.patch b/meta/recipes-graphics/xorg-font/font-alias-1.0.4/nocompiler.patch index 0b9fb8ccc0..e54eee4ea9 100644 --- a/meta/recipes-graphics/xorg-font/font-alias-1.0.3/nocompiler.patch +++ b/meta/recipes-graphics/xorg-font/font-alias-1.0.4/nocompiler.patch @@ -1,22 +1,32 @@ +From fa2bbd48a55d54bd2dae30edf7936e3ab7587c96 Mon Sep 17 00:00:00 2001 +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Date: Tue, 17 May 2011 23:03:02 +0000 +Subject: [PATCH] Improve handling of 'all' architecture recipes and their + Upstream-Status: Inappropriate [configuration] XORG_DEFAULT_OPTIONS pulls in the following dependency chains: XORG_CWARNFLAGS -> AC_PROG_CC_C99 XORG_STRICT_OPTION -> AC_PROG_CC_C99, XORG_CWARNFLAGS -XORG_MANPAGE_SECTIONS -> AC_CANONICAL_HOST -> Checks host +XORG_MANPAGE_SECTIONS -> AC_CANONICAL_HOST -> Checks host each of which triggers the use of the host compiler. As an "all" architecture package, it shouldn't need a compiler (and doesn't). RP 17/5/2011 -diff -uNr font-alias-1.0.3.orig//configure.ac font-alias-1.0.3/configure.ac ---- font-alias-1.0.3.orig//configure.ac 2011-05-18 21:29:18.378258643 +0200 -+++ font-alias-1.0.3/configure.ac 2011-05-18 21:32:06.865258593 +0200 -@@ -28,12 +28,12 @@ +--- + configure.ac | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 3407c69..9fe1f89 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -27,12 +27,12 @@ AC_INIT([font-alias], [1.0.4], + [font-alias]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) - AM_MAINTAINER_MODE -# Require xorg-macros: XORG_DEFAULT_OPTIONS m4_ifndef([XORG_MACROS_VERSION], @@ -29,4 +39,4 @@ diff -uNr font-alias-1.0.3.orig//configure.ac font-alias-1.0.3/configure.ac +XORG_INSTALL AC_PROG_INSTALL - XORG_FONTROOTDIR + # Require X.Org's font util macros 1.2 or later diff --git a/meta/recipes-graphics/xorg-font/font-alias_1.0.3.bb b/meta/recipes-graphics/xorg-font/font-alias_1.0.4.bb index 15e101596a..e4b70c69dc 100644 --- a/meta/recipes-graphics/xorg-font/font-alias_1.0.3.bb +++ b/meta/recipes-graphics/xorg-font/font-alias_1.0.4.bb @@ -4,10 +4,11 @@ require xorg-font-common.inc LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=bf0158b89be493d523d69d9f29265038 \ - file://cyrillic/fonts.alias;md5=f40795b0640d6785826aecd3b16f6124 \ + file://cyrillic/fonts.alias;md5=d27bc65a2655cacdbc2644b51c064c20 \ file://75dpi/fonts.alias;md5=6bc48023f2ae7f3bfc105db7b0ee6b49 \ - file://misc/fonts.alias;md5=a8ec05d528431d4c9703b55a7efd67a8 \ - file://100dpi/fonts.alias;md5=85bebd6ca213aa656c301a72eb4397cb" + file://misc/fonts.alias;md5=1bdafa7c31aa54f87f3531f2ef8ed5a6 \ + file://100dpi/fonts.alias;md5=85bebd6ca213aa656c301a72eb4397cb \ + " SRC_URI += "file://nocompiler.patch" @@ -18,7 +19,5 @@ RDEPENDS_${PN}_class-native = "font-util-native" inherit allarch PE = "1" -PR = "${INC_PR}.3" -SRC_URI[md5sum] = "6d25f64796fef34b53b439c2e9efa562" -SRC_URI[sha256sum] = "8b453b2aae1cfa8090009ca037037b8c5e333550651d5a158b7264ce1d472c9a" +SRC_URI[sha256sum] = "f3111ae8bf2e980f5f56af400e8eefe5fc9f4207f4a412ea79637fd66c945276" diff --git a/meta/recipes-graphics/xorg-font/xorg-font-common.inc b/meta/recipes-graphics/xorg-font/xorg-font-common.inc index cdbebcf788..7ca5c76a66 100644 --- a/meta/recipes-graphics/xorg-font/xorg-font-common.inc +++ b/meta/recipes-graphics/xorg-font/xorg-font-common.inc @@ -8,13 +8,11 @@ DEPENDS = " encodings font-alias font-util-native" RDEPENDS_${PN} = "encodings font-util font-alias" XORG_PN = "${BPN}" -INC_PR = "r2" - SRC_URI = "${XORG_MIRROR}/individual/font/${XORG_PN}-${PV}.tar.bz2" S = "${WORKDIR}/${XORG_PN}-${PV}" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # The mkfontscale-native requires x11 in DISTRO_FEATURES REQUIRED_DISTRO_FEATURES = "x11" diff --git a/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb b/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb index 9bcd1b2fa6..1ea08a6c99 100644 --- a/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb +++ b/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb @@ -13,7 +13,7 @@ SRC_URI = "file://misc" PE = "1" PR = "r2" -inherit allarch distro_features_check +inherit allarch features_check # The font-alias requires x11 in DISTRO_FEATURES REQUIRED_DISTRO_FEATURES = "x11" diff --git a/meta/recipes-graphics/xorg-lib/files/libx11-whitespace.patch b/meta/recipes-graphics/xorg-lib/files/libx11-whitespace.patch new file mode 100644 index 0000000000..3f97143082 --- /dev/null +++ b/meta/recipes-graphics/xorg-lib/files/libx11-whitespace.patch @@ -0,0 +1,56 @@ +Upstream-Status: Submitted [https://gitlab.freedesktop.org/xorg/lib/libx11/merge_requests/33] +Signed-off-by: Ross Burton <ross.burton@intel.com> + +From b41469c5f08b1f3365667ff3c430b104c9b8e25f Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross.burton@intel.com> +Date: Wed, 22 Jan 2020 17:11:23 +0000 +Subject: [PATCH libX11] cpprules.in: squash whitespace in generated files + +CPP is used to generate files, but as cpp reads files from the build host the +output has a number of blank lines at the beginning which varies depending on +what GCC and friends is used. + +Pathalogical example: + + $ cpp -undef -traditional /dev/null + # 1 "/dev/null" + # 1 "<built-in>" + # 1 "<command-line>" + # 31 "<command-line>" + # 1 "/usr/include/stdc-predef.h" 1 3 4 + + # 17 "/usr/include/stdc-predef.h" 3 4 + + [ 40 blank line ] + + # 32 "<command-line>" 2 + # 1 "/dev/null" + +So depending on the content of stdc-predef.h and what other headers CPP will +load, the amount of whitespace in the generates files varies. This can result in +differences in reproducible environments, and file conflicts in multilib +environments. + +As whitespace is irrelevant to these machine-readable files, extend the sed to +just delete blank lines. +--- + cpprules.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/cpprules.in b/cpprules.in +index 03d6701e..ce6b3c98 100644 +--- a/cpprules.in ++++ b/cpprules.in +@@ -23,7 +23,8 @@ CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ + -e '/^[ ]*XHASH/s/XHASH/\#/' \ + -e 's,X11_LOCALEDATADIR,$(X11_LOCALEDATADIR),g' \ +- -e '/\@\@$$/s/\@\@$$/\\/' ++ -e '/\@\@$$/s/\@\@$$/\\/' \ ++ -e '/^$$/d' + + .pre: + @$(MKDIR_P) $(@D) +-- +2.20.1 + diff --git a/meta/recipes-graphics/xorg-lib/libx11-compose-data_1.6.8.bb b/meta/recipes-graphics/xorg-lib/libx11-compose-data_1.6.8.bb index cabb84e686..3d97ad78d2 100644 --- a/meta/recipes-graphics/xorg-lib/libx11-compose-data_1.6.8.bb +++ b/meta/recipes-graphics/xorg-lib/libx11-compose-data_1.6.8.bb @@ -14,7 +14,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=172255dee66bb0151435b2d5d709fcf7" SRC_URI[md5sum] = "c5fa5a86a20e3591bed6c046498d4b8f" SRC_URI[sha256sum] = "b289a845c189e251e0e884cc0f9269bbe97c238df3741e854ec4c17c21e473d5" -SRC_URI += "file://0001-Drop-x11-dependencies.patch" +SRC_URI += "file://0001-Drop-x11-dependencies.patch \ + file://libx11-whitespace.patch" XORG_PN = "libX11" diff --git a/meta/recipes-graphics/xorg-lib/libx11/no-host-libtool.patch b/meta/recipes-graphics/xorg-lib/libx11/no-host-libtool.patch deleted file mode 100644 index 56d9983b13..0000000000 --- a/meta/recipes-graphics/xorg-lib/libx11/no-host-libtool.patch +++ /dev/null @@ -1,45 +0,0 @@ -Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/lib/libx11/merge_requests/22] -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From edc7680ed5a03cedb5facf14693823455e12c29c Mon Sep 17 00:00:00 2001 -From: Ross Burton <ross.burton@intel.com> -Date: Tue, 6 Aug 2019 14:53:43 +0100 -Subject: [PATCH libX11] src/util/Makefile: explicitly reset LINK to not use - libtool - -Simply looking at libtool redefines LINK globally to use libtool, which when -you're trying to cross-compile to Windows can cause complications. - -As in src/util/ we're simply building a small binary for the build host, reset -LINK to the automake default so that the traditional compile/link steps occur -without libtool. - -Also remove -all-static from LDFLAGS as that is a libtool-specific argument -intended to solve this problem. - -Closes: #100 -Signed-off-by: Ross Burton <ross.burton@intel.com> ---- - src/util/Makefile.am | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/util/Makefile.am b/src/util/Makefile.am -index 37314370..b7236530 100644 ---- a/src/util/Makefile.am -+++ b/src/util/Makefile.am -@@ -7,10 +7,11 @@ AM_CFLAGS = \ - AM_CPPFLAGS = \ - -I$(top_srcdir)/include - -+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ - CC = @CC_FOR_BUILD@ - CPPFLAGS = @CPPFLAGS_FOR_BUILD@ - CFLAGS = @CFLAGS_FOR_BUILD@ --LDFLAGS = @LDFLAGS_FOR_BUILD@ -all-static -+LDFLAGS = @LDFLAGS_FOR_BUILD@ - LIBS = - EXEEXT = @EXEEXT_FOR_BUILD@ - --- -2.20.1 - diff --git a/meta/recipes-graphics/xorg-lib/libx11/no-host-x.patch b/meta/recipes-graphics/xorg-lib/libx11/no-host-x.patch deleted file mode 100644 index 803f8b408c..0000000000 --- a/meta/recipes-graphics/xorg-lib/libx11/no-host-x.patch +++ /dev/null @@ -1,40 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From cf2ef27831173c5ed6f98be3c39caff18fd4e7f1 Mon Sep 17 00:00:00 2001 -From: Adam Jackson <ajax@redhat.com> -Date: Mon, 17 Jun 2019 13:36:08 -0400 -Subject: [PATCH 1/2] makekeys: Detach ourselves from X headers entirely - -Subsequent to a121b7b0c210efe10bf93453b29050282324c906 we are no longer -building makekeys with enough -I/foo/bar to find the X11 headers, so if -they're not in a system include path, things fail. Since this utility is -only needed at build time, there's no real reason to demand the X -headers be installed for both the build and target machines if cross- -compiling, we can just assume a vaguely ANSI environment instead. - -Tested-by: Niclas Zeising <zeising@daemonic.se> -Reviewed-by: Keith Packard <keithp@keithp.com> -Reviewed-by: Matt Turner <mattst88@gmail.com> ---- - src/util/makekeys.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/util/makekeys.c b/src/util/makekeys.c -index bcb5b7d5..07563315 100644 ---- a/src/util/makekeys.c -+++ b/src/util/makekeys.c -@@ -35,8 +35,10 @@ from The Open Group. - #include <stdio.h> - #include <stdlib.h> - #include <string.h> -+#include <stdint.h> -+#include <inttypes.h> - --#include "../Xresinternal.h" -+typedef uint32_t Signature; - - #define KTNUM 4000 - --- -2.20.1 diff --git a/meta/recipes-graphics/xorg-lib/libx11.inc b/meta/recipes-graphics/xorg-lib/libx11_1.6.12.bb index cce0cb9929..de7f1c366e 100644 --- a/meta/recipes-graphics/xorg-lib/libx11.inc +++ b/meta/recipes-graphics/xorg-lib/libx11_1.6.12.bb @@ -11,11 +11,10 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/libx11:" PE = "1" SRC_URI += "file://Fix-hanging-issue-in-_XReply.patch \ - file://no-host-libtool.patch \ - file://no-host-x.patch" + file://disable_tests.patch \ + file://libx11-whitespace.patch" -SRC_URI[md5sum] = "c5fa5a86a20e3591bed6c046498d4b8f" -SRC_URI[sha256sum] = "b289a845c189e251e0e884cc0f9269bbe97c238df3741e854ec4c17c21e473d5" +SRC_URI[sha256sum] = "f108227469419ac04d196df0f3b80ce1f7f65059bb54c0de811f4d8e03fd6ec7" PROVIDES = "virtual/libx11" @@ -37,6 +36,10 @@ CPPFLAGS_FOR_BUILD += "-D_GNU_SOURCE" PACKAGES =+ "${PN}-xcb" +inherit gettext + FILES_${PN} += "${datadir}/X11/XKeysymDB ${datadir}/X11/XErrorDB ${datadir}/X11/Xcms.txt" FILES_${PN}-xcb += "${libdir}/libX11-xcb.so.*" FILES_${PN}-locale += "${datadir}/X11/locale ${libdir}/X11/locale" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-graphics/xorg-lib/libx11_1.6.8.bb b/meta/recipes-graphics/xorg-lib/libx11_1.6.8.bb deleted file mode 100644 index 0d27bc2bce..0000000000 --- a/meta/recipes-graphics/xorg-lib/libx11_1.6.8.bb +++ /dev/null @@ -1,7 +0,0 @@ -require libx11.inc - -SRC_URI += "file://disable_tests.patch" - -inherit gettext - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-graphics/xorg-lib/libxcb/xcbincludedir.patch b/meta/recipes-graphics/xorg-lib/libxcb/xcbincludedir.patch deleted file mode 100644 index 46297c33c3..0000000000 --- a/meta/recipes-graphics/xorg-lib/libxcb/xcbincludedir.patch +++ /dev/null @@ -1,28 +0,0 @@ -As pkg-config --variable doesn't respect the sysroot, add the pkg-config sysroot -to the beginning of variables that are used later on the host. - -Upstream-Status: Pending -Signed-off-by: Ross Burton <ross.burton@intel.com> - -diff --git a/configure.ac b/configure.ac -index 94da4f7..d29cd6a 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -64,7 +64,7 @@ AC_SUBST(NEEDED) - - # Find the xcb-proto protocol descriptions - AC_MSG_CHECKING(XCBPROTO_XCBINCLUDEDIR) --XCBPROTO_XCBINCLUDEDIR=`$PKG_CONFIG --variable=xcbincludedir xcb-proto` -+XCBPROTO_XCBINCLUDEDIR=$PKG_CONFIG_SYSROOT_DIR/`$PKG_CONFIG --variable=xcbincludedir xcb-proto` - AC_MSG_RESULT($XCBPROTO_XCBINCLUDEDIR) - AC_SUBST(XCBPROTO_XCBINCLUDEDIR) - -@@ -74,7 +74,7 @@ AC_SUBST(XCBPROTO_VERSION) - - # Find the xcbgen Python package - AC_MSG_CHECKING(XCBPROTO_XCBPYTHONDIR) --XCBPROTO_XCBPYTHONDIR=`$PKG_CONFIG --variable=pythondir xcb-proto` -+XCBPROTO_XCBPYTHONDIR=$PKG_CONFIG_SYSROOT_DIR/`$PKG_CONFIG --variable=pythondir xcb-proto` - AC_MSG_RESULT($XCBPROTO_XCBPYTHONDIR) - AC_SUBST(XCBPROTO_XCBPYTHONDIR) - diff --git a/meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb b/meta/recipes-graphics/xorg-lib/libxcb_1.14.bb index b0afc01dfd..f27c5daa61 100644 --- a/meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb +++ b/meta/recipes-graphics/xorg-lib/libxcb_1.14.bb @@ -9,13 +9,11 @@ SECTION = "x11/libs" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7" -SRC_URI = "http://xcb.freedesktop.org/dist/libxcb-${PV}.tar.bz2 \ - file://xcbincludedir.patch \ +SRC_URI = "http://xcb.freedesktop.org/dist/libxcb-${PV}.tar.xz \ file://disable-check.patch \ " -SRC_URI[md5sum] = "f33cdfc67346f7217a9326c0d8679975" -SRC_URI[sha256sum] = "a89fb7af7a11f43d2ce84a844a4b38df688c092bf4b67683aef179cdf2a647c4" +SRC_URI[sha256sum] = "a55ed6db98d43469801262d81dc2572ed124edc3db31059d4e9916eb9f844c34" BBCLASSEXTEND = "native nativesdk" @@ -25,7 +23,7 @@ PACKAGES_DYNAMIC = "^libxcb-.*" FILES_${PN} = "${libdir}/libxcb.so.*" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # The libxau and others requires x11 in DISTRO_FEATURES REQUIRED_DISTRO_FEATURES = "x11" diff --git a/meta/recipes-graphics/xorg-lib/libxfont2_2.0.3.bb b/meta/recipes-graphics/xorg-lib/libxfont2_2.0.4.bb index 6994d79e89..1c9cc0a21d 100644 --- a/meta/recipes-graphics/xorg-lib/libxfont2_2.0.3.bb +++ b/meta/recipes-graphics/xorg-lib/libxfont2_2.0.4.bb @@ -15,8 +15,8 @@ XORG_PN = "libXfont2" BBCLASSEXTEND = "native" -SRC_URI[md5sum] = "b7ca87dfafeb5205b28a1e91ac3efe85" -SRC_URI[sha256sum] = "0e8ab7fd737ccdfe87e1f02b55f221f0bd4503a1c5f28be4ed6a54586bac9c4e" +SRC_URI[md5sum] = "00516bed7ec1453d56974560379fff2f" +SRC_URI[sha256sum] = "6d151b3368e5035efede4b6264c0fdc6662c1c99dbc2de425e3480cababc69e6" PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," diff --git a/meta/recipes-graphics/xorg-lib/libxkbcommon_0.8.4.bb b/meta/recipes-graphics/xorg-lib/libxkbcommon_0.10.0.bb index 0608fd5af8..16d9c36eae 100644 --- a/meta/recipes-graphics/xorg-lib/libxkbcommon_0.8.4.bb +++ b/meta/recipes-graphics/xorg-lib/libxkbcommon_0.10.0.bb @@ -9,17 +9,18 @@ DEPENDS = "util-macros flex-native bison-native" SRC_URI = "http://xkbcommon.org/download/${BPN}-${PV}.tar.xz" -SRC_URI[md5sum] = "3c4409058dfd203f641a563358e0187d" -SRC_URI[sha256sum] = "60ddcff932b7fd352752d51a5c4f04f3d0403230a584df9a2e0d5ed87c486c8b" +SRC_URI[md5sum] = "2d9ad3a46b317138b5e72a91cf105451" +SRC_URI[sha256sum] = "57c3630cdc38fb4734cd57fa349e92244f5ae3862813e533cedbd86721a0b6f2" UPSTREAM_CHECK_URI = "http://xkbcommon.org/" -inherit autotools pkgconfig +inherit meson pkgconfig -EXTRA_OECONF = "--disable-docs" +EXTRA_OEMESON = "-Denable-docs=false" -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" -PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxcb xkeyboard-config," +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'x11 wayland', d)}" +PACKAGECONFIG[x11] = "-Denable-x11=true,-Denable-x11=false,libxcb xkeyboard-config," +PACKAGECONFIG[wayland] = "-Denable-wayland=true,-Denable-wayland=false,wayland-native wayland wayland-protocols," # Fix a following runtime error: # xkbcommon: ERROR: couldn't find a Compose file for locale "C" diff --git a/meta/recipes-graphics/xorg-lib/libxpm_3.5.12.bb b/meta/recipes-graphics/xorg-lib/libxpm_3.5.13.bb index 57b202cae3..fda8e32d2c 100644 --- a/meta/recipes-graphics/xorg-lib/libxpm_3.5.12.bb +++ b/meta/recipes-graphics/xorg-lib/libxpm_3.5.13.bb @@ -10,7 +10,7 @@ pixmap format, which is commonly used in legacy X applications. XPM is \ an extension of the monochrome XBM bitmap specificied in the X \ protocol." -LICENSE = "BSD" +LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=51f4270b012ecd4ab1a164f5f4ed6cf7" DEPENDS += "libxext libsm libxt gettext-native" PE = "1" @@ -21,7 +21,7 @@ PACKAGES =+ "sxpm cxpm" FILES_cxpm = "${bindir}/cxpm" FILES_sxpm = "${bindir}/sxpm" -SRC_URI[md5sum] = "20f4627672edb2bd06a749f11aa97302" -SRC_URI[sha256sum] = "fd6a6de3da48de8d1bb738ab6be4ad67f7cb0986c39bd3f7d51dd24f7854bdec" +SRC_URI[md5sum] = "6f0ecf8d103d528cfc803aa475137afa" +SRC_URI[sha256sum] = "9cd1da57588b6cb71450eff2273ef6b657537a9ac4d02d0014228845b935ac25" BBCLASSEXTEND = "native" diff --git a/meta/recipes-graphics/xorg-lib/libxshmfence_1.3.bb b/meta/recipes-graphics/xorg-lib/libxshmfence_1.3.bb index 85a48e4c58..cc45696530 100644 --- a/meta/recipes-graphics/xorg-lib/libxshmfence_1.3.bb +++ b/meta/recipes-graphics/xorg-lib/libxshmfence_1.3.bb @@ -11,6 +11,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=47e508ca280fde97906eacb77892c3ac" DEPENDS += "virtual/libx11" +EXTRA_OECONF += "--with-shared-memory-dir=/dev/shm" + BBCLASSEXTEND = "native nativesdk" SRC_URI[md5sum] = "42dda8016943dc12aff2c03a036e0937" diff --git a/meta/recipes-graphics/xorg-lib/libxt_1.2.0.bb b/meta/recipes-graphics/xorg-lib/libxt_1.2.0.bb index 42df435052..54384521c8 100644 --- a/meta/recipes-graphics/xorg-lib/libxt_1.2.0.bb +++ b/meta/recipes-graphics/xorg-lib/libxt_1.2.0.bb @@ -22,8 +22,8 @@ PE = "1" XORG_PN = "libXt" -SRC_URI += "file://libxt_fix_for_x32.patch \ - " +SRC_URI += "file://libxt_fix_for_x32.patch" + SRC_URI[md5sum] = "a9019421d3ee8b4937b6afd9025f018a" SRC_URI[sha256sum] = "b31df531dabed9f4611fc8980bc51d7782967e2aff44c4105251a1acb5a77831" diff --git a/meta/recipes-graphics/xorg-lib/libxvmc_1.0.11.bb b/meta/recipes-graphics/xorg-lib/libxvmc_1.0.12.bb index d95f809ed6..29ed0c43d1 100644 --- a/meta/recipes-graphics/xorg-lib/libxvmc_1.0.11.bb +++ b/meta/recipes-graphics/xorg-lib/libxvmc_1.0.12.bb @@ -15,5 +15,5 @@ PE = "1" XORG_PN = "libXvMC" -SRC_URI[md5sum] = "707175185a2e0490b8173686c657324f" -SRC_URI[sha256sum] = "4a2e34d444a683a7c010b01b23cefe2b8043a063ce4dc6a9b855836b5262622d" +SRC_URI[md5sum] = "3569ff7f3e26864d986d6a21147eaa58" +SRC_URI[sha256sum] = "6b3da7977b3f7eaf4f0ac6470ab1e562298d82c4e79077765787963ab7966dcd" diff --git a/meta/recipes-graphics/xorg-lib/libxxf86vm_1.1.4.bb b/meta/recipes-graphics/xorg-lib/libxxf86vm_1.1.4.bb index 95fc0b642c..1612a50f19 100644 --- a/meta/recipes-graphics/xorg-lib/libxxf86vm_1.1.4.bb +++ b/meta/recipes-graphics/xorg-lib/libxxf86vm_1.1.4.bb @@ -18,3 +18,5 @@ XORG_PN = "libXxf86vm" SRC_URI[md5sum] = "298b8fff82df17304dfdb5fe4066fe3a" SRC_URI[sha256sum] = "afee27f93c5f31c0ad582852c0fb36d50e4de7cd585fcf655e278a633d85cd57" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-graphics/xorg-lib/pixman/0001-test-utils-Check-for-FE_INVALID-definition-before-us.patch b/meta/recipes-graphics/xorg-lib/pixman/0001-test-utils-Check-for-FE_INVALID-definition-before-us.patch deleted file mode 100644 index 782c1db022..0000000000 --- a/meta/recipes-graphics/xorg-lib/pixman/0001-test-utils-Check-for-FE_INVALID-definition-before-us.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0ccd906b904d21536d5ab41c6196760e3e5d72cb Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 17 May 2016 17:30:00 -0700 -Subject: [PATCH] test/utils: Check for FE_INVALID definition before use - -Some architectures e.g. nios2 do not support all exceptions - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Submitted - - test/utils.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/test/utils.c b/test/utils.c -index f8e42a5..fe32b1e 100644 ---- a/test/utils.c -+++ b/test/utils.c -@@ -978,9 +978,11 @@ enable_invalid_exceptions (void) - { - #ifdef HAVE_FENV_H - #ifdef HAVE_FEENABLEEXCEPT -+#ifdef FE_INVALID - feenableexcept (FE_INVALID); - #endif - #endif -+#endif - } - - void * --- -2.8.2 - diff --git a/meta/recipes-graphics/xorg-lib/pixman_0.38.4.bb b/meta/recipes-graphics/xorg-lib/pixman_0.40.0.bb index 82c2e73e50..5a3bb22ec3 100644 --- a/meta/recipes-graphics/xorg-lib/pixman_0.38.4.bb +++ b/meta/recipes-graphics/xorg-lib/pixman_0.40.0.bb @@ -1,40 +1,35 @@ SUMMARY = "Pixman: Pixel Manipulation library" - DESCRIPTION = "Pixman provides a library for manipulating pixel regions \ -- a set of Y-X banded rectangles, image compositing using the \ Porter/Duff model and implicit mask generation for geometric primitives \ including trapezoids, triangles, and rectangles." +HOMEPAGE = "http://www.pixman.org" +SECTION = "x11/libs" +DEPENDS = "zlib" -require xorg-lib-common.inc +SRC_URI = "https://www.cairographics.org/releases/${BP}.tar.gz \ + file://0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch \ + " +SRC_URI[md5sum] = "73858c0862dd9896fb5f62ae267084a4" +SRC_URI[sha256sum] = "6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc" # see http://cairographics.org/releases/ - only even minor versions are stable UPSTREAM_CHECK_REGEX = "pixman-(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)" +PE = "1" + LICENSE = "MIT & MIT-style & PD" LIC_FILES_CHKSUM = "file://COPYING;md5=14096c769ae0cbb5fcb94ec468be11b3 \ file://pixman/pixman-matrix.c;endline=21;md5=4a018dff3e4e25302724c88ff95c2456 \ file://pixman/pixman-arm-neon-asm.h;endline=24;md5=9a9cc1e51abbf1da58f4d9528ec9d49b \ " -DEPENDS += "zlib libpng" -BBCLASSEXTEND = "native nativesdk" -PE = "1" +inherit meson pkgconfig -IWMMXT = "--disable-arm-iwmmxt" -LOONGSON_MMI = "--disable-loongson-mmi" -# If target supports neon then disable the 'simd' (ie VFPv2) fallback, otherwise disable neon. -NEON = "${@bb.utils.contains("TUNE_FEATURES", "neon", "--disable-arm-simd", "--disable-arm-neon" ,d)}" +# These are for the tests and demos, which we don't install +EXTRA_OEMESON = "-Dgtk=disabled -Dlibpng=disabled" +# ld: pixman/libpixman-mmx.a(pixman-mmx.c.o): +# linking mips:loongson_2f module with previous mips:isa64 modules +EXTRA_OEMESON += "-Dloongson-mmi=disabled" -EXTRA_OECONF = "--disable-gtk ${IWMMXT} ${LOONGSON_MMI} ${NEON}" -EXTRA_OECONF_class-native = "--disable-gtk" -EXTRA_OECONF_class-nativesdk = "--disable-gtk" - -SRC_URI += "\ - file://0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch \ - file://0001-test-utils-Check-for-FE_INVALID-definition-before-us.patch \ -" - -SRC_URI[md5sum] = "16a350a8a40116ddf67632a1d2623711" -SRC_URI[sha256sum] = "84abb7fa2541af24d9c3b34bf75d6ac60cc94ac4410061bbb295b66a29221550" - -REQUIRED_DISTRO_FEATURES = "" +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-graphics/xorg-lib/xcb-util.inc b/meta/recipes-graphics/xorg-lib/xcb-util.inc index 99d04f9d44..0e5ab70b2d 100644 --- a/meta/recipes-graphics/xorg-lib/xcb-util.inc +++ b/meta/recipes-graphics/xorg-lib/xcb-util.inc @@ -18,6 +18,6 @@ DEPENDS += "gperf-native" SRC_URI = "http://xcb.freedesktop.org/dist/${BPN}-${PV}.tar.bz2" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check REQUIRED_DISTRO_FEATURES = "x11" diff --git a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.27.bb b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.30.bb index 02156ad75b..a4d67cd2ce 100644 --- a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.27.bb +++ b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.30.bb @@ -13,8 +13,7 @@ LICENSE = "MIT & MIT-style" LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9" SRC_URI = "${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-${PV}.tar.bz2" -SRC_URI[md5sum] = "316753e35d3906d042c74230612eab9f" -SRC_URI[sha256sum] = "690daec8fea63526c07620c90e6f3f10aae34e94b6db6e30906173480721901f" +SRC_URI[sha256sum] = "095a524f7b633ed257617202d06c9c71fe020c8897b106cf0dcdd0c6e8b797d4" SECTION = "x11/libs" DEPENDS = "util-macros libxslt-native" diff --git a/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc b/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc index 09df0109cb..a566eaa45e 100644 --- a/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc +++ b/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc @@ -11,7 +11,7 @@ SRC_URI = "${XORG_MIRROR}/individual/lib/${XORG_PN}-${PV}.tar.bz2" S = "${WORKDIR}/${XORG_PN}-${PV}" -inherit autotools distro_features_check pkgconfig +inherit autotools features_check pkgconfig EXTRA_OECONF = "--disable-specs --without-groff --without-ps2pdf --without-fop" diff --git a/meta/recipes-graphics/xorg-proto/xcb-proto_1.13.bb b/meta/recipes-graphics/xorg-proto/xcb-proto_1.14.bb index 7467090920..6de30098d6 100644 --- a/meta/recipes-graphics/xorg-proto/xcb-proto_1.13.bb +++ b/meta/recipes-graphics/xorg-proto/xcb-proto_1.14.bb @@ -11,9 +11,8 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7 \ file://src/dri2.xml;beginline=2;endline=28;md5=f8763b13ff432e8597e0d610cf598e65" -SRC_URI = "http://xcb.freedesktop.org/dist/${BP}.tar.bz2" -SRC_URI[md5sum] = "abe9aa4886138150bbc04ae4f29b90e3" -SRC_URI[sha256sum] = "7b98721e669be80284e9bbfeab02d2d0d54cd11172b72271e47a2fe875e2bde1" +SRC_URI = "http://xcb.freedesktop.org/dist/${BP}.tar.xz" +SRC_URI[sha256sum] = "186a3ceb26f9b4a015f5a44dcc814c93033a5fc39684f36f1ecc79834416a605" inherit autotools pkgconfig python3native diff --git a/meta/recipes-graphics/xorg-proto/xorg-proto-common.inc b/meta/recipes-graphics/xorg-proto/xorg-proto-common.inc deleted file mode 100644 index 7a417c9742..0000000000 --- a/meta/recipes-graphics/xorg-proto/xorg-proto-common.inc +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "X protocol headers: ${XORG_PN}" -HOMEPAGE = "http://www.x.org" -BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=xorg" - -SECTION = "x11/libs" -LICENSE = "MIT-X" - -XORG_PN = "${BPN}" - -SRC_URI = "${XORG_MIRROR}/individual/proto/${XORG_PN}-${PV}.tar.bz2" - -S = "${WORKDIR}/${XORG_PN}-${PV}" - -DEPENDS = "util-macros" - -inherit autotools pkgconfig -EXTRA_OECONF = "--without-fop" - -UNKNOWN_CONFIGURE_WHITELIST += "--without-fop --without-xmlto --with-xmlto" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" - -# ${PN} is empty so we need to tweak -dev and -dbg package dependencies -RDEPENDS_${PN}-dev = "" -RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" diff --git a/meta/recipes-graphics/xorg-proto/xorgproto_2019.1.bb b/meta/recipes-graphics/xorg-proto/xorgproto_2019.1.bb deleted file mode 100644 index 2c7ce2a56c..0000000000 --- a/meta/recipes-graphics/xorg-proto/xorgproto_2019.1.bb +++ /dev/null @@ -1,14 +0,0 @@ -require xorg-proto-common.inc - -SUMMARY = "XCalibrate: Touchscreen calibration headers" - -DESCRIPTION = "This package provides the headers and specification documents defining \ -the core protocol and (many) extensions for the X Window System" - -LICENSE = "MIT-style" -LIC_FILES_CHKSUM = "file://COPYING-x11proto;md5=b9e051107d5628966739a0b2e9b32676" - -SRC_URI[md5sum] = "802ccb9e977ba3cf94ba798ddb2898a4" -SRC_URI[sha256sum] = "a6daaa7a6cbc8e374032d83ff7f47d41be98f1e0f4475d66a4da3aa766a0d49b" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-graphics/xorg-proto/xorgproto_2020.1.bb b/meta/recipes-graphics/xorg-proto/xorgproto_2020.1.bb new file mode 100644 index 0000000000..c71bc9038f --- /dev/null +++ b/meta/recipes-graphics/xorg-proto/xorgproto_2020.1.bb @@ -0,0 +1,27 @@ + +SUMMARY = "X Window System unified protocol definitions" +DESCRIPTION = "This package provides the headers and specification documents defining \ +the core protocol and (many) extensions for the X Window System" +HOMEPAGE = "http://www.x.org" +BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=xorg" + +SECTION = "x11/libs" +LICENSE = "MIT-style" +LIC_FILES_CHKSUM = "file://COPYING-x11proto;md5=b9e051107d5628966739a0b2e9b32676" + +SRC_URI = "${XORG_MIRROR}/individual/proto/${BP}.tar.bz2" +SRC_URI[md5sum] = "c29f4fa78f53b52b3efdc71ebd9506b6" +SRC_URI[sha256sum] = "54a153f139035a376c075845dd058049177212da94d7a9707cf9468367b699d2" + +inherit meson + +PACKAGECONFIG ??= "" +PACKAGECONFIG[legacy] = "-Dlegacy=true,-Dlegacy=false" + +# Datadir only used to install pc files, $datadir/pkgconfig +datadir="${libdir}" +# ${PN} is empty so we need to tweak -dev and -dbg package dependencies +RDEPENDS_${PN}-dev = "" +RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips/xorg.conf b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips/xorg.conf deleted file mode 100644 index 1d3c64f620..0000000000 --- a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips/xorg.conf +++ /dev/null @@ -1,39 +0,0 @@ - -Section "Files" -EndSection - -Section "Device" - Identifier "Graphics Controller" - Driver "fbdev" -EndSection - -Section "Monitor" - Identifier "Generic Monitor" - Option "DPMS" - # 1024x600 59.85 Hz (CVT) hsync: 37.35 kHz; pclk: 49.00 MHz - Modeline "1024x600_60.00" 49.00 1024 1072 1168 1312 600 603 613 624 -hsync +vsync - # 640x480 @ 60Hz (Industry standard) hsync: 31.5kHz - ModeLine "640x480" 25.2 640 656 752 800 480 490 492 525 -hsync -vsync - # 640x480 @ 72Hz (VESA) hsync: 37.9kHz - ModeLine "640x480" 31.5 640 664 704 832 480 489 491 520 -hsync -vsync - # 640x480 @ 75Hz (VESA) hsync: 37.5kHz - ModeLine "640x480" 31.5 640 656 720 840 480 481 484 500 -hsync -vsync - # 640x480 @ 85Hz (VESA) hsync: 43.3kHz - ModeLine "640x480" 36.0 640 696 752 832 480 481 484 509 -hsync -vsync -EndSection - -Section "Screen" - Identifier "Default Screen" - Device "Graphics Controller" - Monitor "Generic Monitor" - DefaultDepth 16 - SubSection "Display" - Modes "640x480" - EndSubSection -EndSection - -Section "ServerLayout" - Identifier "Default Layout" - Screen "Default Screen" - Option "AllowEmptyInput" "no" -EndSection diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips64/xorg.conf b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips64/xorg.conf deleted file mode 100644 index 03b94dc3af..0000000000 --- a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips64/xorg.conf +++ /dev/null @@ -1,39 +0,0 @@ - -Section "Files" -EndSection - -Section "Device" - Identifier "Graphics Controller" - Driver "fbdev" -EndSection - -Section "Monitor" - Identifier "Generic Monitor" - Option "DPMS" - # 1024x600 59.85 Hz (CVT) hsync: 37.35 kHz; pclk: 49.00 MHz - Modeline "1024x600_60.00" 49.00 1024 1072 1168 1312 600 603 613 624 -hsync +vsync - # 640x480 @ 60Hz (Industry standard) hsync: 31.5kHz - ModeLine "640x480" 25.2 640 656 752 800 480 490 492 525 -hsync -vsync - # 640x480 @ 72Hz (VESA) hsync: 37.9kHz - ModeLine "640x480" 31.5 640 664 704 832 480 489 491 520 -hsync -vsync - # 640x480 @ 75Hz (VESA) hsync: 37.5kHz - ModeLine "640x480" 31.5 640 656 720 840 480 481 484 500 -hsync -vsync - # 640x480 @ 85Hz (VESA) hsync: 43.3kHz - ModeLine "640x480" 36.0 640 696 752 832 480 481 484 509 -hsync -vsync -EndSection - -Section "Screen" - Identifier "Default Screen" - Device "Graphics Controller" - Monitor "Generic Monitor" - DefaultDepth 16 - SubSection "Display" - Modes "640x480" - EndSubSection -EndSection - -Section "ServerLayout" - Identifier "Default Layout" - Screen "Default Screen" - Option "AllowEmptyInput" "no" -EndSection diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc b/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc index 44315f59dc..b3e03744c0 100644 --- a/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc @@ -13,7 +13,6 @@ PROVIDES = "virtual/xserver-xf86" PROVIDES += "virtual/xserver" PE = "2" -INC_PR = "r8" XORG_PN = "xorg-server" SRC_URI = "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${PV}.tar.bz2" @@ -24,7 +23,7 @@ S = "${WORKDIR}/${XORG_PN}-${PV}" inherit autotools pkgconfig -inherit distro_features_check +inherit features_check REQUIRED_DISTRO_FEATURES = "x11" LIB_DEPS = "pixman libxfont2 xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess" @@ -117,6 +116,7 @@ EXTRA_OECONF += "--with-fop=no \ --sysconfdir=/etc/X11 \ --localstatedir=/var \ --with-xkb-output=/var/lib/xkb \ + --with-os-name=Linux \ " OPENGL_PKGCONFIGS = "dri glx glamor dri3 xshmfence" @@ -151,6 +151,7 @@ PACKAGECONFIG[gcrypt] = "--with-sha1=libgcrypt,,libgcrypt" do_install_append () { # Its assumed base-files creates this for us rmdir ${D}${localstatedir}/log/ + sed -i -e 's,${libdir}/xorg/modules,${prefix}/lib*/xorg/modules,' ${D}${mandir}/man5/xorg.conf.5 } # Add runtime provides for the ABI versions of the video and input subsystems, diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-Avoid-duplicate-definitions-of-IOPortBase.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-Avoid-duplicate-definitions-of-IOPortBase.patch new file mode 100644 index 0000000000..4737040675 --- /dev/null +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-Avoid-duplicate-definitions-of-IOPortBase.patch @@ -0,0 +1,45 @@ +From fc04acfd948ac99d04a5dc08c78f3b13bc0c5c41 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 17 Aug 2020 10:50:51 -0700 +Subject: [PATCH] Avoid duplicate definitions of IOPortBase + +This fixed build with gcc10/-fno-common + +Fixes +compiler.h:528: multiple definition of `IOPortBase'; + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + hw/xfree86/common/compiler.h | 2 +- + hw/xfree86/os-support/linux/lnx_video.c | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h +index 2b2008b..c7d617e 100644 +--- a/hw/xfree86/common/compiler.h ++++ b/hw/xfree86/common/compiler.h +@@ -525,7 +525,7 @@ xf86WriteMmio32Le(__volatile__ void *base, const unsigned long offset, + #define PORT_SIZE short + #endif + +-_X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */ ++extern _X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */ + + static __inline__ void + outb(unsigned PORT_SIZE port, unsigned char val) +diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c +index 04e4509..9dc7316 100644 +--- a/hw/xfree86/os-support/linux/lnx_video.c ++++ b/hw/xfree86/os-support/linux/lnx_video.c +@@ -78,6 +78,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) + /***************************************************************************/ + /* I/O Permissions section */ + /***************************************************************************/ ++_X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */ + + #if defined(__powerpc__) + volatile unsigned char *ioBase = NULL; +-- +2.28.0 + diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch new file mode 100644 index 0000000000..8b687d612d --- /dev/null +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch @@ -0,0 +1,34 @@ +From e50c85f4ebf559a3bac4817b41074c43d4691779 Mon Sep 17 00:00:00 2001 +From: Eric Anholt <eric@anholt.net> +Date: Fri, 26 Oct 2018 17:47:30 -0700 +Subject: [PATCH] Fix segfault on probing a non-PCI platform device on a system + with PCI. + +Some Broadcom set-top-box boards have PCI busses, but the GPU is still +probed through DT. We would dereference a null busid here in that +case. + +Signed-off-by: Eric Anholt <eric@anholt.net> + +Upstream-Status: Backport [https://github.com/freedesktop/xorg-xserver/commit/e50c85f4e] +Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> +--- + hw/xfree86/common/xf86platformBus.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c +index cef47da03..dadbac6c8 100644 +--- a/hw/xfree86/common/xf86platformBus.c ++++ b/hw/xfree86/common/xf86platformBus.c +@@ -289,7 +289,7 @@ xf86platformProbe(void) + for (i = 0; i < xf86_num_platform_devices; i++) { + char *busid = xf86_platform_odev_attributes(i)->busid; + +- if (pci && (strncmp(busid, "pci:", 4) == 0)) { ++ if (pci && busid && (strncmp(busid, "pci:", 4) == 0)) { + platform_find_pci_info(&xf86_platform_devices[i], busid); + } + +-- +2.28.0 + diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-compiler.h-Do-not-include-sys-io.h-on-ARM-with-glibc.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-compiler.h-Do-not-include-sys-io.h-on-ARM-with-glibc.patch deleted file mode 100644 index da9a4f2b25..0000000000 --- a/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-compiler.h-Do-not-include-sys-io.h-on-ARM-with-glibc.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 2ba9510721b7a76cb7fe507449fa0ac997a4cce3 Mon Sep 17 00:00:00 2001 -From: Olivier Fourdan <ofourdan@redhat.com> -Date: Mon, 1 Jul 2019 13:20:39 +0200 -Subject: [PATCH] compiler.h: Do not include sys/io.h on ARM with glibc - -<sys/io.h> on ARM hasn't worked for a long, long time, so it was removed -it from glibc upstream. - -Remove the include to avoid a compilation failure on ARM with glibc. - -Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> -Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/840 -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/commit/fe4cd0e7f5c58fa94db36326aadc1bd4e6d73eba] ---- - hw/xfree86/common/compiler.h | 30 ------------------------------ - 1 file changed, 30 deletions(-) - -diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h -index 7144c6a..2b2008b 100644 ---- a/hw/xfree86/common/compiler.h -+++ b/hw/xfree86/common/compiler.h -@@ -758,36 +758,6 @@ inl(unsigned short port) - return xf86ReadMmio32Le((void *) ioBase, port); - } - --#elif defined(__arm__) && defined(__linux__) -- --/* for Linux on ARM, we use the LIBC inx/outx routines */ --/* note that the appropriate setup via "ioperm" needs to be done */ --/* *before* any inx/outx is done. */ -- --#include <sys/io.h> -- --static __inline__ void --xf_outb(unsigned short port, unsigned char val) --{ -- outb(val, port); --} -- --static __inline__ void --xf_outw(unsigned short port, unsigned short val) --{ -- outw(val, port); --} -- --static __inline__ void --xf_outl(unsigned short port, unsigned int val) --{ -- outl(val, port); --} -- --#define outb xf_outb --#define outw xf_outw --#define outl xf_outl -- - #elif defined(__nds32__) - - /* --- -2.22.0 - diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-drmmode_display.c-add-missing-mi.h-include.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-drmmode_display.c-add-missing-mi.h-include.patch new file mode 100644 index 0000000000..4b8e43f1e4 --- /dev/null +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-drmmode_display.c-add-missing-mi.h-include.patch @@ -0,0 +1,23 @@ +From 84338444179cab7ede1252a11b66e3b8f657e6a4 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Fri, 7 Feb 2020 20:36:45 +0100 +Subject: [PATCH] drmmode_display.c: add missing mi.h include + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + hw/xfree86/drivers/modesetting/drmmode_display.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c +index e18cc37..3445cce 100644 +--- a/hw/xfree86/drivers/modesetting/drmmode_display.c ++++ b/hw/xfree86/drivers/modesetting/drmmode_display.c +@@ -46,6 +46,7 @@ + #include "xf86Crtc.h" + #include "drmmode_display.h" + #include "present.h" ++#include "mi.h" + + #include <cursorstr.h> + diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.5.bb b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.9.bb index 3de6d22e57..c83e43ed99 100644 --- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.5.bb +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.9.bb @@ -1,13 +1,14 @@ require xserver-xorg.inc SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch \ - file://pkgconfig.patch \ - file://0001-test-xtest-Initialize-array-with-braces.patch \ - file://0001-compiler.h-Do-not-include-sys-io.h-on-ARM-with-glibc.patch \ - file://sdksyms-no-build-path.patch \ - " -SRC_URI[md5sum] = "c9fc7e21e11286dbedd22c00df652130" -SRC_URI[sha256sum] = "a81d8243f37e75a03d4f8c55f96d0bc25802be6ec45c3bfa5cb614c6d01bac9d" + file://pkgconfig.patch \ + file://0001-test-xtest-Initialize-array-with-braces.patch \ + file://sdksyms-no-build-path.patch \ + file://0001-drmmode_display.c-add-missing-mi.h-include.patch \ + file://0001-Avoid-duplicate-definitions-of-IOPortBase.patch \ + file://0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch \ + " +SRC_URI[sha256sum] = "e219f2e0dfe455467939149d7cd2ee53b79b512cc1d2094ae4f5c9ed9ccd3571" # These extensions are now integrated into the server, so declare the migration # path for in-place upgrades. diff --git a/meta/recipes-graphics/xrestop/xrestop_0.4.bb b/meta/recipes-graphics/xrestop/xrestop_0.4.bb index ce5df03936..c7b8716f6f 100644 --- a/meta/recipes-graphics/xrestop/xrestop_0.4.bb +++ b/meta/recipes-graphics/xrestop/xrestop_0.4.bb @@ -19,6 +19,6 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/xrestop/xrestop-${PV}.tar. SRC_URI[md5sum] = "d8a54596cbaf037e62b80c4585a3ca9b" SRC_URI[sha256sum] = "67c2fc94a7ecedbaae0d1837e82e93d1d98f4a6d759828860e552119af3ce257" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" |