[ogre/f18] Allow plugin names to not end in .so
Bruno Wolff III
bruno at fedoraproject.org
Sun Apr 21 17:15:27 UTC 2013
commit e280e2f33eb98f23eca4e567492c0f8172d6e71a
Author: Bruno Wolff III <bruno at wolff.to>
Date: Sun Apr 21 11:03:38 2013 -0500
Allow plugin names to not end in .so
Fix for bug 573672.
ogre-1.7-dynlib-allow-no-so.patch | 22 ++++++++++++++++++++++
ogre.spec | 7 ++++++-
2 files changed, 28 insertions(+), 1 deletions(-)
---
diff --git a/ogre-1.7-dynlib-allow-no-so.patch b/ogre-1.7-dynlib-allow-no-so.patch
new file mode 100644
index 0000000..2857779
--- /dev/null
+++ b/ogre-1.7-dynlib-allow-no-so.patch
@@ -0,0 +1,22 @@
+--- OgreMain/src/OgreDynLib.cpp.orig 2013-04-21 10:48:20.089440483 -0500
++++ OgreMain/src/OgreDynLib.cpp 2013-04-21 10:54:09.285821547 -0500
+@@ -69,7 +69,9 @@
+ String name = mName;
+ #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
+ // dlopen() does not add .so to the filename, like windows does for .dll
+- if (name.substr(name.length() - 3, 3) != ".so")
++ m_hInst = (DYNLIB_HANDLE)DYNLIB_LOAD( name.c_str() );
++ // Only add .so if open without it failed
++ if ((!m_hInst) && (name.substr(name.length() - 3, 3) != ".so"))
+ name += ".so";
+ #elif OGRE_PLATFORM == OGRE_PLATFORM_APPLE
+ // dlopen() does not add .dylib to the filename, like windows does for .dll
+@@ -81,7 +83,7 @@
+ if (name.substr(name.length() - 4, 4) != ".dll")
+ name += ".dll";
+ #endif
+- m_hInst = (DYNLIB_HANDLE)DYNLIB_LOAD( name.c_str() );
++ if ( !m_hInst ) m_hInst = (DYNLIB_HANDLE)DYNLIB_LOAD( name.c_str() );
+
+ if( !m_hInst )
+ OGRE_EXCEPT(
diff --git a/ogre.spec b/ogre.spec
index 4a5e708..a81bc2d 100644
--- a/ogre.spec
+++ b/ogre.spec
@@ -1,6 +1,6 @@
Name: ogre
Version: 1.7.4
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Object-Oriented Graphics Rendering Engine
# MIT with exceptions - main library
# CC-BY-SA - devel docs
@@ -32,6 +32,7 @@ Patch6: ogre-fix-utilSSE.patch
# Some fuzz adjustments made
Patch7: ogre-boost_cmake.patch
Patch8: ogre-1.7.4-arm-ftbfs.patch
+Patch9: ogre-1.7-dynlib-allow-no-so.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: zziplib-devel freetype-devel
BuildRequires: libXaw-devel libXrandr-devel libXxf86vm-devel libGLU-devel
@@ -98,6 +99,7 @@ using SampleBrowser.
%patch6 -p0 -z .fix-utilSSE
%patch7 -p1 -z .boost-cmake
%patch8 -p0 -z .arm-ftbfs
+%patch9 -p0 -z .dynlib-allow-no-so
# remove execute bits from src-files for -debuginfo package
chmod -x `find RenderSystems/GL -type f` \
`find Samples/DeferredShading -type f` Samples/DynTex/src/DynTex.cpp
@@ -212,6 +214,9 @@ ln -s ../../../../fonts/dejavu/DejaVuSans.ttf \
%changelog
+* Sun Apr 21 2013 Bruno Wolff III <bruno at wolff.to> - 1.7.4-6
+- Backport fix for bz 573672, allow plugin names to not end in .so
+
* Tue Oct 02 2012 Jon Ciesla <limburgher at gmail.com> - 1.7.4-5
- Fix FTBFS on ARM, based on debian's patch.
More information about the scm-commits
mailing list