Complete Yocto mirror with license table for TQMa6UL (2038-compliance)

- 264 license table entries with exact download URLs (224/264 resolved)
- Complete sources/ directory with all BitBake recipes
- Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl)
- Full traceability for Softwarefreigabeantrag
- GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4
- License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
This commit is contained in:
Siggi (OpenClaw Agent)
2026-03-01 20:58:18 +00:00
commit 16accb6b24
15086 changed files with 1292356 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
SUMMARY = "New user to do specific job"
DESCRIPTION = "This recipe create a new user named ${PN}, who is used for specific jobs like building. The task can be auto started via mini X"
SECTION = "x11"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://builder_session.sh;endline=5;md5=84796c3c41785d86100fdabcbdade00e"
SRC_URI = "file://builder_session.sh \
"
S = "${WORKDIR}"
RDEPENDS:${PN} = "mini-x-session"
inherit useradd
# builder user password is "builder"
BUILDER_PASSWORD ?= ".gLibiNXn0P12"
USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "--system --create-home \
--groups video,tty,audio \
--password ${BUILDER_PASSWORD} \
--user-group builder"
do_install () {
install -d -m 755 ${D}${sysconfdir}/mini_x/session.d
install -p -m 755 builder_session.sh ${D}${sysconfdir}/mini_x/session.d/
chown builder.builder ${D}${sysconfdir}/mini_x/session.d/builder_session.sh
}
# do not report CVEs for other builder apps
CVE_PRODUCT = "yoctoproject:builder"

View File

@@ -0,0 +1,33 @@
#!/bin/sh
#This script will be called via mini X session on behalf of file owner, after
#installed in /etc/mini_x/session.d/. Any auto start jobs including X apps can
#be put here
# start hob here
export PSEUDO_PREFIX=/usr
export PSEUDO_LOCALSTATEDIR=/home/builder/pseudo
export PSEUDO_LIBDIR=/usr/lib/pseudo/lib64
export GIT_PROXY_COMMAND=/home/builder/poky/scripts/oe-git-proxy
#start pcmanfm in daemon mode to allow asynchronous launch
pcmanfm -d&
#register handlers for some file types
if [ ! -d /home/builder/.local/share/applications ]; then
mkdir -p /home/builder/.local/share/applications/
#register folders to open with PCManFM filemanager
xdg-mime default pcmanfm.desktop inode/directory
#register html links and files with epiphany
xdg-mime default epiphany.desktop x-scheme-handler/http
xdg-mime default epiphany.desktop x-scheme-handler/https
xdg-mime default epiphany.desktop text/html
#register text files with l3afpad text editor
xdg-mime default l3afpad.desktop text/plain
fi
cd /home/builder/poky
. ./oe-init-build-env
matchbox-terminal&

View File

