Package init
This commit is contained in:
commit
2116b046bb
BIN
mesa-demos-20171027.tar.bz2
Normal file
BIN
mesa-demos-20171027.tar.bz2
Normal file
Binary file not shown.
19
mesa-demos-8.0.1-legal.patch
Normal file
19
mesa-demos-8.0.1-legal.patch
Normal file
@ -0,0 +1,19 @@
|
||||
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 \
|
||||
13
mesa-demos-as-needed.patch
Normal file
13
mesa-demos-as-needed.patch
Normal file
@ -0,0 +1,13 @@
|
||||
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])
|
||||
79
mesa-demos.spec
Normal file
79
mesa-demos.spec
Normal file
@ -0,0 +1,79 @@
|
||||
Name: mesa-demos
|
||||
Version: 8.3.0
|
||||
Release: 13
|
||||
Summary: Demo applications for testing Mesa
|
||||
License: MIT
|
||||
URL: http://www.mesa3d.org
|
||||
Source0: %{name}-20171027.tar.bz2
|
||||
Source1: http://www.x.org/pub/individual/app/xdriinfo-1.0.4.tar.bz2
|
||||
Source2: mesad-git-snapshot.sh
|
||||
|
||||
Patch0000: mesa-demos-8.0.1-legal.patch
|
||||
Patch0001: mesa-demos-as-needed.patch
|
||||
Patch0002: xdriinfo-1.0.4-glvnd.patch
|
||||
|
||||
BuildRequires: gcc-c++ pkgconfig autoconf automake libtool glew-devel
|
||||
BuildRequires: freeglut-devel mesa-libGL-devel mesa-libEGL-devel
|
||||
BuildRequires: mesa-libGLES-devel mesa-libgbm-devel libGLU-devel
|
||||
|
||||
Provides: glxinfo glxinfo%{?__isa_bits} eglinfo es2_info
|
||||
Provides: glx-utils = %{version}-%{release} egl-utils = %{version}-%{release}
|
||||
Obsoletes: glx-utils < %{version}-%{release} egl-utils < %{version}-%{release}
|
||||
|
||||
%description
|
||||
This package provides some demo applications for testing Mesa.
|
||||
It also provides the glxinfo, glxgears, eglinfo and es2_info utilities.
|
||||
|
||||
%package help
|
||||
Summary: Help package for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description help
|
||||
This package contains some man files for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-20171027 -b1
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
cd ../xdriinfo-1.0.4
|
||||
%patch2 -p1
|
||||
cd -
|
||||
|
||||
rm -f src/demos/{pointblast.c,spriteblast.c}
|
||||
|
||||
%build
|
||||
autoreconf -vfi
|
||||
%configure --bindir=%{_libdir}/mesa --with-system-data-files
|
||||
%make_build
|
||||
|
||||
cd ../xdriinfo-1.0.4
|
||||
%configure
|
||||
%make_build
|
||||
cd -
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
cd ../xdriinfo-1.0.4
|
||||
%make_install
|
||||
cd -
|
||||
|
||||
install -m755 src/xdemos/{glxgears,glxinfo} %{buildroot}%{_bindir}
|
||||
install -m755 src/egl/{opengl/eglinfo,opengles2/es2_info} %{buildroot}%{_bindir}
|
||||
|
||||
%if 0%{?__isa_bits} != 0
|
||||
install -m755 src/xdemos/glxinfo %{buildroot}%{_bindir}/glxinfo%{?__isa_bits}
|
||||
%endif
|
||||
|
||||
%files
|
||||
%{_libdir}/mesa
|
||||
%{_bindir}/*
|
||||
%{_datadir}/%{name}/
|
||||
|
||||
%files help
|
||||
%{_datadir}/man/man1/xdriinfo.1*
|
||||
|
||||
%changelog
|
||||
* Wed Oct 23 2019 huzhiyu <huzhiyu1@huawei.com> - 8.3.0-13
|
||||
- Package init
|
||||
22
mesad-git-snapshot.sh
Normal file
22
mesad-git-snapshot.sh
Normal file
@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Usage: ./make-git-snapshot.sh [COMMIT]
|
||||
#
|
||||
# to make a snapshot of the given tag/branch. Defaults to HEAD.
|
||||
# Point env var REF to a local mesa repo to reduce clone time.
|
||||
|
||||
DIRNAME=mesa-demos-$( date +%Y%m%d )
|
||||
|
||||
echo REF ${REF:+--reference $REF}
|
||||
echo DIRNAME $DIRNAME
|
||||
echo HEAD ${1:-HEAD}
|
||||
|
||||
rm -rf $DIRNAME
|
||||
|
||||
git clone ${REF:+--reference $REF} \
|
||||
git://git.freedesktop.org/git/mesa/demos $DIRNAME
|
||||
|
||||
GIT_DIR=$DIRNAME/.git git archive --format=tar --prefix=$DIRNAME/ ${1:-HEAD} \
|
||||
| bzip2 > $DIRNAME.tar.bz2
|
||||
|
||||
# rm -rf $DIRNAME
|
||||
54
xdriinfo-1.0.4-glvnd.patch
Normal file
54
xdriinfo-1.0.4-glvnd.patch
Normal file
@ -0,0 +1,54 @@
|
||||
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);
|
||||
BIN
xdriinfo-1.0.4.tar.bz2
Normal file
BIN
xdriinfo-1.0.4.tar.bz2
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user