Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -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"
PR = "r6"
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
}
CVE_STATUS[CVE-2008-4178] = "cpe-incorrect: This CVE is for an unrelated builder"
@@ -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&
@@ -0,0 +1,34 @@
CVE: CVE-2018-19876
Upstream-Status: Backport
Signed-off-by: Ross Burton <ross.burton@intel.com>
From 90e85c2493fdfa3551f202ff10282463f1e36645 Mon Sep 17 00:00:00 2001
From: Carlos Garcia Campos <cgarcia@igalia.com>
Date: Mon, 19 Nov 2018 12:33:07 +0100
Subject: [PATCH] ft: Use FT_Done_MM_Var instead of free when available in
cairo_ft_apply_variations
Fixes a crash when using freetype >= 2.9
---
src/cairo-ft-font.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 325dd61b4..981973f78 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -2393,7 +2393,11 @@ skip:
done:
free (coords);
free (current_coords);
+#if HAVE_FT_DONE_MM_VAR
+ FT_Done_MM_Var (face->glyph->library, ft_mm_var);
+#else
free (ft_mm_var);
+#endif
}
}
--
2.11.0
@@ -0,0 +1,20 @@
There is an assertion in function _cairo_arc_in_direction().
CVE: CVE-2019-6461
Upstream-Status: Pending
Signed-off-by: Ross Burton <ross.burton@intel.com>
diff --git a/src/cairo-arc.c b/src/cairo-arc.c
index 390397bae..1bde774a4 100644
--- a/src/cairo-arc.c
+++ b/src/cairo-arc.c
@@ -186,7 +186,8 @@ _cairo_arc_in_direction (cairo_t *cr,
if (cairo_status (cr))
return;
- assert (angle_max >= angle_min);
+ if (angle_max < angle_min)
+ return;
if (angle_max - angle_min > 2 * M_PI * MAX_FULL_CIRCLES) {
angle_max = fmod (angle_max - angle_min, 2 * M_PI);
@@ -0,0 +1,40 @@
CVE: CVE-2019-6462
Upstream-Status: Backport
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
From ab2c5ee21e5f3d3ee4b3f67cfcd5811a4f99c3a0 Mon Sep 17 00:00:00 2001
From: Heiko Lewin <hlewin@gmx.de>
Date: Sun, 1 Aug 2021 11:16:03 +0000
Subject: [PATCH] _arc_max_angle_for_tolerance_normalized: fix infinite loop
---
src/cairo-arc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/cairo-arc.c b/src/cairo-arc.c
index 390397bae..1c891d1a0 100644
--- a/src/cairo-arc.c
+++ b/src/cairo-arc.c
@@ -90,16 +90,18 @@ _arc_max_angle_for_tolerance_normalized (double tolerance)
{ M_PI / 11.0, 9.81410988043554039085e-09 },
};
int table_size = ARRAY_LENGTH (table);
+ const int max_segments = 1000; /* this value is chosen arbitrarily. this gives an error of about 1.74909e-20 */
for (i = 0; i < table_size; i++)
if (table[i].error < tolerance)
return table[i].angle;
++i;
+
do {
angle = M_PI / i++;
error = _arc_error_normalized (angle);
- } while (error > tolerance);
+ } while (error > tolerance && i < max_segments);
return angle;
}
--
2.38.1
@@ -0,0 +1,60 @@
Fix stack buffer overflow.
CVE: CVE-2020-35492
Upstream-Status: Backport
Signed-off-by: Ross Burton <ross.burton@arm.com>
From 03a820b173ed1fdef6ff14b4468f5dbc02ff59be Mon Sep 17 00:00:00 2001
From: Heiko Lewin <heiko.lewin@worldiety.de>
Date: Tue, 15 Dec 2020 16:48:19 +0100
Subject: [PATCH] Fix mask usage in image-compositor
---
src/cairo-image-compositor.c | 8 ++--
test/Makefile.sources | 1 +
test/bug-image-compositor.c | 39 ++++++++++++++++++++
test/reference/bug-image-compositor.ref.png | Bin 0 -> 185 bytes
4 files changed, 44 insertions(+), 4 deletions(-)
create mode 100644 test/bug-image-compositor.c
create mode 100644 test/reference/bug-image-compositor.ref.png
diff --git a/src/cairo-image-compositor.c b/src/cairo-image-compositor.c
index 79ad69f68..4f8aaed99 100644
--- a/src/cairo-image-compositor.c
+++ b/src/cairo-image-compositor.c
@@ -2601,14 +2601,14 @@ _inplace_src_spans (void *abstract_renderer, int y, int h,
unsigned num_spans)
{
cairo_image_span_renderer_t *r = abstract_renderer;
- uint8_t *m;
+ uint8_t *m, *base = (uint8_t*)pixman_image_get_data(r->mask);
int x0;
if (num_spans == 0)
return CAIRO_STATUS_SUCCESS;
x0 = spans[0].x;
- m = r->_buf;
+ m = base;
do {
int len = spans[1].x - spans[0].x;
if (len >= r->u.composite.run_length && spans[0].coverage == 0xff) {
@@ -2655,7 +2655,7 @@ _inplace_src_spans (void *abstract_renderer, int y, int h,
spans[0].x, y,
spans[1].x - spans[0].x, h);
- m = r->_buf;
+ m = base;
x0 = spans[1].x;
} else if (spans[0].coverage == 0x0) {
if (spans[0].x != x0) {
@@ -2684,7 +2684,7 @@ _inplace_src_spans (void *abstract_renderer, int y, int h,
#endif
}
- m = r->_buf;
+ m = base;
x0 = spans[1].x;
} else {
*m++ = spans[0].coverage;
--
@@ -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
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;
@@ -0,0 +1,106 @@
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 = "http://bugs.freedesktop.org"
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 glib-2.0 libpng pixman zlib"
SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \
file://cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff \
file://CVE-2018-19876.patch \
file://CVE-2019-6461.patch \
file://CVE-2019-6462.patch \
file://CVE-2020-35492.patch \
"
SRC_URI[md5sum] = "f19e0353828269c22bd72e271243a552"
SRC_URI[sha256sum] = "5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331"
inherit autotools pkgconfig upstream-version-is-even gtk-doc multilib_script
MULTILIB_SCRIPTS = "${PN}-perf-utils:${bindir}/cairo-trace"
X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)} \
trace"
PACKAGECONFIG:class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)}"
PACKAGECONFIG:class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)}"
PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb"
PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind"
PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"
PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2"
PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"
# trace is under GPLv3
PACKAGECONFIG[trace] = "--enable-trace,--disable-trace"
EXTRA_OECONF += " \
${@bb.utils.contains('TARGET_FPU', 'soft', '--disable-some-floating-point', '', d)} \
--enable-tee \
"
# We don't depend on binutils so we need to disable this
export ac_cv_lib_bfd_bfd_openr="no"
# Ensure we don't depend on LZO
export ac_cv_lib_lzo2_lzo2a_decompress="no"
do_install:append () {
rm -rf ${D}${bindir}/cairo-sphinx
rm -rf ${D}${libdir}/cairo/cairo-fdr*
rm -rf ${D}${libdir}/cairo/cairo-sphinx*
rm -rf ${D}${libdir}/cairo/.debug/cairo-fdr*
rm -rf ${D}${libdir}/cairo/.debug/cairo-sphinx*
[ ! -d ${D}${bindir} ] ||
rmdir -p --ignore-fail-on-non-empty ${D}${bindir}
[ ! -d ${D}${libdir}/cairo ] ||
rmdir -p --ignore-fail-on-non-empty ${D}${libdir}/cairo
}
PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
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-trace* ${libdir}/cairo/*.la ${libdir}/cairo/libcairo-trace.so"
BBCLASSEXTEND = "native nativesdk"
UPSTREAM_CHECK_REGEX = "cairo-(?P<pver>\d+(\.\d+)+).tar.xz"
@@ -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"
@@ -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] = "554cfbfe0542bddb391b4e3e05bfbbfc3e282b955bd56218d21c0616481f65eb"
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"
@@ -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}
@@ -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=ce976b310a013a6ace6b60afa71851c1 \
"
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] = "3ba2dd92158718acec5caaf1a716043b5aa055c27b081d914af3ccb40dce8a55"
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"
@@ -0,0 +1,45 @@
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"
SRC_URI[sha256sum] = "ea67e3b019b1104d1667aa274f5dc307d8cbd606b399bc32df308a77f1a564bf"
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"
@@ -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
@@ -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)/"
@@ -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
@@ -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
}
@@ -0,0 +1,47 @@
From e8c1b7e1dc6d108a3b49d0adfdc4f836cfafcf1a 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: Pending
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 72e82b48..c6188e12 100644
--- a/glslang/CMakeLists.txt
+++ b/glslang/CMakeLists.txt
@@ -223,6 +223,8 @@ if(ENABLE_GLSLANG_INSTALL)
")
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(ALL_HEADERS
${GLSLANG_HEADERS}
diff --git a/glslang/glslang.pc.cmake.in b/glslang/glslang.pc.cmake.in
new file mode 100644
index 00000000..948a0952
--- /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}
@@ -0,0 +1,33 @@
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 = "d1517d64cfca91f573af1bf7341dc3a5113349c0"
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
# 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
EXTRA_OECMAKE = " \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DENABLE_PCH=OFF \
-DENABLE_CTEST=OFF \
-DBUILD_EXTERNAL=OFF \
"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,28 @@
SUMMARY = "A thin layer of graphic data types"
HOMEPAGE = "http://ebassi.github.io/graphene/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a7d871d9e23c450c421a85bb2819f648"
GNOMEBASEBUILDCLASS = "meson"
inherit gnomebase gobject-introspection gtk-doc
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"
@@ -0,0 +1,47 @@
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] = "c1ce780acd385569f25b9a29603d1d5bc71e6940e55bfdd4f7266fad50e42620"
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[freetype] = "-Dfreetype=enabled,-Dfreetype=disabled,freetype"
PACKAGECONFIG[glib] = "-Dglib=enabled,-Dglib=disabled,glib-2.0"
PACKAGECONFIG[graphite] = "-Dgraphite=enabled,-Dgraphite=disabled,graphite2"
PACKAGECONFIG[icu] = "-Dicu=enabled,-Dicu=disabled,icu"
PACKAGES =+ "${PN}-icu ${PN}-icu-dev ${PN}-subset"
LEAD_SONAME = "libharfbuzz.so"
do_install:append() {
# If no tools are installed due to PACKAGECONFIG then this directory 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"
@@ -0,0 +1,502 @@
From 524e58f3b2f9e4702293af66f6768755b300e8d3 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Thu, 2 Mar 2023 13:59:13 +0100
Subject: [PATCH] Support procps 4.x
Upstream-Status: Submitted [https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/116#note_1785522]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
lib/igt_aux.c | 238 ++++++++++++++++++++++++++++++++++++++++--------
lib/meson.build | 7 +-
meson.build | 10 +-
3 files changed, 215 insertions(+), 40 deletions(-)
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 15e30440..d23c9a40 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -52,8 +52,16 @@
#include <assert.h>
#include <grp.h>
+#ifdef HAVE_LIBPROCPS
#include <proc/readproc.h>
+#endif
+#ifdef HAVE_LIBPROC2
+#include <libproc2/pids.h>
+#endif
+
#include <libudev.h>
+#include <linux/limits.h>
+#include <dirent.h>
#include "drmtest.h"
#include "i915_drm.h"
@@ -1217,6 +1225,7 @@ void igt_unlock_mem(void)
*/
int igt_is_process_running(const char *comm)
{
+#if HAVE_LIBPROCPS
PROCTAB *proc;
proc_t *proc_info;
bool found = false;
@@ -1235,6 +1244,26 @@ int igt_is_process_running(const char *comm)
closeproc(proc);
return found;
+#endif
+#ifdef HAVE_LIBPROC2
+ enum pids_item Item[] = { PIDS_CMD };
+ struct pids_info *info = NULL;
+ struct pids_stack *stack;
+ char *pid_comm;
+ bool found = false;
+
+ if (procps_pids_new(&info, Item, 1) < 0)
+ return false;
+ while ((stack = procps_pids_get(info, PIDS_FETCH_TASKS_ONLY))) {
+ pid_comm = PIDS_VAL(0, str, stack, info);
+ if (!strncasecmp(pid_comm, comm, strlen(pid_comm))) {
+ found = true;
+ break;
+ }
+ }
+ procps_pids_unref(&info);
+ return found;
+#endif
}
/**
@@ -1251,6 +1280,7 @@ int igt_is_process_running(const char *comm)
*/
int igt_terminate_process(int sig, const char *comm)
{
+#ifdef HAVE_LIBPROCPS
PROCTAB *proc;
proc_t *proc_info;
int err = 0;
@@ -1272,6 +1302,29 @@ int igt_terminate_process(int sig, const char *comm)
closeproc(proc);
return err;
+#endif
+#ifdef HAVE_LIBPROC2
+ enum pids_item Items[] = { PIDS_ID_PID, PIDS_CMD };
+ struct pids_info *info = NULL;
+ struct pids_stack *stack;
+ char *pid_comm;
+ int pid;
+ int err = 0;
+
+ if (procps_pids_new(&info, Items, 2) < 0)
+ return -errno;
+ while ((stack = procps_pids_get(info, PIDS_FETCH_TASKS_ONLY))) {
+ pid = PIDS_VAL(0, s_int, stack, info);
+ pid_comm = PIDS_VAL(1, str, stack, info);
+ if (!strncasecmp(pid_comm, comm, strlen(pid_comm))) {
+ if (kill(pid, sig) < 0)
+ err = -errno;
+ break;
+ }
+ }
+ procps_pids_unref(&info);
+ return err;
+#endif
}
struct pinfo {
@@ -1341,9 +1394,9 @@ igt_show_stat_header(void)
}
static void
-igt_show_stat(proc_t *info, int *state, const char *fn)
+igt_show_stat(const pid_t tid, const char *cmd, int *state, const char *fn)
{
- struct pinfo p = { .pid = info->tid, .comm = info->cmd, .fn = fn };
+ struct pinfo p = { .pid = tid, .comm = cmd, .fn = fn };
if (!*state)
igt_show_stat_header();
@@ -1353,7 +1406,7 @@ igt_show_stat(proc_t *info, int *state, const char *fn)
}
static void
-__igt_lsof_fds(proc_t *proc_info, int *state, char *proc_path, const char *dir)
+__igt_lsof_fds(const pid_t tid, const char *cmd, int *state, char *proc_path, const char *dir)
{
struct dirent *d;
struct stat st;
@@ -1400,7 +1453,7 @@ again:
dirn = dirname(copy_fd_lnk);
if (!strncmp(dir, dirn, strlen(dir)))
- igt_show_stat(proc_info, state, fd_lnk);
+ igt_show_stat(tid, cmd, state, fd_lnk);
free(copy_fd_lnk);
free(fd_lnk);
@@ -1416,13 +1469,14 @@ again:
static void
__igt_lsof(const char *dir)
{
- PROCTAB *proc;
- proc_t *proc_info;
-
char path[30];
char *name_lnk;
struct stat st;
int state = 0;
+#ifdef HAVE_LIBPROCPS
+ PROCTAB *proc;
+ proc_t *proc_info;
+
proc = openproc(PROC_FILLCOM | PROC_FILLSTAT | PROC_FILLARG);
igt_assert(proc != NULL);
@@ -1456,6 +1510,44 @@ __igt_lsof(const char *dir)
}
closeproc(proc);
+#endif
+#ifdef HAVE_LIBPROC2
+ enum pids_item Items[] = { PIDS_ID_PID, PIDS_CMD };
+ struct pids_info *info = NULL;
+ struct pids_stack *stack;
+
+ if (procps_pids_new(&info, Items, 2) < 0)
+ return;
+ while ((stack = procps_pids_get(info, PIDS_FETCH_TASKS_ONLY))) {
+ ssize_t read;
+ int tid = PIDS_VAL(0, s_int, stack, info);
+ char *pid_comm = PIDS_VAL(1, str, stack, info);
+
+ /* check current working directory */
+ memset(path, 0, sizeof(path));
+ snprintf(path, sizeof(path), "/proc/%d/cwd", tid);
+
+ if (stat(path, &st) == -1)
+ continue;
+
+ name_lnk = malloc(st.st_size + 1);
+
+ igt_assert((read = readlink(path, name_lnk, st.st_size + 1)));
+ name_lnk[read] = '\0';
+
+ if (!strncmp(dir, name_lnk, strlen(dir)))
+ igt_show_stat(tid, pid_comm, &state, name_lnk);
+
+ /* check also fd, seems that lsof(8) doesn't look here */
+ memset(path, 0, sizeof(path));
+ snprintf(path, sizeof(path), "/proc/%d/fd", tid);
+
+ __igt_lsof_fds(tid, pid_comm, &state, path, dir);
+
+ free(name_lnk);
+ }
+ procps_pids_unref(&info);
+#endif
}
/**
@@ -1490,7 +1582,7 @@ igt_lsof(const char *dpath)
free(sanitized);
}
-static void pulseaudio_unload_module(proc_t *proc_info)
+static void pulseaudio_unload_module(const uid_t euid, const gid_t egid)
{
struct igt_helper_process pa_proc = {};
char xdg_dir[PATH_MAX];
@@ -1498,14 +1590,14 @@ static void pulseaudio_unload_module(proc_t *proc_info)
struct passwd *pw;
igt_fork_helper(&pa_proc) {
- pw = getpwuid(proc_info->euid);
+ pw = getpwuid(euid);
homedir = pw->pw_dir;
- snprintf(xdg_dir, sizeof(xdg_dir), "/run/user/%d", proc_info->euid);
+ snprintf(xdg_dir, sizeof(xdg_dir), "/run/user/%d", euid);
igt_info("Request pulseaudio to stop using audio device\n");
- setgid(proc_info->egid);
- setuid(proc_info->euid);
+ setgid(egid);
+ setuid(euid);
clearenv();
setenv("HOME", homedir, 1);
setenv("XDG_RUNTIME_DIR",xdg_dir, 1);
@@ -1524,10 +1616,12 @@ static void pipewire_reserve_wait(void)
char xdg_dir[PATH_MAX];
const char *homedir;
struct passwd *pw;
- proc_t *proc_info;
- PROCTAB *proc;
+ int tid=0, euid, egid;
+#ifdef HAVE_LIBPROCPS
igt_fork_helper(&pw_reserve_proc) {
+ proc_t *proc_info;
+ PROCTAB *proc;
igt_info("Preventing pipewire-pulse to use the audio drivers\n");
proc = openproc(PROC_FILLCOM | PROC_FILLSTAT | PROC_FILLARG);
@@ -1539,21 +1633,44 @@ static void pipewire_reserve_wait(void)
freeproc(proc_info);
}
closeproc(proc);
+ tid = proc_info->tid;
+ euid = proc_info->euid;
+ egid = proc_info->egid;
+ freeproc(proc_info);
+#endif
+#ifdef HAVE_LIBPROC2
+ igt_fork(child, 1) {
+ enum pids_item Items[] = { PIDS_ID_PID, PIDS_ID_EUID, PIDS_ID_EGID };
+ enum rel_items { EU_PID, EU_EUID, EU_EGID };
+ struct pids_info *info = NULL;
+ struct pids_stack *stack;
+
+ igt_info("Preventing pipewire-pulse to use the audio drivers\n");
+
+ if (procps_pids_new(&info, Items, 3) < 0)
+ return;
+ while ((stack = procps_pids_get(info, PIDS_FETCH_TASKS_ONLY))) {
+ tid = PIDS_VAL(EU_PID, s_int, stack, info);
+ if (pipewire_pulse_pid == tid)
+ break;
+ }
+ euid = PIDS_VAL(EU_EUID, s_int, stack, info);
+ egid = PIDS_VAL(EU_EGID, s_int, stack, info);
+ procps_pids_unref(&info);
+#endif
/* Sanity check: if it can't find the process, it means it has gone */
- if (pipewire_pulse_pid != proc_info->tid)
+ if (pipewire_pulse_pid != tid)
exit(0);
- pw = getpwuid(proc_info->euid);
+ pw = getpwuid(euid);
homedir = pw->pw_dir;
- snprintf(xdg_dir, sizeof(xdg_dir), "/run/user/%d", proc_info->euid);
- setgid(proc_info->egid);
- setuid(proc_info->euid);
+ snprintf(xdg_dir, sizeof(xdg_dir), "/run/user/%d", euid);
+ setgid(egid);
+ setuid(euid);
clearenv();
setenv("HOME", homedir, 1);
setenv("XDG_RUNTIME_DIR",xdg_dir, 1);
- freeproc(proc_info);
-
/*
* pw-reserve will run in background. It will only exit when
* igt_kill_children() is called later on. So, it shouldn't
@@ -1570,9 +1687,7 @@ static void pipewire_reserve_wait(void)
int pipewire_pulse_start_reserve(void)
{
bool is_pw_reserve_running = false;
- proc_t *proc_info;
int attempts = 0;
- PROCTAB *proc;
if (!pipewire_pulse_pid)
return 0;
@@ -1584,6 +1699,10 @@ int pipewire_pulse_start_reserve(void)
* pipewire version 0.3.50 or upper.
*/
for (attempts = 0; attempts < PIPEWIRE_RESERVE_MAX_TIME; attempts++) {
+#ifdef HAVE_LIBPROCPS
+ proc_t *proc_info;
+ PROCTAB *proc;
+
usleep(1000);
proc = openproc(PROC_FILLCOM | PROC_FILLSTAT | PROC_FILLARG);
igt_assert(proc != NULL);
@@ -1598,6 +1717,25 @@ int pipewire_pulse_start_reserve(void)
freeproc(proc_info);
}
closeproc(proc);
+#endif
+#ifdef HAVE_LIBPROC2
+ enum pids_item Items[] = { PIDS_ID_PID, PIDS_CMD };
+ struct pids_info *info = NULL;
+ struct pids_stack *stack;
+
+ usleep(1000);
+
+ if (procps_pids_new(&info, Items, 2) < 0)
+ return 1;
+ while ((stack = procps_pids_get(info, PIDS_FETCH_TASKS_ONLY))) {
+ if (!strcmp(PIDS_VAL(1, str, stack, info), "pw-reserve")) {
+ is_pw_reserve_running = true;
+ pipewire_pw_reserve_pid = PIDS_VAL(0, s_int, stack, info);
+ break;
+ }
+ }
+ procps_pids_unref(&info);
+#endif
if (is_pw_reserve_running)
break;
}
@@ -1645,7 +1783,7 @@ void pipewire_pulse_stop_reserve(void)
* If the check fails, it means that the process can simply be killed.
*/
static int
-__igt_lsof_audio_and_kill_proc(proc_t *proc_info, char *proc_path)
+__igt_lsof_audio_and_kill_proc(const pid_t tid, const char *cmd, const uid_t euid, const gid_t egid, char *proc_path)
{
const char *audio_dev = "/dev/snd/";
char path[PATH_MAX * 2];
@@ -1670,10 +1808,10 @@ __igt_lsof_audio_and_kill_proc(proc_t *proc_info, char *proc_path)
* 2) unload/unbind the the audio driver(s);
* 3) stop the pw-reserve thread.
*/
- if (!strcmp(proc_info->cmd, "pipewire-pulse")) {
+ if (!strcmp(cmd, "pipewire-pulse")) {
igt_info("process %d (%s) is using audio device. Should be requested to stop using them.\n",
- proc_info->tid, proc_info->cmd);
- pipewire_pulse_pid = proc_info->tid;
+ tid, cmd);
+ pipewire_pulse_pid = tid;
return 0;
}
/*
@@ -1685,9 +1823,9 @@ __igt_lsof_audio_and_kill_proc(proc_t *proc_info, char *proc_path)
* will respawn them. So, just ignore here, they'll honor pw-reserve,
* when the time comes.
*/
- if (!strcmp(proc_info->cmd, "pipewire-media-session"))
+ if (!strcmp(cmd, "pipewire-media-session"))
return 0;
- if (!strcmp(proc_info->cmd, "wireplumber"))
+ if (!strcmp(cmd, "wireplumber"))
return 0;
dp = opendir(proc_path);
@@ -1723,22 +1861,22 @@ __igt_lsof_audio_and_kill_proc(proc_t *proc_info, char *proc_path)
* enough to unbind audio modules and won't cause race issues
* with systemd trying to reload it.
*/
- if (!strcmp(proc_info->cmd, "pulseaudio")) {
- pulseaudio_unload_module(proc_info);
+ if (!strcmp(cmd, "pulseaudio")) {
+ pulseaudio_unload_module(euid, egid);
break;
}
/* For all other processes, just kill them */
igt_info("process %d (%s) is using audio device. Should be terminated.\n",
- proc_info->tid, proc_info->cmd);
+ tid, cmd);
- if (kill(proc_info->tid, SIGTERM) < 0) {
+ if (kill(tid, SIGTERM) < 0) {
igt_info("Fail to terminate %s (pid: %d) with SIGTERM\n",
- proc_info->cmd, proc_info->tid);
- if (kill(proc_info->tid, SIGABRT) < 0) {
+ cmd, tid);
+ if (kill(tid, SIGABRT) < 0) {
fail++;
igt_info("Fail to terminate %s (pid: %d) with SIGABRT\n",
- proc_info->cmd, proc_info->tid);
+ cmd, tid);
}
}
@@ -1760,9 +1898,10 @@ int
igt_lsof_kill_audio_processes(void)
{
char path[PATH_MAX];
+ int fail = 0;
+#ifdef HAVE_LIBPROCPS
proc_t *proc_info;
PROCTAB *proc;
- int fail = 0;
proc = openproc(PROC_FILLCOM | PROC_FILLSTAT | PROC_FILLARG);
igt_assert(proc != NULL);
@@ -1772,12 +1911,35 @@ igt_lsof_kill_audio_processes(void)
if (snprintf(path, sizeof(path), "/proc/%d/fd", proc_info->tid) < 1)
fail++;
else
- fail += __igt_lsof_audio_and_kill_proc(proc_info, path);
+ fail += __igt_lsof_audio_and_kill_proc(proc_info->pid, proc_info->cmd, proc_info->euid, proc_info->egid, path);
freeproc(proc_info);
}
closeproc(proc);
+#endif
+#ifdef HAVE_LIBPROC2
+ enum pids_item Items[] = { PIDS_ID_PID, PIDS_CMD, PIDS_ID_EUID, PIDS_ID_EGID };
+ enum rel_items { EU_PID, EU_CMD, EU_EUID, EU_EGID };
+ struct pids_info *info = NULL;
+ struct pids_stack *stack;
+ pid_t tid;
+
+ if (procps_pids_new(&info, Items, 4) < 0)
+ return 1;
+ while ((stack = procps_pids_get(info, PIDS_FETCH_TASKS_ONLY))) {
+ tid = PIDS_VAL(EU_PID, s_int, stack, info);
+ if (snprintf(path, sizeof(path), "/proc/%d/fd", tid) < 1)
+ fail++;
+ else
+ fail += __igt_lsof_audio_and_kill_proc(tid,
+ PIDS_VAL(EU_CMD, str, stack, info),
+ PIDS_VAL(EU_EUID, s_int, stack, info),
+ PIDS_VAL(EU_EGID, s_int, stack, info),
+ path);
+ }
+ procps_pids_unref(&info);
+#endif
return fail;
}
diff --git a/lib/meson.build b/lib/meson.build
index cc784686..90591e0e 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -105,7 +105,6 @@ lib_deps = [
libdrm,
libdw,
libkmod,
- libprocps,
libudev,
math,
pciaccess,
@@ -169,6 +168,12 @@ if chamelium.found()
lib_sources += 'monitor_edids/monitor_edids_helper.c'
endif
+if libprocps.found()
+ lib_deps += libprocps
+else
+ lib_deps += libproc2
+endif
+
if get_option('srcdir') != ''
srcdir = join_paths(get_option('srcdir'), 'tests')
else
diff --git a/meson.build b/meson.build
index e7a68503..309b0af3 100644
--- a/meson.build
+++ b/meson.build
@@ -120,7 +120,15 @@ build_info += 'With libdrm: ' + ','.join(libdrm_info)
pciaccess = dependency('pciaccess', version : '>=0.10')
libkmod = dependency('libkmod')
-libprocps = dependency('libprocps', required : true)
+libprocps = dependency('libprocps', required : false)
+libproc2 = dependency('libproc2', required : false)
+if libprocps.found()
+ config.set('HAVE_LIBPROCPS', 1)
+elif libproc2.found()
+ config.set('HAVE_LIBPROC2', 1)
+else
+ error('Either libprocps or libproc2 is required')
+endif
libunwind = dependency('libunwind', required : get_option('libunwind'))
build_info += 'With libunwind: @0@'.format(libunwind.found())
@@ -0,0 +1,53 @@
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 = "2b29e8ac07fbcfadc48b9d60e4d736a6e3b289ab"
PV = "1.27.1"
SRC_URI = "git://gitlab.freedesktop.org/drm/igt-gpu-tools.git;protocol=https;branch=master \
file://0001-Support-procps-4.x.patch \
"
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=/usr/src/debug/${PN}/${PV}-${PR}/git/"
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"
@@ -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"
@@ -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"
@@ -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)}'
@@ -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] = "c77c65fcce3d33417b2e90432e7a0eb05f59a7fff884022a9d931775d583bfaa"
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}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
# Add nasm-native dependency consistently for all build arches is hard
EXTRA_OECMAKE:append:class-native = " -DWITH_SIMD=False"
EXTRA_OECMAKE:append:class-nativesdk = " -DWITH_SIMD=False"
# 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"
@@ -0,0 +1,27 @@
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 = "cf4ec7f35521eb54d72ce0c92ce65b2249171cbd"
SRC_URI = "git://gitlab.freedesktop.org/mesa/kmscube;branch=master;protocol=https"
UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/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)}"
@@ -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"
@@ -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${SRCPV}"
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"
@@ -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"
@@ -0,0 +1,85 @@
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=31f575634fd56b27fc6b6cbe8dc9bd38 \
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] = "d215ae4541e69d628953711496cd7b0e8b8d5c8d811d5b0f98fdc7fd1422998a"
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"
# 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"
@@ -0,0 +1,8 @@
require libva.inc
PACKAGECONFIG ?= ""
do_install:append () {
rm -f ${D}${libdir}/*.so*
}
@@ -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.19-branch;protocol=https"
SRCREV = "5bf107ec4f7b18a6457d23abf57560dfb382a751"
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"
@@ -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] = "963be798d559df7feebda6fa81aa0dae6f9409c633a37909c44c6aa8af1e2174"
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"
@@ -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}"
@@ -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 $@
@@ -0,0 +1,26 @@
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}"
PR = "r4"
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}
}
@@ -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
@@ -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
}
@@ -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
@@ -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
@@ -0,0 +1,34 @@
From 865762e0a767a121206d818bdd58301afbf30104 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 23 Jun 2023 01:20:38 -0700
Subject: [PATCH] gallium: Fix build with llvm 17
These headers are not available for C files in llvm 17+
and they seem to be not needed to compile after all with llvm 17
so add conditions to exclude them for llvm >= 17
Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23827]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index 24d0823..3d4573e 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -42,8 +42,10 @@
#include <llvm/Config/llvm-config.h>
#include <llvm-c/Analysis.h>
+#if LLVM_VERSION_MAJOR < 17
#include <llvm-c/Transforms/Scalar.h>
-#if LLVM_VERSION_MAJOR >= 7
+#endif
+#if LLVM_VERSION_MAJOR >= 7 && LLVM_VERSION_MAJOR < 17
#include <llvm-c/Transforms/Utils.h>
#endif
#include <llvm-c/BitWriter.h>
--
2.41.0
@@ -0,0 +1,25 @@
From 3ef37c63f03ad6f2af407de350486fdd25e9132a 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>
@@ -0,0 +1,43 @@
From b251af67df5a6840d2e9cc06edae2c387f8778f1 Mon Sep 17 00:00:00 2001
From: Alistair Francis <alistair@alistair23.me>
Date: Thu, 14 Nov 2019 13:04:49 -0800
Subject: [PATCH] meson.build: check for all linux host_os combinations
Make sure that we are also looking for our host_os combinations like
linux-musl etc. when assuming support for DRM/KMS.
Also delete a duplicate line.
Upstream-Status: Pending
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Alistair Francis <alistair@alistair23.me>
---
meson.build | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 22385d8..15f48a6 100644
--- a/meson.build
+++ b/meson.build
@@ -121,7 +121,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2
# Only build shared_glapi if at least one OpenGL API is enabled
with_shared_glapi = with_shared_glapi and with_any_opengl
-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android'].contains(host_machine.system())
+system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android'].contains(host_machine.system()) or host_machine.system().startswith('linux')
gallium_drivers = get_option('gallium-drivers')
if gallium_drivers.contains('auto')
@@ -909,7 +909,7 @@ if cc.has_function('fmemopen')
endif
# TODO: this is very incomplete
-if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku', 'android'].contains(host_machine.system())
+if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku'].contains(host_machine.system()) or host_machine.system().startswith('linux')
pre_args += '-D_GNU_SOURCE'
elif host_machine.system() == 'sunos'
pre_args += '-D__EXTENSIONS__'
@@ -0,0 +1,32 @@
From 1910b3a83a7e5aa1a31c4325829c94134fafce76 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 13 Jan 2023 20:58:07 -0800
Subject: [PATCH] Remove deprecated register in C++17
Fixes errors like
src/libnurbs/internals/varray.cc:76:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
register long ds = sgn(arc->tail()[0] - arc->prev->tail()[0]);
^~~~~~~~~
Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/glu/-/merge_requests/10]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/libnurbs/internals/varray.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libnurbs/internals/varray.cc b/src/libnurbs/internals/varray.cc
index 1cb2354..41b3b18 100644
--- a/src/libnurbs/internals/varray.cc
+++ b/src/libnurbs/internals/varray.cc
@@ -73,8 +73,8 @@ Varray::~Varray( void )
inline void
Varray::update( Arc_ptr arc, long dir[2], REAL val )
{
- register long ds = sgn(arc->tail()[0] - arc->prev->tail()[0]);
- register long dt = sgn(arc->tail()[1] - arc->prev->tail()[1]);
+ long ds = sgn(arc->tail()[0] - arc->prev->tail()[0]);
+ long dt = sgn(arc->tail()[1] - arc->prev->tail()[1]);
if( dir[0] != ds || dir[1] != dt ) {
dir[0] = ds;
@@ -0,0 +1,30 @@
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.gz \
file://0001-Remove-deprecated-register-in-C-17.patch \
"
SRC_URI[sha256sum] = "24effdfb952453cc00e275e1c82ca9787506aba0282145fff054498e60e19a65"
S = "${WORKDIR}/glu-${PV}"
DEPENDS = "virtual/libgl"
inherit autotools pkgconfig features_check
# 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 = ""
@@ -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
@@ -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
@@ -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
}
@@ -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)}"
+351
View File
@@ -0,0 +1,351 @@
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.build-check-for-all-linux-host_os-combinations.patch \
file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
file://0001-gallium-Fix-build-with-llvm-17.patch \
"
SRC_URI[sha256sum] = "2f6d7381bc10fbd2d6263ad1022785b8b511046c1a904162f8f7da18eea8aed9"
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"
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())}' \
"
def strip_comma(s):
return s.strip(',')
PACKAGECONFIG = " \
gallium \
${@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)} \
${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'video-codecs', '', 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"
VULKAN_DRIVERS:append:x86-64 = ",intel"
# i686 is a 32 bit override for mesa-native
VULKAN_DRIVERS:append:i686 = ",intel"
VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', 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)}"
# 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"
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[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 = "vc1dec,h264dec,h264enc,h265dec,h265enc"
PACKAGECONFIG[video-codecs] = "-Dvideo-codecs=${@strip_comma('${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
}
# 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 ${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"
@@ -0,0 +1,2 @@
require ${BPN}.inc
@@ -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
@@ -0,0 +1,28 @@
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"
PR = "r4"
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}
}
@@ -0,0 +1,15 @@
SUMMARY = "Basic Weston compositor setup"
DESCRIPTION = "Packages required to set up a basic working Weston session"
PR = "r1"
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 \
"
@@ -0,0 +1,16 @@
SUMMARY = "Basic X11 session"
DESCRIPTION = "Packages required to set up a basic working X11 session"
PR = "r1"
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 \
"
@@ -0,0 +1,20 @@
#
# Copyright (C) 2011 Intel Corporation
#
SUMMARY = "X11 display server"
PR = "r40"
PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit packagegroup features_check
# rdepends on XSERVER
REQUIRED_DISTRO_FEATURES = "x11"
XSERVER ?= "xserver-xorg xf86-video-fbdev"
XSERVERCODECS ?= ""
RDEPENDS:${PN} = "\
${XSERVER} \
${XSERVERCODECS} \
"
@@ -0,0 +1,36 @@
#
# Copyright (C) 2011 Intel Corporation
#
PR = "r40"
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 \
"
@@ -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
@@ -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
@@ -0,0 +1,54 @@
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"
GNOMEBASEBUILDCLASS = "meson"
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] = "1d67f205bfc318c27a29cfdfb6828568df566795df0cb51d2189cde7f2d581e8"
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] = ",,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"
@@ -0,0 +1,35 @@
From 26faa2c157a27a18a9f767976730fe0c115e3af4 Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Wed, 13 Jul 2016 19:19:02 +0300
Subject: [PATCH] cmake: install bash-completions in the right place
The completionsdir variable is a full path and should not be
prefixed.
This does mean the files may be installed outside of
CMAKE_INSTALL_PREFIX -- the alternative is more difficult and
means that bash completion files may be installed where
bash-completion can't find them.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Upstream-Status: Submitted [mailing list]
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8e2abba..784a8f9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -532,7 +532,7 @@ install (
if (BASH_COMPLETION_FOUND)
install(
FILES completions/bash/piglit
- DESTINATION ${CMAKE_INSTALL_PREFIX}/${BASH_COMPLETION_COMPLETIONSDIR}/
+ DESTINATION ${BASH_COMPLETION_COMPLETIONSDIR}/
)
endif (BASH_COMPLETION_FOUND)
--
2.8.1
@@ -0,0 +1,53 @@
From cd38c91e8c743bfc1841bcdd08e1ab18bf22f0e1 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;
}
--
2.40.1
@@ -0,0 +1,32 @@
From 3bf1beee1ddd19bc536ff2856e04ac269d43daa2 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 a5f080156..a303a9f58 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)
--
2.11.0
@@ -0,0 +1,30 @@
From 1c67250308a92d4991ed05d9d240090ab84accae 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 2/2] 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 4fd68d21e..c9ea8295e 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,
--
2.17.1
@@ -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://0001-cmake-install-bash-completions-in-the-right-place.patch \
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 \
"
UPSTREAM_CHECK_COMMITS = "1"
SRCREV = "5036601c43fff63f7be5cd8ad7b319a5c1f6652c"
# (when PV goes above 1.0 remove the trailing r)
PV = "1.0+gitr${SRCPV}"
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"
@@ -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);
}
}
}
@@ -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}
}
@@ -0,0 +1,76 @@
From 7f6c60f928dabd8b15aa948886523ddf15709215 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Wed, 2 Nov 2022 15:42:58 +0100
Subject: [PATCH] CMakeLists.txt: drop OSDependent/OGLCompiler from lists of
glslang libraries
glslang no longer installs them separately, and all needed
functionality has been merged into glslang shared library itself:
This wasn't a problem previously as they were still provided,
as static libraries but in latest glslang they no longer are:
https://github.com/KhronosGroup/glslang/commit/7cd519511c32d7e86d901c7ed231cb84c652d18d
Upstream-Status: Submitted [https://github.com/google/shaderc/pull/1276]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
glslc/CMakeLists.txt | 2 +-
libshaderc/CMakeLists.txt | 2 +-
libshaderc/README.md | 4 ++--
libshaderc_util/CMakeLists.txt | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt
index 31664d1..5093bd9 100644
--- a/glslc/CMakeLists.txt
+++ b/glslc/CMakeLists.txt
@@ -43,7 +43,7 @@ if (SHADERC_ENABLE_WGSL_OUTPUT)
endif(SHADERC_ENABLE_WGSL_OUTPUT)
target_link_libraries(glslc PRIVATE
- glslang OSDependent OGLCompiler HLSL glslang SPIRV # Glslang libraries
+ glslang HLSL glslang SPIRV # Glslang libraries
$<$<BOOL:${SHADERC_ENABLE_WGSL_OUTPUT}>:libtint> # Tint libraries, optional
shaderc_util shaderc # internal Shaderc libraries
${CMAKE_THREAD_LIBS_INIT})
diff --git a/libshaderc/CMakeLists.txt b/libshaderc/CMakeLists.txt
index 3ada419..d3542bf 100644
--- a/libshaderc/CMakeLists.txt
+++ b/libshaderc/CMakeLists.txt
@@ -62,7 +62,7 @@ endif(SHADERC_ENABLE_INSTALL)
find_package(Threads)
set(SHADERC_LIBS
- glslang OSDependent OGLCompiler glslang ${CMAKE_THREAD_LIBS_INIT}
+ glslang glslang ${CMAKE_THREAD_LIBS_INIT}
shaderc_util
SPIRV # from glslang
SPIRV-Tools
diff --git a/libshaderc/README.md b/libshaderc/README.md
index bf9d317..1071769 100644
--- a/libshaderc/README.md
+++ b/libshaderc/README.md
@@ -7,8 +7,8 @@ A library for compiling shader strings into SPIR-V.
There are two main shaderc libraries that are created during a CMake
compilation. The first is `libshaderc`, which is a static library
containing just the functionality exposed by libshaderc. It depends
-on other compilation targets `glslang`, `OSDependent`, `OGLCompiler`,
-`shaderc_util`, `SPIRV`, `HLSL`, `SPIRV-Tools`, and `SPIRV-Tools-opt`.
+on other compilation targets `glslang`, `shaderc_util`, `SPIRV`,
+`HLSL`, `SPIRV-Tools`, and `SPIRV-Tools-opt`.
The other is `libshaderc_combined`, which is a static library containing
libshaderc and all of its dependencies.
diff --git a/libshaderc_util/CMakeLists.txt b/libshaderc_util/CMakeLists.txt
index 99ce3c4..5291175 100644
--- a/libshaderc_util/CMakeLists.txt
+++ b/libshaderc_util/CMakeLists.txt
@@ -46,7 +46,7 @@ add_definitions(-DENABLE_HLSL)
find_package(Threads)
target_link_libraries(shaderc_util PRIVATE
- glslang OSDependent OGLCompiler HLSL glslang SPIRV
+ glslang HLSL glslang SPIRV
SPIRV-Tools-opt ${CMAKE_THREAD_LIBS_INIT})
shaderc_add_tests(
@@ -0,0 +1,107 @@
From d3fbd6b9427f29606540528d17fe02930cd78d0c 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 633c244..75b01da 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,6 +67,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)
@@ -129,8 +130,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)
@@ -142,7 +149,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 5785390..f72b762 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):
@@ -0,0 +1,26 @@
From d02ad48d5c9b48af70ddea2e6998081347ef82f3 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 051558b..9c4476c 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"
@@ -0,0 +1,30 @@
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 = "7a8b3da0583425cf511336cf3afbdcf2ebc8b36b"
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 \
file://0001-CMakeLists.txt-drop-OSDependent-OGLCompiler-from-lis.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"
@@ -0,0 +1,19 @@
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 = "268a061764ee69f09a477a695bf6a11ffe311b8d"
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
# 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"
@@ -0,0 +1,46 @@
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 = "e7c6084fd1d6d6f5ac393e842728d8be309688ca"
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
# 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"
@@ -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}")
@@ -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
@@ -0,0 +1,33 @@
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"
PR = "r2"
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"
@@ -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>
@@ -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"
@@ -0,0 +1,33 @@
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"
PR = "r8"
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"
@@ -0,0 +1,28 @@
From c853c9e5c44f1b23a15a7ba629ee02f7d8ec23a0 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 13d95bb..b241eb2 100644
--- a/meson.build
+++ b/meson.build
@@ -64,7 +64,7 @@ flags = [
add_project_arguments(cc.get_supported_arguments(flags), language : 'c')
-prog_python = import('python').find_installation('python3')
+prog_python = 'python3'
libdrm_dep = dependency('libdrm', version : '>=2.4.50')
thread_dep = dependency('threads')
@@ -0,0 +1,33 @@
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 = "88b9fe3bfc64b23a701e4875006dbc0e769f14f6"
SRC_URI = "git://gitlab.freedesktop.org/virgl/virglrenderer.git;branch=master;protocol=https \
file://0001-meson.build-use-python3-directly-for-python.patch \
"
S = "${WORKDIR}/git"
inherit meson pkgconfig features_check
PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'venus-experimental', '', d)}"
PACKAGECONFIG[venus-experimental] = "-Dvenus-experimental=true,-Dvenus-experimental=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"
@@ -0,0 +1,27 @@
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"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
SRC_URI = "git://github.com/KhronosGroup/Vulkan-Headers.git;branch=main;protocol=https"
SRCREV = "9e61870ecbd32514113b467e0a0c46f60ed222c7"
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
# 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+)+)"
@@ -0,0 +1,42 @@
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=sdk-1.3.250;protocol=https"
SRCREV = "f372068d09fc13bcf54b8c81274f37aa5f46aea3"
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
# 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+)+)"
@@ -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
@@ -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
@@ -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);
@@ -0,0 +1,31 @@
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=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/"
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>
Index: git/bldsys/cmake/global_options.cmake
===================================================================
--- git.orig/bldsys/cmake/global_options.cmake
+++ git/bldsys/cmake/global_options.cmake
@@ -47,7 +47,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}")
@@ -0,0 +1,39 @@
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://debugfix.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 \
"
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=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/"
# 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"
@@ -0,0 +1,29 @@
From 9060e916ca05d34b56c62f2be0b4a77dd104e2aa Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Fri, 2 Jun 2023 14:13:00 +0200
Subject: [PATCH] scripts/CMakeLists.txt: append to CMAKE_FIND_ROOT_PATH
instead of replacing it
Resetting CMAKE_FIND_ROOT_PATH in particular breaks builds in Yocto
(which is a major cross compiling framework).
Upstream-Status: Submitted [https://github.com/KhronosGroup/Vulkan-Tools/pull/808]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
scripts/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index 5b979d43..19a58bf9 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -114,7 +114,7 @@ if (MOLTENVK_REPO_ROOT)
endif()
if (CMAKE_CROSSCOMPILING)
- set(CMAKE_FIND_ROOT_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
+ set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
else()
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
endif()
@@ -0,0 +1,38 @@
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 \
file://0001-scripts-CMakeLists.txt-do-not-make-special-arrangeme.patch \
"
SRCREV = "695887a994ef9cc00a7aa3f9c00b31a56ea79534"
S = "${WORKDIR}/git"
inherit cmake features_check pkgconfig
ANY_OF_DISTRO_FEATURES = "x11 wayland"
REQUIRED_DISTRO_FEATURES = "vulkan"
DEPENDS += "vulkan-headers vulkan-loader"
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
# 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+)+)"
@@ -0,0 +1,28 @@
From ea7b9e6fc0b3f45d6032ce624bed85bbde5ec0bf Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Wed, 21 Jun 2023 20:03:03 +0200
Subject: [PATCH] scripts/CMakeLists.txt: append to CMAKE_FIND_ROOT_PATH
instead of replacing it
Resetting CMAKE_FIND_ROOT_PATH in particular breaks builds in Yocto
(which is a major cross compiling framework).
Upstream-Status: Backport [https://github.com/KhronosGroup/Vulkan-ValidationLayers/commit/e1b11dc7856765cf45a283ac805ea5066c81cd9b]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
scripts/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index 94c8528c8..cd86c54eb 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -124,7 +124,7 @@ if (MIMALLOC_INSTALL_DIR)
endif()
if (CMAKE_CROSSCOMPILING)
- set(CMAKE_FIND_ROOT_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
+ set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
else()
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
endif()
@@ -0,0 +1,50 @@
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"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8df9e8826734226d08cb412babfa599c"
SRC_URI = "git://git@github.com/KhronosGroup/Vulkan-ValidationLayers.git;branch=sdk-1.3.250;protocol=https \
file://0001-scripts-CMakeLists.txt-append-to-CMAKE_FIND_ROOT_PAT.patch \
"
SRCREV = "1541e00a63cd125f15d231d5a8059ebe66503b25"
S = "${WORKDIR}/git"
REQUIRED_DISTRO_FEATURES = "vulkan"
DEPENDS = "vulkan-headers vulkan-loader spirv-headers spirv-tools glslang"
# 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
# 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+)+)"
@@ -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'))
@@ -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,
]
@@ -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
}
@@ -0,0 +1,42 @@
From c79a3fb51718c4286b74edf0f758df9219994844 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@redhat.com>
Date: Wed, 14 Sep 2022 09:07:10 +0200
Subject: [PATCH] wayland-info: Fix build without libdrm
wayland-info can optionally use libdrm to provide a description of the
dmabuf format modifiers.
When not using libdrm however, the build fails because "dev_t" is not
defined.
The definition of "dev_t" comes from <sys/types.h> which is included
from <libdrm.h>, which is not included without libdrm support, hence the
build failure.
Simply include <sys/types.h> unconditionally to make sure "dev_t" is
defined regardless of libdrm support, to fix the build failure.
Closes: https://gitlab.freedesktop.org/wayland/wayland-utils/-/issues/6
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Fixes: 240cb739 - "Add support for linux_dmabuf version 4"
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Upstream-Status: Backport [https://gitlab.freedesktop.org/wayland/wayland-utils/-/commit/baa65ba9f62e6a05c32b9202b524158a21f24245]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
wayland-info/wayland-info.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/wayland-info/wayland-info.c b/wayland-info/wayland-info.c
index 53cd04b..98ff205 100644
--- a/wayland-info/wayland-info.c
+++ b/wayland-info/wayland-info.c
@@ -34,6 +34,7 @@
#include <ctype.h>
#include <unistd.h>
#include <sys/mman.h>
+#include <sys/types.h>
#include <wayland-client.h>
#if HAVE_HUMAN_FORMAT_MODIFIER
@@ -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
@@ -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 libcheck"
SRC_URI = "git://gitlab.freedesktop.org/libinput/libinput.git;protocol=https;branch=main \
file://run-ptest \
"
SRCREV = "0b005eb64b12603e65a620a77c67ec62fd03f413"
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 ??= ""
PACKAGECONFIG[libwacom] = "-Dlibwacom=true,-Dlibwacom=false,libwacom"
PACKAGECONFIG[gui] = "-Ddebug-gui=true,-Ddebug-gui=false,cairo gtk+3"
UDEVDIR = "`pkg-config --variable=udevdir udev`"
EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} \
-Ddocumentation=false \
${@bb.utils.contains('PTEST_ENABLED', '1', '-Dtests=true -Dinstall-tests=true', '-Dtests=false -Dinstall-tests=false', d)} \
-Dzshcompletiondir=no"
# package name changed in 1.8.1 upgrade: make sure package upgrades work
RPROVIDES:${PN} = "libinput"
RREPLACES:${PN} = "libinput"
RCONFLICTS:${PN} = "libinput"
FILES:${PN}-ptest += "${libexecdir}/libinput/libinput-test-suite"

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