Split xdriinfo into its own package

Remove xdriinfo additional source build and autotools dependencies.

Signed-off-by: Erico Nunes <ernunes@redhat.com>
This commit is contained in:
Erico Nunes 2023-10-03 15:00:01 +02:00
parent 182a4271c4
commit 07845ceb99
3 changed files with 14 additions and 79 deletions

View File

@ -1,23 +1,18 @@
%global xdriinfo xdriinfo-1.0.4
%global demodir %{_libdir}/mesa %global demodir %{_libdir}/mesa
Summary: Mesa demos Summary: Mesa demos
Name: mesa-demos Name: mesa-demos
Version: 9.0.0 Version: 9.0.0
Release: 3%{?dist} Release: 4%{?dist}
# SPDX # SPDX
License: MIT License: MIT
URL: http://www.mesa3d.org URL: http://www.mesa3d.org
Source0: https://archive.mesa3d.org/demos/%{name}-%{version}.tar.xz Source: https://archive.mesa3d.org/demos/%{name}-%{version}.tar.xz
Source1: http://www.x.org/pub/individual/app/%{xdriinfo}.tar.bz2
Source2: mesad-git-snapshot.sh
# Patch pointblast/spriteblast/dinoshade out for legal reasons # Patch pointblast/spriteblast/dinoshade out for legal reasons
# (not in public domain) # (not in public domain)
Patch0: mesa-demos-8.5.0-legal.patch Patch0: mesa-demos-8.5.0-legal.patch
# Install glsl demos data # Install glsl demos data
Patch1: mesa-demos-system-data.patch Patch1: mesa-demos-system-data.patch
# Fix xdriinfo not working with libglvnd
Patch2: xdriinfo-1.0.4-glvnd.patch
BuildRequires: meson BuildRequires: meson
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -38,8 +33,6 @@ BuildRequires: vulkan-loader-devel
BuildRequires: wayland-devel BuildRequires: wayland-devel
BuildRequires: wayland-protocols-devel BuildRequires: wayland-protocols-devel
BuildRequires: freetype-devel BuildRequires: freetype-devel
# xdriinfo still uses autotools
BuildRequires: make autoconf automake libtool
%description %description
This package provides some demo applications for testing Mesa. This package provides some demo applications for testing Mesa.
@ -47,6 +40,12 @@ This package provides some demo applications for testing Mesa.
%package -n glx-utils %package -n glx-utils
Summary: GLX utilities Summary: GLX utilities
Provides: glxinfo glxinfo%{?__isa_bits} Provides: glxinfo glxinfo%{?__isa_bits}
# mesa-demos' glx-utils used to provide xdriinfo for a long time, but that has
# always been an additional external source, so it was split into its own
# package.
# Recommend it here so that it still gets pulled at first for anyone expecting
# it to be there, but it doesn't need to be a hard requirement anymore.
Recommends: xdriinfo
%description -n glx-utils %description -n glx-utils
The glx-utils package provides the glxinfo and glxgears utilities. The glx-utils package provides the glxinfo and glxgears utilities.
@ -59,12 +58,9 @@ Provides: eglinfo es2_info
The egl-utils package provides the eglinfo and es2_info utilities. The egl-utils package provides the eglinfo and es2_info utilities.
%prep %prep
%setup -q -n %{name}-%{version} -b1 %setup -q -n %{name}-%{version}
%patch0 -p1 -b .legal %patch0 -p1 -b .legal
%patch1 -p1 -b .systemdata %patch1 -p1 -b .systemdata
pushd ../%{xdriinfo}
%patch2 -p1
popd
# These two files are distributable, but non-free (lack of permission to modify). # These two files are distributable, but non-free (lack of permission to modify).
rm -rf src/demos/pointblast.c rm -rf src/demos/pointblast.c
@ -84,18 +80,10 @@ rm -rf src/demos/spriteblast.c
%meson_build %meson_build
pushd ../%{xdriinfo}
%configure
%make_build
popd
%install %install
%meson_install %meson_install
pushd ../%{xdriinfo} mkdir -p %{buildroot}%{_bindir}
%make_install %{?_smp_mflags}
popd
install -m 0755 %{_vpath_builddir}/src/xdemos/glxgears %{buildroot}%{_bindir} install -m 0755 %{_vpath_builddir}/src/xdemos/glxgears %{buildroot}%{_bindir}
install -m 0755 %{_vpath_builddir}/src/xdemos/glxinfo %{buildroot}%{_bindir} install -m 0755 %{_vpath_builddir}/src/xdemos/glxinfo %{buildroot}%{_bindir}
%if 0%{?__isa_bits} != 0 %if 0%{?__isa_bits} != 0
@ -114,14 +102,16 @@ install -m 0755 %{_vpath_builddir}/src/egl/opengles2/es2_info %{buildroot}%{_bin
%files -n glx-utils %files -n glx-utils
%{_bindir}/glxinfo* %{_bindir}/glxinfo*
%{_bindir}/glxgears %{_bindir}/glxgears
%{_bindir}/xdriinfo
%{_datadir}/man/man1/xdriinfo.1*
%files -n egl-utils %files -n egl-utils
%{_bindir}/eglinfo %{_bindir}/eglinfo
%{_bindir}/es2_info %{_bindir}/es2_info
%changelog %changelog
* Tue Oct 03 2023 Erico Nunes <ernunes@redhat.com> - 9.0.0-4
- Split xdriinfo into its own package
- Remove xdriinfo additional source build and autotools dependencies
* Thu Sep 07 2023 José Expósito <jexposit@redhat.com> * Thu Sep 07 2023 José Expósito <jexposit@redhat.com>
- SPDX migration: license is already SPDX compatible - SPDX migration: license is already SPDX compatible

View File

@ -1,2 +1 @@
SHA512 (xdriinfo-1.0.4.tar.bz2) = 7d998d89c539dbb93c00bc0dd237e086bc3c6e91c02c251448dc6e34cc8f89b2a752ab6f1d86cfb8a0d3d4373a167c9dda2f6f817626c3c7b5cd02a58bc1e6dd
SHA512 (mesa-demos-9.0.0.tar.xz) = af33ef72a521416e39d93370b2b4ccb768f08084c9e4c0aa62868210d9465c858e5cb8e5d23952295a3073946f609eb8723ee60b39dd9fb6696c4e45aafbb2c1 SHA512 (mesa-demos-9.0.0.tar.xz) = af33ef72a521416e39d93370b2b4ccb768f08084c9e4c0aa62868210d9465c858e5cb8e5d23952295a3073946f609eb8723ee60b39dd9fb6696c4e45aafbb2c1

View File

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