Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package opengl-games-utils for openSUSE:Factory checked in at 2022-05-04 15:11:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/opengl-games-utils (Old) and /work/SRC/openSUSE:Factory/.opengl-games-utils.new.1538 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "opengl-games-utils" Wed May 4 15:11:06 2022 rev:7 rq:974830 version:0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/opengl-games-utils/opengl-games-utils.changes 2016-11-14 20:11:32.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.opengl-games-utils.new.1538/opengl-games-utils.changes 2022-05-04 15:11:28.720196228 +0200 @@ -1,0 +2,10 @@ +Thu Apr 21 23:48:17 UTC 2022 - Ferdinand Thiessen <[email protected]> + +- Update to version 0.2 + * Recognize software rendering as such now that it is done with + gallium llvmpipe, rather then the classic software renderer + * Add a new hasDri function to opengl-game-functions.sh +- Add use-posix-shell.patch +- Use SourceURLs + +------------------------------------------------------------------- New: ---- use-posix-shell.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ opengl-games-utils.spec ++++++ --- /var/tmp/diff_new_pack.4iKW2N/_old 2022-05-04 15:11:29.208196829 +0200 +++ /var/tmp/diff_new_pack.4iKW2N/_new 2022-05-04 15:11:29.212196833 +0200 @@ -1,7 +1,7 @@ # # spec file for package opengl-games-utils # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,20 +12,21 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: opengl-games-utils -Version: 0.1 +Version: 0.2 Release: 0 Summary: Utilities to check proper 3d support before launching 3d games License: SUSE-Public-Domain Group: Amusements/Games/3D/Other -Url: http://fedoraproject.org/wiki/SIGs/Games -Source0: opengl-game-wrapper.sh -Source1: opengl-game-functions.sh -Source2: README +URL: http://fedoraproject.org/wiki/SIGs/Games +Source0: https://src.fedoraproject.org/rpms/opengl-games-utils/raw/rawhide/f/opengl-game-wrapper.sh +Source1: https://src.fedoraproject.org/rpms/opengl-games-utils/raw/rawhide/f/opengl-game-functions.sh +Source2: https://src.fedoraproject.org/rpms/opengl-games-utils/raw/rawhide/f/README +Patch0: use-posix-shell.patch Requires: %{_bindir}/glxinfo Requires: zenity BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -39,7 +40,8 @@ %prep %setup -q -c -T -cp %{SOURCE2} . +cp %{SOURCE0} %{SOURCE1} %{SOURCE2} . +%patch0 %build # nothing to build @@ -47,8 +49,8 @@ %install mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_datadir}/%{name} -install -p -m 755 %{SOURCE0} %{buildroot}%{_bindir} -install -p -m 644 %{SOURCE1} %{buildroot}%{_datadir}/%{name} +install -p -m 755 opengl-game-wrapper.sh %{buildroot}%{_bindir} +install -p -m 644 opengl-game-functions.sh %{buildroot}%{_datadir}/%{name} %files %defattr(-,root,root,-) ++++++ README ++++++ --- /var/tmp/diff_new_pack.4iKW2N/_old 2022-05-04 15:11:29.256196887 +0200 +++ /var/tmp/diff_new_pack.4iKW2N/_new 2022-05-04 15:11:29.260196892 +0200 @@ -4,7 +4,7 @@ by other packages and is not intended for direct end user use! -Currently this package only contains one script: +Currently this package contains one utility script: opengl-game-wrapper.sh To use this script create a link in /usr/bin gamename-wrapper[.sh] to @@ -16,20 +16,29 @@ cannot run without hardware accelerated 3d, and that this is probably due to missing Free Software support for the users card. - -In the future I also plan to add an opengl-games-functions.sh file which can -be included by other wrapper scripts, the idea is to have a function in here -which will return true or false depending on if the current glx setup is a -setup which is known to work well. This function will have a list of -OpenGL renderer strings of known to work well drivers. This can then be used -by games which can take advantage of OpenGL, but will work without it too, -to determine wether or not to enable OpenGL support. The idea here is that -one might not want to enable OpenGL by default on SIS, VIA and other -low quality chipset / drivers. +The utility script uses 2 functions defined in +/usr/share/opengl-games-utils/opengl-game-functions.sh +You can also use these 2 functions directly from your own scripts by +including the above file from your own shell script. + +The 2 included functions are: + +hasDri: +This function will return true if hardware accellerated OpenGL is available +and false if it is not. This does not say anything about the OpenGL +capabilities (nor the quality of the driver). + +checkDriOK: +This functino calls hasDri, if hardware accellerated OpenGL is available +it does nothing, if it is not available it will show an error dialog and +then call exit. This is the function around which opengl-game-wrapper.sh is +build. It is provided as a "library" function so that if your game needs a +wrapper script anyways, you don't need to wrap the wrapper but instead can +call it directly from the wrapper. Last but not least before I forget, to avoid any licensing issues I hereby declare that all files in this package are in the Public Domain. -Hans de Goede 22 septemper 2007. +Hans de Goede 15 September 2011. ++++++ opengl-game-functions.sh ++++++ --- /var/tmp/diff_new_pack.4iKW2N/_old 2022-05-04 15:11:29.280196917 +0200 +++ /var/tmp/diff_new_pack.4iKW2N/_new 2022-05-04 15:11:29.284196922 +0200 @@ -1,13 +1,27 @@ +# check if DRI is available, true if it is, false otherwise + +function hasDri () +{ + if [ "`glxinfo | grep "direct rendering: " | head -n 1 | cut -d " " -f 3`" != Yes ] || + glxinfo | grep -qE "OpenGL renderer string: Software Rasterizer|OpenGL renderer string: Gallium .* on llvmpipe"; then + return 1 + else + return 0 + fi +} + # check if DRI is available, show an error and exit if it isn't -checkDriOK() { - if ! glxinfo | grep -Fx "direct rendering: Yes" > /dev/null; then + +function checkDriOK () +{ + if ! hasDri; then zenity --error --text="Your system currently is not capable of hardware \ accelerated 3D. Therefore $1 cannot run. Usually the cause of this error is that there are no Free Software drivers \ for your graphics card, please contact your graphics card manufacturer and \ kindly ask them to provide Free Software support for your card." - return 1 + exit 1; fi } ++++++ opengl-game-wrapper.sh ++++++ --- /var/tmp/diff_new_pack.4iKW2N/_old 2022-05-04 15:11:29.296196937 +0200 +++ /var/tmp/diff_new_pack.4iKW2N/_new 2022-05-04 15:11:29.308196951 +0200 @@ -1,11 +1,10 @@ -#!/bin/sh -e +#!/bin/bash . /usr/share/opengl-games-utils/opengl-game-functions.sh -game=$(basename $0) -game="${game%%-wrapper*}" +GAME=`basename $0 | sed 's/-wrapper.*//'` -checkDriOK "$game" +checkDriOK $GAME -exec "$game" "$@" +exec $GAME "$@" ++++++ use-posix-shell.patch ++++++ ++++++ opengl-game-wrapper.sh --- opengl-game-wrapper.sh +++ opengl-game-wrapper.sh @@ -1,1 +1,1 @@ -#!/bin/bash +#!/bin/sh -e
