[marsshooter] 01/07: Add remove-glu-dependency.patch.

Markus Koschany apo-guest at moszumanska.debian.org
Wed Jul 1 11:33:52 UTC 2015


This is an automated email from the git hooks/post-receive script.

apo-guest pushed a commit to branch master
in repository marsshooter.

commit de6f5dd12f81d2825850bf20babe6950483fef2d
Author: Markus Koschany <apo at gambaru.de>
Date:   Wed Jul 1 12:33:13 2015 +0200

    Add remove-glu-dependency.patch.
    
    Fix build failures due to the use of functions from GLU and replace GLU with
    standard OpenGL calls.
    
    Thanks: James Cowgill for the report and the patch!
    Closes: #784857
---
 debian/patches/remove-glu-dependency.patch | 116 +++++++++++++++++++++++++++++
 debian/patches/series                      |   1 +
 2 files changed, 117 insertions(+)

diff --git a/debian/patches/remove-glu-dependency.patch b/debian/patches/remove-glu-dependency.patch
new file mode 100644
index 0000000..d157136
--- /dev/null
+++ b/debian/patches/remove-glu-dependency.patch
@@ -0,0 +1,116 @@
+From: James Cowgill <james410 at cowgill.org.uk>
+Date: Wed, 1 Jul 2015 12:32:55 +0200
+Subject: remove glu dependency
+
+Fix build failures with SFML 2.3 due to the use of GLU functions.
+Replace GLU with standard OpenGL calls.
+
+Forwarded: https://github.com/thelaui/M.A.R.S./pull/17
+---
+ premake4.lua           |  8 ++++----
+ src/Shaders/postFX.cpp |  2 +-
+ src/System/window.cpp  | 12 ++++++------
+ 3 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/premake4.lua b/premake4.lua
+index 023dddd..5af4495 100755
+--- a/premake4.lua
++++ b/premake4.lua
+@@ -11,11 +11,11 @@ project "mars"
+     defines { "NDEBUG" }
+     flags   { "Optimize" }
+     if os.get() == "windows" then
+-      links { "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "glu32", "opengl32", "fribidi-0", "tag" }
++      links { "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "opengl32", "fribidi-0", "tag" }
+     elseif os.get() == "macosx" then
+       links { "sfml-graphics.framework", "sfml-audio.framework", "sfml-system.framework", "sfml-window.framework", "opengl.framework", "fribidi", "tag" }
+     else
+-      links { "GLU", "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "fribidi", "tag" }
++      links { "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "fribidi", "tag" }
+       libdirs { "/usr/lib", "/usr/local/lib" }
+     end
+     
+@@ -23,10 +23,10 @@ project "mars"
+     defines { "_DEBUG", "DEBUG" }
+     flags   { "Symbols" }
+     if os.get() == "windows" then
+-      links { "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "glu32", "opengl32", "fribidi-0", "tag" }
++      links { "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "opengl32", "fribidi-0", "tag" }
+     elseif os.get() == "macosx" then
+       links { "sfml-graphics.framework", "sfml-audio.framework", "sfml-system.framework", "sfml-window.framework", "opengl.framework", "fribidi", "tag" }
+     else
+-      links { "GLU", "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "fribidi", "tag" }
++      links { "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "fribidi", "tag" }
+       libdirs { "/usr/lib", "/usr/local/lib" }
+     end
+diff --git a/src/Shaders/postFX.cpp b/src/Shaders/postFX.cpp
+index 987f411..f767a47 100644
+--- a/src/Shaders/postFX.cpp
++++ b/src/Shaders/postFX.cpp
+@@ -78,7 +78,7 @@ namespace postFX {
+             postFX_.loadFromFile(settings::C_dataPath + "shaders/bump.frag", sf::Shader::Fragment);
+             bumpMap_.create(SPACE_X_RESOLUTION*0.5f, SPACE_Y_RESOLUTION*0.5f);
+             glViewport(0,0,SPACE_X_RESOLUTION*0.5f,SPACE_Y_RESOLUTION*0.5f);
+-            gluOrtho2D(0, SPACE_X_RESOLUTION, SPACE_Y_RESOLUTION, 0);
++            glOrtho(0, SPACE_X_RESOLUTION, SPACE_Y_RESOLUTION, 0, -1, 1);
+             glEnable(GL_BLEND);
+             glMatrixMode(GL_MODELVIEW);
+             postFX_.setParameter("BumpMap", bumpMap_.getTexture());
+diff --git a/src/System/window.cpp b/src/System/window.cpp
+index 3ffcf65..cbec0f6 100644
+--- a/src/System/window.cpp
++++ b/src/System/window.cpp
+@@ -222,7 +222,7 @@ namespace window {
+         glLoadIdentity();
+ 
+         // Setup translation (according to left-upper corner)
+-        gluOrtho2D(0.f, SPACE_X_RESOLUTION, SPACE_Y_RESOLUTION, 0.f);
++        glOrtho(0.f, SPACE_X_RESOLUTION, SPACE_Y_RESOLUTION, 0.f, -1, 1);
+ 
+         // probably improves performance...
+         glDisable(GL_LIGHTING);
+@@ -247,7 +247,7 @@ namespace window {
+ 
+         glMatrixMode(GL_PROJECTION);
+         glLoadIdentity();
+-        gluOrtho2D(0.f, viewPort_.x_, viewPort_.y_, 0.f);
++        glOrtho(0.f, viewPort_.x_, viewPort_.y_, 0.f, -1, 1);
+         glMatrixMode(GL_MODELVIEW);
+         glLoadIdentity();
+ 
+@@ -255,7 +255,7 @@ namespace window {
+ 
+         glMatrixMode(GL_PROJECTION);
+         glLoadIdentity();
+-        gluOrtho2D(0.f, SPACE_X_RESOLUTION, SPACE_Y_RESOLUTION, 0.f);
++        glOrtho(0.f, SPACE_X_RESOLUTION, SPACE_Y_RESOLUTION, 0.f, -1, 1);
+         glMatrixMode(GL_MODELVIEW);
+         glLoadIdentity();
+     }
+@@ -270,7 +270,7 @@ namespace window {
+             glLoadIdentity();
+             setViewPort();
+ 
+-            gluOrtho2D(0.f, viewPort_.x_, viewPort_.y_, 0.f);
++            glOrtho(0.f, viewPort_.x_, viewPort_.y_, 0.f, -1, 1);
+ 
+             glMatrixMode(GL_MODELVIEW);
+             glLoadIdentity();
+@@ -284,7 +284,7 @@ namespace window {
+             glLoadIdentity();
+             setViewPort();
+ 
+-            gluOrtho2D(0.f, viewPort_.x_, viewPort_.y_, 0.f);
++            glOrtho(0.f, viewPort_.x_, viewPort_.y_, 0.f, -1, 1);
+ 
+             glMatrixMode(GL_MODELVIEW);
+             glLoadIdentity();
+@@ -294,7 +294,7 @@ namespace window {
+         else {
+             glMatrixMode(GL_PROJECTION);
+             glLoadIdentity();
+-            gluOrtho2D(0.f, viewPort_.x_, viewPort_.y_, 0.f);
++            glOrtho(0.f, viewPort_.x_, viewPort_.y_, 0.f, -1, 1);
+             glMatrixMode(GL_MODELVIEW);
+             glLoadIdentity();
+         }
diff --git a/debian/patches/series b/debian/patches/series
index 3d722a8..122b663 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ Use-sf-Shader-Bind-correctly.patch
 CMakeList.patch
 desktop-file.patch
 fix-segfault-when-using-arguments-without-path.patch
+remove-glu-dependency.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/marsshooter.git



More information about the Pkg-games-commits mailing list