From b042314d63b5212ece3de75c50bb00d22b4ed15a Mon Sep 17 00:00:00 2001
From: Anton Gladky <gladky.anton@gmail.com>
Date: Wed, 24 Oct 2012 21:15:35 +0200
Subject: [PATCH 2/2] Use packaged version of Glee.

---
 debian/changelog                 |    3 +-
 debian/control                   |    3 +-
 debian/patches/remove_glee.patch |   64 ++++++++++++++++++++++++++++++++++++++
 debian/patches/series            |    1 +
 4 files changed, 69 insertions(+), 2 deletions(-)
 create mode 100644 debian/patches/remove_glee.patch

diff --git a/debian/changelog b/debian/changelog
index 673482f..27f344a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,9 @@ fife (0.3.3+r3-1.1) unstable; urgency=low
 
   * Non-maintainer upload.
   * Add engine/core/util/utf8/utf8* to copyright file (Closes: #690370)
+  * Use packaged version of Glee-library
 
- -- Anton Gladky <gladky.anton@gmail.com>  Thu, 18 Oct 2012 19:54:18 +0200
+ -- Anton Gladky <gladky.anton@gmail.com>  Wed, 24 Oct 2012 21:15:06 +0200
 
 fife (0.3.3+r3-1) unstable; urgency=low
 
diff --git a/debian/control b/debian/control
index fce567d..260ebfb 100644
--- a/debian/control
+++ b/debian/control
@@ -24,7 +24,8 @@ Build-Depends: debhelper (>= 7.0.50~),
  libguichan-dev,
  libtinyxml-dev,
  libpng-dev,
- libunittest++-dev
+ libunittest++-dev,
+ glee-dev
 X-Python-Version: >= 2.6
 Vcs-Git: git://git.debian.org/git/pkg-games/fife.git
 Vcs-Browser: http://git.debian.org/?p=pkg-games/fife.git
diff --git a/debian/patches/remove_glee.patch b/debian/patches/remove_glee.patch
new file mode 100644
index 0000000..ebd8086
--- /dev/null
+++ b/debian/patches/remove_glee.patch
@@ -0,0 +1,64 @@
+Description: use packaged version of glee
+Author: Anton Gladky <gladky.anton@gmail.com>
+Last-Update: 2012-10-24
+
+--- a/engine/core/video/opengl/fife_opengl.h
++++ b/engine/core/video/opengl/fife_opengl.h
+@@ -25,7 +25,7 @@
+ // Standard C++ library includes
+ 
+ // 3rd party library includes
+-#include "ext/glee/GLee.h"
++#include <GLee.h>
+ 
+ // GLee.h includes windows.h when on a windows platform
+ // In winnt.h (which is included from windows.h) DELETE
+--- a/doc/dependencies/filedeps.dot
++++ b/doc/dependencies/filedeps.dot
+@@ -111,7 +111,6 @@
+     "engine/core/eventchannel/key/ec_keyevent.h" -> "eventchannel/source/ec_ieventsource.h"
+     "engine/core/eventchannel/mouse/ec_mouseevent.h" -> "eventchannel/base/ec_inputevent.h"
+     "engine/core/eventchannel/source/ec_ieventsource.h" -> "ec_eventsourcetypes.h"
+-    "engine/core/ext/glee/GLee.cpp" -> "GLee.h"
+     "engine/core/ext/tinyxml/fife_tinyxml.h" -> "tinyxml.h"
+     "engine/core/ext/tinyxml/tinystr.cpp" -> "tinystr.h"
+     "engine/core/ext/tinyxml/tinyxml.cpp" -> "tinyxml.h"
+@@ -633,7 +632,6 @@
+     "engine/core/video/imagemanager.h" -> "util/base/singleton.h"
+     "engine/core/video/imagemanager.h" -> "util/resource/resource.h"
+     "engine/core/video/imagemanager.h" -> "util/resource/resourcemanager.h"
+-    "engine/core/video/opengl/fife_opengl.h" -> "ext/glee/GLee.h"
+     "engine/core/video/opengl/glimage.cpp" -> "glimage.h"
+     "engine/core/video/opengl/glimage.cpp" -> "util/structures/rect.h"
+     "engine/core/video/opengl/glimage.cpp" -> "video/opengl/renderbackendopengl.h"
+@@ -886,4 +884,4 @@
+     "engine/core/view/visual.h" -> "util/math/angles.h"
+     "engine/core/view/visual.h" -> "util/structures/rect.h"
+     "engine/core/view/visual.h" -> "video/animation.h"
+-}
+\ No newline at end of file
++}
+--- a/build/linux2-config.py
++++ b/build/linux2-config.py
+@@ -93,7 +93,7 @@
+ 	return libs
+ 
+ def getOptionalLibs(opengl):
+-	libs = [('tinyxml', 'tinyxml.h')]
++	libs = [('tinyxml', 'tinyxml.h'), ('glee', 'Glee.h')]
+ 	
+ 	return libs
+ 	
+--- a/engine/core/ext/glee/GLee.cpp
++++ b/engine/core/ext/glee/GLee.cpp
+@@ -1,3 +1,4 @@
++#if 0
+ /***************************************************************************
+ *
+ * GLee.c
+@@ -18168,3 +18169,5 @@
+     __GLeeExtList_clean(&extensionNames);
+     return GL_TRUE;
+ }
++
++#endif 
diff --git a/debian/patches/series b/debian/patches/series
index ec3e723..c12413a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 support-parallel-build.diff
 add-kfreebsd-gnu-configuration.diff
+remove_glee.patch
-- 
1.7.10.4

