fix several bugs so the game should actually run (cannot verify it 100% because I've no OpenGL support)
bump PORTREVISION
This commit is contained in:
parent
b860973799
commit
9f63af0cb0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=247539
6 changed files with 59 additions and 4 deletions
|
@ -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 \
|
||||
|
|
BIN
games/freeorion/files/GLX_icon.png
Normal file
BIN
games/freeorion/files/GLX_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
35
games/freeorion/files/patch-client-human-chmain.cpp
Normal file
35
games/freeorion/files/patch-client-human-chmain.cpp
Normal file
|
@ -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;
|
14
games/freeorion/files/patch-util-Directories.cpp
Normal file
14
games/freeorion/files/patch-util-Directories.cpp
Normal file
|
@ -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);
|
3
games/freeorion/files/resources.cfg
Normal file
3
games/freeorion/files/resources.cfg
Normal file
|
@ -0,0 +1,3 @@
|
|||
[General]
|
||||
FileSystem=.
|
||||
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue