diff options
author | miwi <miwi@FreeBSD.org> | 2009-04-12 06:33:31 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2009-04-12 06:33:31 +0800 |
commit | e5e77aa095326317ec2b555d8eb5a1152c46cfb0 (patch) | |
tree | 2a551fdfce51c3dc2d0da81895c4283b931f7cc9 /games/lordsawar | |
parent | 3923fdb0c84b7705ce0b03856d672554a0890883 (diff) | |
download | freebsd-ports-gnome-e5e77aa095326317ec2b555d8eb5a1152c46cfb0.tar.gz freebsd-ports-gnome-e5e77aa095326317ec2b555d8eb5a1152c46cfb0.tar.zst freebsd-ports-gnome-e5e77aa095326317ec2b555d8eb5a1152c46cfb0.zip |
- Update to 0.1.5
PR: 133606
Submitted by: Alex Kozlov <spam@rm-rf.kiev.ua> (maintainer)
Diffstat (limited to 'games/lordsawar')
-rw-r--r-- | games/lordsawar/Makefile | 2 | ||||
-rw-r--r-- | games/lordsawar/distinfo | 6 | ||||
-rw-r--r-- | games/lordsawar/files/patch-src_game.cpp | 10 | ||||
-rw-r--r-- | games/lordsawar/files/patch-src_gamebigmap.cpp | 10 | ||||
-rw-r--r-- | games/lordsawar/files/patch-src_herotemplates.cpp | 102 | ||||
-rw-r--r-- | games/lordsawar/files/patch-src_ucompose.hpp | 14 | ||||
-rw-r--r-- | games/lordsawar/pkg-plist | 2 |
7 files changed, 6 insertions, 140 deletions
diff --git a/games/lordsawar/Makefile b/games/lordsawar/Makefile index 589fc0143a2c..950a32ac5334 100644 --- a/games/lordsawar/Makefile +++ b/games/lordsawar/Makefile @@ -6,7 +6,7 @@ # PORTNAME= lordsawar -PORTVERSION= 0.1.4 +PORTVERSION= 0.1.5 CATEGORIES= games MASTER_SITES= ${MASTER_SITE_SAVANNAH} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/games/lordsawar/distinfo b/games/lordsawar/distinfo index 848fddf01e72..1d6758830f03 100644 --- a/games/lordsawar/distinfo +++ b/games/lordsawar/distinfo @@ -1,3 +1,3 @@ -MD5 (lordsawar-0.1.4.tar.gz) = 62b7d610a9697f1e357b12d5b8aa068a -SHA256 (lordsawar-0.1.4.tar.gz) = 4efe206ef054bf133c42b07b92a68edc309af12408ff1f7f6433f8a16927e3dc -SIZE (lordsawar-0.1.4.tar.gz) = 20598785 +MD5 (lordsawar-0.1.5.tar.gz) = 578ff15d67979b6ef50bc2108a5bba73 +SHA256 (lordsawar-0.1.5.tar.gz) = 59e6f5760efdf9551a33892872a129b13349689456be7cd15191ef058a877bfd +SIZE (lordsawar-0.1.5.tar.gz) = 20596718 diff --git a/games/lordsawar/files/patch-src_game.cpp b/games/lordsawar/files/patch-src_game.cpp deleted file mode 100644 index 9ca515f63aa6..000000000000 --- a/games/lordsawar/files/patch-src_game.cpp +++ /dev/null @@ -1,10 +0,0 @@ -Index: src/game.cpp -@@ -1042,7 +1042,7 @@ - } - else - { -- SDL_Delay(250); -+ //SDL_Delay(250); - } - } - diff --git a/games/lordsawar/files/patch-src_gamebigmap.cpp b/games/lordsawar/files/patch-src_gamebigmap.cpp deleted file mode 100644 index 6dd093cc3fe7..000000000000 --- a/games/lordsawar/files/patch-src_gamebigmap.cpp +++ /dev/null @@ -1,10 +0,0 @@ -Index: src/gamebigmap.cpp -@@ -455,7 +455,7 @@ - if (new_view.w <= GameMap::getWidth() && - new_view.h <= GameMap::getHeight() && - new_view.w >= 0 && new_view.h >= 0) -- zoom_view(-zoom_step); -+ zoom_view(-(const double)zoom_step); - } - } - diff --git a/games/lordsawar/files/patch-src_herotemplates.cpp b/games/lordsawar/files/patch-src_herotemplates.cpp deleted file mode 100644 index c90f876bb405..000000000000 --- a/games/lordsawar/files/patch-src_herotemplates.cpp +++ /dev/null @@ -1,102 +0,0 @@ -Index: src/herotemplates.cpp -@@ -16,6 +16,8 @@ - // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - // 02110-1301, USA. - -+#include <sstream> -+ - #include "herotemplates.h" - - #include "File.h" -@@ -64,15 +66,6 @@ - - int HeroTemplates::loadHeroTemplates() - { -- FILE *fileptr = fopen (File::getMiscFile("heronames").c_str(), "r"); -- char *line = NULL; -- size_t len = 0; -- ssize_t read; -- int retval; -- int gender; -- int side; -- size_t bytesread = 0; -- char *tmp; - const Armysetlist* al = Armysetlist::getInstance(); - const ArmyProto* herotype; - -@@ -83,48 +76,35 @@ - { - const ArmyProto *a = al->getArmy (p->getArmyset(), j); - if (a->isHero()) -- heroes.push_back(a); -+ heroes.push_back(a); - } - -- if (fileptr == NULL) -- return -1; -- while ((read = getline (&line, &len, fileptr)) != -1) -- { -- bytesread = 0; -- retval = sscanf (line, "%d%d%n", &side, &gender, &bytesread); -- if (retval != 2) -- { -- free (line); -- return -2; -- } -- while (isspace(line[bytesread]) && line[bytesread] != '\0') -- bytesread++; -- tmp = strchr (&line[bytesread], '\n'); -- if (tmp) -- tmp[0] = '\0'; -- if (strlen (&line[bytesread]) == 0) -- { -- free (line); -- return -3; -- } -- if (side < 0 || side > (int) MAX_PLAYERS) -- { -- free (line); -- return -4; -- } -- -- herotype = heroes[rand() % heroes.size()]; -- HeroProto *newhero = new HeroProto (*herotype); -- if (gender) -- newhero->setGender(Hero::MALE); -- else -- newhero->setGender(Hero::FEMALE); -- newhero->setName (&line[bytesread]); -- d_herotemplates[side].push_back (newhero); -+ std::ifstream file(File::getMiscFile("heronames").c_str()); -+ if (file.good()) { -+ std::string buffer, name; -+ int side, gender; -+ -+ while (std::getline(file, buffer)) { -+ std::istringstream line(buffer); -+ if (!(line >> side >> gender >> name)) -+ return -2; -+ -+ if (side < 0 || side > (int) MAX_PLAYERS) -+ return -4; -+ -+ herotype = heroes[rand() % heroes.size()]; -+ HeroProto *newhero = new HeroProto (*herotype); -+ if (gender) -+ newhero->setGender(Hero::MALE); -+ else -+ newhero->setGender(Hero::FEMALE); -+ -+ newhero->setName (name); -+ d_herotemplates[side].push_back (newhero); - } -- if (line) -- free (line); -- fclose (fileptr); -+ } else -+ return -1; -+ -+ file.close(); - return 0; - } -- diff --git a/games/lordsawar/files/patch-src_ucompose.hpp b/games/lordsawar/files/patch-src_ucompose.hpp deleted file mode 100644 index 660825131678..000000000000 --- a/games/lordsawar/files/patch-src_ucompose.hpp +++ /dev/null @@ -1,14 +0,0 @@ -Index: src/ucompose.hpp -@@ -178,9 +178,9 @@ - inline Composition::Composition(std::string fmt) - : arg_no(1) - { --#if __GNUC__ >= 3 -- os.imbue(std::locale("")); // use the user's locale for the stream --#endif -+//#if __GNUC__ >= 3 -+// os.imbue(std::locale("")); // use the user's locale for the stream -+//#endif - std::string::size_type b = 0, i = 0; - - // fill in output with the strings between the %1 %2 %3 etc. and diff --git a/games/lordsawar/pkg-plist b/games/lordsawar/pkg-plist index cb27c676f7f3..0d1a5e8a7bdb 100644 --- a/games/lordsawar/pkg-plist +++ b/games/lordsawar/pkg-plist @@ -34,6 +34,8 @@ share/gnome/help/lordsawar/C/figures/main_screen_move_stack_dir_buttons.png share/gnome/help/lordsawar/C/figures/main_screen_park_stack_button.png share/gnome/help/lordsawar/C/figures/main_screen_select_next_stack_button.png share/gnome/help/lordsawar/C/figures/main_screen_stack_search_button.png +share/locale/da/LC_MESSAGES/lordsawar.mo +share/locale/nl/LC_MESSAGES/lordsawar.mo %%DATADIR%%/citynames %%DATADIR%%/gtkrc %%DATADIR%%/heronames |