diff --git a/mesa-demos-8.0.1-legal.patch b/mesa-demos-8.0.1-legal.patch deleted file mode 100644 index 9f83193d605912c7f955843abfd1c67b273ce9c2..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..2394e8fccfe6ea7a9a398a86012c45adf6064797 --- /dev/null +++ b/mesa-demos-8.5.0-legal.patch @@ -0,0 +1,18 @@ +--- mesa-demos-8.5.0/src/demos/meson.build.orig 2023-01-19 01:30:54.693636452 +0800 ++++ mesa-demos-8.5.0/src/demos/meson.build 2023-01-19 01:31:31.655636452 +0800 +@@ -52,7 +52,6 @@ + 'multiarb', + 'paltex', + 'pixeltest', +- 'pointblast', + 'projtex', + 'ray', + 'readpix', +@@ -61,7 +60,6 @@ + 'shadowtex', + 'singlebuffer', + 'spectex', +- 'spriteblast', + 'stex3d', + 'teapot', + 'terrain', diff --git a/demos-main.tar.bz2 b/mesa-demos-8.5.0.tar.bz2 similarity index 45% rename from demos-main.tar.bz2 rename to mesa-demos-8.5.0.tar.bz2 index b684009b6a6a08afe928e0b64bfc65dcae3d9710..1f2f2450581dcafb4c7084f1191d1e387bcfa3ce 100644 Binary files a/demos-main.tar.bz2 and b/mesa-demos-8.5.0.tar.bz2 differ diff --git a/mesa-demos-as-needed.patch b/mesa-demos-as-needed.patch deleted file mode 100644 index f037f8419a11cadb9b7f2dce11ba9dff1ebef918..0000000000000000000000000000000000000000 --- 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 640ea6d602d9a7a1106d3fc7d2887d164e7f629a..9ab785baf4bec50a3bfa3977a01aebc8ecaf1a52 100644 --- a/mesa-demos.spec +++ b/mesa-demos.spec @@ -1,43 +1,47 @@ -%define anolis_release 2 -%global gitdate 20220507 -%global gitcommit d653042589b480fb57270c1c3f20787a9bf7b5d4 -%global shortcommit %(c=%{gitcommit}; echo ${c:0:7}) -%global xdriinfo xdriinfo-1.0.4 -%global demodir %{_libdir}/mesa +%define anolis_release 1 +%global xdriinfo_ver 1.0.7 +%global xdriinfo xdriinfo-%{xdriinfo_ver} Summary: Mesa demos Name: mesa-demos -Version: 8.4.0 -Release: %{gitdate}git%{shortcommit}.%{anolis_release}%{?dist} +Version: 8.5.0 +Release: %{anolis_release}%{?dist} License: MIT URL: http://www.mesa3d.org -Source0: demos-main.tar.bz2 -Source1: http://www.x.org/pub/individual/app/%{xdriinfo}.tar.bz2 +Source0: https://archive.mesa3d.org/demos/%{version}/%{name}-%{version}.tar.bz2 +Source1: http://www.x.org/pub/individual/app/%{xdriinfo}.tar.xz 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 -# Fix xdriinfo not working with libglvnd -Patch2: xdriinfo-1.0.4-glvnd.patch +Patch0: mesa-demos-8.5.0-legal.patch +# mesa-demos requirements +BuildRequires: meson >= 0.53 +BuildRequires: pkgconfig(egl) +BuildRequires: pkgconfig(gl) +BuildRequires: pkgconfig(glesv1_cm) +BuildRequires: pkgconfig(glesv2) +BuildRequires: pkgconfig(glu) +BuildRequires: pkgconfig(glut) +BuildRequires: pkgconfig(libdrm) +BuildRequires: pkgconfig(osmesa) +BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-egl) +BuildRequires: pkgconfig(wayland-protocols) >= 1.12 +BuildRequires: pkgconfig(wayland-scanner) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xext) +#xdriinfo requirements BuildRequires: make -BuildRequires: gcc-c++ -BuildRequires: pkgconfig autoconf automake libtool -BuildRequires: freeglut-devel -BuildRequires: mesa-libGL-devel -BuildRequires: mesa-libEGL-devel -BuildRequires: mesa-libGLES-devel -BuildRequires: mesa-libgbm-devel -BuildRequires: libGLU-devel -BuildRequires: libXext-devel -BuildRequires: wayland-devel -BuildRequires: freetype-devel +BuildRequires: pkgconfig(glproto) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xorg-macros) >= 1.8 %description This package provides some demo applications for testing Mesa. %package -n glx-utils Summary: GLX utilities -Provides: glxinfo glxinfo +Provides: glxinfo +Provides: xdriinfo = %{xdriinfo_ver} %description -n glx-utils The glx-utils package provides the glxinfo and glxgears utilities. @@ -50,30 +54,11 @@ Provides: eglinfo es2_info The egl-utils package provides the eglinfo and es2_info utilities. %prep -%setup -q -n demos-main -b1 -%patch0 -p1 -b .legal -%patch1 -p1 -b .asneeded -pushd ../%{xdriinfo} -%patch2 -p1 -popd - -# These two files are distributable, but non-free (lack of permission to modify). -rm -rf src/demos/pointblast.c -rm -rf src/demos/spriteblast.c +%setup -q -n %{name}-%{version} -b1 %build -autoreconf -vfi -%configure \ - --bindir=%{demodir} \ - --with-system-data-files \ - --enable-x11 \ - --enable-wayland \ - --enable-gbm \ - --enable-egl \ - --enable-gles2 \ - --enable-libdrm \ - --enable-freetype2 -%make_build +%meson --bindir=%{_libexecdir}/mesa -Dwith-system-data-files=true +%meson_build pushd ../%{xdriinfo} %configure @@ -81,24 +66,19 @@ pushd ../%{xdriinfo} popd %install -%make_install +%meson_install pushd ../%{xdriinfo} -%make_install %{?_smp_mflags} +%make_install popd -install -m 0755 src/xdemos/glxgears %{buildroot}%{_bindir} -install -m 0755 src/xdemos/glxinfo %{buildroot}%{_bindir} -install -m 0755 src/egl/opengl/eglinfo %{buildroot}%{_bindir} -install -m 0755 src/egl/opengles2/es2_info %{buildroot}%{_bindir} +install -m 0755 %{buildroot}%{_libexecdir}/mesa/{glxgears,glxinfo,eglinfo,es2_info} %{buildroot}%{_bindir} %generate_compatibility_deps -%check - %files -%{demodir} -%{_datadir}/%{name}/ +%{_libexecdir}/mesa +%{_datadir}/%{name} %files -n glx-utils %dir %{abidir} @@ -106,13 +86,16 @@ install -m 0755 src/egl/opengles2/es2_info %{buildroot}%{_bindir} %{_bindir}/glxgears %{_bindir}/xdriinfo %{abidir}/glxinfo*-option.list -%{_datadir}/man/man1/xdriinfo.1* +%{_mandir}/man1/xdriinfo.1* %files -n egl-utils %{_bindir}/eglinfo %{_bindir}/es2_info %changelog +* Thu Jan 19 2023 Funda Wang - 8.5.0-1 +- New verison 8.5.0 (xdriinfo 1.0.7) + * Thu Oct 27 2022 mgb01105731 - 8.4.0-2.20220507git - optimise spec file diff --git a/xdriinfo-1.0.4-glvnd.patch b/xdriinfo-1.0.4-glvnd.patch deleted file mode 100644 index 0dc4c0a8f2282c3b6937e9141440377506af113b..0000000000000000000000000000000000000000 --- a/xdriinfo-1.0.4-glvnd.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff -up xdriinfo-1.0.4/xdriinfo.c~ xdriinfo-1.0.4/xdriinfo.c ---- xdriinfo-1.0.4/xdriinfo.c~ 2009-10-16 23:39:10.000000000 +0200 -+++ xdriinfo-1.0.4/xdriinfo.c 2017-03-13 12:01:53.419636100 +0100 -@@ -101,23 +101,9 @@ int main (int argc, char *argv[]) { - return 1; - } - } -- /* if the argument to the options command is a driver name, we can handle -- * it without opening an X connection */ -- if (func == OPTIONS && screenNum == -1) { -- const char *options = (*GetDriverConfig) (funcArg); -- if (!options) { -- fprintf (stderr, -- "Driver \"%s\" is not installed or does not support configuration.\n", -- funcArg); -- return 1; -- } -- printf ("%s", options); -- if (isatty (STDOUT_FILENO)) -- printf ("\n"); -- return 0; -- } -+ - /* driver command needs a valid screen number */ -- else if (func == DRIVER && screenNum == -1) { -+ if (func == DRIVER && screenNum == -1) { - fprintf (stderr, "Invalid screen number \"%s\".\n", funcArg); - return 1; - } -@@ -135,6 +121,9 @@ int main (int argc, char *argv[]) { - return 1; - } - -+ /* Call glXGetClientString to load vendor libs on glvnd enabled systems */ -+ glXGetClientString (dpy, GLX_EXTENSIONS); -+ - switch (func) { - case NSCREENS: - printf ("%d", nScreens); -@@ -154,7 +143,13 @@ int main (int argc, char *argv[]) { - break; - } - case OPTIONS: { -- const char *name = (*GetScreenDriver) (dpy, screenNum), *options; -+ const char *name, *options; -+ -+ if (screenNum == -1) { -+ name = funcArg; -+ } else { -+ name = (*GetScreenDriver) (dpy, screenNum); -+ } - if (!name) { - fprintf (stderr, "Screen \"%d\" is not direct rendering capable.\n", - screenNum); diff --git a/xdriinfo-1.0.4.tar.bz2 b/xdriinfo-1.0.4.tar.bz2 deleted file mode 100644 index de70cb8e532b178089edb670d870794b3c595189..0000000000000000000000000000000000000000 Binary files a/xdriinfo-1.0.4.tar.bz2 and /dev/null differ diff --git a/xdriinfo-1.0.7.tar.xz b/xdriinfo-1.0.7.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..afead5790b09109e3acbf55be01a5b644be50446 Binary files /dev/null and b/xdriinfo-1.0.7.tar.xz differ