diff options
author | Michael Sterrett <mr_bones_@gentoo.org> | 2009-07-11 00:36:40 +0000 |
---|---|---|
committer | Michael Sterrett <mr_bones_@gentoo.org> | 2009-07-11 00:36:40 +0000 |
commit | 42b50e3bc5f4b723580ab913e8ca85f2bbdc1591 (patch) | |
tree | 4b9332a9453465631a628825d644aa4cb4d6ee6a /games-strategy | |
parent | Marked stable on AMD64 for bug #277103; tested on a dual Opteron 2354. (diff) | |
download | historical-42b50e3bc5f4b723580ab913e8ca85f2bbdc1591.tar.gz historical-42b50e3bc5f4b723580ab913e8ca85f2bbdc1591.tar.bz2 historical-42b50e3bc5f4b723580ab913e8ca85f2bbdc1591.zip |
version bump (bug #259701 with submissions from yury fedorchenko); clean old
Package-Manager: portage-2.1.6.13/cvs/Linux i686
Diffstat (limited to 'games-strategy')
-rw-r--r-- | games-strategy/glest/ChangeLog | 10 | ||||
-rw-r--r-- | games-strategy/glest/Manifest | 21 | ||||
-rw-r--r-- | games-strategy/glest/files/glest-3.1.2-gcc43.patch | 31 | ||||
-rw-r--r-- | games-strategy/glest/files/glest-3.1.2-home.patch | 166 | ||||
-rw-r--r-- | games-strategy/glest/files/glest-3.2.2-gentoo.patch | 151 | ||||
-rw-r--r-- | games-strategy/glest/files/glest-3.2.2-xerces-c.patch | 49 | ||||
-rw-r--r-- | games-strategy/glest/glest-3.1.2.ebuild | 106 | ||||
-rw-r--r-- | games-strategy/glest/glest-3.2.2.ebuild | 85 | ||||
-rw-r--r-- | games-strategy/glest/metadata.xml | 3 |
9 files changed, 304 insertions, 318 deletions
diff --git a/games-strategy/glest/ChangeLog b/games-strategy/glest/ChangeLog index 139d2f4866d1..fda01bd00981 100644 --- a/games-strategy/glest/ChangeLog +++ b/games-strategy/glest/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for games-strategy/glest # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-strategy/glest/ChangeLog,v 1.22 2009/01/22 18:53:35 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-strategy/glest/ChangeLog,v 1.23 2009/07/11 00:36:39 mr_bones_ Exp $ + +*glest-3.2.2 (11 Jul 2009) + + 11 Jul 2009; Michael Sterrett <mr_bones_@gentoo.org> + -files/glest-3.1.2-gcc43.patch, -files/glest-3.1.2-home.patch, + +files/glest-3.2.2-gentoo.patch, +files/glest-3.2.2-xerces-c.patch, + -glest-3.1.2.ebuild, +glest-3.2.2.ebuild: + version bump (bug #259701 with submissions from yury fedorchenko); clean old 22 Jan 2009; Michael Sterrett <mr_bones_@gentoo.org> glest-3.1.2.ebuild: transition to the non-no* use flags in libsdl diff --git a/games-strategy/glest/Manifest b/games-strategy/glest/Manifest index 374828d89599..fe121399dedd 100644 --- a/games-strategy/glest/Manifest +++ b/games-strategy/glest/Manifest @@ -1,14 +1,7 @@ -AUX glest-3.1.2-gcc43.patch 883 RMD160 ca0b51c17ed29d27823638d9ceb4ed55d177f319 SHA1 3cfeb8229133bdfa4304176b7000ee88c8959e46 SHA256 f88dffb9edce23959ffb51b7ed16722305fae8422703331fc68dce0c90f4e772 -AUX glest-3.1.2-home.patch 5222 RMD160 b8dec68ae737540b2f03782112929729975f0e5a SHA1 e87bd8888e2a5fdb0058ba1e6a321d7c3a1f8100 SHA256 88a9a0ad1bf8e09e1db5cd10269c34bdb17acd9d8b9e67db3b65d171ab4a100e -DIST brazilian_3.1.2.zip 2038 RMD160 bae5ac013bc3ebb168e54611b7b05ae708cc4976 SHA1 a581864eef2e9e98252d0995bebee7a640e73ac4 SHA256 aac469c4c146932cfe7a57ee58c7cbe3ed243a140c862dd03e6affe718e7a235 -DIST cesky_3.1.2.zip 2032 RMD160 bba4b7ce9056c11eea6e172f32d2b0272e5d751c SHA1 42e510cecf8d529ed21866fe7240cf79503c5614 SHA256 e24031c6e2a1814f791fff9fcbec833daf75a660b05d46f4afa2e6d3c6cfae19 -DIST german_3.1.2.zip 2002 RMD160 43c951732917df7dc1a80bf076b76ebcb9045774 SHA1 e552b0aaa4f100148d14a97cf8300d3c8e77ec6d SHA256 1a1da43468fae8f6e7634023ef955710aeee12192c936502405d82a11d355d91 -DIST glest-source-3.1.2.tar.bz2 388086 RMD160 42d5ffc067d485bf9ec2800b78d7b8bbdc48e82f SHA1 62be30fb94044b55efcdd1ec2bd7d0149c594645 SHA256 bc96a78dd86f240568d230fd4dd6b69bca8922ba673b4d1138e09d1ad88fbfdf -DIST glest_data_3.1.2.zip 65751462 RMD160 341ad201dbd9cb4c54eb4e66584c1c09d8bbaa85 SHA1 ef81767d27baa5639de64efc5569c95762af866a SHA256 2b35b1cfe7af2513c6c18ef2ab5b27b8334bb6558def92eef4ad48a99cea7a59 -DIST magyar_3.1.2.zip 2157 RMD160 dcad31162dd0ff72410baba8ade790534d28b93f SHA1 0e88266abd8e23eb067ebd92963a46d6dfaa98b7 SHA256 9c1d7c913756c85669bba3729c8d94dc38ef9fafdd188193e1bd1bc349654937 -DIST norsk_3.1.2.zip 2023 RMD160 c0216a3cc3d7f8e2f8b6c096ca997dd2078256ff SHA1 c6fe059cda2c118a8701643e9a611681a15406b6 SHA256 2ac6c6b154f4680c83a4adaf21604b7eaa01f6c9aa4214c5f09e067fe5c7905b -DIST russian_3.1.2.zip 1377 RMD160 526a2b2b80cd6aa5eac75222c1fa8f78eac80d64 SHA1 2a1162253614af5353b5c8f78e919d50c2369dde SHA256 16b40e46f3c84d8c94ae5174997ff9e3038a31b0934e4d930697ac499cc2022c -DIST turkish_3.1.2.zip 2137 RMD160 ca1842fb3d53118c2841f7ded3b24e97a395b7f8 SHA1 cf3dc8b51786a53e5f4c9f00db190e4ee9a7fe64 SHA256 3be22f0f20a1412cbd771fde6858557e4944db09c1974a1238e7ecc987d1d5c0 -EBUILD glest-3.1.2.ebuild 2963 RMD160 81c03ac311a1df34c6284b8aec1d2ad09858b7ef SHA1 72b92912234fd951686923941c14531c2603cbd8 SHA256 0f684710524dcb02542d4ebb765ee79f974e1047404f50b9be2a20de3c42739f -MISC ChangeLog 3568 RMD160 7e48f1fd2dc6508b28c0eb8c8007155c13250762 SHA1 6d3e5de2423b2c19b6c360bcd0b8c5c5a736f81a SHA256 13a263516aa4cde83118ed4cdd54856bb76846174f92485ed097f613d10e4b35 -MISC metadata.xml 158 RMD160 cbd9984bb6b426c8c9cee5022fe0a26261612fea SHA1 be5251fa1dacef5c41b74761bb1c8c54fb633b9e SHA256 1423a4fdd4a79b1728a2056d9e300f7e1074253095d82726218d9e9b953888a3 +AUX glest-3.2.2-gentoo.patch 5799 RMD160 bd57040ecd43a6cfdb367823c196a69b59d64d72 SHA1 1171e26afe5f3222c30337e3374ec23491022320 SHA256 716716edeb2fc9e337321ef04b4f36c04f76d73f0969dfb2788a6105eaa77e3c +AUX glest-3.2.2-xerces-c.patch 2315 RMD160 a49e2af20274463e0bed6bc28af32c7e336cde0a SHA1 7395927343d88f4a41079b238d01c41a56f13ddd SHA256 aa79bf11f8d41a88f74404426efc9659f32c663d0457a458d3303a941c8884db +DIST glest-source-3.2.2.tar.bz2 364660 RMD160 ae517989f836474251599b9e6633b7be0890ebf9 SHA1 19660b3aac5e220ab2a0cfb48509ba43046eeef2 SHA256 c8d83117f5cf1108cd981a3b70a8d9e70ef0fd3dc1045d25fb9dad5c70928d31 +DIST glest_data_3.2.1.zip 69967380 RMD160 da701fc468a0b7d07a161c13bd981994f9bbadc2 SHA1 44db6f004080dadda6d167ee12300740af95e920 SHA256 5a0660ed103a93d641397980c1e4860d5a0cfcd166256d3f8f6a28c13b457bf1 +EBUILD glest-3.2.2.ebuild 2142 RMD160 1ab383f793de66ae9e645d96cbbaf77fd087d3c9 SHA1 92f83e5298a3d7a0da0780a46dfbdc58c57f3f81 SHA256 3b6270500eaaeec52836ee71cb33214256e2c40f6f16182d7ef557882f44506a +MISC ChangeLog 3910 RMD160 14a81e0d020b4567be1300cfc72a1bef4f588e5b SHA1 7fb9f92ffabeb62e670065a05d458afb0186947c SHA256 175749110a0a0365564826ada842a0fa32d2833b73eb0189aa16ffefb5699edb +MISC metadata.xml 234 RMD160 b09018c0da39b6d254b90c670ef2b3f0840bd268 SHA1 75479a33f4392ebea31076dad0df0996a20fffd6 SHA256 ece9d2567a15234ed14597c3e250fa5598ebb4fc7b8bd55a3b8d37a3421936ec diff --git a/games-strategy/glest/files/glest-3.1.2-gcc43.patch b/games-strategy/glest/files/glest-3.1.2-gcc43.patch deleted file mode 100644 index 425aa6f9ff4c..000000000000 --- a/games-strategy/glest/files/glest-3.1.2-gcc43.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- shared_lib/sources/platform/posix/socket.cpp.old 2008-10-19 13:45:33.000000000 +0200 -+++ shared_lib/sources/platform/posix/socket.cpp 2008-10-19 13:48:42.000000000 +0200 -@@ -8,6 +8,8 @@ - - #include "socket.h" - -+#include <stdlib.h> -+#include <string.h> - #include <stdexcept> - #include <sstream> - #if defined(HAVE_SYS_IOCTL_H) ---- shared_lib/sources/util/conversion.cpp.old 2008-10-19 14:12:55.000000000 +0200 -+++ shared_lib/sources/util/conversion.cpp 2008-10-19 14:13:49.000000000 +0200 -@@ -13,6 +13,7 @@ - - #include <stdexcept> - #include <cstdio> -+#include <stdlib.h> - - #include "leak_dumper.h" - ---- shared_lib/sources/util/util.cpp.old 2008-10-19 14:20:17.000000000 +0200 -+++ shared_lib/sources/util/util.cpp 2008-10-19 14:21:07.000000000 +0200 -@@ -14,6 +14,7 @@ - #include <ctime> - #include <cassert> - #include <stdexcept> -+#include <string.h> - - #include "leak_dumper.h" - diff --git a/games-strategy/glest/files/glest-3.1.2-home.patch b/games-strategy/glest/files/glest-3.1.2-home.patch deleted file mode 100644 index df0351f05853..000000000000 --- a/games-strategy/glest/files/glest-3.1.2-home.patch +++ /dev/null @@ -1,166 +0,0 @@ ---- glest_game/ai/ai_interface.cpp.old 2008-10-20 22:06:57.000000000 +0200 -+++ glest_game/ai/ai_interface.cpp 2008-10-20 22:09:19.000000000 +0200 -@@ -48,7 +48,9 @@ - - //clear log file - if(logLevel>0){ -- FILE *f= fopen(getLogFilename().c_str(), "wt"); -+ char path[PATH_MAX]; -+ snprintf(path, PATH_MAX, "%s/.glest/%s", getenv("HOME"), getLogFilename().c_str()); -+ FILE *f= fopen(path, "wt"); - if(f==NULL){ - throw runtime_error("Can't open file: "+getLogFilename()); - } -@@ -71,7 +73,9 @@ - string logString= "(" + intToStr(factionIndex) + ") " + s; - - //print log to file -- FILE *f= fopen(getLogFilename().c_str(), "at"); -+ char path[PATH_MAX]; -+ snprintf(path, PATH_MAX, "%s/.glest/%s", getenv("HOME"), getLogFilename().c_str()); -+ FILE *f= fopen(path, "at"); - if(f==NULL){ - throw runtime_error("Can't open file: "+getLogFilename()); - } ---- glest_game/game/game.cpp.old 2008-10-19 14:28:24.000000000 +0200 -+++ glest_game/game/game.cpp 2008-10-19 14:28:51.000000000 +0200 -@@ -11,6 +11,8 @@ - - #include "game.h" - -+#include <limits.h> -+ - #include "config.h" - #include "renderer.h" - #include "particle_renderer.h" -@@ -400,9 +400,10 @@ - } - else if(key=='E'){ - for(int i=0; i<100; ++i){ -- string path= "screens/screen" + intToStr(i) + ".tga"; -+ char path[PATH_MAX]; -+ snprintf(path, PATH_MAX, "%s/.glest/screens/screen%d.tga", getenv("HOME"), i); - -- FILE *f= fopen(path.c_str(), "rb"); -+ FILE *f= fopen(path, "rb"); - if(f==NULL){ - Renderer::getInstance().saveScreen(path); - break; ---- glest_game/main/main.cpp.old 2008-10-18 22:03:33.000000000 +0200 -+++ glest_game/main/main.cpp 2008-10-18 22:05:22.000000000 +0200 -@@ -13,6 +13,7 @@ - - #include <string> - #include <cstdlib> -+#include <sys/stat.h> - - #include "game.h" - #include "main_menu.h" -@@ -38,7 +38,9 @@ - class ExceptionHandler: public PlatformExceptionHandler{ - public: - virtual void handle(string description, void *address){ -- FILE *f= fopen("crash.txt", "at"); -+ char path[PATH_MAX]; -+ snprintf(path, PATH_MAX, "%s/.glest/crash.txt", getenv("HOME")); -+ FILE *f= fopen(path, "at"); - if(f!=NULL){ - time_t t= time(NULL); - char *timeString= asctime(localtime(&t)); -@@ -130,6 +130,17 @@ - // ===================================================== - - int glestMain(int argc, char** argv){ -+ if (!getenv("HOME")) -+ throw runtime_error("HOME external variable is not set"); -+ -+ char path[PATH_MAX]; -+ snprintf(path, PATH_MAX, "%s/.glest", getenv("HOME")); -+ mkdir(path, 0750); -+ -+ snprintf(path, PATH_MAX, "%s/.glest/screens", getenv("HOME")); -+ mkdir(path, 0750); -+ -+ chdir("@GENTOO_DATADIR@"); - - MainWindow *mainWindow= NULL; - Program *program= NULL; ---- glest_game/main/program.cpp.old 2008-10-20 22:11:29.000000000 +0200 -+++ glest_game/main/program.cpp 2008-10-20 22:12:16.000000000 +0200 -@@ -197,8 +197,10 @@ - updateCameraTimer.init(GameConstants::cameraFps, maxTimes); - - //log start -+ char path[PATH_MAX]; -+ snprintf(path, PATH_MAX, "%s/.glest/glest.log", getenv("HOME")); - Logger &logger= Logger::getInstance(); -- logger.setFile("glest.log"); -+ logger.setFile(path); - logger.clear(); - - //lang ---- shared_lib/sources/util/leak_dumper.cpp.old 2008-10-21 22:35:33.000000000 +0200 -+++ shared_lib/sources/util/leak_dumper.cpp 2008-10-21 22:36:28.000000000 +0200 -@@ -52,7 +52,9 @@ - } - - AllocRegistry::~AllocRegistry(){ -- dump("leak_dump.log"); -+ char path[PATH_MAX]; -+ snprintf(path, PATH_MAX, "%s/.glest/leak_dump.log", getenv("HOME")); -+ dump(path); - } - - void AllocRegistry::allocate(AllocInfo info){ ---- shared_lib/sources/util/properties.cpp.old 2008-10-19 14:37:19.000000000 +0200 -+++ shared_lib/sources/util/properties.cpp 2008-10-19 14:37:49.000000000 +0200 -@@ -13,6 +13,9 @@ - - #include <fstream> - #include <stdexcept> -+#include <limits.h> -+#include <stdlib.h> -+#include <string.h> - - #include "conversion.h" - #include "leak_dumper.h" -@@ -33,9 +33,13 @@ - - this->path= path; - -- fileStream.open(path.c_str(), ios_base::in); -+ char str[PATH_MAX]; -+ snprintf(str, PATH_MAX, "%s/.glest/%s", getenv("HOME"), path.c_str()); -+ fileStream.open(str, ios_base::in); - if(fileStream.fail()){ -- throw runtime_error("Can't open propertyMap file: " + path); -+ fileStream.open(path.c_str(), ios_base::in); // use defaults -+ if(fileStream.fail()) -+ throw runtime_error("Can't open propertyMap file: " + path); - } - - propertyMap.clear(); -@@ -71,7 +75,9 @@ - void Properties::save(const string &path){ - ofstream fileStream; - -- fileStream.open(path.c_str(), ios_base::out | ios_base::trunc); -+ char str[PATH_MAX]; -+ snprintf(str, PATH_MAX, "%s/.glest/%s", getenv("HOME"), path.c_str()); -+ fileStream.open(str, ios_base::out | ios_base::trunc); - - fileStream << "; === propertyMap File === \n"; - fileStream << '\n'; ---- shared_lib/sources/util/profiler.cpp.old 2008-10-21 22:38:11.000000000 +0200 -+++ shared_lib/sources/util/profiler.cpp 2008-10-21 22:38:50.000000000 +0200 -@@ -71,7 +71,9 @@ - Profiler::~Profiler(){ - rootSection->stop(); - -- FILE *f= fopen("profiler.log", "w"); -+ char path[PATH_MAX]; -+ snprintf(path, PATH_MAX, "%s/.glest/profiler.log", getenv("HOME")); -+ FILE *f= fopen(path, "w"); - if(f==NULL) - throw runtime_error("Can not open file: profiler.log"); - diff --git a/games-strategy/glest/files/glest-3.2.2-gentoo.patch b/games-strategy/glest/files/glest-3.2.2-gentoo.patch new file mode 100644 index 000000000000..633fe37355c7 --- /dev/null +++ b/games-strategy/glest/files/glest-3.2.2-gentoo.patch @@ -0,0 +1,151 @@ +diff -urN glest-source-3.2.2/glest_game/ai/ai_interface.h glest-source-3.2.2_mod/glest_game/ai/ai_interface.h +--- glest-source-3.2.2/glest_game/ai/ai_interface.h 2009-04-15 11:17:19.000000000 +0400 ++++ glest-source-3.2.2_mod/glest_game/ai/ai_interface.h 2009-04-15 12:25:04.000000000 +0400 +@@ -84,7 +84,11 @@ + bool isFreeCells(const Vec2i &pos, int size, Field field);
+
+ private:
+- string getLogFilename() const {return "ai"+intToStr(factionIndex)+".log";}
++ string getLogFilename() const { ++ string logfn=getenv("HOME"); ++ logfn+="/.glest/ai"+intToStr(factionIndex)+".log"; ++ return logfn; ++ }
+ };
+
+ }}//end namespace
+diff -urN glest-source-3.2.2/glest_game/ai/ai_rule.cpp glest-source-3.2.2_mod/glest_game/ai/ai_rule.cpp +--- glest-source-3.2.2/glest_game/ai/ai_rule.cpp 2009-04-15 11:17:19.000000000 +0400 ++++ glest-source-3.2.2_mod/glest_game/ai/ai_rule.cpp 2009-04-15 11:19:02.000000000 +0400 +@@ -17,6 +17,8 @@ + #include "unit.h" + #include "leak_dumper.h" + ++#include <limits.h> ++ + using Shared::Graphics::Vec2i; + + namespace Glest{ namespace Game{ +diff -urN glest-source-3.2.2/glest_game/game/game.cpp glest-source-3.2.2_mod/glest_game/game/game.cpp +--- glest-source-3.2.2/glest_game/game/game.cpp 2009-04-15 11:17:19.000000000 +0400 ++++ glest-source-3.2.2_mod/glest_game/game/game.cpp 2009-04-15 12:21:29.000000000 +0400 +@@ -443,7 +443,8 @@ + } + else if(key=='E'){ + for(int i=0; i<100; ++i){ +- string path= "screens/screen" + intToStr(i) + ".tga"; ++ string path=getenv("HOME"); ++ path+="/.glest/screens/screen" + intToStr(i) + ".tga"; + + FILE *f= fopen(path.c_str(), "rb"); + if(f==NULL){ +diff -urN glest-source-3.2.2/glest_game/main/main.cpp glest-source-3.2.2_mod/glest_game/main/main.cpp +--- glest-source-3.2.2/glest_game/main/main.cpp 2009-04-15 11:17:19.000000000 +0400 ++++ glest-source-3.2.2_mod/glest_game/main/main.cpp 2009-04-15 12:32:04.000000000 +0400 +@@ -114,6 +114,17 @@ + // ===================================================== + + int glestMain(int argc, char** argv){ ++ if (!getenv("HOME")) ++ throw runtime_error("HOME external variable is not set"); ++ ++ char path[PATH_MAX]; ++ snprintf(path, PATH_MAX, "%s/.glest", getenv("HOME")); ++ mkdir(path, 0750); ++ ++ snprintf(path, PATH_MAX, "%s/.glest/screens", getenv("HOME")); ++ mkdir(path, 0750); ++ ++ chdir("@GENTOO_DATADIR@"); + + MainWindow *mainWindow= NULL; + Program *program= NULL; +diff -urN glest-source-3.2.2/glest_game/main/program.cpp glest-source-3.2.2_mod/glest_game/main/program.cpp +--- glest-source-3.2.2/glest_game/main/program.cpp 2009-04-15 11:17:19.000000000 +0400 ++++ glest-source-3.2.2_mod/glest_game/main/program.cpp 2009-04-15 12:11:51.000000000 +0400 +@@ -196,9 +196,11 @@ + updateTimer.init(GameConstants::updateFps, maxTimes); + updateCameraTimer.init(GameConstants::cameraFps, maxTimes); + +- //log start +- Logger &logger= Logger::getInstance(); +- logger.setFile("glest.log"); ++ //log start ++ char path[PATH_MAX]; ++ snprintf(path, PATH_MAX, "%s/.glest/glest.log", getenv("HOME")); ++ Logger &logger= Logger::getInstance(); ++ logger.setFile(path); + logger.clear(); + + //lang +diff -urN glest-source-3.2.2/shared_lib/sources/util/leak_dumper.cpp glest-source-3.2.2_mod/shared_lib/sources/util/leak_dumper.cpp +--- glest-source-3.2.2/shared_lib/sources/util/leak_dumper.cpp 2009-04-15 11:17:19.000000000 +0400 ++++ glest-source-3.2.2_mod/shared_lib/sources/util/leak_dumper.cpp 2009-04-15 12:04:49.000000000 +0400 +@@ -52,7 +52,9 @@ + } + + AllocRegistry::~AllocRegistry(){ +- dump("leak_dump.log"); ++ char path[PATH_MAX]; ++ snprintf(path, PATH_MAX, "%s/.glest/leak_dump.log", getenv("HOME")); ++ dump(path); + } + + void AllocRegistry::allocate(AllocInfo info){ +diff -urN glest-source-3.2.2/shared_lib/sources/util/profiler.cpp glest-source-3.2.2_mod/shared_lib/sources/util/profiler.cpp +--- glest-source-3.2.2/shared_lib/sources/util/profiler.cpp 2009-04-15 11:17:19.000000000 +0400 ++++ glest-source-3.2.2_mod/shared_lib/sources/util/profiler.cpp 2009-04-15 12:01:52.000000000 +0400 +@@ -71,9 +71,11 @@ + Profiler::~Profiler(){ + rootSection->stop(); + +- FILE *f= fopen("profiler.log", "w"); ++ char path[PATH_MAX]; ++ snprintf(path, PATH_MAX, "%s/.glest/profiler.log", getenv("HOME")); ++ FILE *f= fopen(path, "w"); + if(f==NULL) +- throw runtime_error("Can not open file: profiler.log"); ++ throw runtime_error("Can not open file: %s",path); + + fprintf(f, "Profiler Results\n\n"); + +diff -urN glest-source-3.2.2/shared_lib/sources/util/properties.cpp glest-source-3.2.2_mod/shared_lib/sources/util/properties.cpp +--- glest-source-3.2.2/shared_lib/sources/util/properties.cpp 2009-04-15 11:17:19.000000000 +0400 ++++ glest-source-3.2.2_mod/shared_lib/sources/util/properties.cpp 2009-04-15 13:09:33.000000000 +0400 +@@ -15,6 +15,9 @@ + #include <stdexcept> + #include <cstring> + ++#include <limits.h> ++#include <stdlib.h> ++ + #include "conversion.h" + #include "leak_dumper.h" + +@@ -34,9 +37,13 @@ + + this->path= path; + +- fileStream.open(path.c_str(), ios_base::in); ++ char str[PATH_MAX]; ++ snprintf(str, PATH_MAX, "%s/.glest/%s", getenv("HOME"), path.c_str()); ++ fileStream.open(str, ios_base::in); + if(fileStream.fail()){ +- throw runtime_error("Can't open propertyMap file: " + path); ++ fileStream.open(path.c_str(), ios_base::in); // use defaults ++ if(fileStream.fail()) ++ throw runtime_error("Can't open propertyMap file: " + path + " cwd: "+ getenv("PWD")); + } + + propertyMap.clear(); +@@ -71,7 +78,9 @@ + void Properties::save(const string &path){ + ofstream fileStream; + +- fileStream.open(path.c_str(), ios_base::out | ios_base::trunc); ++ char str[PATH_MAX]; ++ snprintf(str, PATH_MAX, "%s/.glest/%s", getenv("HOME"), path.c_str()); ++ fileStream.open(str, ios_base::out | ios_base::trunc); + + fileStream << "; === propertyMap File === \n"; + fileStream << '\n'; diff --git a/games-strategy/glest/files/glest-3.2.2-xerces-c.patch b/games-strategy/glest/files/glest-3.2.2-xerces-c.patch new file mode 100644 index 000000000000..98e9f400d416 --- /dev/null +++ b/games-strategy/glest/files/glest-3.2.2-xerces-c.patch @@ -0,0 +1,49 @@ +diff -urN glest-source-3.2.1/shared_lib/sources/xml/xml_parser.cpp glest-source-3.2.1.mod/shared_lib/sources/xml/xml_parser.cpp +--- glest-source-3.2.1/shared_lib/sources/xml/xml_parser.cpp 2009-02-13 18:52:25.000000000 +0300 ++++ glest-source-3.2.1.mod/shared_lib/sources/xml/xml_parser.cpp 2009-04-15 11:13:46.000000000 +0400 +@@ -87,10 +87,17 @@ + + try{ + ErrorHandler errorHandler; +- DOMBuilder *parser= (static_cast<DOMImplementationLS*>(implementation))->createDOMBuilder(DOMImplementationLS::MODE_SYNCHRONOUS, 0); +- parser->setErrorHandler(&errorHandler); +- parser->setFeature(XMLUni::fgXercesSchemaFullChecking, true); +- parser->setFeature(XMLUni::fgDOMValidation, true); ++#if XERCES_VERSION_MAJOR < 3 ++ DOMBuilder *parser= (static_cast<DOMImplementationLS*>(implementation))->createDOMBuilder(DOMImplementationLS::MODE_SYNCHRONOUS, 0); ++ parser->setErrorHandler(&errorHandler); ++ parser->setFeature(XMLUni::fgXercesSchemaFullChecking, true); ++ parser->setFeature(XMLUni::fgDOMValidation, true); ++#else ++ DOMLSParser *parser = (static_cast<DOMImplementationLS*>(implementation))->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS, 0); ++ DOMConfiguration *config = parser->getDomConfig(); ++ config->setParameter(XMLUni::fgXercesSchemaFullChecking, true); ++ config->setParameter(XMLUni::fgDOMValidate, true); ++#endif + DOMDocument *document= parser->parseURI(path.c_str()); + + if(document==NULL){ +@@ -119,9 +126,20 @@ + } + + LocalFileFormatTarget file(path.c_str()); +- DOMWriter* writer = implementation->createDOMWriter(); +- writer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true); +- writer->writeNode(&file, *document); ++#if XERCES_VERSION_MAJOR < 3 ++ DOMWriter* writer = implementation->createDOMWriter(); ++ writer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true); ++ writer->writeNode(&file, *document); ++#else ++ DOMLSSerializer *serializer = implementation->createLSSerializer(); ++ DOMLSOutput* output=implementation->createLSOutput(); ++ DOMConfiguration* config=serializer->getDomConfig(); ++ config->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint,true); ++ output->setByteStream(&file); ++ serializer->write(document,output); ++ output->release(); ++ serializer->release(); ++#endif + document->release(); + } + catch(const DOMException &e){ diff --git a/games-strategy/glest/glest-3.1.2.ebuild b/games-strategy/glest/glest-3.1.2.ebuild deleted file mode 100644 index d65a042d74a5..000000000000 --- a/games-strategy/glest/glest-3.1.2.ebuild +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-strategy/glest/glest-3.1.2.ebuild,v 1.5 2009/01/22 18:53:35 mr_bones_ Exp $ - -EAPI=2 -inherit autotools eutils games - -L_URI="http://www.glest.org/files/contrib/translations" -DESCRIPTION="Cross-platform 3D realtime strategy game" -HOMEPAGE="http://www.glest.org/" -SRC_URI="mirror://sourceforge/${PN}/${PN}-source-${PV}.tar.bz2 - mirror://sourceforge/${PN}/${PN}_data_${PV}.zip - linguas_pt_BR? ( ${L_URI}/brazilian_${PV}.zip ) - linguas_cs? ( ${L_URI}/cesky_${PV}.zip ) - linguas_de? ( ${L_URI}/german_${PV}.zip ) - linguas_hu? ( ${L_URI}/magyar_${PV}.zip ) - linguas_no? ( ${L_URI}/norsk_${PV}.zip ) - linguas_ru? ( ${L_URI}/russian_${PV}.zip ) - linguas_tr? ( ${L_URI}/turkish_${PV}.zip )" - -LICENSE="GPL-2 glest-data" -SLOT="0" -KEYWORDS="~amd64 -ppc ~x86" # ppc: bug #145478 -IUSE="linguas_pt_BR linguas_cs linguas_de linguas_hu linguas_no linguas_ru -linguas_tr" - -RDEPEND="|| ( media-libs/libsdl[joystick] <media-libs/libsdl-1.2.13-r1 ) - media-libs/libogg - media-libs/libvorbis - media-libs/openal - <dev-libs/xerces-c-3 - virtual/opengl - virtual/glu - x11-libs/libX11 - media-fonts/font-adobe-utopia-75dpi" -DEPEND="${RDEPEND} - app-arch/unzip - dev-util/ftjam" - -S="${WORKDIR}"/${PN}-source-${PV} - -GAMES_USE_SDL="nojoystick" - -src_prepare() { - epatch \ - "${FILESDIR}"/${P}-{home,gcc43}.patch - - sed -i \ - -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}/${PN}:" \ - glest_game/main/main.cpp \ - || die "sed main.cpp failed" - - # sometimes they package configure, sometimes they don't - if [[ ! -f configure ]] ; then - chmod a+x autogen.sh - ./autogen.sh || die "autogen failed" # FIXME: use autotools.eclass - fi - - sed -i 's:-O3 -g3::' Jamrules || die "sed Jamrules failed" -} - -src_configure() { - # Fails with wx enabled, bug #130011 - egamesconf \ - --with-vorbis=/usr \ - --with-ogg=/usr \ - --with-wx-config=disabled_wx -} - -src_compile() { - jam -q || die "jam failed" -} - -src_install() { - dogamesbin glest || die "dogamesbin glest failed" - - insinto "${GAMES_DATADIR}"/${PN} - doins glest.ini || die "doins glest.ini failed" - dodoc README.linux || die "dodoc README.linux failed" - - cd "${WORKDIR}"/glest_game - doins -r servers.ini \ - glest_irc.url \ - glest_web.url \ - data maps scenarios techs tilesets || die "doins data failed" - dodoc docs/readme.txt || die "dodoc docs/readme.txt failed" - - newicon techs/magitech/factions/magic/units/archmage/images/archmage.bmp \ - ${PN}.bmp - make_desktop_entry glest Glest /usr/share/pixmaps/${PN}.bmp - - dolang() { - insinto "${GAMES_DATADIR}"/${PN}/data/lang - doins "${WORKDIR}"/${1} || die "doins ${1} failed" - } - - use linguas_pt_BR && dolang brazilian_${PV}.lng - use linguas_cs && dolang cesky.lng - use linguas_de && dolang german.lng - use linguas_hu && dolang magyar.lng - use linguas_no && dolang norsk.lng - use linguas_ru && dolang russian.lng - use linguas_tr && dolang turkish.lng - - prepgamesdirs -} diff --git a/games-strategy/glest/glest-3.2.2.ebuild b/games-strategy/glest/glest-3.2.2.ebuild new file mode 100644 index 000000000000..e9f6680e85c1 --- /dev/null +++ b/games-strategy/glest/glest-3.2.2.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-strategy/glest/glest-3.2.2.ebuild,v 1.1 2009/07/11 00:36:39 mr_bones_ Exp $ + +EAPI=2 +inherit eutils games + +DESCRIPTION="Cross-platform 3D realtime strategy game" +HOMEPAGE="http://www.glest.org/" +SRC_URI="http://www.titusgames.de/${PN}-source-${PV}.tar.bz2 + mirror://sourceforge/glest/${PN}_data_3.2.1.zip" + +LICENSE="GPL-2 glest-data" +SLOT="0" +KEYWORDS="~amd64 -ppc ~x86" # ppc: bug #145478 +IUSE="editor" + +RDEPEND="media-libs/libsdl[joystick,video] + media-libs/libogg + media-libs/libvorbis + media-libs/openal + || ( >=dev-libs/xerces-c-3[icu] >=dev-libs/xerces-c-3[-icu,-iconv] ) + virtual/opengl + virtual/glu + dev-lang/lua + x11-libs/libX11 + editor? ( x11-libs/wxGTK )" +DEPEND="${RDEPEND} + app-arch/unzip + dev-util/ftjam" + +S=${WORKDIR}/${PN}-source-${PV} + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-{gentoo,xerces-c}.patch + + sed -i \ + -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}/${PN}:" \ + glest_game/main/main.cpp \ + || die "sed failed" + + sed -i \ + -e '/Lang/s:\.lng::' \ + glest.ini \ + || die "sed failed" + + sed -i \ + -e 's:-O3 -DNDEBUG:-DNDEBUG:' \ + Jamrules \ + || die "sed failed" +} + +src_configure() { + use editor || NOWX="--with-wx-config=disabled_wx" + egamesconf \ + --with-vorbis=/usr \ + --with-ogg=/usr \ + ${NOWX} +} + +src_compile() { + local jamopts=$(echo "${MAKEOPTS}" | sed -ne "/-j/ { s/.*\(-j[0-9]\+\).*/\1/; p }") + jam -dx -q ${jamopts} || die "jam failed" +} + +src_install() { + dogamesbin glest || die "dogamesbin glest failed" + if use editor ; then + dogamesbin glest_editor || die "dogamesbin glest_editor failed" + fi + + insinto "${GAMES_DATADIR}"/${PN} + doins glest.ini || die "doins glest.ini failed" + + cd "${WORKDIR}"/glest_game + doins -r servers.ini \ + data maps scenarios techs tilesets || die "doins data failed" + dodoc docs/readme.txt || die "dodoc docs/readme.txt failed" + + newicon techs/magitech/factions/magic/units/archmage/images/archmage.bmp \ + ${PN}.bmp || die "newicon failed" + make_desktop_entry glest Glest /usr/share/pixmaps/${PN}.bmp + prepgamesdirs +} diff --git a/games-strategy/glest/metadata.xml b/games-strategy/glest/metadata.xml index d3c2cc926f0b..5643528e60e3 100644 --- a/games-strategy/glest/metadata.xml +++ b/games-strategy/glest/metadata.xml @@ -2,4 +2,7 @@ <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <herd>games</herd> + <use> + <flag name="editor">Also install a level editor</flag> + </use> </pkgmetadata> |