@@ -0,0 +1,22 @@
Cairo: Fix Denial-of-Service Attack due to Logical Problem in Program
https://bugs.freedesktop.org/show_bug.cgi?id=100763
CVE: CVE-2017-7475
Upstream-Status: Submitted [https://gitlab.freedesktop.org/cairo/cairo/-/issues/80]
Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
Index: cairo-1.15.4/src/cairo-ft-font.c
===================================================================
--- cairo-1.15.4.orig/src/cairo-ft-font.c
+++ cairo-1.15.4/src/cairo-ft-font.c
@@ -1149,7 +1149,7 @@ _get_bitmap_surface (FT_Bitmap *bi
width = bitmap->width;
height = bitmap->rows;
- if (width == 0 || height == 0) {
+ if (width == 0 || height == 0 || bitmap->buffer == NULL) {
*surface = (cairo_image_surface_t *)
cairo_image_surface_create_for_data (NULL, format, 0, 0, 0);
return (*surface)->base.status;

View File

@@ -0,0 +1,86 @@
SUMMARY = "The Cairo 2D vector graphics library"
DESCRIPTION = "Cairo is a multi-platform library providing anti-aliased \
vector-based rendering for multiple target backends. Paths consist \
of line segments and cubic splines and can be rendered at any width \
with various join and cap styles. All colors may be specified with \
optional translucence (opacity/alpha) and combined using the \
extended Porter/Duff compositing algebra as found in the X Render \
Extension."
HOMEPAGE = "http://cairographics.org"
BUGTRACKER = "https://gitlab.freedesktop.org/cairo/cairo/-/issues"
SECTION = "libs"
LICENSE = "(MPL-1.1 | LGPL-2.1-only) & GPL-3.0-or-later"
LICENSE:${PN} = "MPL-1.1 | LGPL-2.1-only"
LICENSE:${PN}-dev = "MPL-1.1 | LGPL-2.1-only"
LICENSE:${PN}-doc = "MPL-1.1 | LGPL-2.1-only"
LICENSE:${PN}-gobject = "MPL-1.1 | LGPL-2.1-only"
LICENSE:${PN}-script-interpreter = "MPL-1.1 | LGPL-2.1-only"
LICENSE:${PN}-perf-utils = "GPL-3.0-or-later"
# Adapt the licenses for cairo-dbg and cairo-src depending on whether
# cairo-trace is being built.
LICENSE:${PN}-dbg = "(MPL-1.1 | LGPL-2.1-only)${@bb.utils.contains('PACKAGECONFIG', 'trace', ' & GPL-3.0-or-later', '', d)}"
LICENSE:${PN}-src = "(MPL-1.1 | LGPL-2.1-only)${@bb.utils.contains('PACKAGECONFIG', 'trace', ' & GPL-3.0-or-later', '', d)}"
LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77 \
${@bb.utils.contains('PACKAGECONFIG', 'trace', 'file://util/cairo-trace/COPYING-GPL-3;md5=d32239bcb673463ab874e80d47fae504', '', d)}"
DEPENDS = "fontconfig freetype 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 \
"
SRC_URI[sha256sum] = "243a0736b978a33dee29f9cca7521733b78a65b5418206fef7bd1c3d4cf10b64"
inherit meson pkgconfig upstream-version-is-even gtk-doc multilib_script
# if qemu usermode isn't available, this value needs to be set statically
# (otherwise it's determinted by running a small target executable with qemu)
do_write_config:append() {
cat >${WORKDIR}/cairo.cross <<EOF
[properties]
ipc_rmid_deferred_release = 'true'
EOF
}
EXTRA_OEMESON:append:class-nativesdk = "${@' --cross-file ${WORKDIR}/cairo.cross' if d.getVar('EXEWRAPPER_ENABLED') == 'False' else ''}"
EXTRA_OEMESON:append:class-target = "${@' --cross-file ${WORKDIR}/cairo.cross' if d.getVar('EXEWRAPPER_ENABLED') == 'False' else ''}"
GTKDOC_MESON_OPTION = "gtk_doc"
MULTILIB_SCRIPTS = "${PN}-perf-utils:${bindir}/cairo-trace"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xlib xcb', '', d)} trace"
PACKAGECONFIG[xlib] = "-Dxlib=enabled,-Dxlib=disabled,virtual/libx11 libxrender libxext"
PACKAGECONFIG[xcb] = "-Dxcb=enabled,-Dxcb=disabled,libxcb"
# cairo-trace is GPLv3 so add an option to remove it
PACKAGECONFIG[trace] = ""
do_install:append () {
if ! ${@bb.utils.contains('PACKAGECONFIG', 'trace', 'true', 'false', d)}; then
rm ${D}${bindir}/cairo-trace ${D}${libdir}/cairo/libcairo-trace.so
rmdir --ignore-fail-on-non-empty ${D}${bindir} ${D}${libdir}/cairo
fi
}
PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
SUMMARY:cairo-gobject = "The Cairo library GObject wrapper library"
DESCRIPTION:cairo-gobject = "A GObject wrapper library for the Cairo API."
SUMMARY:cairo-script-interpreter = "The Cairo library script interpreter"
DESCRIPTION:cairo-script-interpreter = "The Cairo script interpreter implements \
CairoScript. CairoScript is used by tracing utilities to enable the ability \
to replay rendering."
DESCRIPTION:cairo-perf-utils = "The Cairo library performance utilities"
FILES:${PN} = "${libdir}/libcairo.so.*"
FILES:${PN}-gobject = "${libdir}/libcairo-gobject.so.*"
FILES:${PN}-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*"
FILES:${PN}-perf-utils = "${bindir}/cairo-* ${libdir}/cairo/libcairo-trace.so ${libdir}/cairo/libcairo-fdr.so"
BBCLASSEXTEND = "native nativesdk"
UPSTREAM_CHECK_REGEX = "cairo-(?P<pver>\d+(\.\d+)+).tar.xz"

View File

@@ -0,0 +1,18 @@
SUMMARY = "Cantarell, a Humanist sans-serif font family"
DESCRIPTION = "The Cantarell font typeface is designed as a \
contemporary Humanist sans serif, and was developed for \
on-screen reading; in particular, reading web pages on an \
HTC Dream mobile phone."
HOMEPAGE = "https://gitlab.gnome.org/GNOME/cantarell-fonts/"
SECTION = "fonts"
LICENSE = "OFL-1.1 & Apache-2.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=fb1ef92b6909969a472a6ea3c4e99cb7"
inherit gnomebase meson allarch fontcache pkgconfig
SRC_URI[archive.sha256sum] = "f9463a0659c63e57e381fdd753cf1929225395c5b49135989424761830530411"
EXTRA_OEMESON += "-Duseprebuilt=true -Dbuildappstream=false"
FILES:${PN} = "${datadir}/fonts ${datadir}/fontconfig"

View File

@@ -0,0 +1,59 @@
SUMMARY = "Userspace interface to the kernel DRM services"
DESCRIPTION = "The runtime library for accessing the kernel DRM services. DRM \
stands for \"Direct Rendering Manager\", which is the kernel portion of the \
\"Direct Rendering Infrastructure\" (DRI). DRI is required for many hardware \
accelerated OpenGL drivers."
HOMEPAGE = "http://dri.freedesktop.org"
SECTION = "x11/base"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71"
PROVIDES = "drm"
DEPENDS = "libpthread-stubs"
SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.xz \
"
SRC_URI[sha256sum] = "3bf55363f76c7250946441ab51d3a6cc0ae518055c0ff017324ab76cdefb327a"
inherit meson pkgconfig manpages
PACKAGECONFIG ??= "intel radeon amdgpu nouveau vmwgfx omap freedreno vc4 etnaviv tests install-test-programs"
PACKAGECONFIG[intel] = "-Dintel=enabled,-Dintel=disabled,libpciaccess"
PACKAGECONFIG[radeon] = "-Dradeon=enabled,-Dradeon=disabled"
PACKAGECONFIG[amdgpu] = "-Damdgpu=enabled,-Damdgpu=disabled"
PACKAGECONFIG[nouveau] = "-Dnouveau=enabled,-Dnouveau=disabled"
PACKAGECONFIG[vmwgfx] = "-Dvmwgfx=enabled,-Dvmwgfx=disabled"
PACKAGECONFIG[omap] = "-Domap=enabled,-Domap=disabled"
PACKAGECONFIG[exynos] = "-Dexynos=enabled,-Dexynos=disabled"
PACKAGECONFIG[freedreno] = "-Dfreedreno=enabled,-Dfreedreno=disabled"
PACKAGECONFIG[tegra] = "-Dtegra=enabled,-Dtegra=disabled"
PACKAGECONFIG[vc4] = "-Dvc4=enabled,-Dvc4=disabled"
PACKAGECONFIG[etnaviv] = "-Detnaviv=enabled,-Detnaviv=disabled"
PACKAGECONFIG[freedreno-kgsl] = "-Dfreedreno-kgsl=true,-Dfreedreno-kgsl=false"
PACKAGECONFIG[valgrind] = "-Dvalgrind=enabled,-Dvalgrind=disabled,valgrind"
PACKAGECONFIG[install-test-programs] = "-Dinstall-test-programs=true,-Dinstall-test-programs=false"
PACKAGECONFIG[cairo-tests] = "-Dcairo-tests=enabled,-Dcairo-tests=disabled"
PACKAGECONFIG[tests] = "-Dtests=true,-Dtests=false"
PACKAGECONFIG[udev] = "-Dudev=true,-Dudev=false,udev"
PACKAGECONFIG[manpages] = "-Dman-pages=enabled,-Dman-pages=disabled,libxslt-native xmlto-native python3-docutils-native"
ALLOW_EMPTY:${PN}-drivers = "1"
PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \
${PN}-intel ${PN}-exynos ${PN}-freedreno ${PN}-amdgpu \
${PN}-etnaviv"
RRECOMMENDS:${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \
${PN}-exynos ${PN}-freedreno ${PN}-amdgpu \
${PN}-etnaviv"
FILES:${PN}-tests = "${bindir}/*"
FILES:${PN}-radeon = "${libdir}/libdrm_radeon.so.*"
FILES:${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*"
FILES:${PN}-omap = "${libdir}/libdrm_omap.so.*"
FILES:${PN}-intel = "${libdir}/libdrm_intel.so.*"
FILES:${PN}-exynos = "${libdir}/libdrm_exynos.so.*"
FILES:${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*"
FILES:${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.* ${datadir}/${PN}/amdgpu.ids"
FILES:${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,20 @@
Revert part of http://cgit.freedesktop.org/fontconfig/commit/fontconfig.pc.in?id=338ffe6b886ad4ba86ff471cb59c4a5e5ffbe408
We really dont do static linking so its not going to cause issues for us but as such this is harming us by adding absolute
paths into -I options into fontconfig.pc which is them prepended with sysroot when read back by cross pkg-config and
we end up with -I <sysroot>/<sysroot>/usr/include/fontconfig in CFLAGS of clients which depend on it. one such example
is matchbox-panel-2 and it was working fine with gcc < 5 because it tolerated non-existing paths in -I flags but gcc-5
gently refuses and rightly so.
Upstream-Status: Inappropriate [OE-Specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
diff --git a/fontconfig.pc.in b/fontconfig.pc.in
index 61b35fb..5bc9bab 100644
--- a/fontconfig.pc.in
+++ b/fontconfig.pc.in
@@ -15,4 +15,4 @@ Requires: @PKGCONFIG_REQUIRES@
Requires.private: @PKGCONFIG_REQUIRES_PRIVATELY@
Libs: -L${libdir} -lfontconfig
Libs.private: @ICONV_LIBS@ @PKG_EXPAT_LIBS@
-Cflags: -I${includedir} @ICONV_CFLAGS@ @PKG_EXPAT_CFLAGS@
+Cflags: -I${includedir}

View File

@@ -0,0 +1,69 @@
SUMMARY = "Generic font configuration library"
DESCRIPTION = "Fontconfig is a font configuration and customization library, which \
does not depend on the X Window System. It is designed to locate \
fonts within the system and select them according to requirements \
specified by applications. \
Fontconfig is not a rasterization library, nor does it impose a \
particular rasterization library on the application. The X-specific \
library 'Xft' uses fontconfig along with freetype to specify and \
rasterize fonts."
HOMEPAGE = "http://www.fontconfig.org"
BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig"
LICENSE = "MIT & MIT & PD"
LIC_FILES_CHKSUM = "file://COPYING;md5=00252fd272bf2e722925613ad74cb6c7 \
file://src/fcfreetype.c;endline=45;md5=ef8702fbf3dc506715be8a9d69cb0252 \
"
SECTION = "libs"
DEPENDS = "expat freetype zlib gperf-native util-linux"
SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \
file://revert-static-pkgconfig.patch \
"
SRC_URI[sha256sum] = "f5f359d6332861bd497570848fcb42520964a9e83d5e3abe397b6b6db9bcaaf4"
UPSTREAM_CHECK_REGEX = "fontconfig-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
do_configure:prepend() {
# work around https://bugs.freedesktop.org/show_bug.cgi?id=101280
rm -f ${S}/src/fcobjshash.h ${S}/src/fcobjshash.gperf
}
do_install:append:class-target() {
# duplicate fc-cache for postinstall script
mkdir -p ${D}${libexecdir}
ln ${D}${bindir}/fc-cache ${D}${libexecdir}/${MLPREFIX}fc-cache
}
do_install:append:class-nativesdk() {
# duplicate fc-cache for postinstall script
mkdir -p ${D}${libexecdir}
ln ${D}${bindir}/fc-cache ${D}${libexecdir}/${MLPREFIX}fc-cache
}
PACKAGES =+ "fontconfig-utils"
FILES:${PN} =+ "${datadir}/xml/*"
FILES:${PN}-dev += "${datadir}/gettext/*"
FILES:fontconfig-utils = "${bindir}/* ${libexecdir}/*"
# Work around past breakage in debian.bbclass
RPROVIDES:fontconfig-utils = "libfontconfig-utils"
RREPLACES:fontconfig-utils = "libfontconfig-utils"
RCONFLICTS:fontconfig-utils = "libfontconfig-utils"
DEBIAN_NOAUTONAME:fontconfig-utils = "1"
inherit autotools pkgconfig relative_symlinks gettext
FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"
# comma separated list of additional directories
# /usr/share/fonts is already included by default (you can change it with --with-default-fonts)
FONTCONFIG_FONT_DIRS ?= "no"
EXTRA_OECONF = " --disable-docs --with-default-fonts=${datadir}/fonts --with-cache-dir=${FONTCONFIG_CACHE_DIR} --with-add-fonts=${FONTCONFIG_FONT_DIRS}"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,33 @@
From 73720c7c9958e87b3d134a7574d1720ad2d24442 Mon Sep 17 00:00:00 2001
From: Alexei Podtelezhnikov <apodtele@gmail.com>
Date: Sun, 23 Jun 2024 10:58:00 -0400
Subject: [PATCH] * src/truetype/ttgload.c (load_truetype_glyph): Unsigned fix.
CVE: CVE-2025-27363
Upstream-Status: Backport [https://gitlab.freedesktop.org/freetype/freetype/-/commit/73720c7c9958e87b3d134a7574d1720ad2d24442]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
src/truetype/ttgload.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 8cddc394c..b656ccf04 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -1741,14 +1741,14 @@
if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) ||
FT_IS_VARIATION( FT_FACE( face ) ) )
{
- short i, limit;
+ FT_UShort i, limit;
FT_SubGlyph subglyph;
FT_Outline outline = { 0, 0, NULL, NULL, NULL, 0 };
FT_Vector* unrounded = NULL;
- limit = (short)gloader->current.num_subglyphs;
+ limit = (FT_UShort)gloader->current.num_subglyphs;
/* construct an outline structure for */
/* communication with `TT_Vary_Apply_Glyph_Deltas' */

View File

@@ -0,0 +1,47 @@
SUMMARY = "Freetype font rendering library"
DESCRIPTION = "FreeType is a software font engine that is designed to be small, efficient, \
highly customizable, and portable while capable of producing high-quality output (glyph \
images). It can be used in graphics libraries, display servers, font conversion tools, text \
image generation tools, and many other products as well."
HOMEPAGE = "http://www.freetype.org/"
BUGTRACKER = "https://savannah.nongnu.org/bugs/?group=freetype"
SECTION = "libs"
LICENSE = "(FTL | GPL-2.0-or-later) & MIT"
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=843b6efc16f6b1652ec97f89d5a516c0 \
file://docs/FTL.TXT;md5=9f37b4e6afa3fef9dba8932b16bd3f97 \
file://docs/GPLv2.TXT;md5=8ef380476f642c20ebf40fecb0add2ec \
"
SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BP}.tar.xz \
file://CVE-2025-27363.patch \
"
SRC_URI[sha256sum] = "12991c4e55c506dd7f9b765933e62fd2be2e06d421505d7950a132e4f1bb484d"
UPSTREAM_CHECK_REGEX = "freetype-(?P<pver>\d+(\.\d+)+)"
inherit autotools pkgconfig multilib_header
# Adapt autotools to work with the minimal autoconf usage in freetype
AUTOTOOLS_SCRIPT_PATH = "${S}/builds/unix"
CONFIGURE_SCRIPT = "${S}/configure"
EXTRA_AUTORECONF += "--exclude=autoheader --exclude=automake"
PACKAGECONFIG ??= "zlib pixmap"
PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
# harfbuzz results in a circular dependency so enabling is non-trivial
PACKAGECONFIG[harfbuzz] = "--with-harfbuzz,--without-harfbuzz,harfbuzz"
PACKAGECONFIG[pixmap] = "--with-png,--without-png,libpng"
PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
PACKAGECONFIG[freetypeconfig] = "--enable-freetype-config=yes,--enable-freetype-config=no,"
EXTRA_OECONF = "CC_BUILD='${BUILD_CC}'"
TARGET_CPPFLAGS += "-D_FILE_OFFSET_BITS=64"
do_install:append() {
oe_multilib_header freetype2/freetype/config/ftconfig.h
}
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,56 @@
Upstream-Status: Backport [767e0316450911f1158bd4f7fd8dcd066bae5c55]
Signed-off-by: Ross Burton <ross.burton@arm.com>
From 0ce0a85597db48a2fca619bd95e34af091e54ae8 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@arm.com>
Date: Thu, 22 Jul 2021 16:31:11 +0100
Subject: [PATCH] Fix build race in Makefile
The current rule for the binaries is:
glew.bin: glew.lib bin bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN)
In parallel builds, all of those targets happen at the same time. This
means that 'bin' can happen *after* 'bin/$(GLEWINFO.BIN)', which is a
problem as the 'bin' target's responsibility is to create the directory
that the other target writes into.
Solve this by not having a separate 'create directory' target which is
fundamentally racy, and simply mkdir in each target which writes into it.
---
Makefile | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index d0e4614..04af44c 100644
--- a/Makefile
+++ b/Makefile
@@ -171,21 +171,20 @@ VISUALINFO.BIN.OBJ := $(VISUALINFO.BIN.OBJ:.c=.o)
# Don't build glewinfo or visualinfo for NaCL, yet.
ifneq ($(filter nacl%,$(SYSTEM)),)
-glew.bin: glew.lib bin
+glew.bin: glew.lib
else
-glew.bin: glew.lib bin bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN)
+glew.bin: glew.lib bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN)
endif
-bin:
- mkdir bin
-
bin/$(GLEWINFO.BIN): $(GLEWINFO.BIN.OBJ) $(LIB.SHARED.DIR)/$(LIB.SHARED)
+ @mkdir -p $(dir $@)
$(CC) $(CFLAGS) -o $@ $(GLEWINFO.BIN.OBJ) $(BIN.LIBS)
ifneq ($(STRIP),)
$(STRIP) -x $@
endif
bin/$(VISUALINFO.BIN): $(VISUALINFO.BIN.OBJ) $(LIB.SHARED.DIR)/$(LIB.SHARED)
+ @mkdir -p $(dir $@)
$(CC) $(CFLAGS) -o $@ $(VISUALINFO.BIN.OBJ) $(BIN.LIBS)
ifneq ($(STRIP),)
$(STRIP) -x $@
--
2.25.1

View File

@@ -0,0 +1,12 @@
Don't forcibly strip the binaries.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Upstream-Status: Backport [d7693eea09ac76c67f5f3aa538bb911ce2291e2c]
diff --git a/Makefile b/Makefile
index 6a9803c..170c0ce 100644
--- a/Makefile
+++ b/Makefile
@@ -285 +285 @@ install.bin: glew.bin
- $(INSTALL) -s -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) "$(DESTDIR)$(BINDIR)/"
+ $(INSTALL) -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) "$(DESTDIR)$(BINDIR)/"

View File

@@ -0,0 +1,21 @@
We don't use the dist-* targets and hence DIST_DIR isn't used. The current code
creates a new temp directory in /tmp/ for every invocation of make. Lets
not do that.
https://github.com/nigels-com/glew/issues/334
Upstream-Status: Pending [a revised version would be needed for upstream]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Index: glew-2.2.0/Makefile
===================================================================
--- glew-2.2.0.orig/Makefile
+++ glew-2.2.0/Makefile
@@ -56,7 +56,6 @@ DIST_SRC_ZIP ?= $(shell pwd)/$(DIST_NAME
DIST_SRC_TGZ ?= $(shell pwd)/$(DIST_NAME).tgz
DIST_WIN32 ?= $(shell pwd)/$(DIST_NAME)-win32.zip
-DIST_DIR := $(shell mktemp -d /tmp/glew.XXXXXX)/$(DIST_NAME)
# To disable stripping of linked binaries either:
# - use STRIP= on gmake command-line

View File

@@ -0,0 +1,46 @@
SUMMARY = "OpenGL extension loading library"
DESCRIPTION = "The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library."
HOMEPAGE = "http://glew.sourceforge.net/"
BUGTRACKER = "http://sourceforge.net/tracker/?group_id=67586"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
file://0001-Fix-build-race-in-Makefile.patch \
file://notempdir.patch \
file://no-strip.patch"
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 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,,,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,
# we're cross-compiling. Pass our CFLAGS via POPT as that's the optimisation
# variable and safely overwritten.
EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS} \
CC='${CC}' LD='${CC}' STRIP='' \
LDFLAGS.EXTRA='${LDFLAGS}' \
POPT='${CFLAGS}' \
GLEW_PREFIX='${prefix}' BINDIR='${bindir}' \
LIBDIR='${libdir}' INCDIR='${includedir}/GL' PKGDIR='${libdir}/pkgconfig'"
do_compile() {
oe_runmake
}
do_install() {
oe_runmake 'DESTDIR=${D}' install.all
}

View File

@@ -0,0 +1,46 @@
From 4cede5edcff96134baf35953d58595c4aa5f1fc5 Mon Sep 17 00:00:00 2001
From: Jose Quaresma <quaresma.jose@gmail.com>
Date: Sun, 7 Feb 2021 01:30:39 +0000
Subject: [PATCH] generate glslang pkg-config
Based on https://src.fedoraproject.org/rpms/glslang/blob/main/f/0001-pkg-config-compatibility.patch
Upstream-Status: Inappropriate [independently developed patch submitted at https://github.com/KhronosGroup/glslang/pull/3371]
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
---
glslang/CMakeLists.txt | 2 ++
glslang/glslang.pc.cmake.in | 11 +++++++++++
2 files changed, 13 insertions(+)
create mode 100644 glslang/glslang.pc.cmake.in
diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt
index 37eecaad..6974935c 100644
--- a/glslang/CMakeLists.txt
+++ b/glslang/CMakeLists.txt
@@ -251,6 +251,8 @@ if(PROJECT_IS_TOP_LEVEL)
")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glslangTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
endif()
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/glslang.pc.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/glslang.pc @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/glslang.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
set(PUBLIC_HEADERS
Public/ResourceLimits.h
diff --git a/glslang/glslang.pc.cmake.in b/glslang/glslang.pc.cmake.in
new file mode 100644
index 00000000..43104e68
--- /dev/null
+++ b/glslang/glslang.pc.cmake.in
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@CMAKE_INSTALL_PREFIX@
+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+
+Name: @PROJECT_NAME@
+Description: OpenGL and OpenGL ES shader front end and validator
+Requires:
+Version: @GLSLANG_VERSION@
+Libs: -L${libdir} -lglslang -lHLSL -lSPVRemapper
+Cflags: -I${includedir}

View File

@@ -0,0 +1,37 @@
SUMMARY = "OpenGL / OpenGL ES Reference Compiler"
DESCRIPTION = "Glslang is the official reference compiler front end for the \
OpenGL ES and OpenGL shading languages. It implements a strict interpretation \
of the specifications for these languages. It is open and free for anyone to use, \
either from a command line or programmatically."
SECTION = "graphics"
HOMEPAGE = "https://www.khronos.org/opengles/sdk/tools/Reference-Compiler"
LICENSE = "BSD-3-Clause & BSD-2-Clause & MIT & Apache-2.0 & GPL-3-with-bison-exception"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2a2b5acd7bc4844964cfda45fe807dc3"
SRCREV = "a91631b260cba3f22858d6c6827511e636c2458a"
SRC_URI = "git://github.com/KhronosGroup/glslang.git;protocol=https;branch=main \
file://0001-generate-glslang-pkg-config.patch \
"
PE = "1"
# These recipes need to be updated in lockstep with each other:
# glslang, vulkan-headers, vulkan-loader, vulkan-tools, spirv-headers, spirv-tools
# vulkan-validation-layers, vulkan-utility-libraries.
# The tags versions should always be sdk-x.y.z, as this is what
# upstream considers a release.
UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
S = "${WORKDIR}/git"
inherit cmake python3native
DEPENDS = "spirv-tools"
EXTRA_OECMAKE = " \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DENABLE_PCH=OFF \
-DENABLE_CTEST=OFF \
-DBUILD_EXTERNAL=OFF \
-DALLOW_EXTERNAL_SPIRV_TOOLS=ON \
"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,28 @@
From c19d1f4a7e44e071df3a2612ae2eb20c84e831a6 Mon Sep 17 00:00:00 2001
From: Emmanuele Bassi <ebassi@gnome.org>
Date: Thu, 10 Aug 2023 12:44:49 +0100
Subject: [PATCH] build: Allow host builds when cross-compiling
Environments that set up execution wrappers when cross-compiling should
be allowed to run code. We only fall back on external properties if we
really can't run any native code on the host machine.
Upstream-Status: Backport
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 48f22d7..7dcb9e6 100644
--- a/meson.build
+++ b/meson.build
@@ -270,7 +270,7 @@ int main() {
return 0;
}
'''
-if meson.is_cross_build()
+if not meson.can_run_host_binaries()
ieee754_float_div = meson.get_external_property('ieee754_float_div', cc.get_id() in ['gcc', 'clang'])
message('Cross-building, assuming IEEE 754 division:', ieee754_float_div)
else

View File

@@ -0,0 +1,29 @@
SUMMARY = "A thin layer of graphic data types"
HOMEPAGE = "http://ebassi.github.io/graphene/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a7d871d9e23c450c421a85bb2819f648"
inherit gnomebase gobject-introspection gtk-doc
SRC_URI += "file://float-div.patch"
SRC_URI[archive.sha256sum] = "a37bb0e78a419dcbeaa9c7027bcff52f5ec2367c25ec859da31dfde2928f279a"
# Disable neon support by default on ARM-32 platforms because of the
# following upstream bug: https://github.com/ebassi/graphene/issues/215
PACKAGECONFIG ?= "gobject-types ${@bb.utils.contains('TUNE_FEATURES', 'aarch64', 'neon', '', d)}"
PACKAGECONFIG[gobject-types] = "-Dgobject_types=true,-Dgobject_types=false,glib-2.0"
PACKAGECONFIG[neon] = "-Darm_neon=true,-Darm_neon=false,"
GIR_MESON_ENABLE_FLAG = 'enabled'
GIR_MESON_DISABLE_FLAG = 'disabled'
GTKDOC_MESON_OPTION = "gtk_doc"
EXTRA_OEMESON = "-Dinstalled_tests=false"
FILES:${PN} += "${libdir}/graphene-1.0"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,48 @@
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=b98429b8e8e3c2a67cfef01e99e4893d \
file://src/hb-ucd.cc;beginline=1;endline=15;md5=29d4dcb6410429195df67efe3382d8bc \
"
SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BPN}-${PV}.tar.xz"
SRC_URI[sha256sum] = "109501eaeb8bde3eadb25fab4164e993fbace29c3d775bcaa1c1e58e2f15f847"
DEPENDS += "glib-2.0-native"
inherit meson pkgconfig lib_package gtk-doc gobject-introspection github-releases
GIR_MESON_ENABLE_FLAG = 'enabled'
GIR_MESON_DISABLE_FLAG = 'disabled'
GTKDOC_MESON_ENABLE_FLAG = 'enabled'
GTKDOC_MESON_DISABLE_FLAG = 'disabled'
PACKAGECONFIG ??= "cairo freetype glib icu"
PACKAGECONFIG[cairo] = "-Dcairo=enabled,-Dcairo=disabled,cairo"
PACKAGECONFIG[chafa] = "-Dchafa=enabled,-Dchafa=disabled,chafa"
PACKAGECONFIG[freetype] = "-Dfreetype=enabled,-Dfreetype=disabled,freetype"
PACKAGECONFIG[glib] = "-Dglib=enabled,-Dglib=disabled,glib-2.0"
PACKAGECONFIG[graphite] = "-Dgraphite2=enabled,-Dgraphite2=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 might
# still be installed, so remove it to stop packaging warnings.
[ ! -d ${D}${bindir} ] || 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"

View File

@@ -0,0 +1,51 @@
SUMMARY = "IGT GPU Tools"
DESCRIPTION = "IGT GPU Tools is a collection of tools for development and testing of the DRM drivers"
HOMEPAGE = "https://gitlab.freedesktop.org/drm/igt-gpu-tools"
BUGTRACKER = "https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues"
LIC_FILES_CHKSUM = "file://COPYING;md5=67bfee4df38fa6ecbe3a675c552d4c08"
LICENSE = "MIT"
inherit meson pkgconfig
SRCREV = "31ec677ca24e7ed86e35f367f40a29d3d9f51c06"
PV = "1.28"
SRC_URI = "git://gitlab.freedesktop.org/drm/igt-gpu-tools.git;protocol=https;branch=master"
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 perl"
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 -Dsrcdir=${TARGET_DBGSRC_DIR}/git/ -Dversion_hash=${PV}"
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"

View File

@@ -0,0 +1,15 @@
require core-image-weston.bb
DESCRIPTION = "Image with Weston support that includes everything within \
core-image-weston plus meta-toolchain, development headers and libraries to \
form a standalone SDK."
HOMEPAGE = "https://www.yoctoproject.org/"
IMAGE_FEATURES += "dev-pkgs tools-sdk \
tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks ssh-server-openssh"
IMAGE_INSTALL += "kernel-devsrc"
# Compiling stuff, specifically SystemTap probes, can require lots of memory
# See https://bugzilla.yoctoproject.org/show_bug.cgi?id=14673
QB_MEM = "-m 768"

View File

@@ -0,0 +1,12 @@
SUMMARY = "A very basic Wayland image with a terminal"
IMAGE_FEATURES += "splash package-management ssh-server-dropbear hwcodecs weston"
LICENSE = "MIT"
inherit core-image
CORE_IMAGE_BASE_INSTALL += "gtk+3-demo"
CORE_IMAGE_BASE_INSTALL += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'weston-xwayland matchbox-terminal', '', d)}"
QB_MEM = "-m 512"

View File

@@ -0,0 +1,11 @@
SUMMARY = "A very basic X11 image with a terminal"
IMAGE_FEATURES += "splash package-management x11-base"
LICENSE = "MIT"
inherit core-image features_check
REQUIRED_DISTRO_FEATURES = "x11"
QB_MEM = '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m 256", d)}'

View File

@@ -0,0 +1,58 @@
SUMMARY = "Hardware accelerated JPEG compression/decompression library"
DESCRIPTION = "libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression"
HOMEPAGE = "http://libjpeg-turbo.org/"
LICENSE = "IJG & BSD-3-Clause & Zlib"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=2a8e0d8226a102f07ab63ed7fd6ce155"
DEPENDS:append:x86-64:class-target = " nasm-native"
DEPENDS:append:x86:class-target = " nasm-native"
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
SRC_URI[sha256sum] = "22429507714ae147b3acacd299e82099fce5d9f456882fc28e252e4579ba2a75"
UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libjpeg-turbo/files/"
UPSTREAM_CHECK_REGEX = "/libjpeg-turbo/files/(?P<pver>(\d+[\.\-_]*)+)/"
PE = "1"
# Drop-in replacement for jpeg
PROVIDES = "jpeg"
RPROVIDES:${PN} += "jpeg"
RREPLACES:${PN} += "jpeg"
RCONFLICTS:${PN} += "jpeg"
inherit cmake pkgconfig
export NASMENV = "--reproducible --debug-prefix-map=${WORKDIR}=${TARGET_DBGSRC_DIR}"
# 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"
# Work around missing x32 ABI support
EXTRA_OECMAKE:append:class-target = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", "-DWITH_SIMD=False", "", d)}"
# Work around missing non-floating point ABI support in MIPS
EXTRA_OECMAKE:append:class-target = " ${@bb.utils.contains("MIPSPKGSFX_FPU", "-nf", "-DWITH_SIMD=False", "", d)}"
EXTRA_OECMAKE:append:class-target:arm = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "", "-DWITH_SIMD=False", d)}"
EXTRA_OECMAKE:append:class-target:armeb = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "", "-DWITH_SIMD=False", d)}"
# Provide a workaround if Altivec unit is not present in PPC
EXTRA_OECMAKE:append:class-target:powerpc = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
EXTRA_OECMAKE:append:class-target:powerpc64 = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
EXTRA_OECMAKE:append:class-target:powerpc64le = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
DEBUG_OPTIMIZATION:append:armv4 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
DEBUG_OPTIMIZATION:append:armv5 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
PACKAGES =+ "jpeg-tools libturbojpeg"
DESCRIPTION:jpeg-tools = "The jpeg-tools package includes client programs to access libjpeg functionality. These tools allow for the compression, decompression, transformation and display of JPEG files and benchmarking of the libjpeg library."
FILES:jpeg-tools = "${bindir}/*"
DESCRIPTION:libturbojpeg = "A SIMD-accelerated JPEG codec which provides only TurboJPEG APIs"
FILES:libturbojpeg = "${libdir}/libturbojpeg.so.*"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,31 @@
From 5f54f067da7ee24a61d6cb41e0636383729e2bad Mon Sep 17 00:00:00 2001
From: Fabio Estevam <festevam@gmail.com>
Date: Mon, 8 Jan 2024 15:00:01 -0300
Subject: [PATCH] cube-gears: Change header file to <GLES3/gl3.h>
Since commit 96d63eb59e34 ("kmscube: Add gears mode"), kmscube fails
to build on platforms without <GL/gl.h>.
Fix it by changing the header file to <GLES3/gl3.h>.
Reported-by: Martin Jansa <martin.jansa@gmail.com>
Suggested-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/kmscube/-/merge_requests/51]
---
cube-gears.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cube-gears.c b/cube-gears.c
index d5b7a5f..cb538ec 100644
--- a/cube-gears.c
+++ b/cube-gears.c
@@ -31,7 +31,7 @@
#include <sys/time.h>
#include <math.h>
-#include <GL/gl.h>
+#include <GLES3/gl3.h>
#include "common.h"
#include "esUtil.h"

View File

@@ -0,0 +1,33 @@
SUMMARY = "Demo application to showcase 3D graphics using kms and gbm"
DESCRIPTION = "kmscube is a little demonstration program for how to drive bare metal graphics \
without a compositor like X11, wayland or similar, using DRM/KMS (kernel mode \
setting), GBM (graphics buffer manager) and EGL for rendering content using \
OpenGL or OpenGL ES."
HOMEPAGE = "https://cgit.freedesktop.org/mesa/kmscube/"
LICENSE = "MIT"
SECTION = "graphics"
DEPENDS = "virtual/libgles3 virtual/libgles2 virtual/egl libdrm virtual/libgbm"
LIC_FILES_CHKSUM = "file://kmscube.c;beginline=1;endline=23;md5=8b309d4ee67b7315ff7381270dd631fb"
SRCREV = "6ab022fdfcfedd28f4b5dbd8d3299414a367746f"
SRC_URI = "git://gitlab.freedesktop.org/mesa/kmscube;branch=master;protocol=https \
file://0001-cube-gears-Change-header-file-to-GLES3-gl3.h.patch \
"
UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
BASEPV = "0.0.1"
PV = "${BASEPV}+git"
inherit meson pkgconfig features_check
REQUIRED_DISTRO_FEATURES = "opengl"
PACKAGECONFIG ??= ""
PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base"
CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}"

View File

@@ -0,0 +1,30 @@
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"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=58ef4c80d401e07bd9ee8b6b58cf464b"
SRC_URI = "git://github.com/anholt/libepoxy;branch=master;protocol=https"
SRCREV = "c84bc9459357a40e46e2fec0408d04fbdde2c973"
S = "${WORKDIR}/git"
inherit meson pkgconfig features_check github-releases
REQUIRED_DISTRO_FEATURES = "opengl"
PACKAGECONFIG[egl] = "-Degl=yes, -Degl=no, virtual/egl"
PACKAGECONFIG[x11] = "-Dglx=yes, -Dglx=no -Dx11=false, virtual/libx11 virtual/libgl"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} egl"
EXTRA_OEMESON += "-Dtests=false"
PACKAGECONFIG:class-native = "egl x11"
PACKAGECONFIG:class-nativesdk = "egl x11"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,23 @@
SUMMARY = "Library for converting characters to X key-presses"
DESCRIPTION = "libfakekey is a simple library for converting UTF-8 characters into 'fake' X \
key-presses."
HOMEPAGE = "http://matchbox-project.org/"
BUGTRACKER = "http://bugzilla.yoctoproject.org/"
LICENSE = "LGPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://src/libfakekey.c;endline=30;md5=602b5ccd48f64407510867f3373b448c"
DEPENDS = "libxtst"
SECTION = "x11/wm"
SRCREV = "7ad885912efb2131e80914e964d5e635b0d07b40"
PV = "0.3+git"
SRC_URI = "git://git.yoctoproject.org/${BPN};branch=master;protocol=https"
S = "${WORKDIR}/git"
inherit autotools pkgconfig gettext features_check
# The libxtst requires x11 in DISTRO_FEATURES
REQUIRED_DISTRO_FEATURES = "x11"

View File

@@ -0,0 +1,32 @@
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/"
LICENSE = "LGPL-2.0-or-later & MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
file://COPYING.MIT;md5=f45ed9332b4f50a35adf2065adde4ca7 \
file://libmb/mbexp.c;endline=20;md5=28c0aef3b23e308464f5dae6a11b0d2f \
file://libmb/xsettings-client.c;endline=20;md5=4b106a387602db8d91a50d5cdfd65031"
DEPENDS = "virtual/libx11 libxext"
#SRCREV for 1.12
SRCREV = "e846ee434f8e23d9db38af13c523f791495e0e87"
SRC_URI = "git://git.yoctoproject.org/${BPN};branch=master;protocol=https"
S = "${WORKDIR}/git"
inherit autotools pkgconfig features_check
# depends on virtual/libx11
REQUIRED_DISTRO_FEATURES = "x11"
PACKAGECONFIG ??= "jpeg png xft"
PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
PACKAGECONFIG[pango] = "--enable-pango,--disable-pango,pango"
PACKAGECONFIG[png] = "--enable-png,--disable-png,libpng"
PACKAGECONFIG[xft] = "--enable-xft,--disable-xft,libxft"

View File

@@ -0,0 +1,86 @@
SUMMARY = "Simple DirectMedia Layer"
DESCRIPTION = "Simple DirectMedia Layer is a cross-platform multimedia \
library designed to provide low level access to audio, keyboard, mouse, \
joystick, 3D hardware via OpenGL, and 2D video framebuffer."
HOMEPAGE = "http://www.libsdl.org"
BUGTRACKER = "http://bugzilla.libsdl.org/"
SECTION = "libs"
LICENSE = "Zlib & BSD-2-Clause"
LIC_FILES_CHKSUM = "\
file://LICENSE.txt;md5=25231a5b96ccdd8f39eb53c07717be64 \
file://src/hidapi/LICENSE.txt;md5=7c3949a631240cb6c31c50f3eb696077 \
file://src/hidapi/LICENSE-bsd.txt;md5=b5fa085ce0926bb50d0621620a82361f \
file://src/video/yuv2rgb/LICENSE;md5=79f8f3418d91531e05f0fc94ca67e071 \
"
# 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"
SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz"
S = "${WORKDIR}/SDL2-${PV}"
SRC_URI[sha256sum] = "01215ffbc8cfc4ad165ba7573750f15ddda1f971d5a66e9dcaffd37c587f473a"
inherit cmake lib_package binconfig-disabled pkgconfig upstream-version-is-even
BINCONFIG = "${bindir}/sdl2-config"
CVE_PRODUCT = "simple_directmedia_layer sdl"
EXTRA_OECMAKE = "-DSDL_OSS=OFF -DSDL_ESD=OFF -DSDL_ARTS=OFF \
-DSDL_DISKAUDIO=OFF -DSDL_NAS=OFF -DSDL_ESD_SHARED=OFF \
-DSDL_DUMMYVIDEO=OFF \
-DSDL_RPI=OFF \
-DSDL_PTHREADS=ON \
-DSDL_RPATH=OFF \
-DSDL_SNDIO=OFF \
-DSDL_X11_XCURSOR=OFF \
-DSDL_X11_XDBE=OFF \
-DSDL_X11_XFIXES=OFF \
-DSDL_X11_XINPUT=OFF \
-DSDL_X11_XRANDR=OFF \
-DSDL_X11_XSCRNSAVER=OFF \
-DSDL_X11_XSHAPE=OFF \
"
# 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_GL}"
PACKAGECONFIG:class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${PACKAGECONFIG_GL}"
PACKAGECONFIG ??= " \
${PACKAGECONFIG_GL} \
${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio pipewire x11 vulkan', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
${@bb.utils.contains("TUNE_FEATURES", "neon","arm-neon","",d)} \
"
PACKAGECONFIG[alsa] = "-DSDL_ALSA=ON,-DSDL_ALSA=OFF,alsa-lib,"
PACKAGECONFIG[arm-neon] = "-DSDL_ARMNEON=ON,-DSDL_ARMNEON=OFF"
PACKAGECONFIG[directfb] = "-DSDL_DIRECTFB=ON,-DSDL_DIRECTFB=OFF,directfb,directfb"
PACKAGECONFIG[gles2] = "-DSDL_OPENGLES=ON,-DSDL_OPENGLES=OFF,virtual/libgles2"
PACKAGECONFIG[jack] = "-DSDL_JACK=ON,-DSDL_JACK=OFF,jack"
PACKAGECONFIG[kmsdrm] = "-DSDL_KMSDRM=ON,-DSDL_KMSDRM=OFF,libdrm virtual/libgbm"
PACKAGECONFIG[libsamplerate] = "-DSDL_LIBSAMPLERATE=ON,-DSDL_LIBSAMPLERATE=OFF,libsamplerate0"
# The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
# so we'll just use libusb when it's available.
PACKAGECONFIG[libusb] = ",,libusb1"
PACKAGECONFIG[libdecor] = "-DSDL_WAYLAND_LIBDECOR=ON,-DSDL_WAYLAND_LIBDECOR=OFF,libdecor,libdecor"
PACKAGECONFIG[opengl] = "-DSDL_OPENGL=ON,-DSDL_OPENGL=OFF,virtual/egl"
PACKAGECONFIG[pipewire] = "-DSDL_PIPEWIRE_SHARED=ON,-DSDL_PIPEWIRE_SHARED=OFF,pipewire"
PACKAGECONFIG[pulseaudio] = "-DSDL_PULSEAUDIO=ON,-DSDL_PULSEAUDIO=OFF,pulseaudio"
PACKAGECONFIG[vulkan] = "-DSDL_VULKAN=ON,-DSDL_VULKAN=OFF"
PACKAGECONFIG[wayland] = "-DSDL_WAYLAND=ON,-DSDL_WAYLAND=OFF,wayland-native wayland wayland-protocols libxkbcommon"
PACKAGECONFIG[x11] = "-DSDL_X11=ON,-DSDL_X11=OFF,virtual/libx11 libxext libxrandr libxrender"
CFLAGS:append:class-native = " -DNO_SHARED_MEMORY"
FILES:${PN} += "${datadir}/licenses/SDL2/LICENSE.txt"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,8 @@
require libva.inc
PACKAGECONFIG ?= ""
do_install:append () {
rm -f ${D}${libdir}/*.so*
}

View File

@@ -0,0 +1,32 @@
SUMMARY = "libva-utils is a collection of utilities from libva project"
DESCRIPTION = "libva-utils is a collection of utilities \
and examples to exercise VA-API in accordance with the libva \
project.VA-API is an open-source library and API specification, \
which provides access to graphics hardware acceleration capabilities \
for video processing. It consists of a main library and driver-specific \
acceleration backends for each supported hardware vendor"
HOMEPAGE = "https://01.org/linuxmedia/vaapi"
BUGTRACKER = "https://github.com/intel/libva-utils/issues"
SECTION = "x11"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=b148fc8adf19dc9aec17cf9cd29a9a5e"
SRC_URI = "git://github.com/intel/libva-utils.git;branch=v2.20-branch;protocol=https"
SRCREV = "2ad888bb463dc9bfb3deb512ec9faf78f1d3bfa8"
S = "${WORKDIR}/git"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))$"
DEPENDS = "libva"
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] = "-Dx11=true, -Dx11=false,virtual/libx11 libxext libxfixes"
PACKAGECONFIG[wayland] = "-Dwayland=true, -Dwayland=false,wayland-native wayland"

View File

@@ -0,0 +1,37 @@
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 = "${GITHUB_BASE_URI}/download/${PV}/libva-${PV}.tar.bz2"
LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f"
SRC_URI[sha256sum] = "f72bdb4f48dfe71ad01f1cbefe069672a2c949a6abd51cf3c4d4784210badc49"
S = "${WORKDIR}/libva-${PV}"
GITHUB_BASE_URI = "https://github.com/intel/libva/releases"
DEPENDS = "libdrm"
inherit meson pkgconfig github-releases
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"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,15 @@
require libva.inc
PACKAGECONFIG ??= " \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'glx', '', d)} \
${@bb.utils.filter('DISTRO_FEATURES', 'x11 wayland', d)} \
"
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}"

View File

@@ -0,0 +1,24 @@
#!/bin/sh
#
# Very simple session manager for matchbox tools
#
# Uncomment below to enable parsing of debian menu entrys
# export MB_USE_DEB_MENUS=1
if [ -e $HOME/.matchbox/session ]
then
exec $HOME/.matchbox/session
fi
if [ -e /etc/matchbox/session ]
then
exec /etc/matchbox/session
fi
# Default files to run if $HOME/.matchbox/session or /etc/matchbox/session
# dont exist.
matchbox-desktop &
matchbox-panel &
exec matchbox-window-manager $@

View File

@@ -0,0 +1,25 @@
SUMMARY = "Custom Matchbox session files"
DESCRIPTION = "Very simple session manager for matchbox tools"
HOMEPAGE = "http://www.matchbox-project.org/"
BUGTRACKER = "http://bugzilla.yoctoproject.org/"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://matchbox-session;endline=20;md5=180f1c169a15d059a56c30094f6fb5ea"
SECTION = "x11"
RCONFLICTS:${PN} = "matchbox-common"
SRC_URI = "file://matchbox-session"
S = "${WORKDIR}"
inherit update-alternatives
ALTERNATIVE:${PN} = "x-session-manager"
ALTERNATIVE_TARGET[x-session-manager] = "${bindir}/matchbox-session"
ALTERNATIVE_PRIORITY = "100"
do_install() {
install -d ${D}/${bindir}
install -m 0755 ${S}/matchbox-session ${D}/${bindir}
}

View File

@@ -0,0 +1,42 @@
#
# This is an example keyboard config file for matchbox
#
# You can edit this file or change per user by copying to
# ~/.matchbox/kbdconfig
#
# Se the matchbox manual for more info ( http://projects.o-hand.com/matchbox )
### Window operation short cuts
<Alt>n=next
<Alt>p=prev
<Alt>c=close
<Alt>d=desktop
<Alt>m=!matchbox-remote -mbmenu
### App launching.
<ctrl><alt>x=!xterm
<ctrl><alt>r=!rxvt
### poky additions
XF86Calendar=!$contacts
telephone=!$dates
XF86Start=!matchbox-remote -desktop
F2=!matchbox-remote -mbmenu
#XF86Mail=!$tasks
#Escape=close
### windows style key shortcuts
<alt>Tab=next
<alt><shift>Tab=prev
<alt>space=taskmenu
<alt>escape=!matchbox-remote -mbmenu
<alt>f4=close
f11=fullscreen

View File

@@ -0,0 +1,38 @@
SUMMARY = "Matchbox lightweight window manager"
HOMEPAGE = "http://matchbox-project.org"
BUGTRACKER = "http://bugzilla.yoctoproject.org/"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://src/wm.h;endline=21;md5=ce20617ac10f26045cc57b8d977ab552 \
file://src/main.c;endline=21;md5=508f280276140250ce483e0a44f7a9ec \
file://src/wm.c;endline=21;md5=f54584fb0d48cfc2e6876e0f0e272e6c"
SECTION = "x11/wm"
DEPENDS = "libmatchbox virtual/libx11 libxext libxrender startup-notification expat gconf libxcursor libxfixes"
SRCREV = "ce8c1053270d960a7235ab5c3435f707541810a4"
SRC_URI = "git://git.yoctoproject.org/matchbox-window-manager;branch=master;protocol=https \
file://kbdconfig"
S = "${WORKDIR}/git"
inherit autotools pkgconfig features_check
# depends on virtual/libx11
REQUIRED_DISTRO_FEATURES = "x11"
FILES:${PN} = "${bindir}/* \
${datadir}/matchbox \
${sysconfdir}/matchbox \
${datadir}/themes/blondie/matchbox \
${datadir}/themes/Default/matchbox \
${datadir}/themes/MBOpus/matchbox"
EXTRA_OECONF = " --enable-startup-notification \
--disable-xrm \
--enable-expat \
--with-expat-lib=${STAGING_LIBDIR} \
--with-expat-includes=${STAGING_INCDIR}"
do_install:prepend() {
install ${WORKDIR}/kbdconfig ${S}/data/kbdconfig
}

View File

@@ -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

View File

@@ -0,0 +1,20 @@
SUMMARY = "Library for caching application menus"
DESCRIPTION = "A library creating and utilizing caches to speed up freedesktop.org application menus"
HOMEPAGE = "http://lxde.sourceforge.net/"
LICENSE = "LGPL-2.1-or-later"
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 \
file://0001-Support-gcc10-compilation.patch \
"
SRC_URI[md5sum] = "99999a0bca48b980105208760c8fd893"
SRC_URI[sha256sum] = "ed02eb459dcb398f69b9fa5bf4dd813020405afc84331115469cdf7be9273ec7"
UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lxde/files/menu-cache/1.1/"
inherit autotools gettext pkgconfig gtk-doc

View File

@@ -0,0 +1,53 @@
From 051f41beda540f0ae77b341db01a6de83c9e938a Mon Sep 17 00:00:00 2001
From: Markus Volk <f_l_k@t-online.de>
Date: Fri, 8 Mar 2024 15:53:11 +0100
Subject: [PATCH] Revert "meson: do not pull in clc for clover"
This reverts commit 815a6647eb1383e9dc704ffcc266d85f3b13338a.
Upstream-Status: Inappropriate [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27783/diffs?commit_id=a976f2c9f0c07f9e06cc9affd9124b45bc60c2bd]
Once the merge request above was added, it will only be possible to provide opencl spir-v with gallium-rusticl=true. This is not yet supported in the mesa recipe.
For now reverting this commit allows to still use clover with opencl-spirv, which would otherwise be broken starting from mesa 24.0.2.
After it was merged, this patch needs to be removed and rusticl support will be required
Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
meson.build | 3 ++-
src/compiler/meson.build | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 2db6185..741b5d1 100644
--- a/meson.build
+++ b/meson.build
@@ -813,6 +813,7 @@ if _opencl != 'disabled'
error('The Clover OpenCL state tracker requires rtti')
endif
+ with_clc = true
with_gallium_opencl = true
with_opencl_icd = _opencl == 'icd'
else
@@ -837,7 +838,7 @@ if with_gallium_rusticl
endif
dep_clc = null_dep
-if with_gallium_opencl or with_clc
+if with_clc
dep_clc = dependency('libclc')
endif
diff --git a/src/compiler/meson.build b/src/compiler/meson.build
index 8d73544..1dae56d 100644
--- a/src/compiler/meson.build
+++ b/src/compiler/meson.build
@@ -79,7 +79,7 @@ subdir('nir')
subdir('spirv')
-if with_clc
+if with_opencl_spirv
subdir('clc')
endif
if with_gallium

View File

@@ -0,0 +1,58 @@
From 4bd15a419e892da843489c374c58c5b29c40b5d6 Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@smile.fr>
Date: Tue, 6 Feb 2024 09:47:09 +0100
Subject: [PATCH 1/2] drisw: fix build without dri3
commit 1887368df41 ("glx/sw: check for modifier support in the kopper path")
added dri3_priv.h header and dri3_check_multibuffer() function in drisw that
can be build without dri3.
i686-buildroot-linux-gnu/bin/ld: src/glx/libglx.a.p/drisw_glx.c.o: in function `driswCreateScreenDriver':
drisw_glx.c:(.text.driswCreateScreenDriver+0x3a0): undefined reference to `dri3_check_multibuffer'
collect2: error: ld returned 1 exit status
Add HAVE_DRI3 guard around dri3_priv.h header and the zink code using
dri3_check_multibuffer().
Fixes: 1887368df41 ("glx/sw: check for modifier support in the kopper path")
Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27478]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/glx/drisw_glx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index 3d3f752..4b19e2d 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -32,7 +32,9 @@
#include <dlfcn.h>
#include "dri_common.h"
#include "drisw_priv.h"
+#ifdef HAVE_DRI3
#include "dri3_priv.h"
+#endif
#include <X11/extensions/shmproto.h>
#include <assert.h>
#include <vulkan/vulkan_core.h>
@@ -995,6 +997,7 @@ driswCreateScreenDriver(int screen, struct glx_display *priv,
goto handle_error;
}
+#ifdef HAVE_DRI3
if (pdpyp->zink) {
bool err;
psc->has_multibuffer = dri3_check_multibuffer(priv->dpy, &err);
@@ -1005,6 +1008,7 @@ driswCreateScreenDriver(int screen, struct glx_display *priv,
goto handle_error;
}
}
+#endif
glx_config_destroy_list(psc->base.configs);
psc->base.configs = configs;
--
2.44.0

View File

@@ -0,0 +1,24 @@
From 02cc21800fe29f566add525e63f619c0536d6e7b 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 5a5eab4..e499516 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>

View File

@@ -0,0 +1,42 @@
From 62495ebb977866c52d5bed8499a547c49f0d9bc1 Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@smile.fr>
Date: Tue, 6 Feb 2024 09:47:10 +0100
Subject: [PATCH 2/2] glxext: don't try zink if not enabled in mesa
Commit 7d9ea77b459 ("glx: add automatic zink fallback loading between hw and sw drivers")
added an automatic zink fallback even when the zink gallium is not
enabled at build time.
It leads to unexpected error log while loading drisw driver and
zink is not installed on the rootfs:
MESA-LOADER: failed to open zink: /usr/lib/dri/zink_dri.so
Fixes: 7d9ea77b459 ("glx: add automatic zink fallback loading between hw and sw drivers")
Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27478]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/glx/glxext.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
index 05c825a..7a06aa9 100644
--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -908,9 +908,11 @@ __glXInitialize(Display * dpy)
#endif /* HAVE_DRI3 */
if (!debug_get_bool_option("LIBGL_DRI2_DISABLE", false))
dpyPriv->dri2Display = dri2CreateDisplay(dpy);
+#if defined(HAVE_ZINK)
if (!dpyPriv->dri3Display && !dpyPriv->dri2Display)
try_zink = !debug_get_bool_option("LIBGL_KOPPER_DISABLE", false) &&
!getenv("GALLIUM_DRIVER");
+#endif /* HAVE_ZINK */
}
#endif /* GLX_USE_DRM */
if (glx_direct)
--
2.44.0

View File

@@ -0,0 +1,31 @@
SUMMARY = "The OpenGL utility toolkit"
DESCRIPTION = "GLU is a utility toolkit used with OpenGL implementations"
HOMEPAGE = "http://mesa3d.org"
BUGTRACKER = "https://bugs.freedesktop.org"
SECTION = "x11"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://include/GL/glu.h;endline=29;md5=6b79c570f644363b356456e7d44471d9 \
file://src/libtess/tess.c;endline=29;md5=6b79c570f644363b356456e7d44471d9"
# Epoch as this used to be part of mesa
PE = "2"
SRC_URI = "https://mesa.freedesktop.org/archive/glu/glu-${PV}.tar.xz \
"
SRC_URI[sha256sum] = "bd43fe12f374b1192eb15fe20e45ff456b9bc26ab57f0eee919f96ca0f8a330f"
S = "${WORKDIR}/glu-${PV}"
DEPENDS = "virtual/libgl"
inherit meson pkgconfig features_check
EXTRA_OEMESON = "-Dgl_provider=gl"
# Requires libGL.so which is provided by mesa when x11 in DISTRO_FEATURES
REQUIRED_DISTRO_FEATURES = "x11 opengl"
# Remove the mesa-glu dependency in mesa-glu-dev, as mesa-glu is empty
DEV_PKG_DEPENDENCY = ""

View File

@@ -0,0 +1,624 @@
From b695c3a3fa3f4cd48c13aa26542110de27075518 Mon Sep 17 00:00:00 2001
From: Drew Moseley <drew_moseley@mentor.com>
Date: Mon, 12 May 2014 15:22:32 -0400
Subject: [PATCH 1/9] mesa-demos: Add missing data files.
Add some data files that are present in the git repository:
http://cgit.freedesktop.org/mesa/demos/tree/?id=mesa-demos-8.1.0
but not in the release tarball
ftp://ftp.freedesktop.org/pub/mesa/demos/8.1.0/mesa-demos-8.1.0.tar.bz2
Upstream-Status: Backport
Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
src/fpglsl/depth-read.glsl | 4 +
src/fpglsl/infinite-loop.glsl | 7 +
src/glsl/CH11-bumpmaptex.frag | 47 +++++++
src/glsl/blinking-teapot.frag | 31 +++++
src/glsl/blinking-teapot.vert | 16 +++
src/glsl/convolution.frag | 21 +++
src/glsl/simplex-noise.glsl | 279 ++++++++++++++++++++++++++++++++++++++++
src/glsl/skinning.vert | 24 ++++
src/perf/glslstateschange1.frag | 19 +++
src/perf/glslstateschange1.vert | 14 ++
src/perf/glslstateschange2.frag | 17 +++
src/perf/glslstateschange2.vert | 14 ++
src/vpglsl/infinite-loop.glsl | 8 ++
13 files changed, 501 insertions(+)
create mode 100644 src/fpglsl/depth-read.glsl
create mode 100644 src/fpglsl/infinite-loop.glsl
create mode 100644 src/glsl/CH11-bumpmaptex.frag
create mode 100644 src/glsl/blinking-teapot.frag
create mode 100644 src/glsl/blinking-teapot.vert
create mode 100644 src/glsl/convolution.frag
create mode 100644 src/glsl/simplex-noise.glsl
create mode 100644 src/glsl/skinning.vert
create mode 100644 src/perf/glslstateschange1.frag
create mode 100644 src/perf/glslstateschange1.vert
create mode 100644 src/perf/glslstateschange2.frag
create mode 100644 src/perf/glslstateschange2.vert
create mode 100644 src/vpglsl/infinite-loop.glsl
diff --git a/src/fpglsl/depth-read.glsl b/src/fpglsl/depth-read.glsl
new file mode 100644
index 0000000..86d298e
--- /dev/null
+++ b/src/fpglsl/depth-read.glsl
@@ -0,0 +1,4 @@
+void main()
+{
+ gl_FragColor = gl_FragCoord.zzzz;
+}
diff --git a/src/fpglsl/infinite-loop.glsl b/src/fpglsl/infinite-loop.glsl
new file mode 100644
index 0000000..c6dc6ee
--- /dev/null
+++ b/src/fpglsl/infinite-loop.glsl
@@ -0,0 +1,7 @@
+void main() {
+ vec4 sum = vec4(0);
+ for (int i = 1; i != 2; i += 2) {
+ sum += vec4(0.1, 0.1, 0.1, 0.1);
+ }
+ gl_FragColor = sum;
+}
diff --git a/src/glsl/CH11-bumpmaptex.frag b/src/glsl/CH11-bumpmaptex.frag
new file mode 100644
index 0000000..b5dabb4
--- /dev/null
+++ b/src/glsl/CH11-bumpmaptex.frag
@@ -0,0 +1,47 @@
+//
+// Fragment shader for procedural bumps
+//
+// Authors: John Kessenich, Randi Rost
+//
+// Copyright (c) 2002-2006 3Dlabs Inc. Ltd.
+//
+// See 3Dlabs-License.txt for license information
+//
+// Texture mapping/modulation added by Brian Paul
+//
+
+varying vec3 LightDir;
+varying vec3 EyeDir;
+
+uniform float BumpDensity; // = 16.0
+uniform float BumpSize; // = 0.15
+uniform float SpecularFactor; // = 0.5
+
+uniform sampler2D Tex;
+
+void main()
+{
+ vec3 ambient = vec3(0.25);
+ vec3 litColor;
+ vec2 c = BumpDensity * gl_TexCoord[0].st;
+ vec2 p = fract(c) - vec2(0.5);
+
+ float d, f;
+ d = p.x * p.x + p.y * p.y;
+ f = inversesqrt(d + 1.0);
+
+ if (d >= BumpSize)
+ { p = vec2(0.0); f = 1.0; }
+
+ vec3 SurfaceColor = texture2D(Tex, gl_TexCoord[0].st).xyz;
+
+ vec3 normDelta = vec3(p.x, p.y, 1.0) * f;
+ litColor = SurfaceColor * (ambient + max(dot(normDelta, LightDir), 0.0));
+ vec3 reflectDir = reflect(LightDir, normDelta);
+
+ float spec = max(dot(EyeDir, reflectDir), 0.0);
+ spec *= SpecularFactor;
+ litColor = min(litColor + spec, vec3(1.0));
+
+ gl_FragColor = vec4(litColor, 1.0);
+}
diff --git a/src/glsl/blinking-teapot.frag b/src/glsl/blinking-teapot.frag
new file mode 100644
index 0000000..0db060b
--- /dev/null
+++ b/src/glsl/blinking-teapot.frag
@@ -0,0 +1,31 @@
+#extension GL_ARB_uniform_buffer_object : enable
+
+layout(std140) uniform colors0
+{
+ float DiffuseCool;
+ float DiffuseWarm;
+ vec3 SurfaceColor;
+ vec3 WarmColor;
+ vec3 CoolColor;
+ vec4 some[8];
+};
+
+varying float NdotL;
+varying vec3 ReflectVec;
+varying vec3 ViewVec;
+
+void main (void)
+{
+
+ vec3 kcool = min(CoolColor + DiffuseCool * SurfaceColor, 1.0);
+ vec3 kwarm = min(WarmColor + DiffuseWarm * SurfaceColor, 1.0);
+ vec3 kfinal = mix(kcool, kwarm, NdotL);
+
+ vec3 nreflect = normalize(ReflectVec);
+ vec3 nview = normalize(ViewVec);
+
+ float spec = max(dot(nreflect, nview), 0.0);
+ spec = pow(spec, 32.0);
+
+ gl_FragColor = vec4 (min(kfinal + spec, 1.0), 1.0);
+}
diff --git a/src/glsl/blinking-teapot.vert b/src/glsl/blinking-teapot.vert
new file mode 100644
index 0000000..397d733
--- /dev/null
+++ b/src/glsl/blinking-teapot.vert
@@ -0,0 +1,16 @@
+vec3 LightPosition = vec3(0.0, 10.0, 4.0);
+
+varying float NdotL;
+varying vec3 ReflectVec;
+varying vec3 ViewVec;
+
+void main(void)
+{
+ vec3 ecPos = vec3 (gl_ModelViewMatrix * gl_Vertex);
+ vec3 tnorm = normalize(gl_NormalMatrix * gl_Normal);
+ vec3 lightVec = normalize(LightPosition - ecPos);
+ ReflectVec = normalize(reflect(-lightVec, tnorm));
+ ViewVec = normalize(-ecPos);
+ NdotL = (dot(lightVec, tnorm) + 1.0) * 0.5;
+ gl_Position = ftransform();
+}
diff --git a/src/glsl/convolution.frag b/src/glsl/convolution.frag
new file mode 100644
index 0000000..e49b8ac
--- /dev/null
+++ b/src/glsl/convolution.frag
@@ -0,0 +1,21 @@
+
+const int KernelSize = 9;
+
+//texture offsets
+uniform vec2 Offset[KernelSize];
+//convolution kernel
+uniform vec4 KernelValue[KernelSize];
+uniform sampler2D srcTex;
+uniform vec4 ScaleFactor;
+uniform vec4 BaseColor;
+
+void main(void)
+{
+ int i;
+ vec4 sum = vec4(0.0);
+ for (i = 0; i < KernelSize; ++i) {
+ vec4 tmp = texture2D(srcTex, gl_TexCoord[0].st + Offset[i]);
+ sum += tmp * KernelValue[i];
+ }
+ gl_FragColor = sum * ScaleFactor + BaseColor;
+}
diff --git a/src/glsl/simplex-noise.glsl b/src/glsl/simplex-noise.glsl
new file mode 100644
index 0000000..b6833cb
--- /dev/null
+++ b/src/glsl/simplex-noise.glsl
@@ -0,0 +1,279 @@
+//
+// Description : Array and textureless GLSL 2D/3D/4D simplex
+// noise functions.
+// Author : Ian McEwan, Ashima Arts.
+// Maintainer : ijm
+// Lastmod : 20110223
+// License : Copyright (C) 2011 Ashima Arts. All rights reserved.
+// Distributed under the Artistic License 2.0; See LICENCE file.
+//
+
+#define NORMALIZE_GRADIENTS
+#undef USE_CIRCLE
+#define COLLAPSE_SORTNET
+
+float permute(float x0,vec3 p) {
+ float x1 = mod(x0 * p.y, p.x);
+ return floor( mod( (x1 + p.z) *x0, p.x ));
+ }
+vec2 permute(vec2 x0,vec3 p) {
+ vec2 x1 = mod(x0 * p.y, p.x);
+ return floor( mod( (x1 + p.z) *x0, p.x ));
+ }
+vec3 permute(vec3 x0,vec3 p) {
+ vec3 x1 = mod(x0 * p.y, p.x);
+ return floor( mod( (x1 + p.z) *x0, p.x ));
+ }
+vec4 permute(vec4 x0,vec3 p) {
+ vec4 x1 = mod(x0 * p.y, p.x);
+ return floor( mod( (x1 + p.z) *x0, p.x ));
+ }
+
+uniform vec4 pParam;
+// Example
+// const vec4 pParam = vec4( 17.* 17., 34., 1., 7.);
+
+float taylorInvSqrt(float r)
+ {
+ return ( 0.83666002653408 + 0.7*0.85373472095314 - 0.85373472095314 * r );
+ }
+
+float simplexNoise2(vec2 v)
+ {
+ const vec2 C = vec2(0.211324865405187134, // (3.0-sqrt(3.0))/6.;
+ 0.366025403784438597); // 0.5*(sqrt(3.0)-1.);
+ const vec3 D = vec3( 0., 0.5, 2.0) * 3.14159265358979312;
+// First corner
+ vec2 i = floor(v + dot(v, C.yy) );
+ vec2 x0 = v - i + dot(i, C.xx);
+
+// Other corners
+ vec2 i1 = (x0.x > x0.y) ? vec2(1.,0.) : vec2(0.,1.) ;
+
+ // x0 = x0 - 0. + 0. * C
+ vec2 x1 = x0 - i1 + 1. * C.xx ;
+ vec2 x2 = x0 - 1. + 2. * C.xx ;
+
+// Permutations
+ i = mod(i, pParam.x);
+ vec3 p = permute( permute(
+ i.y + vec3(0., i1.y, 1. ), pParam.xyz)
+ + i.x + vec3(0., i1.x, 1. ), pParam.xyz);
+
+#ifndef USE_CIRCLE
+// ( N points uniformly over a line, mapped onto a diamond.)
+ vec3 x = fract(p / pParam.w) ;
+ vec3 h = 0.5 - abs(x) ;
+
+ vec3 sx = vec3(lessThan(x,D.xxx)) *2. -1.;
+ vec3 sh = vec3(lessThan(h,D.xxx));
+
+ vec3 a0 = x + sx*sh;
+ vec2 p0 = vec2(a0.x,h.x);
+ vec2 p1 = vec2(a0.y,h.y);
+ vec2 p2 = vec2(a0.z,h.z);
+
+#ifdef NORMALISE_GRADIENTS
+ p0 *= taylorInvSqrt(dot(p0,p0));
+ p1 *= taylorInvSqrt(dot(p1,p1));
+ p2 *= taylorInvSqrt(dot(p2,p2));
+#endif
+
+ vec3 g = 2.0 * vec3( dot(p0, x0), dot(p1, x1), dot(p2, x2) );
+#else
+// N points around a unit circle.
+ vec3 phi = D.z * mod(p,pParam.w) /pParam.w ;
+ vec4 a0 = sin(phi.xxyy+D.xyxy);
+ vec2 a1 = sin(phi.zz +D.xy);
+ vec3 g = vec3( dot(a0.xy, x0), dot(a0.zw, x1), dot(a1.xy, x2) );
+#endif
+// mix
+ vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.);
+ m = m*m ;
+ return 1.66666* 70.*dot(m*m, g);
+ }
+
+float simplexNoise3(vec3 v)
+ {
+ const vec2 C = vec2(1./6. , 1./3. ) ;
+ const vec4 D = vec4(0., 0.5, 1.0, 2.0);
+
+// First corner
+ vec3 i = floor(v + dot(v, C.yyy) );
+ vec3 x0 = v - i + dot(i, C.xxx) ;
+
+// Other corners
+#ifdef COLLAPSE_SORTNET
+ vec3 g = vec3( greaterThan( x0.xyz, x0.yzx) );
+ vec3 l = vec3( lessThanEqual( x0.xyz, x0.yzx) );
+
+ vec3 i1 = g.xyz * l.zxy;
+ vec3 i2 = max( g.xyz, l.zxy);
+#else
+// Keeping this clean - let the compiler optimize.
+ vec3 q1;
+ q1.x = max(x0.x, x0.y);
+ q1.y = min(x0.x, x0.y);
+ q1.z = x0.z;
+
+ vec3 q2;
+ q2.x = max(q1.x,q1.z);
+ q2.z = min(q1.x,q1.z);
+ q2.y = q1.y;
+
+ vec3 q3;
+ q3.y = max(q2.y, q2.z);
+ q3.z = min(q2.y, q2.z);
+ q3.x = q2.x;
+
+ vec3 i1 = vec3(equal(q3.xxx, x0));
+ vec3 i2 = i1 + vec3(equal(q3.yyy, x0));
+#endif
+
+ // x0 = x0 - 0. + 0. * C
+ vec3 x1 = x0 - i1 + 1. * C.xxx;
+ vec3 x2 = x0 - i2 + 2. * C.xxx;
+ vec3 x3 = x0 - 1. + 3. * C.xxx;
+
+// Permutations
+ i = mod(i, pParam.x );
+ vec4 p = permute( permute( permute(
+ i.z + vec4(0., i1.z, i2.z, 1. ), pParam.xyz)
+ + i.y + vec4(0., i1.y, i2.y, 1. ), pParam.xyz)
+ + i.x + vec4(0., i1.x, i2.x, 1. ), pParam.xyz);
+
+// Gradients
+// ( N*N points uniformly over a square, mapped onto a octohedron.)
+ float n_ = 1.0/pParam.w ;
+ vec3 ns = n_ * D.wyz - D.xzx ;
+
+ vec4 j = p - pParam.w*pParam.w*floor(p * ns.z *ns.z); // mod(p,N*N)
+
+ vec4 x_ = floor(j * ns.z) ;
+ vec4 y_ = floor(j - pParam.w * x_ ) ; // mod(j,N)
+
+ vec4 x = x_ *ns.x + ns.yyyy;
+ vec4 y = y_ *ns.x + ns.yyyy;
+ vec4 h = 1. - abs(x) - abs(y);
+
+ vec4 b0 = vec4( x.xy, y.xy );
+ vec4 b1 = vec4( x.zw, y.zw );
+
+ vec4 s0 = vec4(lessThan(b0,D.xxxx)) *2. -1.;
+ vec4 s1 = vec4(lessThan(b1,D.xxxx)) *2. -1.;
+ vec4 sh = vec4(lessThan(h, D.xxxx));
+
+ vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;
+ vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;
+
+ vec3 p0 = vec3(a0.xy,h.x);
+ vec3 p1 = vec3(a0.zw,h.y);
+ vec3 p2 = vec3(a1.xy,h.z);
+ vec3 p3 = vec3(a1.zw,h.w);
+
+#ifdef NORMALISE_GRADIENTS
+ p0 *= taylorInvSqrt(dot(p0,p0));
+ p1 *= taylorInvSqrt(dot(p1,p1));
+ p2 *= taylorInvSqrt(dot(p2,p2));
+ p3 *= taylorInvSqrt(dot(p3,p3));
+#endif
+
+// Mix
+ vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.);
+ m = m * m;
+//used to be 64.
+ return 48.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),
+ dot(p2,x2), dot(p3,x3) ) );
+ }
+
+vec4 grad4(float j, vec4 ip)
+ {
+ const vec4 ones = vec4(1.,1.,1.,-1.);
+ vec4 p,s;
+
+ p.xyz = floor( fract (vec3(j) * ip.xyz) *pParam.w) * ip.z -1.0;
+ p.w = 1.5 - dot(abs(p.xyz), ones.xyz);
+ s = vec4(lessThan(p,vec4(0.)));
+ p.xyz = p.xyz + (s.xyz*2.-1.) * s.www;
+
+ return p;
+ }
+
+float simplexNoise4(vec4 v)
+ {
+ const vec2 C = vec2( 0.138196601125010504, // (5 - sqrt(5))/20 G4
+ 0.309016994374947451); // (sqrt(5) - 1)/4 F4
+// First corner
+ vec4 i = floor(v + dot(v, C.yyyy) );
+ vec4 x0 = v - i + dot(i, C.xxxx);
+
+// Other corners
+
+// Force existance of strict total ordering in sort.
+ vec4 q0 = floor(x0 * 1024.0) + vec4( 0., 1./4., 2./4. , 3./4.);
+ vec4 q1;
+ q1.xy = max(q0.xy,q0.zw); // x:z y:w
+ q1.zw = min(q0.xy,q0.zw);
+
+ vec4 q2;
+ q2.xz = max(q1.xz,q1.yw); // x:y z:w
+ q2.yw = min(q1.xz,q1.yw);
+
+ vec4 q3;
+ q3.y = max(q2.y,q2.z); // y:z
+ q3.z = min(q2.y,q2.z);
+ q3.xw = q2.xw;
+
+ vec4 i1 = vec4(lessThanEqual(q3.xxxx, q0));
+ vec4 i2 = vec4(lessThanEqual(q3.yyyy, q0));
+ vec4 i3 = vec4(lessThanEqual(q3.zzzz, q0));
+
+ // x0 = x0 - 0. + 0. * C
+ vec4 x1 = x0 - i1 + 1. * C.xxxx;
+ vec4 x2 = x0 - i2 + 2. * C.xxxx;
+ vec4 x3 = x0 - i3 + 3. * C.xxxx;
+ vec4 x4 = x0 - 1. + 4. * C.xxxx;
+
+// Permutations
+ i = mod(i, pParam.x );
+ float j0 = permute( permute( permute( permute (
+ i.w, pParam.xyz) + i.z, pParam.xyz)
+ + i.y, pParam.xyz) + i.x, pParam.xyz);
+ vec4 j1 = permute( permute( permute( permute (
+ i.w + vec4(i1.w, i2.w, i3.w, 1. ), pParam.xyz)
+ + i.z + vec4(i1.z, i2.z, i3.z, 1. ), pParam.xyz)
+ + i.y + vec4(i1.y, i2.y, i3.y, 1. ), pParam.xyz)
+ + i.x + vec4(i1.x, i2.x, i3.x, 1. ), pParam.xyz);
+// Gradients
+// ( N*N*N points uniformly over a cube, mapped onto a 4-octohedron.)
+ vec4 ip = pParam ;
+ ip.xy *= pParam.w ;
+ ip.x *= pParam.w ;
+ ip = vec4(1.,1.,1.,2.) / ip ;
+
+ vec4 p0 = grad4(j0, ip);
+ vec4 p1 = grad4(j1.x, ip);
+ vec4 p2 = grad4(j1.y, ip);
+ vec4 p3 = grad4(j1.z, ip);
+ vec4 p4 = grad4(j1.w, ip);
+
+#ifdef NORMALISE_GRADIENTS
+ p0 *= taylorInvSqrt(dot(p0,p0));
+ p1 *= taylorInvSqrt(dot(p1,p1));
+ p2 *= taylorInvSqrt(dot(p2,p2));
+ p3 *= taylorInvSqrt(dot(p3,p3));
+ p4 *= taylorInvSqrt(dot(p4,p4));
+#endif
+
+// Mix
+ vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.);
+ vec2 m1 = max(0.6 - vec2(dot(x3,x3), dot(x4,x4) ), 0.);
+ m0 = m0 * m0;
+ m1 = m1 * m1;
+ return 32. * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))
+ + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;
+
+ }
+
+
+
diff --git a/src/glsl/skinning.vert b/src/glsl/skinning.vert
new file mode 100644
index 0000000..28970ee
--- /dev/null
+++ b/src/glsl/skinning.vert
@@ -0,0 +1,24 @@
+// Vertex weighting/blendin shader
+// Brian Paul
+// 4 Nov 2008
+
+uniform mat4 mat0, mat1;
+attribute float weight;
+
+void main()
+{
+ // simple diffuse shading
+ // Note that we should really transform the normal vector along with
+ // the postion below... someday.
+ vec3 lightVec = vec3(0, 0, 1);
+ vec3 norm = gl_NormalMatrix * gl_Normal;
+ float dot = 0.2 + max(0.0, dot(norm, lightVec));
+ gl_FrontColor = vec4(dot);
+
+ // compute sum of weighted transformations
+ vec4 pos0 = mat0 * gl_Vertex;
+ vec4 pos1 = mat1 * gl_Vertex;
+ vec4 pos = mix(pos0, pos1, weight);
+
+ gl_Position = gl_ModelViewProjectionMatrix * pos;
+}
diff --git a/src/perf/glslstateschange1.frag b/src/perf/glslstateschange1.frag
new file mode 100644
index 0000000..0839436
--- /dev/null
+++ b/src/perf/glslstateschange1.frag
@@ -0,0 +1,19 @@
+// Multi-texture fragment shader
+// Brian Paul
+
+// Composite second texture over first.
+// We're assuming the 2nd texture has a meaningful alpha channel.
+
+uniform sampler2D tex1;
+uniform sampler2D tex2;
+uniform vec4 UniV1;
+uniform vec4 UniV2;
+
+void main()
+{
+ vec4 t3;
+ vec4 t1 = texture2D(tex1, gl_TexCoord[0].xy);
+ vec4 t2 = texture2D(tex2, gl_TexCoord[1].xy);
+ t3 = mix(t1, t2, t2.w);
+ gl_FragColor = t3 + UniV1 + UniV2;
+}
diff --git a/src/perf/glslstateschange1.vert b/src/perf/glslstateschange1.vert
new file mode 100644
index 0000000..cef50db
--- /dev/null
+++ b/src/perf/glslstateschange1.vert
@@ -0,0 +1,14 @@
+// Multi-texture vertex shader
+// Brian Paul
+
+
+attribute vec4 TexCoord0, TexCoord1;
+attribute vec4 VertCoord;
+
+void main()
+{
+ gl_TexCoord[0] = TexCoord0;
+ gl_TexCoord[1] = TexCoord1;
+ // note: may use gl_Vertex or VertCoord here for testing:
+ gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+}
diff --git a/src/perf/glslstateschange2.frag b/src/perf/glslstateschange2.frag
new file mode 100644
index 0000000..0df0319
--- /dev/null
+++ b/src/perf/glslstateschange2.frag
@@ -0,0 +1,17 @@
+// Multi-texture fragment shader
+// Brian Paul
+
+// Composite second texture over first.
+// We're assuming the 2nd texture has a meaningful alpha channel.
+
+uniform sampler2D tex1;
+uniform sampler2D tex2;
+uniform vec4 UniV1;
+uniform vec4 UniV2;
+
+void main()
+{
+ vec4 t1 = texture2D(tex1, gl_TexCoord[0].xy);
+ vec4 t2 = texture2D(tex2, gl_TexCoord[1].xy);
+ gl_FragColor = t1 + t2 + UniV1 + UniV2;
+}
diff --git a/src/perf/glslstateschange2.vert b/src/perf/glslstateschange2.vert
new file mode 100644
index 0000000..cef50db
--- /dev/null
+++ b/src/perf/glslstateschange2.vert
@@ -0,0 +1,14 @@
+// Multi-texture vertex shader
+// Brian Paul
+
+
+attribute vec4 TexCoord0, TexCoord1;
+attribute vec4 VertCoord;
+
+void main()
+{
+ gl_TexCoord[0] = TexCoord0;
+ gl_TexCoord[1] = TexCoord1;
+ // note: may use gl_Vertex or VertCoord here for testing:
+ gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+}
diff --git a/src/vpglsl/infinite-loop.glsl b/src/vpglsl/infinite-loop.glsl
new file mode 100644
index 0000000..bc7ae4b
--- /dev/null
+++ b/src/vpglsl/infinite-loop.glsl
@@ -0,0 +1,8 @@
+void main() {
+ gl_Position = gl_Vertex;
+ vec4 sum = vec4(0);
+ for (int i = 1; i != 2; i += 2) {
+ sum += vec4(0.1, 0.1, 0.1, 0.1);
+ }
+ gl_FrontColor = sum;
+}
--
2.0.0

View File

@@ -0,0 +1,234 @@
From 5e10108d76a59abac21c7e540bcfd2ddaccca2cb Mon Sep 17 00:00:00 2001
From: Drew Moseley <drew_moseley@mentor.com>
Date: Fri, 9 May 2014 11:50:24 -0400
Subject: [PATCH 4/9] Use DEMOS_DATA_DIR to locate data files
Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=78496]
Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
---
src/glsl/bezier.c | 2 +-
src/glsl/blinking-teapot.c | 4 ++--
src/glsl/brick.c | 4 ++--
src/glsl/bump.c | 6 +++---
src/glsl/convolutions.c | 2 +-
src/glsl/mandelbrot.c | 4 ++--
src/glsl/multitex.c | 4 ++--
src/glsl/simplex-noise.c | 2 +-
src/glsl/skinning.c | 4 ++--
src/glsl/texdemo1.c | 8 ++++----
src/glsl/toyball.c | 4 ++--
src/objviewer/objview.c | 12 ++++++------
src/perf/glslstateschange.c | 8 ++++----
13 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/src/glsl/bezier.c b/src/glsl/bezier.c
index 0b56bc1..e01603d 100644
--- a/src/glsl/bezier.c
+++ b/src/glsl/bezier.c
@@ -13,7 +13,7 @@
#include "glut_wrap.h"
#include "shaderutil.h"
-static const char *filename = "bezier.geom";
+static const char *filename = DEMOS_DATA_DIR "bezier.geom";
static GLuint fragShader;
static GLuint vertShader;
diff --git a/src/glsl/blinking-teapot.c b/src/glsl/blinking-teapot.c
index e3bf24d..7662b1f 100644
--- a/src/glsl/blinking-teapot.c
+++ b/src/glsl/blinking-teapot.c
@@ -63,8 +63,8 @@ init_opengl (void)
exit(1);
}
- vshad_id = CompileShaderFile (GL_VERTEX_SHADER, "blinking-teapot.vert");
- fshad_id = CompileShaderFile (GL_FRAGMENT_SHADER, "blinking-teapot.frag");
+ vshad_id = CompileShaderFile (GL_VERTEX_SHADER, DEMOS_DATA_DIR "blinking-teapot.vert");
+ fshad_id = CompileShaderFile (GL_FRAGMENT_SHADER, DEMOS_DATA_DIR "blinking-teapot.frag");
prog_id = LinkShaders (vshad_id, fshad_id);
UseProgram (prog_id);
diff --git a/src/glsl/brick.c b/src/glsl/brick.c
index 3021856..fe5f190 100644
--- a/src/glsl/brick.c
+++ b/src/glsl/brick.c
@@ -14,8 +14,8 @@
#include "shaderutil.h"
-static char *FragProgFile = "CH06-brick.frag";
-static char *VertProgFile = "CH06-brick.vert";
+static char *FragProgFile = DEMOS_DATA_DIR "CH06-brick.frag";
+static char *VertProgFile = DEMOS_DATA_DIR "CH06-brick.vert";
/* program/shader objects */
static GLuint fragShader;
diff --git a/src/glsl/bump.c b/src/glsl/bump.c
index 59f62cd..3a1b20a 100644
--- a/src/glsl/bump.c
+++ b/src/glsl/bump.c
@@ -15,9 +15,9 @@
#include "readtex.h"
-static char *FragProgFile = "CH11-bumpmap.frag";
-static char *FragTexProgFile = "CH11-bumpmaptex.frag";
-static char *VertProgFile = "CH11-bumpmap.vert";
+static char *FragProgFile = DEMOS_DATA_DIR "CH11-bumpmap.frag";
+static char *FragTexProgFile = DEMOS_DATA_DIR "CH11-bumpmaptex.frag";
+static char *VertProgFile = DEMOS_DATA_DIR "CH11-bumpmap.vert";
static char *TextureFile = DEMOS_DATA_DIR "tile.rgb";
/* program/shader objects */
diff --git a/src/glsl/convolutions.c b/src/glsl/convolutions.c
index a120cfe..9312f00 100644
--- a/src/glsl/convolutions.c
+++ b/src/glsl/convolutions.c
@@ -340,7 +340,7 @@ static void init(void)
menuInit();
readTexture(textureLocation);
- createProgram("convolution.vert", "convolution.frag");
+ createProgram(DEMOS_DATA_DIR "convolution.vert", DEMOS_DATA_DIR "convolution.frag");
glEnable(GL_TEXTURE_2D);
glClearColor(1.0, 1.0, 1.0, 1.0);
diff --git a/src/glsl/mandelbrot.c b/src/glsl/mandelbrot.c
index 31ede1d..ab34a0f 100644
--- a/src/glsl/mandelbrot.c
+++ b/src/glsl/mandelbrot.c
@@ -14,8 +14,8 @@
#include "shaderutil.h"
-static char *FragProgFile = "CH18-mandel.frag";
-static char *VertProgFile = "CH18-mandel.vert";
+static char *FragProgFile = DEMOS_DATA_DIR "CH18-mandel.frag";
+static char *VertProgFile = DEMOS_DATA_DIR "CH18-mandel.vert";
/* program/shader objects */
static GLuint fragShader;
diff --git a/src/glsl/multitex.c b/src/glsl/multitex.c
index 262ea50..546bd27 100644
--- a/src/glsl/multitex.c
+++ b/src/glsl/multitex.c
@@ -35,8 +35,8 @@
static const char *Demo = "multitex";
-static const char *VertFile = "multitex.vert";
-static const char *FragFile = "multitex.frag";
+static const char *VertFile = DEMOS_DATA_DIR "multitex.vert";
+static const char *FragFile = DEMOS_DATA_DIR "multitex.frag";
static const char *TexFiles[2] =
{
diff --git a/src/glsl/simplex-noise.c b/src/glsl/simplex-noise.c
index 13fdd5d..885f01e 100644
--- a/src/glsl/simplex-noise.c
+++ b/src/glsl/simplex-noise.c
@@ -169,7 +169,7 @@ SpecialKey(int key, int x, int y)
static void
Init(void)
{
- const char *filename = "simplex-noise.glsl";
+ const char *filename = DEMOS_DATA_DIR "simplex-noise.glsl";
char noiseText[10000];
FILE *f;
int len;
diff --git a/src/glsl/skinning.c b/src/glsl/skinning.c
index bf38d77..536d475 100644
--- a/src/glsl/skinning.c
+++ b/src/glsl/skinning.c
@@ -20,8 +20,8 @@
#define M_PI 3.1415926535
#endif
-static char *FragProgFile = "skinning.frag";
-static char *VertProgFile = "skinning.vert";
+static char *FragProgFile = DEMOS_DATA_DIR "skinning.frag";
+static char *VertProgFile = DEMOS_DATA_DIR "skinning.vert";
/* program/shader objects */
static GLuint fragShader;
diff --git a/src/glsl/texdemo1.c b/src/glsl/texdemo1.c
index 6cde239..a082342 100644
--- a/src/glsl/texdemo1.c
+++ b/src/glsl/texdemo1.c
@@ -35,11 +35,11 @@
static const char *Demo = "texdemo1";
-static const char *ReflectVertFile = "reflect.vert";
-static const char *CubeFragFile = "cubemap.frag";
+static const char *ReflectVertFile = DEMOS_DATA_DIR "reflect.vert";
+static const char *CubeFragFile = DEMOS_DATA_DIR "cubemap.frag";
-static const char *SimpleVertFile = "simple.vert";
-static const char *SimpleTexFragFile = "shadowtex.frag";
+static const char *SimpleVertFile = DEMOS_DATA_DIR "simple.vert";
+static const char *SimpleTexFragFile = DEMOS_DATA_DIR "shadowtex.frag";
static const char *GroundImage = DEMOS_DATA_DIR "tile.rgb";
diff --git a/src/glsl/toyball.c b/src/glsl/toyball.c
index 5f27951..4e7e832 100644
--- a/src/glsl/toyball.c
+++ b/src/glsl/toyball.c
@@ -14,8 +14,8 @@
#include "shaderutil.h"
-static char *FragProgFile = "CH11-toyball.frag";
-static char *VertProgFile = "CH11-toyball.vert";
+static char *FragProgFile = DEMOS_DATA_DIR "CH11-toyball.frag";
+static char *VertProgFile = DEMOS_DATA_DIR "CH11-toyball.vert";
/* program/shader objects */
static GLuint fragShader;
diff --git a/src/objviewer/objview.c b/src/objviewer/objview.c
index 6def726..78a6acf 100644
--- a/src/objviewer/objview.c
+++ b/src/objviewer/objview.c
@@ -162,12 +162,12 @@ init_model(void)
static void
init_skybox(void)
{
- SkyboxTex = LoadSkyBoxCubeTexture("alpine_east.rgb",
- "alpine_west.rgb",
- "alpine_up.rgb",
- "alpine_down.rgb",
- "alpine_south.rgb",
- "alpine_north.rgb");
+ SkyboxTex = LoadSkyBoxCubeTexture(DEMOS_DATA_DIR "alpine_east.rgb",
+ DEMOS_DATA_DIR "alpine_west.rgb",
+ DEMOS_DATA_DIR "alpine_up.rgb",
+ DEMOS_DATA_DIR "alpine_down.rgb",
+ DEMOS_DATA_DIR "alpine_south.rgb",
+ DEMOS_DATA_DIR "alpine_north.rgb");
glmSpecularTexture(Model, SkyboxTex);
}
diff --git a/src/perf/glslstateschange.c b/src/perf/glslstateschange.c
index 7422b78..dbf8332 100644
--- a/src/perf/glslstateschange.c
+++ b/src/perf/glslstateschange.c
@@ -33,10 +33,10 @@
#include "glmain.h"
#include "common.h"
-static const char *VertFile1 = "glslstateschange1.vert";
-static const char *FragFile1 = "glslstateschange1.frag";
-static const char *VertFile2 = "glslstateschange2.vert";
-static const char *FragFile2 = "glslstateschange2.frag";
+static const char *VertFile1 = DEMOS_DATA_DIR "glslstateschange1.vert";
+static const char *FragFile1 = DEMOS_DATA_DIR "glslstateschange1.frag";
+static const char *VertFile2 = DEMOS_DATA_DIR "glslstateschange2.vert";
+static const char *FragFile2 = DEMOS_DATA_DIR "glslstateschange2.frag";
static struct uniform_info Uniforms1[] = {
{ "tex1", 1, GL_SAMPLER_2D, { 0, 0, 0, 0 }, -1 },
{ "tex2", 1, GL_SAMPLER_2D, { 1, 0, 0, 0 }, -1 },
--
2.0.0

View File

@@ -0,0 +1,43 @@
SUMMARY = "Mesa demo applications"
DESCRIPTION = "This package includes the demonstration application, such as glxgears. \
These applications can be used for Mesa validation and benchmarking."
HOMEPAGE = "http://mesa3d.org"
BUGTRACKER = "https://bugs.freedesktop.org"
SECTION = "x11"
LICENSE = "MIT & PD"
LIC_FILES_CHKSUM = "file://src/xdemos/glxgears.c;beginline=1;endline=20;md5=914225785450eff644a86c871d3ae00e \
file://src/xdemos/glxdemo.c;beginline=1;endline=8;md5=b01d5ab1aee94d35b7efaa2ef48e1a06"
SRC_URI = "https://mesa.freedesktop.org/archive/demos/${PV}/${BPN}-${PV}.tar.bz2 \
file://0001-mesa-demos-Add-missing-data-files.patch \
file://0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch \
"
SRC_URI[sha256sum] = "cea2df0a80f09a30f635c4eb1a672bf90c5ddee0b8e77f4d70041668ef71aac1"
inherit meson pkgconfig features_check
# depends on virtual/egl, virtual/libgl ...
REQUIRED_DISTRO_FEATURES = "opengl x11"
EXTRA_OEMESON = "-Dwith-system-data-files=true"
PACKAGECONFIG ?= "drm egl gles1 gles2 \
${@bb.utils.filter('DISTRO_FEATURES', 'x11 wayland', d)}"
PACKAGECONFIG[drm] = "-Dlibdrm=enabled,-Dlibdrm=disabled,libdrm"
PACKAGECONFIG[egl] = "-Degl=enabled,-Degl=disabled,virtual/egl"
PACKAGECONFIG[gles1] = "-Dgles1=enabled,-Dgles1=disabled,virtual/libgles1"
PACKAGECONFIG[gles2] = "-Dgles2=enabled,-Dgles2=disabled,virtual/libgles2"
PACKAGECONFIG[glut] = "-Dwith-glut=${STAGING_EXECPREFIXDIR},,freeglut"
PACKAGECONFIG[osmesa] = "-Dosmesa=enabled,-Dosmesa=disabled,"
PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,virtual/libgl wayland wayland-native wayland-protocols"
PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,virtual/libx11 libglu"
do_install:append() {
# it can be completely empty when all PACKAGECONFIG options are disabled
rmdir --ignore-fail-on-non-empty ${D}${bindir}
if [ -f ${D}${bindir}/clear ]; then
mv ${D}${bindir}/clear ${D}${bindir}/clear.mesa-demos
fi
}

View File

@@ -0,0 +1,15 @@
require mesa.inc
SUMMARY += " (OpenGL only, no EGL/GLES)"
PROVIDES = "virtual/libgl virtual/mesa"
S = "${WORKDIR}/mesa-${PV}"
TARGET_CFLAGS = "-I${STAGING_INCDIR}/drm"
# At least one DRI rendering engine is required to build mesa.
# When no X11 is available, use osmesa for the rendering engine.
PACKAGECONFIG ??= "opengl gallium ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa', d)}"
PACKAGECONFIG:class-target = "opengl gallium ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa', d)}"

View File

@@ -0,0 +1,367 @@
SUMMARY = "A free implementation of the OpenGL API"
DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - \
a system for rendering interactive 3D graphics. \
A variety of device drivers allows Mesa to be used in many different environments \
ranging from software emulation to complete hardware acceleration for modern GPUs. \
Mesa is used as part of the overall Direct Rendering Infrastructure and X.org \
environment."
HOMEPAGE = "http://mesa3d.org"
BUGTRACKER = "https://bugs.freedesktop.org"
SECTION = "x11"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10"
PE = "2"
SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
file://0001-drisw-fix-build-without-dri3.patch \
file://0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch \
file://0001-Revert-meson-do-not-pull-in-clc-for-clover.patch \
"
SRC_URI[sha256sum] = "7454425f1ed4a6f1b5b107e1672b30c88b22ea0efea000ae2c7d96db93f6c26a"
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() {
# sed can't find EGL/eglplatform.h as it doesn't get installed when glvnd enabled.
# So, check if EGL/eglplatform.h exists before running sed.
if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)} && [ -f ${D}${includedir}/EGL/eglplatform.h ]; 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"
DEPENDS:append:class-target = " ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'mesa-native', '', d)}"
EXTRANATIVEPATH += "chrpath-native"
PROVIDES = " \
${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'glvnd', 'virtual/libglx', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2 virtual/libgles3', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \
virtual/mesa \
"
inherit meson pkgconfig python3native gettext features_check
BBCLASSEXTEND = "native nativesdk"
ANY_OF_DISTRO_FEATURES = "opengl vulkan"
PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)}"
# 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=enabled \
-Dglx-read-only-text=true \
-Dplatforms='${@",".join("${PLATFORMS}".split())}' \
"
EXTRA_OEMESON:append:class-target = " ${@bb.utils.contains('PACKAGECONFIG', 'opencl', '-Dintel-clc=system', '', d)}"
EXTRA_OEMESON:append:class-native = " ${@bb.utils.contains('PACKAGECONFIG', 'opencl', '-Dintel-clc=enabled', '', d)}"
def strip_comma(s):
return s.strip(',')
PACKAGECONFIG = " \
gallium \
video-codecs \
${@bb.utils.filter('DISTRO_FEATURES', 'x11 vulkan wayland', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm virgl', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'dri3', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'zink', '', d)} \
"
PACKAGECONFIG:append:class-native = " gallium-llvm r600"
# "gbm" requires "opengl"
PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled"
X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr"
# "x11" requires "opengl"
PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}"
PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols"
PACKAGECONFIG[dri3] = "-Ddri3=enabled, -Ddri3=disabled, xorgproto libxshmfence"
# Vulkan drivers need dri3 enabled
# amd could be enabled as well but requires gallium-llvm with llvm >= 3.9
VULKAN_DRIVERS = ""
VULKAN_DRIVERS:append:x86 = ",intel,amd"
VULKAN_DRIVERS:append:x86-64 = ",intel,amd"
# i686 is a 32 bit override for mesa-native
VULKAN_DRIVERS:append:i686 = ",intel,amd"
VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', d)}"
VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',swrast', '', d)}"
VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'imagination', ',imagination-experimental', '', d)}"
PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers"
# mesa development and testing tools support, per driver
TOOLS = ""
TOOLS_DEPS = ""
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}"
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'imagination', ',imagination', '', d)}"
# dependencies for tools.
TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libxml2 ', '', d)}"
# the fdperf tool requires libconfig (a part of meta-oe) so it needs special
# treatment in addition to the usual 'freedreno tools'.
PACKAGECONFIG[freedreno-fdperf] = ",,libconfig"
PACKAGECONFIG[tools] = "-Dtools=${@strip_comma('${TOOLS}')}, -Dtools='', ${TOOLS_DEPS}"
PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false"
PACKAGECONFIG[glvnd] = "-Dglvnd=true, -Dglvnd=false, libglvnd"
# "gles" requires "opengl"
PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2=disabled"
# "egl" requires "opengl"
PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
# "opencl" requires libclc from meta-clang and spirv-tools from OE-Core
OPENCL_NATIVE = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', '-Dopencl-native=true', '', d)}"
PACKAGECONFIG[opencl] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools python3-ply-native"
PACKAGECONFIG[broadcom] = ""
PACKAGECONFIG[etnaviv] = ""
PACKAGECONFIG[freedreno] = ""
PACKAGECONFIG[kmsro] = ""
PACKAGECONFIG[vc4] = ""
PACKAGECONFIG[v3d] = ""
PACKAGECONFIG[zink] = ""
GALLIUMDRIVERS = "swrast"
# gallium swrast was found to crash Xorg on startup in x32 qemu
GALLIUMDRIVERS:x86-x32 = ""
GALLIUMDRIVERS:append:x86 = ",i915,iris,crocus"
GALLIUMDRIVERS:append:x86-64 = ",i915,iris,crocus"
# i686 is a 32 bit override for mesa-native
GALLIUMDRIVERS:append:i686 = ",i915,iris,crocus"
GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'kmsro', ',kmsro', '', d)}"
GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'vc4', ',vc4', '', d)}"
GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', '', d)}"
GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', '', d)}"
# radeonsi requires LLVM
GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}"
GALLIUMDRIVERS_LLVM = ",r300,nouveau${GALLIUMDRIVERS_RADEONSI}"
GALLIUMDRIVERS_LLVM:append:x86 = ",svga"
GALLIUMDRIVERS_LLVM:append:x86-64 = ",svga"
# i686 is a 32 bit override for mesa-native
GALLIUMDRIVERS_LLVM:append:i686 = ",svga"
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 = "${@bb.utils.contains('PACKAGECONFIG', 'virgl', ',virgl', '', d)}"
PACKAGECONFIG[gallium] = "-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, -Dgallium-drivers='', libdrm"
PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, -Dllvm=disabled, llvm llvm-native elfutils"
PACKAGECONFIG[xa] = "-Dgallium-xa=enabled, -Dgallium-xa=disabled"
PACKAGECONFIG[va] = "-Dgallium-va=enabled,-Dgallium-va=disabled,libva-initial"
PACKAGECONFIG[vdpau] = "-Dgallium-vdpau=enabled,-Dgallium-vdpau=disabled,libvdpau"
PACKAGECONFIG[imagination] = "-Dimagination-srv=true,-Dimagination-srv=false"
PACKAGECONFIG[lima] = ""
GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
PACKAGECONFIG[panfrost] = ""
GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}"
PACKAGECONFIG[vulkan-beta] = "-Dvulkan-beta=true,-Dvulkan-beta=false"
PACKAGECONFIG[osmesa] = "-Dosmesa=true,-Dosmesa=false"
PACKAGECONFIG[perfetto] = "-Dperfetto=true,-Dperfetto=false,libperfetto"
PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
PACKAGECONFIG[lmsensors] = "-Dlmsensors=enabled,-Dlmsensors=disabled,lmsensors"
VIDEO_CODECS ?= "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'all', 'all_free', d)}"
PACKAGECONFIG[video-codecs] = "-Dvideo-codecs=${VIDEO_CODECS}, -Dvideo-codecs=''"
# llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
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
DEV_PKG_DEPENDENCY = ""
# Khronos documentation says that include/GLES2/gl2ext.h can be used for
# OpenGL ES 3 specification as well as for OpenGL ES 2.
# There can be applications including GLES2/gl2ext.h instead of GLES3/gl3ext.h
# meaning we should probably bring in GLES2/gl2ext.h if someone asks for
# development package of libgles3.
RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev"
RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools', '', d)}"
PACKAGES =+ "libegl-mesa libegl-mesa-dev \
libosmesa libosmesa-dev \
libgl-mesa libgl-mesa-dev \
libglx-mesa libglx-mesa-dev \
libglapi libglapi-dev \
libgbm libgbm-dev \
libgles1-mesa libgles1-mesa-dev \
libgles2-mesa libgles2-mesa-dev \
libgles3-mesa libgles3-mesa-dev \
libopencl-mesa libopencl-mesa-dev \
libxatracker libxatracker-dev \
mesa-megadriver mesa-vulkan-drivers \
mesa-vdpau-drivers mesa-tools \
"
do_install:append () {
# Drivers never need libtool .la files
rm -f ${D}${libdir}/dri/*.la
rm -f ${D}${libdir}/egl/*.la
rm -f ${D}${libdir}/gallium-pipe/*.la
rm -f ${D}${libdir}/gbm/*.la
# libwayland-egl has been moved to wayland 1.15+
rm -f ${D}${libdir}/libwayland-egl*
rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc
}
do_install:append:class-native () {
if ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'true', 'false', d)}; then
install -d ${D}${bindir}
install -m0755 ${B}/src/intel/compiler/intel_clc ${D}${bindir}
fi
}
# For the packages that make up the OpenGL interfaces, inject variables so that
# they don't get Debian-renamed (which would remove the -mesa suffix), and
# RPROVIDEs/RCONFLICTs on the generic libgl name.
python __anonymous() {
pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
suffix = ""
if "-native" in d.getVar("PN"):
suffix = "-native"
for p in (("egl", "libegl", "libegl1"),
("opengl", "libgl", "libgl1"),
("glvnd", "libglx",),
("gles", "libgles1", "libglesv1-cm1"),
("gles", "libgles2", "libglesv2-2"),
("gles", "libgles3",),
("opencl", "libopencl",)):
if not p[0] in pkgconfig:
continue
mlprefix = d.getVar("MLPREFIX")
fullp = mlprefix + p[1] + "-mesa" + suffix
mlprefix = d.getVar("MLPREFIX")
pkgs = " " + " ".join(mlprefix + x + suffix 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, " ${MLPREFIX}mesa-megadriver" + suffix)
# For -dev, the first element is both the Debian and original name
fullp = mlprefix + p[1] + "-mesa-dev" + suffix
pkgs = " " + mlprefix + p[1] + "-dev" + suffix
d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
d.appendVar("RREPLACES:" + fullp, pkgs)
d.appendVar("RPROVIDES:" + fullp, pkgs)
d.appendVar("RCONFLICTS:" + fullp, pkgs)
}
python mesa_populate_packages() {
pkgs = ['mesa', 'mesa-dev', 'mesa-dbg']
for pkg in pkgs:
d.setVar("RPROVIDES:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
d.setVar("RCONFLICTS:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
d.setVar("RREPLACES:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
import re
dri_drivers_root = oe.path.join(d.getVar('PKGD'), d.getVar('libdir'), "dri")
if os.path.isdir(dri_drivers_root):
dri_pkgs = sorted(os.listdir(dri_drivers_root))
lib_name = d.expand("${MLPREFIX}mesa-megadriver")
for p in dri_pkgs:
m = re.match(r'^(.*)_dri\.so$', p)
if m:
pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1))
d.appendVar("RPROVIDES:%s" % lib_name, pkg_name)
d.appendVar("RCONFLICTS:%s" % lib_name, pkg_name)
d.appendVar("RREPLACES:%s" % lib_name, pkg_name)
pipe_drivers_root = os.path.join(d.getVar('libdir'), "gallium-pipe")
do_split_packages(d, pipe_drivers_root, r'^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='')
}
PACKAGESPLITFUNCS =+ "mesa_populate_packages"
PACKAGES_DYNAMIC += "^mesa-driver-.*"
PACKAGES_DYNAMIC:class-native = "^mesa-driver-.*-native"
FILES:mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d"
FILES:mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${libdir}/libpowervr_rogue.so ${datadir}/vulkan"
FILES:${PN}-vdpau-drivers = "${libdir}/vdpau/*.so.*"
FILES:libegl-mesa = "${libdir}/libEGL*.so.* ${datadir}/glvnd/egl_vendor.d"
FILES:libgbm = "${libdir}/libgbm.so.*"
FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*"
FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*"
FILES:libgl-mesa = "${libdir}/libGL.so.*"
FILES:libglx-mesa = "${libdir}/libGLX*.so.*"
FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd"
FILES:libglapi = "${libdir}/libglapi.so.*"
FILES:libosmesa = "${libdir}/libOSMesa.so.*"
FILES:libxatracker = "${libdir}/libxatracker.so.*"
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"
FILES:libglx-mesa-dev = "${libdir}/libGLX*.*"
FILES:libglapi-dev = "${libdir}/libglapi.*"
FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc"
FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc"
FILES:libgles3-mesa-dev = "${includedir}/GLES3"
FILES:libopencl-mesa-dev = "${libdir}/libMesaOpenCL.so"
FILES:libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc"
FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \
${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \
${libdir}/pkgconfig/xatracker.pc"
# catch all to get all the tools and data
FILES:${PN}-tools = "${bindir} ${datadir}"
ALLOW_EMPTY:${PN}-tools = "1"
# Fix upgrade path from mesa to mesa-megadriver
RREPLACES:mesa-megadriver = "mesa"
RCONFLICTS:mesa-megadriver = "mesa"
RPROVIDES:mesa-megadriver = "mesa"

View File

@@ -0,0 +1,2 @@
require ${BPN}.inc

View File

@@ -0,0 +1,39 @@
#!/bin/sh
#
# Very simple session manager for Mini X
#
# Uncomment below to enable parsing of debian menu entrys
# export MB_USE_DEB_MENUS=1
if [ -e $HOME/.mini_x/session ]
then
exec $HOME/.mini_x/session
fi
if [ -e /etc/mini_x/session ]
then
exec /etc/mini_x/session
fi
MINI_X_SESSION_DIR=/etc/mini_x/session.d
if [ -d "$MINI_X_SESSION_DIR" ]; then
# Execute session file on behalf of file owner
find $MINI_X_SESSION_DIR -type f | while read SESSIONFILE; do
set +e
USERNAME=`stat -c %U $SESSIONFILE`
# Using su rather than sudo as latest 1.8.1 cause failure [YOCTO #1211]
# su -l -c '$SESSIONFILE&' $USERNAME
sudo -b -i -u $USERNAME $SESSIONFILE&
set -e
done
fi
# This resolution is big enough for hob2's max window size.
xrandr -s 1024x768
# Default files to run if $HOME/.mini_x/session or /etc/mini_x/session
# dont exist.
matchbox-terminal&
exec matchbox-window-manager

View File

@@ -0,0 +1,27 @@
SUMMARY = "Very simple session manager for X"
DESCRIPTION = "Simple session manager for X, that provides just the right boilerplate to create a session and launch the browser "
HOMEPAGE = "http://www.yoctoproject.org"
BUGTRACKER = "http://bugzilla.pokylinux.org"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://mini-x-session;endline=5;md5=b6430bffbcf05f9760e72938826b7487"
SECTION = "x11"
RCONFLICTS:${PN} = "matchbox-common"
SRC_URI = "file://mini-x-session"
S = "${WORKDIR}"
RDEPENDS:${PN} = "sudo"
inherit update-alternatives
ALTERNATIVE:${PN} = "x-session-manager"
ALTERNATIVE_TARGET[x-session-manager] = "${bindir}/mini-x-session"
ALTERNATIVE_PRIORITY = "50"
do_install() {
install -d ${D}/${bindir}
install -m 0755 ${S}/mini-x-session ${D}/${bindir}
}

View File

@@ -0,0 +1,14 @@
SUMMARY = "Basic Weston compositor setup"
DESCRIPTION = "Packages required to set up a basic working Weston session"
inherit packagegroup features_check
# weston-init requires pam enabled if started via systemd
REQUIRED_DISTRO_FEATURES = "wayland ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}"
RDEPENDS:${PN} = "\
weston \
weston-init \
weston-examples \
wayland-utils \
"

View File

@@ -0,0 +1,15 @@
SUMMARY = "Basic X11 session"
DESCRIPTION = "Packages required to set up a basic working X11 session"
inherit packagegroup features_check
# rdepends on matchbox-wm
REQUIRED_DISTRO_FEATURES = "x11"
RDEPENDS:${PN} = "\
packagegroup-core-x11-xserver \
packagegroup-core-x11-utils \
matchbox-terminal \
matchbox-wm \
mini-x-session \
liberation-fonts \
"

View File

@@ -0,0 +1,22 @@
#
# Copyright (C) 2011 Intel Corporation
#
SUMMARY = "X11 display server"
PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit packagegroup features_check
# rdepends on XSERVER
REQUIRED_DISTRO_FEATURES = "x11"
XSERVER ?= "xserver-xorg \
xf86-video-fbdev \
xf86-video-modesetting \
"
XSERVERCODECS ?= ""
RDEPENDS:${PN} = "\
${XSERVER} \
${XSERVERCODECS} \
"

View File

@@ -0,0 +1,35 @@
#
# Copyright (C) 2011 Intel Corporation
#
inherit packagegroup features_check
REQUIRED_DISTRO_FEATURES = "x11"
PACKAGES = "${PN} ${PN}-utils"
# backwards compatibility for xserver-common
VIRTUAL-RUNTIME_xserver_common ?= ""
# elsa, xserver-nodm-init
VIRTUAL-RUNTIME_graphical_init_manager ?= "xserver-nodm-init"
SUMMARY = "X11 display server and basic utilities"
RDEPENDS:${PN} = "\
${PN}-xserver \
${PN}-utils \
"
SUMMARY:${PN}-utils = "X11 basic utilities and init"
RDEPENDS:${PN}-utils = "\
${VIRTUAL-RUNTIME_xserver_common} \
${VIRTUAL-RUNTIME_graphical_init_manager} \
xauth \
xhost \
xset \
xrandr \
xmodmap \
xdpyinfo \
xinput-calibrator \
dbus-x11 \
"

View File

@@ -0,0 +1,45 @@
From b9bfe3a79f165682a6db3d7ee1928365e93b1ccf Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 13 Apr 2022 19:39:29 -0700
Subject: [PATCH] Skip running test-layout test
This fails intermittently, it varies based on what version of harfbuzz
is installed and if it does not match with what pango CI tests then we
get random failures in this test. This has been disabled in other
distros [1] too
We want to drop this on next upgrade and see if this test passes if not
then keep it disabled
Fixes
Running test: pango/test-layout.test
1..36
ok 1 /layout/letterspacing.layout
ok 2 /layout/valid-7.layout
not ok 3 /layout/valid-14.layout
Bail out!
FAIL: pango/test-layout.test (Child process killed by signal 6)
[1] https://github.com/archlinux/svntogit-packages/commit/3f883e7ff8071adad23b6bcc0ba4b995aff10d52
Upstream-Status: Inappropriate [bugfix https://gitlab.gnome.org/GNOME/pango/-/issues/677]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
tests/test-layout.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test-layout.c b/tests/test-layout.c
index 1139e4f..b47a066 100644
--- a/tests/test-layout.c
+++ b/tests/test-layout.c
@@ -222,5 +222,5 @@ main (int argc, char *argv[])
}
g_dir_close (dir);
- return g_test_run ();
+ return 77;
}
--
2.35.2

View File

@@ -0,0 +1,6 @@
#! /bin/sh
# workaround for https://gitlab.gnome.org/GNOME/pango/-/issues/668
mkdir -p /usr/share/fonts/pango-private
cp -rf /usr/libexec/installed-tests/pango/fonts/* /usr/share/fonts/pango-private
gnome-desktop-testing-runner pango

View File

@@ -0,0 +1,53 @@
SUMMARY = "Framework for layout and rendering of internationalized text"
DESCRIPTION = "Pango is a library for laying out and rendering of text, \
with an emphasis on internationalization. Pango can be used anywhere \
that text layout is needed, though most of the work on Pango so far has \
been done in the context of the GTK+ widget toolkit. Pango forms the \
core of text and font handling for GTK+-2.x."
HOMEPAGE = "http://www.pango.org/"
BUGTRACKER = "http://bugzilla.gnome.org"
SECTION = "libs"
LICENSE = "LGPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
inherit gnomebase gi-docgen ptest-gnome upstream-version-is-even gobject-introspection
UPSTREAM_CHECK_REGEX = "pango-(?P<pver>\d+\.(?!9\d+)\d+\.\d+)"
GIR_MESON_ENABLE_FLAG = "enabled"
GIR_MESON_DISABLE_FLAG = "disabled"
SRC_URI += "file://run-ptest \
file://0001-Skip-running-test-layout-test.patch \
"
SRC_URI[archive.sha256sum] = "58728a0a2d86f60761208df9493033d18ecb2497abac80ee1a274ad0c6e55f0f"
DEPENDS = "glib-2.0 glib-2.0-native fontconfig freetype virtual/libiconv cairo harfbuzz fribidi"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} \
${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
PACKAGECONFIG[x11] = ",,virtual/libx11 libxft"
PACKAGECONFIG[tests] = "-Dinstall-tests=true, -Dinstall-tests=false"
PACKAGECONFIG[thai] = "-Dlibthai=enabled,-Dlibthai=disabled,libthai"
GIR_MESON_OPTION = 'introspection'
do_configure:prepend() {
chmod +x ${S}/tests/*.py
}
LEAD_SONAME = "libpango-1.0*"
FILES:${PN} = "${bindir}/* ${libdir}/libpango*${SOLIBS}"
RDEPENDS:${PN}-ptest += "cantarell-fonts"
RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us"
RPROVIDES:${PN} += "pango-modules pango-module-indic-lang \
pango-module-basic-fc pango-module-arabic-lang"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,50 @@
From 77f327909e4a99c64261290cd76e234e10cc64d2 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 3 May 2023 21:59:43 -0700
Subject: [PATCH] tests: Fix narrowing errors seen with clang
Fixes
piglit-test-pattern.cpp:656:26: error: type 'float' cannot be narrowed to 'int' in initiali
zer list [-Wc++11-narrowing]
Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/807]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../spec/ext_framebuffer_multisample/draw-buffers-common.cpp | 4 ++--
tests/util/piglit-test-pattern.cpp | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp b/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp
index 48e1ad4a5..b36830c45 100644
--- a/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp
+++ b/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp
@@ -353,8 +353,8 @@ draw_pattern(bool sample_alpha_to_coverage,
float vertices[4][2] = {
{ 0.0f, 0.0f + i * (pattern_height / num_rects) },
{ 0.0f, (i + 1.0f) * (pattern_height / num_rects) },
- { pattern_width, (i + 1.0f) * (pattern_height / num_rects) },
- { pattern_width, 0.0f + i * (pattern_height / num_rects) } };
+ { static_cast<float>(pattern_width), (i + 1.0f) * (pattern_height / num_rects) },
+ { static_cast<float>(pattern_width), 0.0f + i * (pattern_height / num_rects) } };
glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE,
sizeof(vertices[0]),
diff --git a/tests/util/piglit-test-pattern.cpp b/tests/util/piglit-test-pattern.cpp
index 43d451d6a..52ee94457 100644
--- a/tests/util/piglit-test-pattern.cpp
+++ b/tests/util/piglit-test-pattern.cpp
@@ -653,12 +653,12 @@ ColorGradientSunburst::draw_with_scale_and_offset(const float (*proj)[4],
{
switch (out_type) {
case GL_INT: {
- int clear_color[4] = { offset, offset, offset, offset };
+ int clear_color[4] = { static_cast<int>(offset), static_cast<int>(offset), static_cast<int>(offset), static_cast<int>(offset) };
glClearBufferiv(GL_COLOR, 0, clear_color);
break;
}
case GL_UNSIGNED_INT: {
- unsigned clear_color[4] = { offset, offset, offset, offset };
+ unsigned clear_color[4] = { static_cast<unsigned>(offset), static_cast<unsigned>(offset), static_cast<unsigned>(offset), static_cast<unsigned>(offset) };
glClearBufferuiv(GL_COLOR, 0, clear_color);
break;
}

View File

@@ -0,0 +1,83 @@
From 6c852e6ac292008137a6f3a8aa908090bb5b4b11 Mon Sep 17 00:00:00 2001
From: Erik Faye-Lund <erik.faye-lund@collabora.com>
Date: Tue, 19 Mar 2024 16:34:02 +0100
Subject: [PATCH] properly check for libgen.h
Some users are reporting that basename is not available when building on
Linux with musl libc. And since the POSIX spec[1] says that basename is
defined in libgen.h, we should include that when available.
So let's properly detect the header, and include it if it exists. This
should hopefully make things a bit more robust.
Since we're also including this from the CL program-tester, let's
rearrange the includes a bit so we know that config.h has been included.
Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/888]
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
CMakeLists.txt | 1 +
tests/cl/program/program-tester.c | 5 ++++-
tests/util/config.h.in | 1 +
tests/util/piglit-util.h | 4 ++--
4 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dd2bf67125..5563fe0e20 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -492,6 +492,7 @@ check_include_file(unistd.h HAVE_UNISTD_H)
check_include_file(fcntl.h HAVE_FCNTL_H)
check_include_file(linux/sync_file.h HAVE_LINUX_SYNC_FILE_H)
check_include_file(endian.h HAVE_ENDIAN_H)
+check_include_file(libgen.h HAVE_LIBGEN_H)
if(DEFINED PIGLIT_INSTALL_VERSION)
set(PIGLIT_INSTALL_VERSION_SUFFIX
diff --git a/tests/cl/program/program-tester.c b/tests/cl/program/program-tester.c
index 97fe64906d..e47fb5aacc 100644
--- a/tests/cl/program/program-tester.c
+++ b/tests/cl/program/program-tester.c
@@ -31,10 +31,13 @@
#include <inttypes.h>
#include <math.h>
#include <regex.h>
-#include <libgen.h>
#include "piglit-framework-cl-program.h"
+#ifdef HAVE_LIBGEN_H
+#include <libgen.h>
+#endif
+
/* Regexes */
/*
diff --git a/tests/util/config.h.in b/tests/util/config.h.in
index 8ed5af1709..437eb91418 100644
--- a/tests/util/config.h.in
+++ b/tests/util/config.h.in
@@ -16,3 +16,4 @@
#cmakedefine HAVE_SYS_RESOURCE_H 1
#cmakedefine HAVE_UNISTD_H 1
#cmakedefine HAVE_ENDIAN_H 1
+#cmakedefine HAVE_LIBGEN_H 1
diff --git a/tests/util/piglit-util.h b/tests/util/piglit-util.h
index 4d3606c708..de999980b6 100644
--- a/tests/util/piglit-util.h
+++ b/tests/util/piglit-util.h
@@ -52,8 +52,8 @@ extern "C" {
#include <math.h>
#include <float.h>
-#if defined(__APPLE__) || defined(__MINGW32__)
-# include "libgen.h" // for basename
+#ifdef HAVE_LIBGEN_H
+# include <libgen.h> // for basename
#elif defined(_MSC_VER)
static inline char *
--
GitLab

View File

@@ -0,0 +1,29 @@
From cb8e4b99fcfe81399e3e6d922156db4a48a39a8e Mon Sep 17 00:00:00 2001
From: Pascal Bach <pascal.bach@siemens.com>
Date: Thu, 4 Oct 2018 14:43:17 +0200
Subject: [PATCH] cmake: use proper WAYLAND_INCLUDE_DIRS variable
WAYLAND_wayland-client_INCLUDEDIR is an internal variable and is not correctly
set when cross compiling. WAYLAND_INCLUDE_DIRS includes the correct path even
when cross compiling.
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Upstream-Status: Submitted [piglit@lists.freedesktop.org]
---
tests/util/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
index 1714ab41f..3b67aa7da 100644
--- a/tests/util/CMakeLists.txt
+++ b/tests/util/CMakeLists.txt
@@ -97,7 +97,7 @@ if(PIGLIT_USE_WAFFLE)
piglit-framework-gl/piglit_wl_framework.c
)
list(APPEND UTIL_GL_INCLUDES
- ${WAYLAND_wayland-client_INCLUDEDIR}
+ ${WAYLAND_INCLUDE_DIRS}
)
endif()
if(PIGLIT_HAS_X11)

View File

@@ -0,0 +1,27 @@
From 7d2d23125f1946a7b74f9a427388d469500fcd8d Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Tue, 10 Nov 2020 17:13:50 +0000
Subject: [PATCH] tests/util/piglit-shader.c: do not hardcode build path into
target binary
This helps reproducibilty.
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
tests/util/piglit-shader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/util/piglit-shader.c b/tests/util/piglit-shader.c
index 1787eb180..9e74704b1 100644
--- a/tests/util/piglit-shader.c
+++ b/tests/util/piglit-shader.c
@@ -73,7 +73,7 @@ piglit_compile_shader(GLenum target, const char *filename)
source_dir = getenv("PIGLIT_SOURCE_DIR");
if (source_dir == NULL) {
- source_dir = SOURCE_DIR;
+ source_dir = ".";
}
snprintf(filename_with_path, FILENAME_MAX - 1,

View File

@@ -0,0 +1,74 @@
SUMMARY = "OpenGL driver testing framework"
DESCRIPTION = "Piglit is an open-source test suite for OpenGL and OpenCL \
implementations."
HOMEPAGE = "https://gitlab.freedesktop.org/mesa/piglit"
BUGTRACKER = "https://gitlab.freedesktop.org/mesa/piglit/-/issues"
LICENSE = "MIT & LGPL-2.0-or-later & GPL-3.0-only & GPL-2.0-or-later & BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0"
SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https;branch=main \
file://0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \
file://0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch \
file://0001-tests-Fix-narrowing-errors-seen-with-clang.patch \
file://0001-utils-Include-libgen.h-on-musl-linux-systems.patch \
"
UPSTREAM_CHECK_COMMITS = "1"
SRCREV = "22eaf6a91cfd57f7bb3df4e5068c2ac1472d4ec1"
# (when PV goes above 1.0 remove the trailing r)
PV = "1.0+gitr"
S = "${WORKDIR}/git"
X11_DEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxrender libglu', '', d)}"
X11_RDEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa-demos', '', d)}"
DEPENDS = "libpng waffle libxkbcommon python3-mako-native python3-numpy-native python3-six-native virtual/egl"
inherit cmake pkgconfig python3native features_check bash-completion
# depends on virtual/libgl
REQUIRED_DISTRO_FEATURES += "opengl"
# The built scripts go into the temporary directory according to tempfile
# (typically /tmp) which can race if multiple builds happen on the same machine,
# so tell it to use a directory in ${B} to avoid overwriting.
export TEMP = "${B}/temp/"
do_compile[dirs] =+ "${B}/temp/"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glx', '', d)}"
PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut,"
PACKAGECONFIG[glx] = "-DPIGLIT_BUILD_GLX_TESTS=ON,-DPIGLIT_BUILD_GLX_TESTS=OFF"
PACKAGECONFIG[opencl] = "-DPIGLIT_BUILD_CL_TESTS=ON,-DPIGLIT_BUILD_CL_TESTS=OFF,virtual/opencl-icd"
PACKAGECONFIG[x11] = "-DPIGLIT_BUILD_GL_TESTS=ON,-DPIGLIT_BUILD_GL_TESTS=OFF,${X11_DEPS}, ${X11_RDEPS}"
PACKAGECONFIG[vulkan] = "-DPIGLIT_BUILD_VK_TESTS=ON,-DPIGLIT_BUILD_VK_TESTS=OFF,glslang-native vulkan-loader,glslang"
export PIGLIT_BUILD_DIR = "../../../../git"
do_configure:prepend() {
if [ "${@bb.utils.contains('PACKAGECONFIG', 'freeglut', 'yes', 'no', d)}" = "no" ]; then
sed -i -e "/^#.*include <GL\/freeglut_ext.h>$/d" ${S}/src/piglit/glut_wrap.h
sed -i -e "/^#.*include.*<GL\/glut.h>$/d" ${S}/src/piglit/glut_wrap.h
fi
}
# Forcibly strip because Piglit is *huge*, and don't bother trying to split/strip the result.
OECMAKE_TARGET_INSTALL = "install/strip"
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
RDEPENDS:${PN} = "waffle waffle-bin python3 python3-mako python3-json \
python3-misc \
python3-unixadmin python3-xml python3-multiprocessing \
python3-six python3-shell python3-io \
python3-netserver bash \
"
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"

View File

@@ -0,0 +1,410 @@
/*
* Pong Clock - A clock that plays pong.
* See http://mocoloco.com/archives/001766.php for the inspiration.
*
* Copyright (C) 2005 Matthew Allum
*
* Author: Matthew Allum mallum@openedhand.com
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <sys/types.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
/* Tweak values for different hw setups */
#define FPS 50
#define RESX 40
#define RESY 40
#define TO_MISS_SECS 55
#define BALLDX 16
#define BALLDY 4
typedef struct PongClock
{
Display *xdpy;
int xscreen;
Window xwin, xwin_root;
Pixmap backbuffer;
GC xgc;
int xwin_width, xwin_height;
int pixelw, pixelh;
int ball_x, ball_y, ball_dx, ball_dy;
int bata_y, batb_y;
Bool bata_to_miss, batb_to_miss;
}
PongClock;
void
get_time(int *hour, int *min, int *sec)
{
struct timeval tv;
struct tm *localTime = NULL;
time_t actualTime;
gettimeofday(&tv, 0);
actualTime = tv.tv_sec;
localTime = localtime(&actualTime);
if (hour)
*hour = localTime->tm_hour;
if (min)
*min = localTime->tm_min;
if (sec)
*sec = localTime->tm_sec;
}
void
draw_rect (PongClock *pong_clock,
int x,
int y,
int width,
int height)
{
XFillRectangle (pong_clock->xdpy,
pong_clock->backbuffer,
pong_clock->xgc,
x * pong_clock->pixelw,
y * pong_clock->pixelh,
width * pong_clock->pixelw,
height * pong_clock->pixelh);
}
void
draw_field (PongClock *pong_clock)
{
int i;
draw_rect (pong_clock, 0, 0, RESX+1, 1);
draw_rect (pong_clock, 0, RESY-1, RESX+1, 1);
for (i=0; i < RESY/2; i++)
draw_rect (pong_clock, (RESX/2)-1, i*2, 2, 1);
}
void
draw_digit (PongClock *pong_clock,
int x,
int y,
int digit)
{
int digits[] = { 0x1f8c63f, 0x1f21086, 0x1f0fe1f, 0x1f87e1f, 0x1087e31,
0x1f87c3f, 0x1f8fc3f, 0x84421f, 0x1f8fe3f, 0x1087e3f };
XRectangle rects[5*5];
int i,j,k;
i = 0;
for (k=0; k<5; k++)
for (j=0; j<5; j++)
if (digits[digit] & (1 << ((k*5)+j)))
{
rects[i].x = (x + j) * pong_clock->pixelw;
rects[i].y = (y + k) * pong_clock->pixelh;
rects[i].width = pong_clock->pixelw;
rects[i].height = pong_clock->pixelh;
i++;
}
XFillRectangles (pong_clock->xdpy,
pong_clock->backbuffer,
pong_clock->xgc,
rects, i);
}
void
draw_time (PongClock *pong_clock)
{
int hour, min;
get_time(&hour, &min, NULL);
draw_digit (pong_clock,
(RESX/2) - 14,
5,
hour / 10 );
draw_digit (pong_clock,
(RESX/2) - 8,
5,
hour % 10 );
draw_digit (pong_clock,
(RESX/2) + 3,
5,
min / 10 );
draw_digit (pong_clock,
(RESX/2) + 9,
5,
min % 10 );
}
void
draw_bat_and_ball (PongClock *pong_clock)
{
/* ball */
XFillRectangle (pong_clock->xdpy,
pong_clock->backbuffer,
pong_clock->xgc,
pong_clock->ball_x,
pong_clock->ball_y,
pong_clock->pixelw,
pong_clock->pixelh);
/* bat a */
XFillRectangle (pong_clock->xdpy,
pong_clock->backbuffer,
pong_clock->xgc,
0,
pong_clock->bata_y - (2 * pong_clock->pixelh),
pong_clock->pixelw,
pong_clock->pixelh * 5);
/* bat b */
XFillRectangle (pong_clock->xdpy,
pong_clock->backbuffer,
pong_clock->xgc,
(pong_clock->xwin_width - pong_clock->pixelw),
pong_clock->batb_y - (2 * pong_clock->pixelh),
pong_clock->pixelw,
pong_clock->pixelh * 5);
}
void
update_state (PongClock *pong_clock)
{
int sec, min, hour;
get_time(&hour, &min, &sec);
/* Check ball is on field and no ones dues to miss a shot.
*/
if ( (pong_clock->ball_x < 0 && !pong_clock->bata_to_miss)
|| (pong_clock->ball_x > (pong_clock->xwin_width - pong_clock->pixelw)
&& !pong_clock->batb_to_miss) )
pong_clock->ball_dx *= -1;
if ((pong_clock->ball_y < pong_clock->pixelh)
|| pong_clock->ball_y > (pong_clock->xwin_height - (2*pong_clock->pixelh)))
pong_clock->ball_dy *= -1;
pong_clock->ball_x += pong_clock->ball_dx;
pong_clock->ball_y += pong_clock->ball_dy;
/* Set up someone to miss if we getting close to an hour or min.
*/
if (sec > TO_MISS_SECS)
{
if (min == 59)
pong_clock->batb_to_miss = True;
else
pong_clock->bata_to_miss = True;
}
else
{
/* Reset the game */
if (pong_clock->bata_to_miss)
{
pong_clock->bata_to_miss = False;
pong_clock->ball_y = pong_clock->bata_y;
pong_clock->ball_x = pong_clock->pixelw;
pong_clock->ball_dx *= -1;
}
if (pong_clock->batb_to_miss)
{
pong_clock->batb_to_miss = False;
pong_clock->ball_y = pong_clock->batb_y;
pong_clock->ball_x = pong_clock->xwin_width - pong_clock->pixelw;
pong_clock->ball_dx *= -1;
}
}
/* Keep bats on field and only move in not setup to miss */
if (pong_clock->ball_y >= (3*pong_clock->pixelh)
&& pong_clock->ball_y <= (pong_clock->xwin_height - (5*pong_clock->pixelh)))
{
if (!pong_clock->batb_to_miss)
pong_clock->batb_y = pong_clock->ball_y;
if (!pong_clock->bata_to_miss)
pong_clock->bata_y = pong_clock->ball_y;
}
}
void
draw_frame (PongClock *pong_clock)
{
update_state (pong_clock);
/* Clear playfield */
XSetForeground (pong_clock->xdpy,
pong_clock->xgc,
BlackPixel(pong_clock->xdpy,
pong_clock->xscreen));
XFillRectangle (pong_clock->xdpy,
pong_clock->backbuffer,
pong_clock->xgc,
0, 0,
pong_clock->xwin_width,
pong_clock->xwin_height);
XSetForeground (pong_clock->xdpy,
pong_clock->xgc,
WhitePixel(pong_clock->xdpy,
pong_clock->xscreen));
draw_field (pong_clock);
draw_time (pong_clock);
draw_bat_and_ball (pong_clock);
/* flip 'backbuffer' */
XSetWindowBackgroundPixmap (pong_clock->xdpy,
pong_clock->xwin,
pong_clock->backbuffer);
XClearWindow(pong_clock->xdpy, pong_clock->xwin);
XSync(pong_clock->xdpy, False);
}
int
main (int argc, char **argv)
{
XGCValues gcv;
Atom atoms_WINDOW_STATE, atoms_WINDOW_STATE_FULLSCREEN;
PongClock *pong_clock;
pong_clock = malloc(sizeof(PongClock));
memset(pong_clock, 0, sizeof(PongClock));
if ((pong_clock->xdpy = XOpenDisplay(getenv("DISPLAY"))) == NULL) {
fprintf(stderr, "Cannot connect to X server on display %s.",
getenv("DISPLAY"));
exit(-1);
}
pong_clock->xscreen = DefaultScreen(pong_clock->xdpy);
pong_clock->xwin_root = DefaultRootWindow(pong_clock->xdpy);
pong_clock->xwin_width = DisplayWidth(pong_clock->xdpy,
pong_clock->xscreen);
pong_clock->xwin_height = DisplayHeight(pong_clock->xdpy,
pong_clock->xscreen);
pong_clock->pixelw = pong_clock->xwin_width / RESX;
pong_clock->pixelh = pong_clock->xwin_height / RESY;
pong_clock->ball_x = 0;
pong_clock->ball_y = pong_clock->xwin_height / 2;
pong_clock->ball_dx = BALLDX;
pong_clock->ball_dy = BALLDY;
pong_clock->batb_y = pong_clock->bata_y = pong_clock->ball_y;
gcv.background = BlackPixel(pong_clock->xdpy,
pong_clock->xscreen);
gcv.foreground = WhitePixel(pong_clock->xdpy,
pong_clock->xscreen);
gcv.graphics_exposures = False;
pong_clock->xgc = XCreateGC (pong_clock->xdpy, pong_clock->xwin_root,
GCForeground|GCBackground|GCGraphicsExposures,
&gcv);
atoms_WINDOW_STATE
= XInternAtom(pong_clock->xdpy, "_NET_WM_STATE",False);
atoms_WINDOW_STATE_FULLSCREEN
= XInternAtom(pong_clock->xdpy, "_NET_WM_STATE_FULLSCREEN",False);
pong_clock->xwin = XCreateSimpleWindow(pong_clock->xdpy,
pong_clock->xwin_root,
0, 0,
pong_clock->xwin_width,
pong_clock->xwin_height,
0,
WhitePixel(pong_clock->xdpy,
pong_clock->xscreen),
BlackPixel(pong_clock->xdpy,
pong_clock->xscreen));
pong_clock->backbuffer = XCreatePixmap(pong_clock->xdpy,
pong_clock->xwin_root,
pong_clock->xwin_width,
pong_clock->xwin_height,
DefaultDepth(pong_clock->xdpy,
pong_clock->xscreen));
XSelectInput(pong_clock->xdpy, pong_clock->xwin, KeyPressMask);
/* Set the hints for fullscreen */
XChangeProperty(pong_clock->xdpy,
pong_clock->xwin,
atoms_WINDOW_STATE,
XA_ATOM,
32,
PropModeReplace,
(unsigned char *) &atoms_WINDOW_STATE_FULLSCREEN, 1);
XMapWindow(pong_clock->xdpy, pong_clock->xwin);
while (True)
{
struct timeval timeout;
XEvent xev;
timeout.tv_sec = 0;
timeout.tv_usec = 1000000 / FPS;
select (0, NULL, NULL, NULL, &timeout);
draw_frame (pong_clock);
XFlush(pong_clock->xdpy);
if (XPending(pong_clock->xdpy))
{
if (XCheckMaskEvent(pong_clock->xdpy,
KeyPressMask,
&xev))
exit(-1);
}
}
}

View File

@@ -0,0 +1,22 @@
SUMMARY = "A clock combined with a game of pong"
LICENSE = "GPL-2.0-or-later"
DEPENDS = "virtual/libx11 xdmcp xau"
inherit features_check pkgconfig
# depends on virtual/libx11
REQUIRED_DISTRO_FEATURES = "x11"
SRC_URI = "file://pong-clock-no-flicker.c"
LIC_FILES_CHKSUM = "file://pong-clock-no-flicker.c;beginline=1;endline=23;md5=dd248d50f73f746d1ee78586b0b2ebd3"
S = "${WORKDIR}"
do_compile () {
${CC} ${CFLAGS} ${LDFLAGS} -o pong-clock pong-clock-no-flicker.c `pkg-config --cflags --libs x11 xau xdmcp`
}
do_install () {
install -d ${D}${bindir}
install -m 0755 pong-clock ${D}${bindir}
}

View File

@@ -0,0 +1,106 @@
From 792a46ef27ef879a21c9f01a198eae213ea535e6 Mon Sep 17 00:00:00 2001
From: Jose Quaresma <quaresma.jose@gmail.com>
Date: Sat, 13 Feb 2021 00:45:56 +0000
Subject: [PATCH] cmake: disable building external dependencies
- add cmake option to disable the build of the third_party dependencies
- change the update_build_version.py to use pkg-config when third_party dependencies not found
Upstream-Status: Inappropriate [OE-core specific]
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
---
CMakeLists.txt | 13 ++++++++++---
utils/update_build_version.py | 22 +++++++++++++++-------
2 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7bc8f5d..13fc535 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,6 +62,7 @@ else()
endif()
option(SHADERC_ENABLE_WERROR_COMPILE "Enable passing -Werror to compiler, if available" ON)
+option(BUILD_EXTERNAL "Build external dependencies in /third_party" ON)
set (CMAKE_CXX_STANDARD 17)
@@ -123,8 +124,14 @@ endif(MSVC)
# Configure subdirectories.
-# We depend on these for later projects, so they should come first.
-add_subdirectory(third_party)
+if(BUILD_EXTERNAL)
+ # We depend on these for later projects, so they should come first.
+ add_subdirectory(third_party)
+else()
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules (PKG_CHECK REQUIRED SPIRV-Tools)
+ pkg_check_modules (PKG_CHECK REQUIRED glslang)
+endif()
add_subdirectory(libshaderc_util)
add_subdirectory(libshaderc)
@@ -136,7 +143,7 @@ endif()
add_custom_target(build-version
${PYTHON_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py
- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/build-version.inc
+ ${CMAKE_CURRENT_BINARY_DIR}/build-version.inc ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR}
COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).")
function(define_pkg_config_file NAME LIBS)
diff --git a/utils/update_build_version.py b/utils/update_build_version.py
index 11ee53e..d39e59d 100755
--- a/utils/update_build_version.py
+++ b/utils/update_build_version.py
@@ -30,6 +30,7 @@ import re
import subprocess
import sys
import time
+import itertools
def mkdir_p(directory):
"""Make the directory, and all its ancestors as required. Any of the
@@ -121,25 +122,32 @@ def get_version_string(project, directory):
directory, which consists of software version string and git description
string."""
detailed_version_string_lst = [project]
- if project != 'glslang':
- detailed_version_string_lst.append(deduce_software_version(directory))
- detailed_version_string_lst.append(describe(directory).replace('"', '\\"'))
+ if isinstance(directory, str) and os.path.isdir(directory):
+ if project != 'glslang':
+ detailed_version_string_lst.append(deduce_software_version(directory))
+ detailed_version_string_lst.append(describe(directory).replace('"', '\\"'))
+ else:
+ if project == 'spirv-tools':
+ project = 'SPIRV-Tools'
+ pkgconfig = ['pkg-config', '--modversion', project]
+ version = subprocess.run(pkgconfig, capture_output=True, text=True).stdout.rstrip()
+ detailed_version_string_lst.append(version)
return ' '.join(detailed_version_string_lst)
def main():
- if len(sys.argv) != 5:
- print(('usage: {} <shaderc-dir> <spirv-tools-dir> <glslang-dir> <output-file>'.format(
+ if len(sys.argv) < 3:
+ print(('usage: {} <output-file> <shaderc-dir> [spirv-tools-dir] [glslang-dir]'.format(
sys.argv[0])))
sys.exit(1)
projects = ['shaderc', 'spirv-tools', 'glslang']
new_content = ''.join([
'"{}\\n"\n'.format(get_version_string(p, d))
- for (p, d) in zip(projects, sys.argv[1:])
+ for (p, d) in itertools.zip_longest(projects, sys.argv[2:])
])
- output_file = sys.argv[4]
+ output_file = sys.argv[1]
mkdir_p(os.path.dirname(output_file))
if os.path.isfile(output_file):

View File

@@ -0,0 +1,25 @@
From ec2442940e1d5338971861bb81537bae3a6c19e2 Mon Sep 17 00:00:00 2001
From: Jose Quaresma <quaresma.jose@gmail.com>
Date: Sat, 13 Feb 2021 00:45:56 +0000
Subject: [PATCH] libshaderc_util: fix glslang header file location
Upstream-Status: Pending
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
---
libshaderc_util/src/compiler.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libshaderc_util/src/compiler.cc b/libshaderc_util/src/compiler.cc
index e5f5d10..5fd6d3c 100644
--- a/libshaderc_util/src/compiler.cc
+++ b/libshaderc_util/src/compiler.cc
@@ -20,7 +20,7 @@
#include <thread>
#include <tuple>
-#include "SPIRV/GlslangToSpv.h"
+#include "glslang/SPIRV/GlslangToSpv.h"
#include "libshaderc_util/format.h"
#include "libshaderc_util/io_shaderc.h"
#include "libshaderc_util/message.h"

View File

@@ -0,0 +1,29 @@
SUMMARY = "A collection of tools, libraries and tests for shader compilation"
DESCRIPTION = "The Shaderc library provides an API for compiling GLSL/HLSL \
source code to SPIRV modules. It has been shipping in the Android NDK since version r12b."
SECTION = "graphics"
HOMEPAGE = "https://github.com/google/shaderc"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
SRCREV = "f8a25c591bf5edbb462ca4aea99dcc666f096d13"
SRC_URI = "git://github.com/google/shaderc.git;protocol=https;branch=main \
file://0001-cmake-disable-building-external-dependencies.patch \
file://0002-libshaderc_util-fix-glslang-header-file-location.patch \
"
UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$"
S = "${WORKDIR}/git"
inherit cmake python3native pkgconfig
DEPENDS = "spirv-headers spirv-tools glslang"
EXTRA_OECMAKE = " \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_EXTERNAL=OFF \
-DSHADERC_SKIP_TESTS=ON \
-DSHADERC_SKIP_EXAMPLES=ON \
-DSHADERC_SKIP_COPYRIGHT_CHECK=ON \
"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,20 @@
SUMMARY = "Machine-readable files for the SPIR-V Registry"
SECTION = "graphics"
HOMEPAGE = "https://www.khronos.org/registry/spir-v"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=c938b85bceb8fb26c1a807f28a52ae2d"
SRCREV = "1c6bb2743599e6eb6f37b2969acc0aef812e32e3"
SRC_URI = "git://github.com/KhronosGroup/SPIRV-Headers;protocol=https;branch=main"
PE = "1"
# These recipes need to be updated in lockstep with each other:
# glslang, vulkan-headers, vulkan-loader, vulkan-tools, spirv-headers, spirv-tools
# vulkan-validation-layers, vulkan-utility-libraries.
# The tags versions should always be sdk-x.y.z, as this is what
# upstream considers a release.
UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
S = "${WORKDIR}/git"
inherit cmake
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,47 @@
SUMMARY = "The SPIR-V Tools project provides an API and commands for \
processing SPIR-V modules"
DESCRIPTION = "The project includes an assembler, binary module parser, \
disassembler, validator, and optimizer for SPIR-V."
HOMEPAGE = "https://github.com/KhronosGroup/SPIRV-Tools"
SECTION = "graphics"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
SRCREV = "f0cc85efdbbe3a46eae90e0f915dc1509836d0fc"
SRC_URI = "git://github.com/KhronosGroup/SPIRV-Tools.git;branch=main;protocol=https"
PE = "1"
# These recipes need to be updated in lockstep with each other:
# glslang, vulkan-headers, vulkan-loader, vulkan-tools, spirv-headers, spirv-tools
# vulkan-validation-layers, vulkan-utility-libraries.
# The tags versions should always be sdk-x.y.z, as this is what
# upstream considers a release.
UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
S = "${WORKDIR}/git"
inherit cmake
DEPENDS = "spirv-headers"
EXTRA_OECMAKE += "\
-DSPIRV-Headers_SOURCE_DIR=${STAGING_EXECPREFIXDIR} \
-DSPIRV_TOOLS_BUILD_STATIC=OFF \
-DBUILD_SHARED_LIBS=ON \
-DSPIRV_SKIP_TESTS=ON \
"
do_install:append:class-target() {
# Properly set _IMPORT_PREFIX in INTERFACE_LINK_LIBRARIES so that dependent
# tools can find the right library
sed -i ${D}${libdir}/cmake/SPIRV-Tools/SPIRV-ToolsTarget.cmake \
-e 's:INTERFACE_LINK_LIBRARIES.*$:INTERFACE_LINK_LIBRARIES "\$\{_IMPORT_PREFIX\}/${baselib}":'
}
# all the libraries are unversioned, so don't pack it on PN-dev
SOLIBS = ".so"
FILES_SOLIBSDEV = ""
PACKAGES =+ "${PN}-lesspipe"
FILES:${PN}-lesspipe = "${base_bindir}/spirv-lesspipe.sh"
RDEPENDS:${PN}-lesspipe += "${PN} bash"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,15 @@
Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=59097]
Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
diff -Nurd startup-notification-0.12/configure.in startup-notification-0.12/configure.in
--- startup-notification-0.12/configure.in 2011-05-16 17:29:20.000000000 +0300
+++ startup-notification-0.12/configure.in 2013-01-07 06:00:48.921905409 +0200
@@ -3,7 +3,7 @@
AC_CONFIG_SRCDIR(libsn/sn-launchee.c)
AM_INIT_AUTOMAKE
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS(config.h)
# Honor aclocal flags
AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}")

View File

@@ -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

View File

@@ -0,0 +1,32 @@
SUMMARY = "Enables monitoring and display of application startup"
DESCRIPTION = "Contains a reference implementation of the startup notification protocol. \
The reference implementation is mostly under an X Window System style license, and has \
no special dependencies. "
HOMEPAGE = "http://www.freedesktop.org/wiki/Software/startup-notification/"
BUGTRACKER = "https://gitlab.freedesktop.org/xdg/startup-notification/-/issues"
# most files are under MIT, but libsn/sn-util.c is under LGPL, the
# effective license is LGPL
LICENSE = "LGPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=a2ae2cd47d6d2f238410f5364dfbc0f2 \
file://libsn/sn-util.c;endline=18;md5=18a14dc1825d38e741d772311fea9ee1 \
file://libsn/sn-common.h;endline=23;md5=6d05bc0ebdcf5513a6e77cb26e8cd7e2 \
file://test/test-boilerplate.h;endline=23;md5=923e706b2a70586176eead261cc5bb98"
SECTION = "libs"
DEPENDS = "virtual/libx11 libsm xcb-util"
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"
SRC_URI[sha256sum] = "3c391f7e930c583095045cd2d10eb73a64f085c7fde9d260f2652c7cb3cfbe4a"

View File

@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- conf.d/sub-pixel.conf -->
<fontconfig>
<alias>
<family>sans-serif</family>
<accept><family>Liberation Sans</family></accept>
</alias>
<alias>
<family>serif</family>
<accept><family>Liberation Serif</family></accept>
</alias>
<alias>
<family>monospace</family>
<accept><family>Liberation Mono</family></accept>
</alias>
</fontconfig>

View File

@@ -0,0 +1,38 @@
SUMMARY = "Liberation(tm) Fonts"
DESCRIPTION = "The Liberation(tm) Fonts is a font family originally \
created by Ascender(c) which aims at metric compatibility with \
Arial, Times New Roman, Courier New."
HOMEPAGE = "https://github.com/liberationfonts/liberation-fonts"
BUGTRACKER = "https://bugzilla.redhat.com/"
SECTION = "x11/fonts"
LICENSE = "OFL-1.1"
LIC_FILES_CHKSUM = "file://LICENSE;md5=f96db970a9a46c5369142b99f530366b"
PE = "1"
SRC_URI = "https://github.com/liberationfonts/liberation-fonts/files/7261482/liberation-fonts-ttf-${PV}.tar.gz \
file://30-liberation-aliases.conf"
SRC_URI[sha256sum] = "7191c669bf38899f73a2094ed00f7b800553364f90e2637010a69c0e268f25d0"
GITHUB_BASE_URI = "https://github.com/liberationfonts/liberation-fonts/releases"
S = "${WORKDIR}/liberation-fonts-ttf-${PV}"
inherit allarch fontcache github-releases
do_install () {
install -d ${D}${datadir}/fonts/ttf/
for i in *.ttf; do
install -m 0644 $i ${D}${prefix}/share/fonts/ttf/${i}
done
install -d ${D}${sysconfdir}/fonts/conf.d/
install -m 0644 ${WORKDIR}/30-liberation-aliases.conf ${D}${sysconfdir}/fonts/conf.d/
install -d ${D}${prefix}/share/doc/${BPN}/
install -m 0644 LICENSE ${D}${datadir}/doc/${BPN}/
}
PACKAGES = "${PN}"
FILES:${PN} += "${sysconfdir} ${datadir}"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,32 @@
SUMMARY = "The Bitstream Vera fonts - TTF Edition"
HOMEPAGE = "https://www.gnome.org/fonts/"
DESCRIPTION = "The Bitstream Vera fonts include four monospace and sans \
faces (normal, oblique, bold, bold oblique) and two serif faces (normal \
and bold). In addition Fontconfig/Xft2 can artificially oblique the \
serif faces for you: this loses hinting and distorts the faces slightly, \
but is visibly different than normal and bold, and reasonably pleasing."
SECTION = "x11/fonts"
LICENSE = "BitstreamVera"
LIC_FILES_CHKSUM = "file://COPYRIGHT.TXT;md5=27d7484b1e18d0ee4ce538644a3f04be"
inherit allarch fontcache
FONT_PACKAGES = "${PN}"
SRC_URI = "${GNOME_MIRROR}/ttf-bitstream-vera/1.10/ttf-bitstream-vera-${PV}.tar.bz2"
SRC_URI[md5sum] = "bb22bd5b4675f5dbe17c6963d8c00ed6"
SRC_URI[sha256sum] = "db5b27df7bbb318036ebdb75acd3e98f1bd6eb6608fb70a67d478cd243d178dc"
do_install () {
install -d ${D}${datadir}/fonts/ttf
for i in *.ttf; do
install -m 644 $i ${D}${datadir}/fonts/ttf
done
install -d ${D}${docdir}/${BPN}
for i in *.TXT; do
install -m 644 $i ${D}${docdir}/${BPN}
done
}
FILES:${PN} = "${datadir}/fonts"

View File

@@ -0,0 +1,28 @@
From dec8cca59124d7f8796b54902482ceb295a71b51 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 9f91ff2f..2391f89d 100644
--- a/meson.build
+++ b/meson.build
@@ -74,7 +74,7 @@ flags = [
add_project_arguments(cc.get_supported_arguments(flags), language : 'c')
-prog_python = import('python').find_installation('python3')
+prog_python = 'python3'
not_found = dependency('', required: false)
libdrm_dep = dependency('libdrm', version : '>=2.4.50', required: get_option('drm').enabled() or get_option('venus'))

View File

@@ -0,0 +1,41 @@
From 464deabe4d1bfce6b8f414ab0945d9a62b66ddd4 Mon Sep 17 00:00:00 2001
From: Purushottam Choudhary <purushottam27.kumar@lge.com>
Date: Tue, 8 Oct 2024 11:47:21 +0530
Subject: [PATCH] vrend: Fix int-conversion fatal build error with GCC-14
Getting below error int conversion during compilation as one the
platforms where EGLNativeDisplayType is an int instead of a pointer.
| ../git/src/vrend_winsys_egl.c: In function 'virgl_egl_init':
| ../git/src/vrend_winsys_egl.c:364:62: error: passing argument 2 of 'egl->funcs.epoxy_eglGetPlatformDisplay' makes pointer from
| 364 | (EGLNativeDisplayType)egl->gbm->device, NULL);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | int
| ../git/src/vrend_winsys_egl.c:364:62: note: expected 'void *' but argument is of type 'int'
Upstream-Status: Backport [https://gitlab.freedesktop.org/virgl/virglrenderer/-/commit/464deabe4d1bfce6b8f414ab0945d9a62b66ddd4]
Signed-off-by: Purushottam Choudhary <purushottam27.kumar@lge.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1440>
---
src/vrend_winsys_egl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vrend_winsys_egl.c b/src/vrend_winsys_egl.c
index 9d9f410c..8750f6b2 100644
--- a/src/vrend_winsys_egl.c
+++ b/src/vrend_winsys_egl.c
@@ -361,7 +361,7 @@ struct virgl_egl *virgl_egl_init(EGLNativeDisplayType display_id, bool surfacele
#ifdef ENABLE_GBM
else
egl->egl_display = egl->funcs.eglGetPlatformDisplay(EGL_PLATFORM_GBM_KHR,
- (EGLNativeDisplayType)egl->gbm->device, NULL);
+ (EGLNativeDisplayType*)egl->gbm->device, NULL);
#endif
} else {
#ifdef ENABLE_GBM
--
2.34.1

View File

@@ -0,0 +1,34 @@
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 libepoxy virtual/egl virtual/libgbm"
SRCREV = "690680e5f0f952e22424fca1538c1b24457a0868"
SRC_URI = "git://gitlab.freedesktop.org/virgl/virglrenderer.git;branch=main;protocol=https \
file://0001-meson.build-use-python3-directly-for-python.patch \
file://0001-vrend-Fix-int-conversion-fatal-build-error-with-GCC-.patch \
"
S = "${WORKDIR}/git"
inherit meson pkgconfig features_check
PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'venus', '', d)}"
PACKAGECONFIG[venus] = "-Dvenus=true,-Dvenus=false,vulkan-loader vulkan-headers"
PACKAGECONFIG[va] = "-Dvideo=true,-Dvideo=false,libva"
PACKAGECONFIG[render-server] = "-Drender-server=true,-Drender-server=false"
PACKAGECONFIG[drm-msm-experimental] = "-Ddrm-msm-experimental=true,-Ddrm-msm-experimental=false"
PACKAGECONFIG[minigbm_allocation] = "-Dminigbm_allocation=true,-Dminigbm_allocation=false"
PACKAGECONFIG[venus-validate] = "-Dvenus-validate=true,-Dvenus-validate=false"
PACKAGECONFIG[tests] = "-Dtests=true,-Dtests=false,libcheck"
BBCLASSEXTEND = "native nativesdk"
REQUIRED_DISTRO_FEATURES = "opengl"

View File

@@ -0,0 +1,28 @@
SUMMARY = "Vulkan Header files and API registry"
DESCRIPTION = "Vulkan is a 3D graphics and compute API providing cross-platform access \
to modern GPUs with low overhead and targeting realtime graphics applications such as \
games and interactive media. This package contains the development headers \
for packages wanting to make use of Vulkan."
HOMEPAGE = "https://www.khronos.org/vulkan/"
BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Headers"
SECTION = "libs"
LICENSE = "Apache-2.0 & MIT"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=1bc355d8c4196f774c8b87ed1a8dd625"
SRC_URI = "git://github.com/KhronosGroup/Vulkan-Headers.git;branch=main;protocol=https"
SRCREV = "217e93c664ec6704ec2d8c36fa116c1a4a1e2d40"
S = "${WORKDIR}/git"
inherit cmake
FILES:${PN} += "${datadir}/vulkan"
RDEPENDS:${PN} += "python3-core"
# These recipes need to be updated in lockstep with each other:
# glslang, vulkan-headers, vulkan-loader, vulkan-tools, spirv-headers, spirv-tools,
# vulkan-validation-layers, vulkan-utility-libraries.
# The tags versions should always be sdk-x.y.z, as this is what
# upstream considers a release.
UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"

View File

@@ -0,0 +1,43 @@
SUMMARY = "3D graphics and compute API common loader"
DESCRIPTION = "Vulkan is a new generation graphics and compute API \
that provides efficient access to modern GPUs. These packages \
provide only the common vendor-agnostic library loader, headers and \
the vulkaninfo utility."
HOMEPAGE = "https://www.khronos.org/vulkan/"
BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Loader"
SECTION = "libs"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7dbefed23242760aa3475ee42801c5ac"
SRC_URI = "git://github.com/KhronosGroup/Vulkan-Loader.git;branch=vulkan-sdk-1.3.275;protocol=https"
SRCREV = "00893b9a03e526aec2c5bf487521d16dfa435229"
S = "${WORKDIR}/git"
REQUIRED_DISTRO_FEATURES = "vulkan"
inherit cmake features_check pkgconfig
DEPENDS += "vulkan-headers"
EXTRA_OECMAKE = "\
-DBUILD_TESTS=OFF \
-DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 \
-DASSEMBLER_WORKS=FALSE \
-DVulkanHeaders_INCLUDE_DIR=${STAGING_INCDIR} \
-DVulkanRegistry_DIR=${RECIPE_SYSROOT}/${datadir} \
"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF, libxcb libx11 libxrandr"
PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland"
RRECOMMENDS:${PN} = "mesa-vulkan-drivers"
# These recipes need to be updated in lockstep with each other:
# glslang, vulkan-headers, vulkan-loader, vulkan-tools, spirv-headers, spirv-tools,
# vulkan-validation-layers, vulkan-utility-libraries.
# The tags versions should always be sdk-x.y.z, as this is what
# upstream considers a release.
UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"

View File

@@ -0,0 +1,59 @@
From 93987b1ce7d6f91387202495aac61026070597df Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 15 Jan 2023 21:37:52 -0800
Subject: [PATCH] Deprecate u8string_view
Use basic_string_view instead
Upstream-Status: Backport [https://github.com/fmtlib/fmt/commit/dea7fde8b7d649923dd41b0766bdf076033c62a2]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
include/spdlog/fmt/bundled/core.h | 3 ++-
include/spdlog/fmt/bundled/format.h | 15 ++-------------
2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/include/spdlog/fmt/bundled/core.h b/include/spdlog/fmt/bundled/core.h
index 50b79351..e8b029ef 100644
--- a/include/spdlog/fmt/bundled/core.h
+++ b/include/spdlog/fmt/bundled/core.h
@@ -1484,7 +1484,8 @@ FMT_API void vprint(wstring_view format_str, wformat_args args);
/**
\rst
- Prints formatted data to ``stdout``.
+ Formats ``args`` according to specifications in ``format_str`` and writes the
+ output to ``stdout``.
**Example**::
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h
index 1bb24a52..39426361 100644
--- a/include/spdlog/fmt/bundled/format.h
+++ b/include/spdlog/fmt/bundled/format.h
@@ -407,21 +407,10 @@ void basic_buffer<T>::append(const U *begin, const U *end) {
enum char8_t: unsigned char {};
#endif
-// A UTF-8 string view.
-class u8string_view : public basic_string_view<char8_t> {
- public:
- typedef char8_t char_type;
-
- u8string_view(const char *s):
- basic_string_view<char8_t>(reinterpret_cast<const char8_t*>(s)) {}
- u8string_view(const char *s, size_t count) FMT_NOEXCEPT:
- basic_string_view<char8_t>(reinterpret_cast<const char8_t*>(s), count) {}
-};
-
#if FMT_USE_USER_DEFINED_LITERALS
inline namespace literals {
-inline u8string_view operator"" _u(const char *s, std::size_t n) {
- return {s, n};
+inline basic_string_view<char8_t> operator"" _u(const char* s, std::size_t n) {
+ return {reinterpret_cast<const char8_t*>(s), n};
}
}
#endif
--
2.39.0

View File

@@ -0,0 +1,37 @@
From ce7a593e74c8e0c2ece15c73e7614d4f13a19a53 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 30 Dec 2022 13:04:08 -0800
Subject: [PATCH] Do not use LFS64 functions on linux/musl
On musl, off_t is 64bit always ( even on 32bit platforms ), therefore using
LFS64 funcitons is not needed on such platforms. Moreover, musl has stopped
providing aliases for these functions [1] which means it wont compile on
newer musl systems. Therefore only use it on 32bit glibc/linux platforms
and exclude musl like cygwin or OSX
[1] https://git.musl-libc.org/cgit/musl/commit/?id=246f1c811448f37a44b41cd8df8d0ef9736d95f4
Upstream-Status: Submitted [https://github.com/gabime/spdlog/pull/2589]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
include/spdlog/details/os.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h
index 8e8476f0..be0a67b8 100644
--- a/include/spdlog/details/os.h
+++ b/include/spdlog/details/os.h
@@ -227,7 +227,9 @@ inline size_t filesize(FILE *f)
#else // unix
int fd = fileno(f);
// 64 bits(but not in osx or cygwin, where fstat64 is deprecated)
-#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__)) && !defined(__CYGWIN__)
+#if !defined(__FreeBSD__) && !defined(__APPLE__) && \
+ (defined(__linux__) && defined(__GLIBC__)) && \
+ (defined(__x86_64__) || defined(__ppc64__)) && !defined(__CYGWIN__)
struct stat64 st;
if (::fstat64(fd, &st) == 0)
{
--
2.39.0

View File

@@ -0,0 +1,43 @@
From d998c753254649c7cf7c64e3fed78e41c11ad7ed Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Wed, 23 Aug 2023 09:38:37 +0200
Subject: [PATCH] vulkan-samples: Fix reproducibility issue
There is code to remove the prefix CMAKE_SOURCE_DIR from __FILENAME__ paths
used for logging with LOGE() in the code. We need to make this match the value we use
in the debug source remapping from CFLAGS
We export the right path to use in the recipe with:
EXTRA_OECMAKE = "-DCMAKE_DEBUG_SRCDIR=${TARGET_DBGSRC_DIR}/"
and we then patch this into the code instead of the broken use
of CMAKE_SOURCE_DIR since __FILENAME__ will match our path prefix
changes.
This also breaks reproducibility since the path length of the build directory
will currently change the output!
Upstream-Status: Pending [needs to be discussed upstream]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
---
bldsys/cmake/global_options.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bldsys/cmake/global_options.cmake b/bldsys/cmake/global_options.cmake
index b15c2da..d8952e5 100644
--- a/bldsys/cmake/global_options.cmake
+++ b/bldsys/cmake/global_options.cmake
@@ -62,7 +62,7 @@ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
-string(LENGTH "${CMAKE_SOURCE_DIR}/" ROOT_PATH_SIZE)
+string(LENGTH "${CMAKE_DEBUG_SRCDIR}/" ROOT_PATH_SIZE)
add_definitions(-DROOT_PATH_SIZE=${ROOT_PATH_SIZE})
set(CMAKE_C_FLAGS_DEBUG "-DDEBUG=0 ${CMAKE_C_FLAGS_DEBUG}")
--
2.41.0

View File

@@ -0,0 +1,52 @@
From a7bfe82a311c713b12bb83b8488574ad5c784f89 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Tue, 9 Jul 2024 04:29:11 +0000
Subject: [PATCH] zstd.c: replace FORCE_INLINE_TEMPLATE with inline
Refer [1], always-inline is not suggested to be used if you have indirect
+calls. so replace FORCE_INLINE_TEMPLATE with inline to fix error:
In function 'ZSTD_compressBlock_lazy_generic',
inlined from 'ZSTD_compressBlock_greedy' at TOPDIR/tmp-glibc/work/core2-32-wrs-linux/vulkan-samples/git/git/third_party/ktx/lib/basisu/zstd/zstd.c:21914:12:
TOPDIR/tmp-glibc/work/core2-32-wrs-linux/vulkan-samples/git/git/third_party/ktx/lib/basisu/zstd/zstd.c:21551:30: error: inlining failed in call to 'always_inline' 'ZSTD_HcFindBestMatch_selectMLS': function not considered for inlining
| FORCE_INLINE_TEMPLATE size_t ZSTD_HcFindBestMatch_selectMLS (
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TOPDIR/tmp-glibc/work/core2-32-wrs-linux/vulkan-samples/git/git/third_party/ktx/lib/basisu/zstd/zstd.c:21736:32: note: called from here
| size_t const ml2 = searchMax(ms, ip, iend, &offsetFound);
Upstream-Status: Inappropriate [ Latest upstream ktx don't have this part code ]
Has report this issue to upstream Vulkan-Samples, refer [2]
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107931
[2] https://github.com/KhronosGroup/Vulkan-Samples/issues/1089
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
lib/basisu/zstd/zstd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/basisu/zstd/zstd.c b/lib/basisu/zstd/zstd.c
index eaf13738..423f149e 100644
--- a/lib/basisu/zstd/zstd.c
+++ b/lib/basisu/zstd/zstd.c
@@ -21548,7 +21548,7 @@ size_t ZSTD_HcFindBestMatch_generic (
}
-FORCE_INLINE_TEMPLATE size_t ZSTD_HcFindBestMatch_selectMLS (
+static inline size_t ZSTD_HcFindBestMatch_selectMLS (
ZSTD_matchState_t* ms,
const BYTE* ip, const BYTE* const iLimit,
size_t* offsetPtr)
@@ -21596,7 +21596,7 @@ static size_t ZSTD_HcFindBestMatch_dedicatedDictSearch_selectMLS (
}
-FORCE_INLINE_TEMPLATE size_t ZSTD_HcFindBestMatch_extDict_selectMLS (
+static inline size_t ZSTD_HcFindBestMatch_extDict_selectMLS (
ZSTD_matchState_t* ms,
const BYTE* ip, const BYTE* const iLimit,
size_t* offsetPtr)
--
2.44.0

View File

@@ -0,0 +1,101 @@
From 49761ca63797014223d8e3ff6fb2c0235803c19c Mon Sep 17 00:00:00 2001
From: asuessenbach <asuessenbach@nvidia.com>
Date: Wed, 3 May 2023 09:50:08 +0200
Subject: [PATCH] Resolve some Vulkan-Hpp-related issues on Win32.
This patch fixes vulkan-samples compilation on 32-bit hosts.
Upstream-Status: Backport
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
framework/common/hpp_vk_common.h | 4 ++--
framework/core/hpp_buffer.cpp | 4 ++--
framework/core/hpp_buffer.h | 2 +-
framework/core/hpp_image.cpp | 2 +-
samples/api/hpp_texture_loading/hpp_texture_loading.cpp | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/framework/common/hpp_vk_common.h b/framework/common/hpp_vk_common.h
index 39ed3dcde..0cbbe479e 100644
--- a/framework/common/hpp_vk_common.h
+++ b/framework/common/hpp_vk_common.h
@@ -92,7 +92,7 @@ inline bool is_dynamic_buffer_descriptor_type(vk::DescriptorType descriptor_type
inline vk::ShaderModule load_shader(const std::string &filename, vk::Device device, vk::ShaderStageFlagBits stage)
{
- return vkb::load_shader(filename, device, static_cast<VkShaderStageFlagBits>(stage));
+ return static_cast<vk::ShaderModule>(vkb::load_shader(filename, device, static_cast<VkShaderStageFlagBits>(stage)));
}
inline void set_image_layout(vk::CommandBuffer command_buffer,
@@ -104,7 +104,7 @@ inline void set_image_layout(vk::CommandBuffer command_buffer,
vk::PipelineStageFlags dst_mask = vk::PipelineStageFlagBits::eAllCommands)
{
vkb::set_image_layout(command_buffer,
- image,
+ static_cast<VkImage>(image),
static_cast<VkImageLayout>(old_layout),
static_cast<VkImageLayout>(new_layout),
static_cast<VkImageSubresourceRange>(subresource_range),
diff --git a/framework/core/hpp_buffer.cpp b/framework/core/hpp_buffer.cpp
index 8da265acb..e6509b9f4 100644
--- a/framework/core/hpp_buffer.cpp
+++ b/framework/core/hpp_buffer.cpp
@@ -84,7 +84,7 @@ HPPBuffer::~HPPBuffer()
if (get_handle() && (allocation != VK_NULL_HANDLE))
{
unmap();
- vmaDestroyBuffer(get_device().get_memory_allocator(), get_handle(), allocation);
+ vmaDestroyBuffer(get_device().get_memory_allocator(), static_cast<VkBuffer>(get_handle()), allocation);
}
}
@@ -93,7 +93,7 @@ VmaAllocation HPPBuffer::get_allocation() const
return allocation;
}
-VkDeviceMemory HPPBuffer::get_memory() const
+vk::DeviceMemory HPPBuffer::get_memory() const
{
return memory;
}
diff --git a/framework/core/hpp_buffer.h b/framework/core/hpp_buffer.h
index 7a243c265..bad47406d 100644
--- a/framework/core/hpp_buffer.h
+++ b/framework/core/hpp_buffer.h
@@ -55,7 +55,7 @@ class HPPBuffer : public vkb::core::HPPVulkanResource<vk::Buffer>
VmaAllocation get_allocation() const;
const uint8_t *get_data() const;
- VkDeviceMemory get_memory() const;
+ vk::DeviceMemory get_memory() const;
/**
* @return Return the buffer's device address (note: requires that the buffer has been created with the VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT usage fla)
diff --git a/framework/core/hpp_image.cpp b/framework/core/hpp_image.cpp
index 00fa89ba7..5e6f27363 100644
--- a/framework/core/hpp_image.cpp
+++ b/framework/core/hpp_image.cpp
@@ -138,7 +138,7 @@ HPPImage::~HPPImage()
if (get_handle() && memory)
{
unmap();
- vmaDestroyImage(get_device().get_memory_allocator(), get_handle(), memory);
+ vmaDestroyImage(get_device().get_memory_allocator(), static_cast<VkImage>(get_handle()), memory);
}
}
diff --git a/samples/api/hpp_texture_loading/hpp_texture_loading.cpp b/samples/api/hpp_texture_loading/hpp_texture_loading.cpp
index 11a1f24c1..cbdd22773 100644
--- a/samples/api/hpp_texture_loading/hpp_texture_loading.cpp
+++ b/samples/api/hpp_texture_loading/hpp_texture_loading.cpp
@@ -170,7 +170,7 @@ void HPPTextureLoading::load_texture()
memory_allocate_info = {memory_requirements.size,
get_device()->get_gpu().get_memory_type(memory_requirements.memoryTypeBits, vk::MemoryPropertyFlagBits::eDeviceLocal)};
texture.device_memory = get_device()->get_handle().allocateMemory(memory_allocate_info);
- VK_CHECK(vkBindImageMemory(get_device()->get_handle(), texture.image, texture.device_memory, 0));
+ get_device()->get_handle().bindImageMemory(texture.image, texture.device_memory, 0);
vk::CommandBuffer copy_command = get_device()->create_command_buffer(vk::CommandBufferLevel::ePrimary, true);

View File

@@ -0,0 +1,40 @@
SUMMARY = "The Vulkan Samples is collection of resources to help develop optimized Vulkan applications."
HOMEPAGE = "https://www.khronos.org/vulkan/"
BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Samples/issues"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=48aa35cefb768436223a6e7f18dc2a2a"
SRC_URI = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git;branch=main;protocol=https;lfs=0 \
file://0001-vulkan-samples-Fix-reproducibility-issue.patch \
file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch;patchdir=third_party/spdlog \
file://0001-Deprecate-u8string_view.patch;patchdir=third_party/spdlog \
file://32bit.patch \
file://0001-zstd.c-replace-FORCE_INLINE_TEMPLATE-with-inline.patch;patchdir=third_party/ktx \
"
UPSTREAM_CHECK_COMMITS = "1"
SRCREV = "2307c3eb5608cb1205fa3514b3a31dbfb857d00c"
UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for"
S = "${WORKDIR}/git"
REQUIRED_DISTRO_FEATURES = 'vulkan'
inherit cmake features_check
FILES:${PN} += "${datadir}"
#
# There is code to remove the prefix CMAKE_SOURCE_DIR from __FILENAME__ paths
# used for logging with LOGE in the code. We need to make this match the value we use
# in the debug source remapping from CFLAGS
#
EXTRA_OECMAKE += "-DCMAKE_DEBUG_SRCDIR=${TARGET_DBGSRC_DIR}/"
# Binaries built with PCH enabled don't appear reproducible, differing results were seen
# from some builds depending on the point the PCH was compiled. Disable it to be
# deterministic
EXTRA_OECMAKE += "-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON"
# This needs to be specified explicitly to avoid xcb/xlib dependencies
EXTRA_OECMAKE += "-DVKB_WSI_SELECTION=D2D"

View File

@@ -0,0 +1,37 @@
SUMMARY = "Vulkan Utilities and Tools"
DESCRIPTION = "Assist development by enabling developers to verify their applications correct use of the Vulkan API."
HOMEPAGE = "https://www.khronos.org/vulkan/"
BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Tools"
SECTION = "libs"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
SRC_URI = "git://github.com/KhronosGroup/Vulkan-Tools.git;branch=main;protocol=https"
SRCREV = "c86d42cf9eb620eeac377e3bff46ae342c5cd664"
S = "${WORKDIR}/git"
inherit cmake features_check pkgconfig
ANY_OF_DISTRO_FEATURES = "x11 wayland"
REQUIRED_DISTRO_FEATURES = "vulkan"
DEPENDS += "vulkan-headers vulkan-loader vulkan-volk"
EXTRA_OECMAKE = "\
-DBUILD_TESTS=OFF \
-DBUILD_CUBE=OFF \
-DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 \
"
# must choose x11 or wayland or both
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF, libxcb libx11 libxrandr"
PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland"
# These recipes need to be updated in lockstep with each other:
# glslang, vulkan-headers, vulkan-loader, vulkan-tools, spirv-headers, spirv-tools
# vulkan-validation-layers, vulkan-utility-libraries.
# The tags versions should always be sdk-x.y.z, as this is what
# upstream considers a release.
UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"

View File

@@ -0,0 +1,33 @@
SUMMARY = "Vulkan Utility Libraries"
DESCRIPTION = "Common libraries created to share code across various \
Vulkan repositories, solving long standing issues for Vulkan SDK \
developers and users."
HOMEPAGE = "https://www.khronos.org/vulkan/"
BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Utility-Libraries"
SECTION = "libs"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=4ca2d6799091aaa98a8520f1b793939b"
SRC_URI = "git://github.com/KhronosGroup/Vulkan-Utility-Libraries.git;branch=main;protocol=https"
SRCREV = "4cfc176e3242b4dbdfd3f6c5680c5d8f2cb7db45"
S = "${WORKDIR}/git"
REQUIRED_DISTRO_FEATURES = "vulkan"
DEPENDS = "vulkan-headers"
EXTRA_OECMAKE = "\
-DBUILD_TESTS=OFF \
"
inherit cmake features_check pkgconfig
# These recipes need to be updated in lockstep with each other:
# glslang, vulkan-headers, vulkan-loader, vulkan-tools,
# vulkan-validation-layers, spirv-headers, spirv-tools,
# vulkan-utility-libraries.
# The tags versions should always be sdk-x.y.z, as this is what
# upstream considers a release.
UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"

View File

@@ -0,0 +1,49 @@
SUMMARY = "Vulkan Validation layers"
DESCRIPTION = "Khronos official Vulkan validation layers to assist developers \
in verifying that their applications correctly use the Vulkan API"
HOMEPAGE = "https://www.khronos.org/vulkan/"
BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-ValidationLayers"
SECTION = "libs"
LICENSE = "Apache-2.0 & MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=cd3c0bc366cd9b6a906e22f0bcb5910f"
SRC_URI = "git://github.com/KhronosGroup/Vulkan-ValidationLayers.git;branch=vulkan-sdk-1.3.275;protocol=https"
SRCREV = "780c65337e111c7385109c7b720d757a778e4fe2"
S = "${WORKDIR}/git"
REQUIRED_DISTRO_FEATURES = "vulkan"
DEPENDS = "vulkan-headers vulkan-loader spirv-headers spirv-tools glslang vulkan-utility-libraries"
# BUILD_TESTS - Not required for OE builds
# USE_ROBIN_HOOD_HASHING - Provides substantial performance improvements on all platforms.
# Yocto project doesn't contain a recipe for package so disabled it.
EXTRA_OECMAKE = "\
-DBUILD_TESTS=OFF \
-DUSE_ROBIN_HOOD_HASHING=OFF \
-DGLSLANG_INSTALL_DIR=${STAGING_LIBDIR} \
-DVULKAN_HEADERS_INSTALL_DIR=${STAGING_EXECPREFIXDIR} \
-DSPIRV_HEADERS_INSTALL_DIR=${STAGING_EXECPREFIXDIR} \
"
PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF, libxcb libx11 libxrandr"
PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland"
PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'x11 wayland', d)}"
inherit cmake features_check pkgconfig
FILES:${PN} += "${datadir}/vulkan"
SOLIBS = ".so"
FILES_SOLIBSDEV = ""
# These recipes need to be updated in lockstep with each other:
# glslang, vulkan-headers, vulkan-loader, vulkan-tools,
# vulkan-validation-layers, spirv-headers, spirv-tools,
# vulkan-utility-libraries.
# The tags versions should always be sdk-x.y.z, as this is what
# upstream considers a release.
UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"

View File

@@ -0,0 +1,37 @@
SUMMARY = "A meta-loader for Vulkan"
DESCRIPTION = "Volk allows one to dynamically load entrypoints required \
to use Vulkan without linking to vulkan-1.dll or statically linking Vulkan loader. \
"
HOMEPAGE = "https://www.khronos.org/vulkan/"
BUGTRACKER = "https://github.com/zeux/volk"
SECTION = "libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=b2dd098d35668a801190a9d9d47461b0"
SRC_URI = "git://github.com/zeux/volk.git;branch=master;protocol=https"
SRCREV = "f2a16e3e19c2349b873343b2dc38a1d4c25af23a"
S = "${WORKDIR}/git"
REQUIRED_DISTRO_FEATURES = "vulkan"
DEPENDS = "vulkan-headers"
EXTRA_OECMAKE = "\
-DVOLK_INSTALL=ON \
"
inherit cmake features_check pkgconfig
# These recipes need to be updated in lockstep with each other:
# glslang, vulkan-headers, vulkan-loader, vulkan-tools,
# vulkan-validation-layers, spirv-headers, spirv-tools,
# vulkan-utility-libraries.
# The tags versions should always be sdk-x.y.z, as this is what
# upstream considers a release.
UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
do_install:append() {
sed -i -e 's,${STAGING_DIR_TARGET},,g' ${D}${libdir}/cmake/volk/volkTargets.cmake
}

View File

@@ -0,0 +1,28 @@
From 0961787d2bf0d359a3ead89e9cec642818b32dea Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Tue, 5 Jul 2022 11:51:39 +0200
Subject: [PATCH] meson.build: request native wayland-scanner
This matters in cross compilation, as otherwise meson will
try to use a cross-binary, and fail.
Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/waffle/-/merge_requests/110]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index ca6a212..3177bde 100644
--- a/meson.build
+++ b/meson.build
@@ -110,7 +110,7 @@ else
'wayland-egl', version : '>= 9.1', required : get_option('wayland'),
)
dep_wayland_scanner = dependency(
- 'wayland-scanner', version : '>= 1.15', required : get_option('wayland'),
+ 'wayland-scanner', version : '>= 1.15', required : get_option('wayland'), native: true,
)
if dep_wayland_scanner.found()
prog_wayland_scanner = find_program(dep_wayland_scanner.get_variable(pkgconfig: 'wayland_scanner'))

View File

@@ -0,0 +1,41 @@
From 71f9399d6cea1e2e885a98b98d82eb628832a86e Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Tue, 26 Oct 2021 08:52:17 +0200
Subject: [PATCH] waffle: do not make core protocol into the library
None of the consumers (which is just piglit) use it, and
this avoids host contamination from pkg-config suggesting
wayland.xml from the host.
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
src/waffle/meson.build | 7 -------
1 file changed, 7 deletions(-)
diff --git a/src/waffle/meson.build b/src/waffle/meson.build
index e2636c7..3ff5762 100644
--- a/src/waffle/meson.build
+++ b/src/waffle/meson.build
@@ -88,12 +88,6 @@ if build_surfaceless
endif
if build_wayland
- wl_core_proto_c = custom_target(
- 'wl-core-proto.c',
- input: wayland_core_xml,
- output: 'wl-core-proto.c',
- command: [prog_wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'],
- )
wl_xdg_shell_proto_c = custom_target(
'wl-xdg-shell-proto.c',
input: wayland_xdg_shell_xml,
@@ -114,7 +108,6 @@ if build_wayland
'wayland/wayland_wrapper.c',
)
files_libwaffle += [
- wl_core_proto_c,
wl_xdg_shell_proto_c,
wl_xdg_shell_proto_h,
]

View File

@@ -0,0 +1,51 @@
SUMMARY = "A C library for selecting an OpenGL API and window system at runtime"
DESCRIPTION = "A cross-platform C library that allows one to defer selection \
of an OpenGL API and window system until runtime. For example, on Linux, Waffle \
enables an application to select X11/EGL with an OpenGL 3.3 core profile, \
Wayland with OpenGL ES2, and other window system / API combinations."
HOMEPAGE = "https://gitlab.freedesktop.org/mesa/waffle"
BUGTRACKER = "https://gitlab.freedesktop.org/mesa/waffle"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4c5154407c2490750dd461c50ad94797 \
file://include/waffle-1/waffle.h;endline=24;md5=61dbf8697f61c78645e75a93c585b1bf"
SRC_URI = "git://gitlab.freedesktop.org/mesa/waffle.git;protocol=https;branch=maint-1.7 \
file://0001-waffle-do-not-make-core-protocol-into-the-library.patch \
file://0001-meson.build-request-native-wayland-scanner.patch \
"
SRCREV = "f3b42a7216105498842bc6ba77d8481b90d6f5f9"
S = "${WORKDIR}/git"
inherit meson features_check lib_package bash-completion pkgconfig
DEPENDS:append = " python3"
# This should be overridden per-machine to reflect the capabilities of the GL
# stack.
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx x11-egl', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gbm surfaceless-egl', '', d)} \
"
# virtual/libgl requires opengl in DISTRO_FEATURES.
REQUIRED_DISTRO_FEATURES += "${@bb.utils.contains('DEPENDS', 'virtual/${MLPREFIX}libgl', 'opengl', '', d)}"
# I say virtual/libgl, actually wants gl.pc
PACKAGECONFIG[glx] = "-Dglx=enabled,-Dglx=disabled,virtual/${MLPREFIX}libgl libx11"
# wants wayland-egl.pc, egl.pc, and the wayland
# DISTRO_FEATURE.
PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,virtual/${MLPREFIX}egl wayland wayland-native wayland-protocols"
# wants gbm.pc egl.pc
PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled,virtual/${MLPREFIX}egl virtual/${MLPREFIX}libgbm udev"
# wants egl.pc
PACKAGECONFIG[x11-egl] = "-Dx11_egl=enabled,-Dx11_egl=disabled,virtual/${MLPREFIX}egl libxcb"
PACKAGECONFIG[surfaceless-egl] = "-Dsurfaceless_egl=enabled,-Dsurfaceless_egl=disabled,virtual/${MLPREFIX}egl"
# TODO: optionally build manpages and examples
do_install:append() {
rm -rf ${D}${datadir}/zsh
}

View File

@@ -0,0 +1,9 @@
#!/bin/sh
/usr/libexec/libinput/libinput-test-suite -j1
if [ $? -eq 0 ]; then
echo 'PASS: libinput-test-suite'
else
echo 'FAIL: libinput-test-suite'
fi

View File

@@ -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=bab4ac7dc1c10bc0fb037dc76c46ef8a"
DEPENDS = "libevdev udev mtdev"
SRC_URI = "git://gitlab.freedesktop.org/libinput/libinput.git;protocol=https;branch=main \
file://run-ptest \
"
SRCREV = "3fd38d89276b679ac3565efd7c2150fd047902cb"
S = "${WORKDIR}/git"
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 ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
PACKAGECONFIG[libwacom] = "-Dlibwacom=true,-Dlibwacom=false,libwacom"
PACKAGECONFIG[gui] = "-Ddebug-gui=true,-Ddebug-gui=false,cairo gtk+3 wayland-native"
PACKAGECONFIG[tests] = "-Dtests=true -Dinstall-tests=true,-Dtests=false -Dinstall-tests=false,libcheck"
UDEVDIR = "`pkg-config --variable=udevdir udev`"
EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} \
-Ddocumentation=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"
FILES:${PN}-ptest += "${libexecdir}/libinput/libinput-test-suite"

View File

@@ -0,0 +1,18 @@
SUMMARY = "Multitouch Protocol Translation Library"
DESCRIPTION = "mtdev is a library which transforms all variants of kernel \
multitouch events to the slotted type B protocol. The events put into mtdev may \
be from any MT device, specifically type A without contact tracking, type A with \
contact tracking, or type B with contact tracking"
HOMEPAGE = "http://bitmath.org/code/mtdev/"
SECTION = "libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=ea6bd0268bb0fcd6b27698616ceee5d6"
SRC_URI = "http://bitmath.org/code/${BPN}/${BP}.tar.bz2"
SRC_URI[md5sum] = "bf8ef2482e84a00b5db8fbd3ce00e249"
SRC_URI[sha256sum] = "15d7b28da8ac71d8bc8c9287c2045fd174267bc740bec10cfda332dc1204e0e0"
inherit autotools pkgconfig

View File

@@ -0,0 +1,8 @@
# distro features required by weston recipes
inherit features_check
# requires pam enabled if started via systemd
#
REQUIRED_DISTRO_FEATURES = "wayland opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}"

Some files were not shown because too many files have changed in this diff Show More