rpms/ogre/devel ogre-1.6.0rc1-glew.patch, NONE, 1.1 ogre.spec, 1.35, 1.36 sources, 1.14, 1.15

Alexey Torkhov atorkhov at fedoraproject.org
Sun Sep 28 07:35:41 UTC 2008


Author: atorkhov

Update of /cvs/pkgs/rpms/ogre/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7968

Modified Files:
	ogre.spec sources 
Added Files:
	ogre-1.6.0rc1-glew.patch 
Log Message:
Updated private GLEW sources due to license issues and added upstream GLEW patch.

ogre-1.6.0rc1-glew.patch:

--- NEW FILE ogre-1.6.0rc1-glew.patch ---
diff -ur ogre/RenderSystems/GL/src/glew.cpp ogre.new/RenderSystems/GL/src/glew.cpp
--- ogre/RenderSystems/GL/src/glew.cpp	2008-09-28 11:10:34.000000000 +0400
+++ ogre.new/RenderSystems/GL/src/glew.cpp	2008-09-28 11:12:46.000000000 +0400
@@ -29,6 +29,10 @@
 ** THE POSSIBILITY OF SUCH DAMAGE.
 */
 
+// SJS
+#include "OgreGLSupport.h"
+// SJS
+
 #include <GL/glew.h>
 #if defined(_WIN32)
 #  include <GL/wglew.h>
@@ -56,13 +60,13 @@
 #  endif /* _WIN32 */
 #  define GLEW_CONTEXT_ARG_DEF_LIST GLEWContext* ctx
 #else /* GLEW_MX */
-#  define GLEW_CONTEXT_ARG_DEF_INIT void
-#  define GLEW_CONTEXT_ARG_VAR_INIT
-#  define GLEW_CONTEXT_ARG_DEF_LIST void
-#  define WGLEW_CONTEXT_ARG_DEF_INIT void
-#  define WGLEW_CONTEXT_ARG_DEF_LIST void
-#  define GLXEW_CONTEXT_ARG_DEF_INIT void
-#  define GLXEW_CONTEXT_ARG_DEF_LIST void
+#  define GLEW_CONTEXT_ARG_DEF_INIT Ogre::GLSupport *glSupport
+#  define GLEW_CONTEXT_ARG_VAR_INIT glSupport
+#  define GLEW_CONTEXT_ARG_DEF_LIST Ogre::GLSupport *glSupport
+#  define WGLEW_CONTEXT_ARG_DEF_INIT Ogre::GLSupport *glSupport
+#  define WGLEW_CONTEXT_ARG_DEF_LIST Ogre::GLSupport *glSupport
+#  define GLXEW_CONTEXT_ARG_DEF_INIT Ogre::GLSupport *glSupport
+#  define GLXEW_CONTEXT_ARG_DEF_LIST Ogre::GLSupport *glSupport
 #endif /* GLEW_MX */
 
 #if defined(__APPLE__)
@@ -80,7 +84,7 @@
     image = NSAddImage("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", NSADDIMAGE_OPTION_RETURN_ON_ERROR);
   }
   /* prepend a '_' for the Unix C symbol mangling convention */
-  symbolName = malloc(strlen((const char*)name) + 2);
+  symbolName = (char*)malloc(strlen((const char*)name) + 2);
   strcpy(symbolName+1, (const char*)name);
   symbolName[0] = '_';
   symbol = NULL;
@@ -5326,9 +5330,11 @@
 
 /* ------------------------------------------------------------------------- */
 
