package/mesa3d-demos: bump version to 8.5.0

The package build system changed from autotools to meson. Autotools
was deprecated in commit [1], which is included in this 8.5.0
version. It was definitevely removed soon after, in commit [2].

The package patch file making libgl optional was fully rewritten
for meson.

This patch also updates the old ftp _SITE url to the new https one,
published in the project README.rst file. See [3].

This patch also removes openvg and freetype2 dependencies, as their
support was removed in commit [4]. The 'gbm' option is removed, and
the option 'libdrm' is added.

The md5 and sha1 entries in hash files are also removed, to keep only
sha256 and sha512 from the release announce email [5].

For change log, see the release announce [5].

[1] 2df8e97108
[2] abfead3758
[3] https://gitlab.freedesktop.org/mesa/demos/-/blob/mesa-demos-8.5.0/README.rst
[4] e6d0d9a868
[5] https://lists.freedesktop.org/archives/mesa-announce/2022-May/000677.html

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Julien Olivain 2022-09-20 22:05:21 +02:00 committed by Thomas Petazzoni
parent 557c68fbd2
commit fa75c4a305
3 changed files with 116 additions and 113 deletions

View File

@ -1,88 +1,101 @@
From bb0ffae7164d296d32da24fa5499534de259169a Mon Sep 17 00:00:00 2001
From: Spenser Gilliland <spenser@gillilanding.com>
Date: Sat, 24 Feb 2018 11:36:17 +0100
From 9ec9f7b4d0ef5e799ca4cc5103163e4630d184d8 Mon Sep 17 00:00:00 2001
From: Julien Olivain <ju.o@free.fr>
Date: Fri, 16 Sep 2022 22:30:59 +0200
Subject: [PATCH] demos: makes opengl an optional component
Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
[Romain: convert to git patch, rebase on 8.4.0]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
This patch is a port of [1] for the new meson build system.
[1].
https://git.busybox.net/buildroot/tree/package/mesa3d-demos/0001-demos-makes-opengl-an-optional-component.patch?h=2022.08
Signed-off-by: Julien Olivain <ju.o@free.fr>
---
configure.ac | 12 +++++++++++-
src/egl/opengl/Makefile.am | 2 ++
src/util/Makefile.am | 2 ++
3 files changed, 15 insertions(+), 1 deletion(-)
meson.build | 19 ++++++++++++-------
meson_options.txt | 1 +
src/egl/meson.build | 5 ++++-
src/meson.build | 4 +++-
4 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/configure.ac b/configure.ac
index 0b5e9a76..24298c44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,6 +51,14 @@ m4_ifndef([PKG_PROG_PKG_CONFIG],
ACLOCAL="aclocal -I/other/macro/dir" before running autoreconf.])])
PKG_PROG_PKG_CONFIG()
diff --git a/meson.build b/meson.build
index e1968fab..a15699d6 100644
--- a/meson.build
+++ b/meson.build
@@ -38,7 +38,10 @@ add_project_arguments(
dep_m = cc.find_library('m', required : false)
dep_winmm = cc.find_library('winmm', required : false)
+AC_ARG_ENABLE([gl],
+ [AS_HELP_STRING([--enable-gl],
+ [enable GL library @<:@default=no@:>@])],
+ [gl_enabled="$enableval"],
+ [gl_enabled=auto])
+
+if test "x$gl_enabled" != "xno"; then
+
dnl Get the pkg-config definitions for libGL. We include a fallback
dnl path for GL implementation that don't provide a .pc file
PKG_CHECK_MODULES(GL, [gl], [], [
@@ -112,6 +120,8 @@ PKG_CHECK_MODULES(GLU, [glu], [],
DEMO_CFLAGS="$DEMO_CFLAGS $GLU_CFLAGS"
DEMO_LIBS="$DEMO_LIBS $GLU_LIBS"
+fi
+
AC_ARG_ENABLE([egl],
[AS_HELP_STRING([--enable-egl],
[enable EGL library @<:@default=auto@:>@])],
@@ -302,7 +312,7 @@ AC_SUBST([MESA_GLAPI])
AC_SUBST([WAYLAND_CFLAGS])
AC_SUBST([WAYLAND_LIBS])
-
+AM_CONDITIONAL(HAVE_GL, test "x$gl_enabled" = "xyes")
AM_CONDITIONAL(HAVE_EGL, test "x$egl_enabled" = "xyes")
AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes")
AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes")
diff --git a/src/egl/opengl/Makefile.am b/src/egl/opengl/Makefile.am
index 6d184ff6..219ab850 100644
--- a/src/egl/opengl/Makefile.am
+++ b/src/egl/opengl/Makefile.am
@@ -56,6 +56,7 @@ endif
endif
if HAVE_EGL
+if HAVE_GL
bin_PROGRAMS = \
eglinfo
noinst_PROGRAMS = \
@@ -64,6 +65,7 @@ noinst_PROGRAMS = \
$(EGL_X11_DEMOS) \
$(EGL_WL_DEMOS)
endif
-dep_gl = dependency('gl')
+dep_gl = dependency('gl', required : get_option('gl'))
+if not dep_gl.found()
+ add_project_arguments('-DEGL_NO_X11=1', language: 'c')
+endif
egltri_x11_SOURCES = egltri.c
eglgears_x11_SOURCES = eglgears.c
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 759a293a..012b9c75 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -27,7 +27,9 @@ AM_CFLAGS = \
AM_LDFLAGS = \
$(DEMO_LIBS)
dep_gles1 = dependency('glesv1_cm', required : get_option('gles1'))
dep_gles2 = dependency('glesv2', required : get_option('gles2'))
@@ -75,13 +78,15 @@ endif
+if HAVE_GL
noinst_LTLIBRARIES = libutil.la
dep_threads = dependency('threads')
-dep_glu = dependency('glu', required : dep_x11.found())
-if not dep_glu.found()
- _glu_name = 'GLU'
- if host_machine.system() == 'windows'
- _glu_name = 'glu32'
+if dep_gl.found()
+ dep_glu = dependency('glu', required : dep_x11.found())
+ if not dep_glu.found()
+ _glu_name = 'GLU'
+ if host_machine.system() == 'windows'
+ _glu_name = 'glu32'
+ endif
+ dep_glu = cc.find_library(_glu_name, has_headers: 'GL/glu.h')
endif
- dep_glu = cc.find_library(_glu_name, has_headers: 'GL/glu.h')
endif
# GBM is needed for EGL on KMS
diff --git a/meson_options.txt b/meson_options.txt
index ddadd2e3..f5405698 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,5 +1,6 @@
option('with-glut', type : 'string')
option('egl', type : 'feature')
+option('gl', type : 'feature')
option('gles1', type : 'feature')
option('gles2', type : 'feature')
option('osmesa', type : 'feature')
diff --git a/src/egl/meson.build b/src/egl/meson.build
index d1846921..42bf8ecd 100644
--- a/src/egl/meson.build
+++ b/src/egl/meson.build
@@ -19,7 +19,10 @@
# SOFTWARE.
subdir('eglut')
-subdir('opengl')
+
+if dep_gl.found()
+ subdir('opengl')
+endif
if HAVE_GLUT
AM_CFLAGS += \
if dep_gles1.found()
subdir('opengles1')
diff --git a/src/meson.build b/src/meson.build
index 39cac78d..7607c6de 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -20,7 +20,9 @@
subdir('glad')
-subdir('util')
+if dep_gl.found()
+ subdir('util')
+endif
if dep_glut.found()
subdir('demos')
--
2.14.3
2.37.3

View File

@ -1,5 +1,3 @@
# From https://lists.freedesktop.org/archives/mesa-dev/2018-February/186542.html
md5 6b65a02622765522176d00f553086fa3 mesa-demos-8.4.0.tar.bz2
sha1 57ba892e919fa22ce3db9f25e7331a6fa33c652c mesa-demos-8.4.0.tar.bz2
sha256 01e99c94a0184e63e796728af89bfac559795fb2a0d6f506fa900455ca5fff7d mesa-demos-8.4.0.tar.bz2
sha512 b72d03cad36e0535ff18dcfb222ec4200064b9264f6da51a6e5f03b0dd912abe188bc1d600b6698de3ce6f63b28d2ce01565886ca8e7079edc4967fbf2fb0957 mesa-demos-8.4.0.tar.bz2
# From https://lists.freedesktop.org/archives/mesa-announce/2022-May/000677.html
sha256 cea2df0a80f09a30f635c4eb1a672bf90c5ddee0b8e77f4d70041668ef71aac1 mesa-demos-8.5.0.tar.bz2
sha512 df6a7f09638ca389d6e8bc569e599dcc59c9aa280bcfb95976d83e5cd3edfe74bb3a31f0953956dc16faa540ee5b09990e3377e1341d836fc527e50ace6e60b8 mesa-demos-8.5.0.tar.bz2

View File

@ -4,77 +4,69 @@
#
################################################################################
MESA3D_DEMOS_VERSION = 8.4.0
MESA3D_DEMOS_VERSION = 8.5.0
MESA3D_DEMOS_SOURCE = mesa-demos-$(MESA3D_DEMOS_VERSION).tar.bz2
MESA3D_DEMOS_SITE = ftp://ftp.freedesktop.org/pub/mesa/demos
# 0001-demos-makes-opengl-an-optional-component.patch
MESA3D_DEMOS_AUTORECONF = YES
MESA3D_DEMOS_SITE = https://archive.mesa3d.org/demos/$(MESA3D_DEMOS_VERSION)
MESA3D_DEMOS_DEPENDENCIES = host-pkgconf
MESA3D_DEMOS_LICENSE = MIT
MESA3D_DEMOS_CONF_OPTS += \
--disable-gles1
-Dgles1=disabled
ifeq ($(BR2_PACKAGE_XORG7)$(BR2_PACKAGE_HAS_LIBGL),yy)
MESA3D_DEMOS_DEPENDENCIES += libgl libglew libglu xlib_libX11 xlib_libXext
MESA3D_DEMOS_CONF_OPTS += --enable-gl --enable-x11
MESA3D_DEMOS_CONF_OPTS += -Dgl=enabled -Dx11=enabled
else
MESA3D_DEMOS_CONF_OPTS += --disable-gl --disable-x11
MESA3D_DEMOS_CONF_OPTS += -Dgl=disabled -Dx11=disabled
endif
ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y)
MESA3D_DEMOS_DEPENDENCIES += libegl
MESA3D_DEMOS_CONF_OPTS += --enable-egl
MESA3D_DEMOS_CONF_OPTS += -Degl=enabled
else
MESA3D_DEMOS_CONF_OPTS += --disable-egl
MESA3D_DEMOS_CONF_OPTS += -Degl=disabled
endif
ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
MESA3D_DEMOS_DEPENDENCIES += libgles
MESA3D_DEMOS_CONF_OPTS += --enable-gles2
MESA3D_DEMOS_CONF_OPTS += -Dgles2=enabled
else
MESA3D_DEMOS_CONF_OPTS += --disable-gles2
MESA3D_DEMOS_CONF_OPTS += -Dgles2=disabled
endif
ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y)
MESA3D_DEMOS_DEPENDENCIES += libopenvg
MESA3D_DEMOS_CONF_OPTS += --enable-vg
ifeq ($(BR2_PACKAGE_LIBDRM),y)
MESA3D_DEMOS_DEPENDENCIES += libdrm
MESA3D_DEMOS_CONF_OPTS += -Dlibdrm=enabled
else
MESA3D_DEMOS_CONF_OPTS += --disable-vg
MESA3D_DEMOS_CONF_OPTS += -Dlibdrm=disabled
endif
ifeq ($(BR2_PACKAGE_MESA3D_GBM),y)
# Meson search for gbm, but has no option to enable/disable it. See:
# https://gitlab.freedesktop.org/mesa/demos/-/blob/mesa-demos-8.5.0/meson.build#L88
# We still add the dependency, if needed, to make sure it will always
# be detected.
MESA3D_DEMOS_DEPENDENCIES += mesa3d
MESA3D_DEMOS_CONF_OPTS += --enable-gbm
else
MESA3D_DEMOS_CONF_OPTS += --disable-gbm
endif
ifeq ($(BR2_PACKAGE_FREETYPE),y)
MESA3D_DEMOS_DEPENDENCIES += freetype
MESA3D_DEMOS_CONF_OPTS += --enable-freetype2
else
MESA3D_DEMOS_CONF_OPTS += --disable-freetype2
endif
ifeq ($(BR2_PACKAGE_LIBFREEGLUT),y)
MESA3D_DEMOS_DEPENDENCIES += libfreeglut
MESA3D_DEMOS_CONF_OPTS += --with-glut=$(STAGING_DIR)/usr
MESA3D_DEMOS_CONF_OPTS += -Dwith-glut=$(STAGING_DIR)/usr
# osmesa support depends on glut
ifeq ($(BR2_PACKAGE_MESA3D_OSMESA_GALLIUM),y)
MESA3D_DEMOS_CONF_OPTS += --enable-osmesa
MESA3D_DEMOS_CONF_OPTS += -Dosmesa=enabled
else
MESA3D_DEMOS_CONF_OPTS += --disable-osmesa
MESA3D_DEMOS_CONF_OPTS += -Dosmesa=disabled
endif
else
MESA3D_DEMOS_CONF_OPTS += --without-glut --disable-osmesa
MESA3D_DEMOS_CONF_OPTS += -Dosmesa=disabled
endif
ifeq ($(BR2_PACKAGE_WAYLAND),y)
MESA3D_DEMOS_DEPENDENCIES += wayland
MESA3D_DEMOS_CONF_OPTS += --enable-wayland
MESA3D_DEMOS_CONF_OPTS += -Dwayland=enabled
else
MESA3D_DEMOS_CONF_OPTS += --disable-wayland
MESA3D_DEMOS_CONF_OPTS += -Dwayland=disabled
endif
$(eval $(autotools-package))
$(eval $(meson-package))