diff options
Diffstat (limited to 'games')
-rw-r--r-- | games/freeorion/Makefile | 9 | ||||
-rw-r--r-- | games/freeorion/files/GLX_icon.png | bin | 0 -> 1085 bytes | |||
-rw-r--r-- | games/freeorion/files/patch-client-human-chmain.cpp | 35 | ||||
-rw-r--r-- | games/freeorion/files/patch-util-Directories.cpp | 14 | ||||
-rw-r--r-- | games/freeorion/files/resources.cfg | 3 | ||||
-rw-r--r-- | games/freeorion/pkg-plist | 2 |
6 files changed, 59 insertions, 4 deletions
diff --git a/games/freeorion/Makefile b/games/freeorion/Makefile index 9b1ac73e0756..f23488a17069 100644 --- a/games/freeorion/Makefile +++ b/games/freeorion/Makefile @@ -7,6 +7,7 @@ PORTNAME= freeorion PORTVERSION= 0.3.13.3318 +PORTREVISION= 1 CATEGORIES= games MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= oliver @@ -38,20 +39,20 @@ SCONS_ARGS+= release=yes .endif post-patch: - @${REINPLACE_CMD} -e 's|ND_coord_i|ND_coord|g' \ - ${WRKSRC}/UI/TechTreeWnd.cpp - @${REINPLACE_CMD} -e 's|"OISInput.cfg"|"${DATADIR}/OISInput.cfg"|g' \ - ${WRKSRC}/client/human/HumanClientApp.cpp @${REINPLACE_CMD} -e 's|Plugin=Plugin_CgProgramManager|#&|g; \ s|\(PluginFolder=\)\.|\1${LOCALBASE}/lib/OGRE|g' \ ${WRKSRC}/ogre_plugins.cfg @${REINPLACE_CMD} -e 's|\(prefix.*\)/usr/local|\1${PREFIX}|g; \ s|/usr/local/lib/OGRE|${LOCALBASE}/lib/OGRE|g' \ ${WRKSRC}/SConstruct + @${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' \ + ${WRKSRC}/util/Directories.cpp post-install: ${INSTALL_DATA} ${WRKSRC}/ogre_plugins.cfg ${DATADIR} ${INSTALL_DATA} ${WRKSRC}/OISInput.cfg ${DATADIR} + ${INSTALL_DATA} ${FILESDIR}/resources.cfg ${DATADIR} + ${INSTALL_DATA} ${FILESDIR}/GLX_icon.png ${DATADIR}/default/data/art maint-gen-distfile: @if [ -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \ diff --git a/games/freeorion/files/GLX_icon.png b/games/freeorion/files/GLX_icon.png Binary files differnew file mode 100644 index 000000000000..a13699bedba7 --- /dev/null +++ b/games/freeorion/files/GLX_icon.png 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=. + diff --git a/games/freeorion/pkg-plist b/games/freeorion/pkg-plist index 517af1635515..9ed25e4dea5e 100644 --- a/games/freeorion/pkg-plist +++ b/games/freeorion/pkg-plist @@ -26,6 +26,7 @@ bin/freeoriond %%DATADIR%%/default/LICENSE.DejaVu %%DATADIR%%/default/buildings.txt %%DATADIR%%/default/credits.xml +%%DATADIR%%/default/data/art/GLX_icon.png %%DATADIR%%/default/data/art/arrows.png %%DATADIR%%/default/data/art/combat/backgrounds/blackhole01back.png %%DATADIR%%/default/data/art/combat/backgrounds/blackhole01big_spark.png @@ -1554,6 +1555,7 @@ bin/freeoriond %%DATADIR%%/default/techs.txt %%DATADIR%%/default/universe_tables.txt %%DATADIR%%/ogre_plugins.cfg +%%DATADIR%%/resources.cfg %%DATADIR%%/OISInput.cfg @dirrm %%DATADIR%%/default/AI @dirrm %%DATADIR%%/default/data/art/stars_sidepanel |