-#ifndef GLEW_MX
-static
-#endif
+// SJS
+//#ifndef GLEW_MX
+//static
+//#endif
+// SJS
 GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
 {
   const GLubyte* s;
@@ -7299,11 +7305,15 @@
 
 #ifdef GLX_VERSION_1_2
 
+// FB: Patched to allow Ogre to overload glXGetCurrentDisplay
 static GLboolean _glewInit_GLX_VERSION_1_2 (GLXEW_CONTEXT_ARG_DEF_INIT)
 {
   GLboolean r = GL_FALSE;
 
-  r = ((glXGetCurrentDisplay = (PFNGLXGETCURRENTDISPLAYPROC)glewGetProcAddress((const GLubyte*)"glXGetCurrentDisplay")) == NULL) || r;
+  if (glXGetCurrentDisplay == NULL) 
+  {
+      r = ((glXGetCurrentDisplay = (PFNGLXGETCURRENTDISPLAYPROC)glewGetProcAddress((const GLubyte*)"glXGetCurrentDisplay")) == NULL) || r;
+  }
 
   return r;
 }
@@ -7976,18 +7986,20 @@
 extern GLenum glxewContextInit (void);
 #endif /* _WIN32 */
 
-GLenum glewInit ()
-{
-  GLenum r;
-  if ( (r = glewContextInit()) ) return r;
-#if defined(_WIN32)
-  return wglewContextInit();
-#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) /* _UNIX */
-  return glxewContextInit();
-#else
-  return r;
-#endif /* _WIN32 */
-}
+// SJS
+//GLenum glewInit ()
+//{
+//  GLenum r;
+//  if ( (r = glewContextInit()) ) return r;
+//#if defined(_WIN32)
+//  return wglewContextInit();
+//#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) /* _UNIX */
+//  return glxewContextInit();
+//#else
+//  return r;
+//#endif /* _WIN32 */
+//}
+// End SJS
 
 #endif /* !GLEW_MX */
 #ifdef GLEW_MX


Index: ogre.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ogre/devel/ogre.spec,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- ogre.spec	20 Sep 2008 08:32:42 -0000	1.35
+++ ogre.spec	28 Sep 2008 07:35:11 -0000	1.36
@@ -7,16 +7,19 @@
 URL:            http://www.ogre3d.org/
 # This is http://downloads.sourceforge.net/ogre/ogre-v%(echo %{version} | tr . -).tar.bz2
 # With the non free licensed headers under RenderSystems/GL/include/GL removed
+# And GLEW sources updated to 1.5.0 - upstream notified http://www.ogre3d.org/phpBB2/viewtopic.php?t=44558
 Source0:        ogre-1.6.0rc1-clean.tar.bz2
 Source1:        ogre-samples.sh
 Patch0:         ogre-1.2.1-rpath.patch
 #Patch1:         ogre-1.6.0-system-glew.patch
+# Upstream patch to GLEW applied to new version
+Patch1:         ogre-1.6.0rc1-glew.patch
 Patch2:         ogre-1.4.7-system-tinyxml.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  cegui-devel zziplib-devel freetype-devel gtk2-devel
 BuildRequires:  libXaw-devel libXrandr-devel libXxf86vm-devel libGLU-devel
 BuildRequires:  ois-devel freeimage-devel
-#BuildRequires:  glew-devel
+#BuildRequires:  openexr-devel glew-devel
 BuildRequires:  tinyxml-devel
 
 %description
@@ -65,7 +68,7 @@
 %prep
 %setup -q -n ogre
 %patch0 -p1 -z .rpath
-#%patch1 -p1 -z .glew
+%patch1 -p1 -z .glew
 %patch2 -p1 -z .sys-tinyxml
 # remove execute bits from src-files for -debuginfo package
 chmod -x `find RenderSystems/GL -type f` \
@@ -176,10 +179,12 @@
 
 
 %changelog
-* Sat Sep 13 2008 Alexey Torkhov <atorkhov at gmail.com> 1.6.0-0.1.rc1
+* Sat Sep 21 2008 Alexey Torkhov <atorkhov at gmail.com> 1.6.0-0.1.rc1
 - New upstream release 1.6.0rc1
-- Removing broken OpenEXR plugin, it is not updated for long time and doesn't
+- Disabling broken OpenEXR plugin, it is not updated for long time and doesn't
   compile. FreeImage now have EXR support
+- Updated private GLEW sources to 1.5.0 due to license issues and compiling
+  against it instead of system ones, as it is patched by upstream
 
 * Fri Jul 11 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 1.4.9-2
 - Rebuild for new cegui


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/ogre/devel/sources,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- sources	14 Sep 2008 09:25:14 -0000	1.14
+++ sources	28 Sep 2008 07:35:11 -0000	1.15
@@ -1 +1 @@
-6befec25a9ac9c84aa1ccd1256522fc9  ogre-1.6.0rc1-clean.tar.bz2
+4a3ec51765880a682f8c9846839ea901  ogre-1.6.0rc1-clean.tar.bz2




More information about the fedora-extras-commits mailing list