From 0ae544fcac9b9a511b3618cfe930b276d3265e90 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Nov 04 2009 15:27:08 +0000 Subject: - Fix hang on exit (by using XF86Vidmode instead of Xrandr) - Do not crash when openal-soft-devel is not installed (dlopen versioned lib instead of .so devel symlink) - Require openal-soft, as it is dlopened --- diff --git a/bolzplatz2006-no-xrandr.patch b/bolzplatz2006-no-xrandr.patch new file mode 100644 index 0000000..17f6ad4 --- /dev/null +++ b/bolzplatz2006-no-xrandr.patch @@ -0,0 +1,20 @@ +diff -up bolzplatz2006-1.0.3/libsrc/lwjgl/src/native/linux/display.c~ bolzplatz2006-1.0.3/libsrc/lwjgl/src/native/linux/display.c +--- bolzplatz2006-1.0.3/libsrc/lwjgl/src/native/linux/display.c~ 2006-05-29 18:49:24.000000000 +0200 ++++ bolzplatz2006-1.0.3/libsrc/lwjgl/src/native/linux/display.c 2009-11-04 15:05:12.000000000 +0100 +@@ -132,10 +132,15 @@ static bool isXF86VidModeSupported(JNIEn + } + + static extension getBestDisplayModeExtension(JNIEnv *env, Display *disp) { ++/* HDG disable use of xrandr, as it hangs on exit in XRRGetScreenInfo. ++ Note I don't think this is bolzplatz fault, but lets workaround it. */ ++#if 0 + if (isXrandrSupported(env, disp)) { + printfDebugJava(env, "Using Xrandr for display mode switching"); + return XRANDR; +- } else if (isXF86VidModeSupported(env, disp)) { ++ } else ++#endif ++ if (isXF86VidModeSupported(env, disp)) { + printfDebugJava(env, "Using XF86VidMode for display mode switching"); + return XF86VIDMODE; + } else { diff --git a/bolzplatz2006-versioned-openal.patch b/bolzplatz2006-versioned-openal.patch new file mode 100644 index 0000000..df241b5 --- /dev/null +++ b/bolzplatz2006-versioned-openal.patch @@ -0,0 +1,34 @@ +diff -up bolzplatz2006-1.0.3/libsrc/lwjgl/src/native/common/extal.c~ bolzplatz2006-1.0.3/libsrc/lwjgl/src/native/common/extal.c +--- bolzplatz2006-1.0.3/libsrc/lwjgl/src/native/common/extal.c~ 2006-05-29 18:49:26.000000000 +0200 ++++ bolzplatz2006-1.0.3/libsrc/lwjgl/src/native/common/extal.c 2009-11-04 16:02:55.000000000 +0100 +@@ -117,12 +117,26 @@ static void tryLoadLibrary(JNIEnv *env, + free(path_str); + #endif + #ifdef _X11 ++ char *versioned_path_str; + char *path_str = GetStringNativeChars(env, path); +- printfDebugJava(env, "Testing '%s'", path_str); +- handleOAL = dlopen(path_str, RTLD_LAZY); +- if (handleOAL != NULL) { +- printfDebugJava(env, "Found OpenAL at '%s'", path_str); ++ ++ if (asprintf(&versioned_path_str, "%s.1", path_str) != -1) { ++ printfDebugJava(env, "Testing '%s'", versioned_path_str); ++ handleOAL = dlopen(versioned_path_str, RTLD_LAZY); ++ if (handleOAL != NULL) { ++ printfDebugJava(env, "Found OpenAL at '%s'", versioned_path_str); ++ } ++ free(versioned_path_str); + } ++ ++ if (handleOAL == NULL) { ++ printfDebugJava(env, "Testing '%s'", path_str); ++ handleOAL = dlopen(path_str, RTLD_LAZY); ++ if (handleOAL != NULL) { ++ printfDebugJava(env, "Found OpenAL at '%s'", path_str); ++ } ++ } ++ + free(path_str); + #endif + #ifdef _MACOSX diff --git a/bolzplatz2006.spec b/bolzplatz2006.spec index 4a34a1f..0154e07 100644 --- a/bolzplatz2006.spec +++ b/bolzplatz2006.spec @@ -7,7 +7,7 @@ Name: bolzplatz2006 Version: 1.0.3 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Slam Soccer 2006 is a funny football game in 3D-comic-style Summary(fr): Coup de Foot 2006 est un jeu comique en 3D Summary(de): Bolzplatz 2006 ist ein spaßiges Fußballspiel im 3D-Comic-Stil @@ -31,6 +31,8 @@ Patch3: %{name}-irrlicht-png-64bit.patch Patch4: %{name}-lwjgl-nofmod.patch Patch5: %{name}-lwjgl-openal11.patch Patch6: %{name}-lwjgl-Makefile.patch +Patch7: %{name}-no-xrandr.patch +Patch8: %{name}-versioned-openal.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ant-nodeps sdljava dom4j vecmath1.2 swig xml-commons-apis BuildRequires: libGLU-devel DevIL-devel libXxf86vm-devel libjpeg-devel @@ -40,6 +42,8 @@ BuildRequires: libXt-devel libXrender-devel libvorbis-devel desktop-file-utils BuildRequires: java-1.6.0-openjdk-devel Requires: sdljava dom4j vecmath1.2 java-1.6.0-openjdk jpackage-utils Requires: hicolor-icon-theme autodownloader +# These are dynamically opened by lwjgl: +Requires: openal-soft libGL %description Slam Soccer 2006 is a funny football game in @@ -119,6 +123,8 @@ popd %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 +%patch8 -p1 sed -i 's/\r//' license.txt # we use the system versions of these rm -r libsrc/irrlicht-0.14-patched/libpng libsrc/irrlicht-0.14-patched/zlib \ @@ -237,6 +243,12 @@ fi %changelog +* Wed Nov 4 2009 Hans de Goede 1.0.3-9 +- Fix hang on exit (by using XF86Vidmode instead of Xrandr) +- Do not crash when openal-soft-devel is not installed + (dlopen versioned lib instead of .so devel symlink) +- Require openal-soft, as it is dlopened + * Fri Jul 24 2009 Fedora Release Engineering - 1.0.3-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild