[ogre] Allow plugin names to not end in .so
Bruno Wolff III
bruno at fedoraproject.org
Sat Apr 20 10:38:01 UTC 2013
commit 8dc9e32ee89e0827d9798eab6c1f86e703b349e9
Author: Bruno Wolff III <bruno at wolff.to>
Date: Sat Apr 20 05:36:09 2013 -0500
Allow plugin names to not end in .so
The plugin name is now tried as is and if the load fails and
the name didn't end in .so then the dlopen is retried with
.so added to the name.
This resolves bug 573672.
ogre-1.8.1-dynlib-allow-no-so.patch | 13 +++++++++++++
ogre.spec | 7 ++++++-
2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/ogre-1.8.1-dynlib-allow-no-so.patch b/ogre-1.8.1-dynlib-allow-no-so.patch
new file mode 100644
index 0000000..2896156
--- /dev/null
+++ b/ogre-1.8.1-dynlib-allow-no-so.patch
@@ -0,0 +1,13 @@
+--- OgreMain/src/OgreDynLib.cpp.orig 2013-04-20 05:28:11.276661686 -0500
++++ OgreMain/src/OgreDynLib.cpp 2013-04-20 05:30:48.945700610 -0500
+@@ -71,7 +71,9 @@
+ String name = mName;
+ #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_NACL
+ // dlopen() does not add .so to the filename, like windows does for .dll
+- if (name.find(".so") == String::npos)
++ mInst = (DYNLIB_HANDLE)DYNLIB_LOAD( name.c_str() );
++ // Only add .so if open without it failed
++ if ((!mInst) && (name.find(".so") == String::npos))
+ name += ".so";
+ #elif OGRE_PLATFORM == OGRE_PLATFORM_APPLE
+ // dlopen() does not add .dylib to the filename, like windows does for .dll
diff --git a/ogre.spec b/ogre.spec
index d061844..67eabf0 100644
--- a/ogre.spec
+++ b/ogre.spec
@@ -1,6 +1,6 @@
Name: ogre
Version: 1.8.1
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Object-Oriented Graphics Rendering Engine
# MIT with exceptions - main library
# CC-BY-SA - devel docs
@@ -26,6 +26,7 @@ Patch2: ogre-1.8.1-system-tinyxml.patch
Patch3: ogre-1.7.2-fix-ppc-build.patch
Patch5: ogre-1.8.1-build-rcapsdump.patch
Patch6: ogre-thread.patch
+Patch7: ogre-1.8.1-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
@@ -141,6 +142,7 @@ using SampleBrowser.
%patch3 -p1 -z .ppc
%patch5 -p0 -z .build-rcapsdump
%patch6 -p0 -z .thread
+%patch6 -p0 -z .dynlib-allow-no-so
# remove execute bits from src-files for -debuginfo package
chmod -x `find RenderSystems/GL -type f` \
@@ -279,6 +281,9 @@ ln -s ../../../../fonts/dejavu/DejaVuSans.ttf \
%changelog
+* Sat Apr 20 2013 Bruno Wolff III <bruno at wolff.to> - 1.8.1-5
+- Allow for plugin names to not end in .so - bz 573672
+
* Sun Feb 10 2013 Denis Arnaud <denis.arnaud_fedora at m4x.org> - 1.8.1-4
- Rebuild for Boost-1.53.0
More information about the scm-commits
mailing list