From d6acf2835becaefd42233d5ef39b1e8e372a3e73 Mon Sep 17 00:00:00 2001 From: Erico Nunes Date: Fri, 3 Feb 2023 12:23:45 +0100 Subject: [PATCH] Update to 8.5.0 Change build system to meson which was introduced in 8.5.0 and in the next releases will become the only build system for mesa-demos. Rebase patching out some demos for legal reasons. Signed-off-by: Erico Nunes --- .gitignore | 1 + mesa-demos-8.0.1-legal.patch | 19 ------ mesa-demos-8.5.0-legal.patch | 28 ++++++++ mesa-demos-as-needed.patch | 13 ---- mesa-demos.spec | 66 ++++++++++--------- ...DATA_DIR-when-with-system-data-files.patch | 29 ++++++++ sources | 2 +- 7 files changed, 94 insertions(+), 64 deletions(-) delete mode 100644 mesa-demos-8.0.1-legal.patch create mode 100644 mesa-demos-8.5.0-legal.patch delete mode 100644 mesa-demos-as-needed.patch create mode 100644 meson-Fix-DEMOS_DATA_DIR-when-with-system-data-files.patch diff --git a/.gitignore b/.gitignore index 229e920..350e06f 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ xdriinfo-1.0.3.tar.bz2 /mesa-demos-8.3.0.tar.bz2 /mesa-demos-20181118.tar.bz2 /mesa-demos-20210504.tar.bz2 +/mesa-demos-8.5.0.tar.bz2 diff --git a/mesa-demos-8.0.1-legal.patch b/mesa-demos-8.0.1-legal.patch deleted file mode 100644 index 9f83193..0000000 --- a/mesa-demos-8.0.1-legal.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -up mesa-demos-6eef979a5488dab01088412f88374b2ea9d615cd/src/demos/Makefile.am.legal mesa-demos-6eef979a5488dab01088412f88374b2ea9d615cd/src/demos/Makefile.am ---- mesa-demos-6eef979a5488dab01088412f88374b2ea9d615cd/src/demos/Makefile.am.legal 2013-01-08 11:24:38.805867866 -0500 -+++ mesa-demos-6eef979a5488dab01088412f88374b2ea9d615cd/src/demos/Makefile.am 2013-01-08 11:24:44.975870107 -0500 -@@ -65,7 +65,6 @@ bin_PROGRAMS = \ - multiarb \ - paltex \ - pixeltest \ -- pointblast \ - projtex \ - ray \ - readpix \ -@@ -74,7 +73,6 @@ bin_PROGRAMS = \ - shadowtex \ - singlebuffer \ - spectex \ -- spriteblast \ - stex3d \ - teapot \ - terrain \ diff --git a/mesa-demos-8.5.0-legal.patch b/mesa-demos-8.5.0-legal.patch new file mode 100644 index 0000000..dfaa6c8 --- /dev/null +++ b/mesa-demos-8.5.0-legal.patch @@ -0,0 +1,28 @@ +diff --git a/src/demos/meson.build b/src/demos/meson.build +index 8f01036b..929f5405 100644 +--- a/src/demos/meson.build ++++ b/src/demos/meson.build +@@ -28,7 +28,6 @@ progs = [ + 'copypix', + 'cubemap', + 'cuberender', +- 'dinoshade', + 'dissolve', + 'drawpix', + 'engine', +@@ -52,7 +51,6 @@ progs = [ + 'multiarb', + 'paltex', + 'pixeltest', +- 'pointblast', + 'projtex', + 'ray', + 'readpix', +@@ -61,7 +59,6 @@ progs = [ + 'shadowtex', + 'singlebuffer', + 'spectex', +- 'spriteblast', + 'stex3d', + 'teapot', + 'terrain', diff --git a/mesa-demos-as-needed.patch b/mesa-demos-as-needed.patch deleted file mode 100644 index f037f84..0000000 --- a/mesa-demos-as-needed.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up mesa-demos-8.1.0/configure.ac.jx mesa-demos-8.1.0/configure.ac ---- mesa-demos-8.1.0/configure.ac.jx 2013-02-24 05:49:47.000000000 -0500 -+++ mesa-demos-8.1.0/configure.ac 2013-03-27 14:41:42.493936005 -0400 -@@ -267,6 +267,9 @@ cygwin*) - ;; - esac - -+dnl i am somewhat surprised this works -+DEMO_LIBS="-Wl,--as-needed $DEMO_LIBS" -+ - AC_SUBST([DEMO_CFLAGS]) - AC_SUBST([DEMO_LIBS]) - AC_SUBST([EGL_CFLAGS]) diff --git a/mesa-demos.spec b/mesa-demos.spec index 90457a8..3377815 100644 --- a/mesa-demos.spec +++ b/mesa-demos.spec @@ -1,27 +1,25 @@ -%global gitdate 20210504 -%global gitcommit 0f9e7d995a14f15666600fc8598f941b619d82fe -%global shortcommit %(c=%{gitcommit}; echo ${c:0:7}) %global xdriinfo xdriinfo-1.0.4 %global demodir %{_libdir}/mesa Summary: Mesa demos Name: mesa-demos -Version: 8.4.0 -Release: 15.%{gitdate}git%{shortcommit}%{?dist} +Version: 8.5.0 +Release: 1%{?dist} License: MIT URL: http://www.mesa3d.org -#Source0: https://mesa.freedesktop.org/archive/demos/%{version}/%{name}-%{version}.tar.bz2 -Source0: mesa-demos-%{gitdate}.tar.bz2 +Source0: https://mesa.freedesktop.org/archive/demos/%{version}/%{name}-%{version}.tar.bz2 Source1: http://www.x.org/pub/individual/app/%{xdriinfo}.tar.bz2 Source2: mesad-git-snapshot.sh -# Patch pointblast/spriteblast out of the Makefile for legal reasons -Patch0: mesa-demos-8.0.1-legal.patch -Patch1: mesa-demos-as-needed.patch +# Patch pointblast/spriteblast/dinoshade out for legal reasons +# (not in public domain) +Patch0: mesa-demos-8.5.0-legal.patch +Patch1: meson-Fix-DEMOS_DATA_DIR-when-with-system-data-files.patch # Fix xdriinfo not working with libglvnd Patch2: xdriinfo-1.0.4-glvnd.patch -BuildRequires: make +BuildRequires: meson +BuildRequires: gcc BuildRequires: gcc-c++ -BuildRequires: pkgconfig autoconf automake libtool +BuildRequires: pkgconfig BuildRequires: freeglut-devel BuildRequires: mesa-libGL-devel BuildRequires: mesa-libEGL-devel @@ -30,7 +28,10 @@ BuildRequires: mesa-libgbm-devel BuildRequires: libGLU-devel BuildRequires: libXext-devel BuildRequires: wayland-devel +BuildRequires: wayland-protocols-devel BuildRequires: freetype-devel +# xdriinfo still uses autotools +BuildRequires: make autoconf automake libtool %description This package provides some demo applications for testing Mesa. @@ -50,9 +51,9 @@ Provides: eglinfo es2_info The egl-utils package provides the eglinfo and es2_info utilities. %prep -%setup -q -n %{name}-%{gitdate} -b1 +%setup -q -n %{name}-%{version} -b1 %patch0 -p1 -b .legal -%patch1 -p1 -b .asneeded +%patch1 -p1 pushd ../%{xdriinfo} %patch2 -p1 popd @@ -62,18 +63,17 @@ rm -rf src/demos/pointblast.c rm -rf src/demos/spriteblast.c %build -autoreconf -vfi -%configure \ +%meson \ --bindir=%{demodir} \ - --with-system-data-files \ - --enable-x11 \ - --enable-wayland \ - --enable-gbm \ - --enable-egl \ - --enable-gles2 \ - --enable-libdrm \ - --enable-freetype2 -%make_build + -Dwith-system-data-files=true \ + -Dx11=enabled \ + -Dwayland=enabled \ + -Degl=enabled \ + -Dgles2=enabled \ + -Dlibdrm=enabled \ + -Dosmesa=disabled + +%meson_build pushd ../%{xdriinfo} %configure @@ -81,20 +81,20 @@ pushd ../%{xdriinfo} popd %install -%make_install +%meson_install pushd ../%{xdriinfo} %make_install %{?_smp_mflags} popd -install -m 0755 src/xdemos/glxgears %{buildroot}%{_bindir} -install -m 0755 src/xdemos/glxinfo %{buildroot}%{_bindir} +install -m 0755 %{_vpath_builddir}/src/xdemos/glxgears %{buildroot}%{_bindir} +install -m 0755 %{_vpath_builddir}/src/xdemos/glxinfo %{buildroot}%{_bindir} %if 0%{?__isa_bits} != 0 -install -m 0755 src/xdemos/glxinfo %{buildroot}%{_bindir}/glxinfo%{?__isa_bits} +install -m 0755 %{_vpath_builddir}/src/xdemos/glxinfo %{buildroot}%{_bindir}/glxinfo%{?__isa_bits} %endif -install -m 0755 src/egl/opengl/eglinfo %{buildroot}%{_bindir} -install -m 0755 src/egl/opengles2/es2_info %{buildroot}%{_bindir} +install -m 0755 %{_vpath_builddir}/src/egl/opengl/eglinfo %{buildroot}%{_bindir} +install -m 0755 %{_vpath_builddir}/src/egl/opengles2/es2_info %{buildroot}%{_bindir} %check @@ -113,6 +113,10 @@ install -m 0755 src/egl/opengles2/es2_info %{buildroot}%{_bindir} %{_bindir}/es2_info %changelog +* Fri Feb 03 2023 Erico Nunes - 8.5.0-1 +- Update to 8.5.0 +- Change build system to meson + * Thu Jan 19 2023 Fedora Release Engineering - 8.4.0-15.20210504git0f9e7d9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/meson-Fix-DEMOS_DATA_DIR-when-with-system-data-files.patch b/meson-Fix-DEMOS_DATA_DIR-when-with-system-data-files.patch new file mode 100644 index 0000000..b1d0489 --- /dev/null +++ b/meson-Fix-DEMOS_DATA_DIR-when-with-system-data-files.patch @@ -0,0 +1,29 @@ +From 49c89ab7a96a2ef5e3200e56d3043372e736e4c9 Mon Sep 17 00:00:00 2001 +From: Anders Kaseorg +Date: Mon, 11 Jul 2022 13:00:03 -0700 +Subject: [PATCH] meson: Fix DEMOS_DATA_DIR when with-system-data-files is + enabled + +DEMOS_DATA_DIR needs to be an absolute path with a trailing slash. + +Signed-off-by: Anders Kaseorg +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 282c3962..0c15274b 100644 +--- a/meson.build ++++ b/meson.build +@@ -29,7 +29,7 @@ null_dep = dependency('', required : false) + + demos_data_dir = '../data/' + if get_option('with-system-data-files') +- demos_data_dir = get_option('datadir') / 'mesa-demos' ++ demos_data_dir = get_option('prefix') / get_option('datadir') / 'mesa-demos/' + endif + add_project_arguments( + '-DDEMOS_DATA_DIR="@0@"'.format(demos_data_dir), +-- +2.39.1 + diff --git a/sources b/sources index e1ab25d..8634384 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (xdriinfo-1.0.4.tar.bz2) = 7d998d89c539dbb93c00bc0dd237e086bc3c6e91c02c251448dc6e34cc8f89b2a752ab6f1d86cfb8a0d3d4373a167c9dda2f6f817626c3c7b5cd02a58bc1e6dd -SHA512 (mesa-demos-20210504.tar.bz2) = 3cc071b1aeff7acb2faa71baf3d06fa4f678644ba471be01a51967330217e18dedd3a9636ab139ff8e1488e60dd1fa79b2b70ccdc383a448043997d3668b0ef0 +SHA512 (mesa-demos-8.5.0.tar.bz2) = df6a7f09638ca389d6e8bc569e599dcc59c9aa280bcfb95976d83e5cd3edfe74bb3a31f0953956dc16faa540ee5b09990e3377e1341d836fc527e50ace6e60b8