aboutsummaryrefslogtreecommitdiff
path: root/games/freeorion/files
diff options
context:
space:
mode:
authorOliver Lehmann <oliver@FreeBSD.org>2010-01-10 18:10:04 +0000
committerOliver Lehmann <oliver@FreeBSD.org>2010-01-10 18:10:04 +0000
commit9f63af0cb015b265f6b6b525fe14cce650976b8d (patch)
tree3ff8277bc2c03ea1c5ed1392e1152959e5250029 /games/freeorion/files
parentb860973799da23c97e09c5781840ea1b60ea435a (diff)
downloadports-9f63af0cb015b265f6b6b525fe14cce650976b8d.tar.gz
ports-9f63af0cb015b265f6b6b525fe14cce650976b8d.zip
fix several bugs so the game should actually run (cannot verify it 100% because I've no OpenGL support)
bump PORTREVISION
Notes
Notes: svn path=/head/; revision=247539
Diffstat (limited to 'games/freeorion/files')
-rw-r--r--games/freeorion/files/GLX_icon.pngbin0 -> 1085 bytes
-rw-r--r--games/freeorion/files/patch-client-human-chmain.cpp35
-rw-r--r--games/freeorion/files/patch-util-Directories.cpp14
-rw-r--r--games/freeorion/files/resources.cfg3
4 files changed, 52 insertions, 0 deletions
diff --git a/games/freeorion/files/GLX_icon.png b/games/freeorion/files/GLX_icon.png
new file mode 100644
index 000000000000..a13699bedba7
--- /dev/null
+++ b/games/freeorion/files/GLX_icon.png
Binary files differ
diff --git a/games/freeorion/files/patch-client-human-chmain.cpp b/games/freeorion/files/patch-client-human-chmain.cpp
new file mode 100644
index 000000000000..104c37dcb070
--- /dev/null
+++ b/games/freeorion/files/patch-client-human-chmain.cpp
@@ -0,0 +1,35 @@
+--- client/human/chmain.cpp.orig 2010-01-10 17:21:20.000000000 +0100
++++ client/human/chmain.cpp 2010-01-10 17:18:12.000000000 +0100
+@@ -22,6 +22,7 @@
+ #include <OgreRoot.h>
+ #include <OgreSceneManager.h>
+ #include <OgreViewport.h>
++#include <OgreConfigFile.h>
+
+ #include <boost/lexical_cast.hpp>
+ #include <boost/format.hpp>
+@@ -172,6 +173,24 @@
+
+ root = new Root((GetRootDataDir() / "ogre_plugins.cfg").string());
+
++ Ogre::ConfigFile cf;
++ cf.load((GetRootDataDir() / "resources.cfg").file_string());
++
++ // Go through all sections & settings in the file
++ Ogre::ConfigFile::SectionIterator section_it = cf.getSectionIterator();
++ while (section_it.hasMoreElements()) {
++ Ogre::String section_name = section_it.peekNextKey();
++ Ogre::ConfigFile::SettingsMultiMap *settings = section_it.getNext();
++ for (Ogre::ConfigFile::SettingsMultiMap::iterator it = settings->begin();
++ it != settings->end();
++ ++it) {
++ Ogre::String type_name = it->first, path_name = it->second;
++ Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
++ (ClientUI::ArtDir() / path_name).file_string(),
++ type_name, section_name);
++ }
++ }
++
+ #if defined(OGRE_STATIC_LIB)
+ cg_plugin = new Ogre::CgPlugin;
+ octree_plugin = new Ogre::OctreePlugin;
diff --git a/games/freeorion/files/patch-util-Directories.cpp b/games/freeorion/files/patch-util-Directories.cpp
new file mode 100644
index 000000000000..52c1e736a552
--- /dev/null
+++ b/games/freeorion/files/patch-util-Directories.cpp
@@ -0,0 +1,14 @@
+--- util/Directories.cpp.orig 2010-01-10 18:41:05.000000000 +0100
++++ util/Directories.cpp 2010-01-10 18:47:22.000000000 +0100
+@@ -201,7 +201,10 @@
+ problem = true;
+ }
+
+- if (problem || !exists(bin_dir)) {
++ fs::path p(bin_dir);
++ p /= "freeorion";
++
++ if (problem || !exists(p)) {
+ // failed trying to parse the call path, so try hard-coded standard location...
+ char* dir_name = br_find_bin_dir("/usr/local/bin");
+ fs::path p(dir_name);
diff --git a/games/freeorion/files/resources.cfg b/games/freeorion/files/resources.cfg
new file mode 100644
index 000000000000..f96b8295ec38
--- /dev/null
+++ b/games/freeorion/files/resources.cfg
@@ -0,0 +1,3 @@
+[General]
+FileSystem=.
+