summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2014-03-18 06:34:03 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2014-03-18 06:34:03 +0000
commit1abd0a9498631842396b21050074823a0376beb4 (patch)
treef267884614f1a5f7a634ec01ef92feca14818d73 /games-action
parentinitial commit of emilpro, replaces dissy (diff)
downloadhistorical-1abd0a9498631842396b21050074823a0376beb4.tar.gz
historical-1abd0a9498631842396b21050074823a0376beb4.tar.bz2
historical-1abd0a9498631842396b21050074823a0376beb4.zip
EAPI=5; update HOMEPAGE (bug #499700); warnings patch
Package-Manager: portage-2.2.8-r1/cvs/Linux x86_64
Diffstat (limited to 'games-action')
-rw-r--r--games-action/maelstrom/ChangeLog11
-rw-r--r--games-action/maelstrom/Manifest18
-rw-r--r--games-action/maelstrom/files/maelstrom-3.0.6-gcc34.patch30
-rw-r--r--games-action/maelstrom/files/maelstrom-3.0.6-security.patch380
-rw-r--r--games-action/maelstrom/files/maelstrom-3.0.6-warnings.patch20
-rw-r--r--games-action/maelstrom/maelstrom-3.0.6-r2.ebuild58
6 files changed, 508 insertions, 9 deletions
diff --git a/games-action/maelstrom/ChangeLog b/games-action/maelstrom/ChangeLog
index ba4203aff0d5..3e1a4f878f0e 100644
--- a/games-action/maelstrom/ChangeLog
+++ b/games-action/maelstrom/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for games-action/maelstrom
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-action/maelstrom/ChangeLog,v 1.20 2010/03/31 20:51:08 mr_bones_ Exp $
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-action/maelstrom/ChangeLog,v 1.21 2014/03/18 06:33:58 mr_bones_ Exp $
+
+*maelstrom-3.0.6-r2 (18 Mar 2014)
+
+ 18 Mar 2014; Michael Sterrett <mr_bones_@gentoo.org>
+ +files/maelstrom-3.0.6-gcc34.patch, +files/maelstrom-3.0.6-security.patch,
+ +files/maelstrom-3.0.6-warnings.patch, +maelstrom-3.0.6-r2.ebuild:
+ EAPI=5; update HOMEPAGE (bug #499700); warnings patch
31 Mar 2010; Michael Sterrett <mr_bones_@gentoo.org>
maelstrom-3.0.6-r1.ebuild:
diff --git a/games-action/maelstrom/Manifest b/games-action/maelstrom/Manifest
index 4980c1c7f38e..0d322c40dbc6 100644
--- a/games-action/maelstrom/Manifest
+++ b/games-action/maelstrom/Manifest
@@ -1,7 +1,11 @@
-AUX maelstrom-3.0.6-64bits.patch 499 RMD160 6d2d4e10f2f0dd68d175becdc876b472d1bdcd7e SHA1 3156c1607727b2dcf9b946b60db3053f650dddef SHA256 6fd7a7cab4f89ec00b123758f4d6a82e930c2a6632ffa00c3172f6c076d7015a
-AUX maelstrom-3.0.6-r1-security.patch 14189 RMD160 7509c96a2ee3f91f32824e640bec00c11019adfd SHA1 9bbb7d90620551cdebafb51cf548660e8e153372 SHA256 977d7558b094037ad82177d56ac897e376714e939568b0925ad28708aad6099f
-AUX maelstrom-gcc34.patch 878 RMD160 dfa90264cbd1f3cb4aca724c7b566b7d96169971 SHA1 60ebcb0e541fe6d3fe9fbd12f32f7b31c68de913 SHA256 38a0a869c60e32d2873f536badd28e45f1908027d4e40936f533da2c0741dc3a
-DIST Maelstrom-3.0.6.tar.gz 1007421 RMD160 9415324e96fdccfc5ff5c453e886d0ce28956c13 SHA1 28b273615d1c375e532d375a4a407a99af63e283 SHA256 bb6ca1952d1080e25f8716a2d08a4241614ee72d54f13c8a60eecadf7ea6198d
-EBUILD maelstrom-3.0.6-r1.ebuild 1901 RMD160 e4babe795f020c71e23d18c70a1568dce46cf2ea SHA1 a2195612d92c8f852ed0d4b8e751b6d32840af41 SHA256 990249525c9ddb37e4e7dca594427ca5315dae8488602d83c8b24477372a1250
-MISC ChangeLog 2888 RMD160 7aa66da8c024d3388b574788b9399fc94fad0ca9 SHA1 b7ffb5ba19d684169d3940b7c0257f926c8a1fe4 SHA256 4f987f6aac3dfad7065c469c4bc654549206f5d6baf8f1f4f61d639db4bc5906
-MISC metadata.xml 158 RMD160 cbd9984bb6b426c8c9cee5022fe0a26261612fea SHA1 be5251fa1dacef5c41b74761bb1c8c54fb633b9e SHA256 1423a4fdd4a79b1728a2056d9e300f7e1074253095d82726218d9e9b953888a3
+AUX maelstrom-3.0.6-64bits.patch 499 SHA256 6fd7a7cab4f89ec00b123758f4d6a82e930c2a6632ffa00c3172f6c076d7015a SHA512 eac1d07c576624de1e3d732e788a4b7e8ef3215964b8dd1e5c0ce80a2ee1143d3994fa9d6cc2819b3a0ac5f9dd3f1f13a92a4d414e80e3b9c79bf41b27314448 WHIRLPOOL 9b146d0646073d180b40b1bdab7e674a9dd2523daff57f2b78635394ddbc51c3889b954e8ea6bba94a20517afe759bb16ac22837352aa5062166997aa4d81a63
+AUX maelstrom-3.0.6-gcc34.patch 878 SHA256 38a0a869c60e32d2873f536badd28e45f1908027d4e40936f533da2c0741dc3a SHA512 5427e198d6a595f9d68357d0ad31b8d1d7c6bc8db7dde261269a660d8e6102d83d592128e1e2f1c82285e764808f166798cb4a9121d88a8ec7c047efa6d856d6 WHIRLPOOL c1303fda8b4e2a266a3bcb14e2f444d1e332f8deafe5253cc7360ff02ea05d6d8dd4b7523db4442a9f3b06aeff6e9c46fe8df9c0e25b9730568b0d2e3ad94866
+AUX maelstrom-3.0.6-r1-security.patch 14189 SHA256 977d7558b094037ad82177d56ac897e376714e939568b0925ad28708aad6099f SHA512 7e8c6c5c7244fa8871fe55b95e9d2a8c631735590dba04e9e2dfed62e2dfc6264f1b990f3737d797c7762fbceda17474782b1720f944d444bdb8627b43188cb3 WHIRLPOOL da1c87ac540822895e3b7aeacb7cffb992300344b06012ea9ad920f977a4651f23db3fea65744bc4bd056ffb18886ae5ca26bc74418e4b0b66ac3d2c12628ff3
+AUX maelstrom-3.0.6-security.patch 14189 SHA256 977d7558b094037ad82177d56ac897e376714e939568b0925ad28708aad6099f SHA512 7e8c6c5c7244fa8871fe55b95e9d2a8c631735590dba04e9e2dfed62e2dfc6264f1b990f3737d797c7762fbceda17474782b1720f944d444bdb8627b43188cb3 WHIRLPOOL da1c87ac540822895e3b7aeacb7cffb992300344b06012ea9ad920f977a4651f23db3fea65744bc4bd056ffb18886ae5ca26bc74418e4b0b66ac3d2c12628ff3
+AUX maelstrom-3.0.6-warnings.patch 439 SHA256 2b4148c9dbf11e51d623199b161b1ae0ff5cc07bbefc3a04f71621e5ac605a65 SHA512 e7c1c73f8f23b7f0bedd5ce143d18ab6c8eea04138685475ce725cce388f3a9283bdf35393a53efe23a0a26ffb98c117ba2f90243de12caaeca8a89b6483ebc6 WHIRLPOOL b07071b516583854fe4831df0b11a2d107c3e31d09a9e8c15fa14f7936941db0497e4ee9c4b70e69a631f253487f495b4f5a91846ad845077087cd831ee2b8ed
+AUX maelstrom-gcc34.patch 878 SHA256 38a0a869c60e32d2873f536badd28e45f1908027d4e40936f533da2c0741dc3a SHA512 5427e198d6a595f9d68357d0ad31b8d1d7c6bc8db7dde261269a660d8e6102d83d592128e1e2f1c82285e764808f166798cb4a9121d88a8ec7c047efa6d856d6 WHIRLPOOL c1303fda8b4e2a266a3bcb14e2f444d1e332f8deafe5253cc7360ff02ea05d6d8dd4b7523db4442a9f3b06aeff6e9c46fe8df9c0e25b9730568b0d2e3ad94866
+DIST Maelstrom-3.0.6.tar.gz 1007421 SHA256 bb6ca1952d1080e25f8716a2d08a4241614ee72d54f13c8a60eecadf7ea6198d SHA512 fecd2411f5d2109aa99e5a6c65702c74f9f79326fc9f074a53005238c846780f231776b9c170ceb54b0470894b856abaa4708c59afd912fa5b2868e6776893ca WHIRLPOOL 36e9266a246a9bd55923e81e89d6a59956d3f7c15d8231b2973c8b1c77280828b7508cbc1978ea069a7149a1b4e2ba2de2f8debd8da55c0c082f125039d60829
+EBUILD maelstrom-3.0.6-r1.ebuild 1901 SHA256 990249525c9ddb37e4e7dca594427ca5315dae8488602d83c8b24477372a1250 SHA512 f35a4052e25789450484fe559687d58931a945f251e02ac8671736dcbdddcf0d6cfeecbbf95cbf2f8854e324ff97c0603b145488ffc75f1bd38a260002bd9162 WHIRLPOOL d8e69fd50ed8307dae62da7cb93e545731837d609576538425ac50b40528f783fabba63c888eefe5fd6c6123cb70680af2bc21105ceeaa0c8e09a5b7dc09312e
+EBUILD maelstrom-3.0.6-r2.ebuild 1926 SHA256 c4c95b878476ae9f623803311f6f2fe8af6845c78094f37a9db3cbb77a80ca2a SHA512 6a002af99d42c63c8b070d111fe59ca5de911522f558dffbecb973a8db5c3bc4bca6bfb789f478b17487bc465a2f03393e6f50a32590aa208fe5737a43e75640 WHIRLPOOL ecb0e2ea7ddd54242ac39ba5545fdc367733bf1226deec5a578a87992011e1796037aea003b10cf7bf9a511aee33b80510085c99bf23ff8a5c9341e74b148755
+MISC ChangeLog 3181 SHA256 2c4c598f9a7be4611b7d96514e6b1abd23c5fdd540f8b7afbf0835ae51d77c93 SHA512 53de9adaa3150e85653e398ec3a8251f11cdafc8c76048e2fd802a6995568478f38b0f1f00774c5a17f373e377828fb3fd467ec767e91e76ce6948925e85bd1c WHIRLPOOL 2731808180f3bfb715889f1c7f4163377cd50125c0c2f5bdfde9601dcfdad84b17ffcc79a2b0cc0c4845bc4a47d7622882a32ac42757759c513e902eca04f67b
+MISC metadata.xml 158 SHA256 1423a4fdd4a79b1728a2056d9e300f7e1074253095d82726218d9e9b953888a3 SHA512 d954564236b67b6ab97846b73f74e715e8f1bec2dba6595e9a5046c2e8c3b93f4879c293f9d1d02d99a533bee56156dae3f31a485697128c51af14cdbfdada8a WHIRLPOOL d03e7293d09d794d61c095a423f945b3644355a247f270a73ca8d30b4dfe9c98244297536bfd1a4bd6c14794aa1152eca20fd83bfdf3e1e74d4f676152d35ada
diff --git a/games-action/maelstrom/files/maelstrom-3.0.6-gcc34.patch b/games-action/maelstrom/files/maelstrom-3.0.6-gcc34.patch
new file mode 100644
index 000000000000..6ceb421f16ba
--- /dev/null
+++ b/games-action/maelstrom/files/maelstrom-3.0.6-gcc34.patch
@@ -0,0 +1,30 @@
+diff -ur Maelstrom-3.0.6-orig/buttonlist.h Maelstrom-3.0.6/buttonlist.h
+--- Maelstrom-3.0.6-orig/buttonlist.h 2004-08-28 01:43:55.867378220 -0400
++++ Maelstrom-3.0.6/buttonlist.h 2004-08-28 01:44:23.700062593 -0400
+@@ -16,7 +16,7 @@
+
+ void Add_Button(Uint16 x, Uint16 y, Uint16 width, Uint16 height,
+ void (*callback)(void)) {
+- struct button *belem;
++ button *belem;
+
+ for ( belem=&button_list; belem->next; belem=belem->next );
+ belem->next = new button;
+@@ -30,7 +30,7 @@
+ }
+
+ void Activate_Button(Uint16 x, Uint16 y) {
+- struct button *belem;
++ button *belem;
+
+ for ( belem=button_list.next; belem; belem=belem->next ) {
+ if ( (x >= belem->x1) && (x <= belem->x2) &&
+@@ -42,7 +42,7 @@
+ }
+
+ void Delete_Buttons(void) {
+- struct button *belem, *btemp;
++ button *belem, *btemp;
+
+ for ( belem=button_list.next; belem; ) {
+ btemp = belem;
diff --git a/games-action/maelstrom/files/maelstrom-3.0.6-security.patch b/games-action/maelstrom/files/maelstrom-3.0.6-security.patch
new file mode 100644
index 000000000000..ae22c0cdd11a
--- /dev/null
+++ b/games-action/maelstrom/files/maelstrom-3.0.6-security.patch
@@ -0,0 +1,380 @@
+diff -ur Maelstrom-3.0.6-orig/controls.cpp Maelstrom-3.0.6/controls.cpp
+--- Maelstrom-3.0.6-orig/controls.cpp 2001-03-25 03:04:28 +0900
++++ Maelstrom-3.0.6/controls.cpp 2003-05-21 11:25:53 +0900
+@@ -83,7 +83,7 @@
+ if ( fname ) {
+ *fname = datafile;
+ }
+- sprintf(datafile, "%s"DIR_SEP"%s", home, MAELSTROM_DATA);
++ snprintf(datafile, sizeof(datafile), "%s"DIR_SEP"%s", home, MAELSTROM_DATA);
+ if ( (data=fopen(datafile, mode)) == NULL )
+ return(NULL);
+ return(data);
+diff -ur Maelstrom-3.0.6-orig/dialog.h Maelstrom-3.0.6/dialog.h
+--- Maelstrom-3.0.6-orig/dialog.h 2001-07-21 00:08:10 +0900
++++ Maelstrom-3.0.6/dialog.h 2003-05-21 11:24:33 +0900
+@@ -92,7 +92,7 @@
+ va_list ap;
+
+ va_start(ap, fmt);
+- vsprintf(errbuf, fmt, ap);
++ vsnprintf(errbuf, sizeof(errbuf), fmt, ap);
+ va_end(ap);
+ errstr = errbuf;
+ }
+@@ -878,7 +878,7 @@
+ if ( entry->text ) {
+ Fontserv->FreeText(entry->text);
+ }
+- sprintf(buf, "%d", *entry->variable);
++ snprintf(buf, sizeof(buf), "%d", *entry->variable);
+
+ if ( entry->hilite ) {
+ clear = Fg;
+diff -ur Maelstrom-3.0.6-orig/load.cpp Maelstrom-3.0.6/load.cpp
+--- Maelstrom-3.0.6-orig/load.cpp 2000-02-15 11:47:39 +0900
++++ Maelstrom-3.0.6/load.cpp 2003-05-21 11:26:18 +0900
+@@ -81,7 +81,7 @@
+ SDL_Surface *bmp, *title;
+
+ /* Open the title file -- we know its colormap is our global one */
+- sprintf(file, "Images"DIR_SEP"Maelstrom_Titles#%d.bmp", title_id);
++ snprintf(file, sizeof(file), "Images"DIR_SEP"Maelstrom_Titles#%d.bmp", title_id);
+ bmp = SDL_LoadBMP(path.Path(file));
+ if ( bmp == NULL ) {
+ return(NULL);
+@@ -103,7 +103,7 @@
+ Uint16 w, h;
+
+ /* Open the cicn sprite file.. */
+- sprintf(file, "Images"DIR_SEP"Maelstrom_Icon#%hd.cicn", cicn_id);
++ snprintf(file, sizeof(file), "Images"DIR_SEP"Maelstrom_Icon#%hd.cicn", cicn_id);
+ if ( (cicn_src=SDL_RWFromFile(path.Path(file), "r")) == NULL ) {
+ error("GetCIcon(%hd): Can't open CICN %s: ",
+ cicn_id, path.Path(file));
+diff -ur Maelstrom-3.0.6-orig/maclib/Mac_FontServ.h Maelstrom-3.0.6/maclib/Mac_FontServ.h
+--- Maelstrom-3.0.6-orig/maclib/Mac_FontServ.h 1999-12-03 02:15:33 +0900
++++ Maelstrom-3.0.6/maclib/Mac_FontServ.h 2003-05-21 11:28:43 +0900
+@@ -135,7 +135,7 @@
+ va_list ap;
+
+ va_start(ap, fmt);
+- vsprintf(errbuf, fmt, ap);
++ vsnprintf(errbuf, sizeof(errbuf), fmt, ap);
+ va_end(ap);
+ errstr = errbuf;
+ }
+diff -ur Maelstrom-3.0.6-orig/maclib/Mac_Resource.h Maelstrom-3.0.6/maclib/Mac_Resource.h
+--- Maelstrom-3.0.6-orig/maclib/Mac_Resource.h 1999-12-04 03:01:47 +0900
++++ Maelstrom-3.0.6/maclib/Mac_Resource.h 2003-05-21 11:28:35 +0900
+@@ -96,7 +96,7 @@
+ va_list ap;
+
+ va_start(ap, fmt);
+- vsprintf(errbuf, fmt, ap);
++ vsnprintf(errbuf, sizeof(errbuf), fmt, ap);
+ va_end(ap);
+ errstr = errbuf;
+ }
+diff -ur Maelstrom-3.0.6-orig/maclib/Mac_Sound.h Maelstrom-3.0.6/maclib/Mac_Sound.h
+--- Maelstrom-3.0.6-orig/maclib/Mac_Sound.h 2002-10-20 11:53:34 +0900
++++ Maelstrom-3.0.6/maclib/Mac_Sound.h 2003-05-21 11:28:27 +0900
+@@ -199,7 +199,7 @@
+ va_list ap;
+
+ va_start(ap, fmt);
+- vsprintf(errbuf, fmt, ap);
++ vsnprintf(errbuf, sizeof(errbuf), fmt, ap);
+ va_end(ap);
+ errstr = errbuf;
+ }
+diff -ur Maelstrom-3.0.6-orig/maclib/Mac_Wave.h Maelstrom-3.0.6/maclib/Mac_Wave.h
+--- Maelstrom-3.0.6-orig/maclib/Mac_Wave.h 2000-01-26 01:44:10 +0900
++++ Maelstrom-3.0.6/maclib/Mac_Wave.h 2003-05-21 11:28:20 +0900
+@@ -108,7 +108,7 @@
+ va_list ap;
+
+ va_start(ap, fmt);
+- vsprintf(errbuf, fmt, ap);
++ vsnprintf(errbuf, sizeof(errbuf), fmt, ap);
+ va_end(ap);
+ errstr = errbuf;
+ }
+diff -ur Maelstrom-3.0.6-orig/maclib/macres.cpp Maelstrom-3.0.6/maclib/macres.cpp
+--- Maelstrom-3.0.6-orig/maclib/macres.cpp 2000-01-26 01:44:20 +0900
++++ Maelstrom-3.0.6/maclib/macres.cpp 2003-05-21 11:30:01 +0900
+@@ -58,8 +58,8 @@
+ ids[j], res->ResourceName(types[i], ids[j]));
+ if ( argv[2] ) {
+ char path[23];
+- sprintf(path,"%s/%s:%hu", argv[2],
+- types[i], ids[j]);
++ snprintf(path, sizeof(path), "%s/%s:%hu",
++ argv[2], types[i], ids[j]);
+ FILE *output;
+ Mac_ResData *D;
+ if ( (output=fopen(path, "w")) != NULL ) {
+diff -ur Maelstrom-3.0.6-orig/maclib/snd2wav.cpp Maelstrom-3.0.6/maclib/snd2wav.cpp
+--- Maelstrom-3.0.6-orig/maclib/snd2wav.cpp 2001-03-28 12:54:50 +0900
++++ Maelstrom-3.0.6/maclib/snd2wav.cpp 2003-05-21 11:29:23 +0900
+@@ -82,7 +82,7 @@
+ continue;
+ }
+ wave.Load(snd, rate);
+- sprintf(wavname, "snd_%d.wav", ids[i]);
++ snprintf(wavname, sizeof(wavname), "snd_%d.wav", ids[i]);
+ wave.Save(wavname);
+ }
+ delete macx;
+diff -ur Maelstrom-3.0.6-orig/main.cpp Maelstrom-3.0.6/main.cpp
+--- Maelstrom-3.0.6-orig/main.cpp 2002-10-20 11:53:32 +0900
++++ Maelstrom-3.0.6/main.cpp 2003-05-21 11:27:02 +0900
+@@ -445,7 +445,7 @@
+ DrawText(xOff+309-7, yOff+240-6, text, geneva, STYLE_BOLD,
+ 0x00, 0x00, 0x00);
+ }
+- sprintf(text, "%d", gSoundLevel);
++ snprintf(text, sizeof(text), "%d", gSoundLevel);
+ DrawText(xOff+309-7, yOff+240-6, text, geneva, STYLE_BOLD,
+ 30000>>8, 30000>>8, 0xFF);
+ screen->Update();
+@@ -547,11 +547,11 @@
+ }
+ DrawText(xOff+5, botDiv+42+(index*18), hScores[index].name,
+ font, STYLE_BOLD, R, G, B);
+- sprintf(buffer, "%u", hScores[index].score);
++ snprintf(buffer, sizeof(buffer), "%u", hScores[index].score);
+ sw = fontserv->TextWidth(buffer, font, STYLE_BOLD);
+ DrawText(sRt-sw, botDiv+42+(index*18), buffer,
+ font, STYLE_BOLD, R, G, B);
+- sprintf(buffer, "%u", hScores[index].wave);
++ snprintf(buffer, sizeof(buffer), "%u", hScores[index].wave);
+ sw = fontserv->TextWidth(buffer, font, STYLE_BOLD);
+ DrawText(wRt-sw, botDiv+42+(index*18), buffer,
+ font, STYLE_BOLD, R, G, B);
+@@ -560,7 +560,7 @@
+
+ DrawText(xOff+5, botDiv+46+(10*18)+3, "Last Score: ",
+ bigfont, STYLE_NORM, 0xFF, 0xFF, 0xFF);
+- sprintf(buffer, "%d", GetScore());
++ snprintf(buffer, sizeof(buffer), "%d", GetScore());
+ sw = fontserv->TextWidth("Last Score: ", bigfont, STYLE_NORM);
+ DrawText(xOff+5+sw, botDiv+46+(index*18)+3, buffer,
+ bigfont, STYLE_NORM, 0xFF, 0xFF, 0xFF);
+diff -ur Maelstrom-3.0.6-orig/myerror.cpp Maelstrom-3.0.6/myerror.cpp
+--- Maelstrom-3.0.6-orig/myerror.cpp 1998-07-14 10:50:17 +0900
++++ Maelstrom-3.0.6/myerror.cpp 2003-05-21 11:23:33 +0900
+@@ -16,7 +16,7 @@
+ va_list ap;
+
+ va_start(ap, fmt);
+- vsprintf(mesg, fmt, ap);
++ vsnprintf(mesg, sizeof(mesg), fmt, ap);
+ fputs(mesg, stderr);
+ va_end(ap);
+ }
+@@ -27,7 +27,7 @@
+ va_list ap;
+
+ va_start(ap, fmt);
+- vsprintf(mesg, fmt, ap);
++ vsnprintf(mesg, sizeof(mesg), fmt, ap);
+ fputs(mesg, stdout);
+ va_end(ap);
+ }
+@@ -37,7 +37,7 @@
+ char buffer[BUFSIZ];
+
+ if ( *msg ) {
+- sprintf(buffer, "%s: %s\n", msg, strerror(errno));
++ snprintf(buffer, sizeof(buffer), "%s: %s\n", msg, strerror(errno));
+ error(buffer);
+ } else
+ error((char *)strerror(errno));
+diff -ur Maelstrom-3.0.6-orig/netlogic/game.cpp Maelstrom-3.0.6/netlogic/game.cpp
+--- Maelstrom-3.0.6-orig/netlogic/game.cpp 2001-07-23 11:24:03 +0900
++++ Maelstrom-3.0.6/netlogic/game.cpp 2003-05-21 11:33:19 +0900
+@@ -232,7 +232,7 @@
+
+ lastDisplayed = gDisplayed;
+ screen->FillRect(0, 0, SCREEN_WIDTH, 12, ourBlack);
+- sprintf(caption,
++ snprintf(caption, sizeof(caption),
+ "You are player %d --- displaying player %d",
+ gOurPlayer+1, gDisplayed+1);
+ DrawText(SPRITES_WIDTH, 11, caption, geneva,
+@@ -357,7 +357,7 @@
+ /* -- Erase old and draw new score */
+ screen->FillRect(45, gStatusLine+1,
+ score_width, text_height, ourBlack);
+- sprintf(numbuf, "%d", Score);
++ snprintf(numbuf, sizeof(numbuf), "%d", Score);
+ score_width = DrawText(45, gStatusLine+11,
+ numbuf, geneva, STYLE_BOLD,
+ 0xFF, 0xFF, 0xFF);
+@@ -380,7 +380,7 @@
+ if (lastWave != gWave) {
+ screen->FillRect(255, gStatusLine+1,
+ wave_width, text_height, ourBlack);
+- sprintf(numbuf, "%d", gWave);
++ snprintf(numbuf, sizeof(numbuf), "%d", gWave);
+ wave_width = DrawText(255, gStatusLine+11,
+ numbuf, geneva, STYLE_BOLD,
+ 0xFF, 0xFF, 0xFF);
+@@ -391,7 +391,7 @@
+ if (lastLives != Lives) {
+ screen->FillRect(319, gStatusLine+1,
+ lives_width, text_height, ourBlack);
+- sprintf(numbuf, "%-3.1d", Lives);
++ snprintf(numbuf, sizeof(numbuf), "%-3.1d", Lives);
+ lives_width = DrawText(319, gStatusLine+11,
+ numbuf, geneva, STYLE_BOLD,
+ 0xFF, 0xFF, 0xFF);
+@@ -402,7 +402,7 @@
+ if (lastBonus != Bonus) {
+ screen->FillRect(384, gStatusLine+1,
+ bonus_width, text_height, ourBlack);
+- sprintf(numbuf, "%-7.1d", Bonus);
++ snprintf(numbuf, sizeof(numbuf), "%-7.1d", Bonus);
+ bonus_width = DrawText(384, gStatusLine+11,
+ numbuf, geneva, STYLE_BOLD,
+ 0xFF, 0xFF, 0xFF);
+@@ -414,7 +414,7 @@
+ if (lastFrags != Frags) {
+ screen->FillRect(fragoff, gStatusLine+1,
+ frags_width, text_height, ourBlack);
+- sprintf(numbuf, "%-3.1d", Frags);
++ snprintf(numbuf, sizeof(numbuf), "%-3.1d", Frags);
+ frags_width = DrawText(fragoff, gStatusLine+11,
+ numbuf, geneva, STYLE_BOLD,
+ 0xFF, 0xFF, 0xFF);
+@@ -747,10 +747,11 @@
+ for ( i=0; i<gNumPlayers; ++i ) {
+ char buffer[BUFSIZ], num1[12], num2[12];
+
+- sprintf(num1, "%7.1d", final[i].Score);
+- sprintf(num2, "%3.1d", final[i].Frags);
+- sprintf(buffer, "Player %d: %-.7s Points, %-.3s Frags",
+- final[i].Player, num1, num2);
++ snprintf(num1, sizeof(num1), "%7.1d", final[i].Score);
++ snprintf(num2, sizeof(num2), "%3.1d", final[i].Frags);
++ snprintf(buffer, sizeof(buffer),
++ "Player %d: %-.7s Points, %-.3s Frags",
++ final[i].Player, num1, num2);
+ DrawText(160, 380+i*newyork_height, buffer,
+ newyork, STYLE_NORM, 30000>>8, 30000>>8, 0xFF);
+ }
+@@ -898,7 +899,7 @@
+
+
+ /* -- Draw the wave completed message */
+- sprintf(numbuf, "Wave %d completed.", gWave);
++ snprintf(numbuf, sizeof(numbuf), "Wave %d completed.", gWave);
+ sw = fontserv->TextWidth(numbuf, geneva, STYLE_BOLD);
+ x = (SCREEN_WIDTH - sw) / 2;
+ DrawText(x, 150, numbuf, geneva, STYLE_BOLD, 0xFF, 0xFF, 0x00);
+@@ -935,7 +936,7 @@
+ if (OurShip->GetBonusMult() != 1) {
+ SDL_Surface *sprite;
+
+- sprintf(numbuf, "%-5.1d", OurShip->GetBonus());
++ snprintf(numbuf, sizeof(numbuf), "%-5.1d", OurShip->GetBonus());
+ DrawText(x, 200, numbuf, geneva, STYLE_BOLD,
+ 0xFF, 0xFF, 0xFF);
+ x += 75;
+@@ -951,10 +952,10 @@
+ Delay(SOUND_DELAY);
+ sound->PlaySound(gFunk, 5);
+
+- sprintf(numbuf, "%-5.1d", OurShip->GetBonus());
++ snprintf(numbuf, sizeof(numbuf), "%-5.1d", OurShip->GetBonus());
+ bonus_width = DrawText(x, 200, numbuf, geneva, STYLE_BOLD,
+ 0xFF, 0xFF, 0xFF);
+- sprintf(numbuf, "%-5.1d", OurShip->GetScore());
++ snprintf(numbuf, sizeof(numbuf), "%-5.1d", OurShip->GetScore());
+ score_width = DrawText(xt, 220, numbuf, geneva, STYLE_BOLD,
+ 0xFF, 0xFF, 0xFF);
+ screen->Update();
+@@ -997,12 +998,12 @@
+
+ screen->FillRect(x, 200-text_height+2,
+ bonus_width, text_height, ourBlack);
+- sprintf(numbuf, "%-5.1d", OurShip->GetBonus());
++ snprintf(numbuf, sizeof(numbuf), "%-5.1d", OurShip->GetBonus());
+ bonus_width = DrawText(x, 200, numbuf,
+ geneva, STYLE_BOLD, 0xFF, 0xFF, 0xFF);
+ screen->FillRect(xt, 220-text_height+2,
+ score_width, text_height, ourBlack);
+- sprintf(numbuf, "%-5.1d", OurShip->GetScore());
++ snprintf(numbuf, sizeof(numbuf), "%-5.1d", OurShip->GetScore());
+ score_width = DrawText(xt, 220, numbuf,
+ geneva, STYLE_BOLD, 0xFF, 0xFF, 0xFF);
+
+@@ -1015,7 +1016,7 @@
+ HandleEvents(10);
+
+ /* -- Draw the "next wave" message */
+- sprintf(numbuf, "Prepare for Wave %d...", gWave+1);
++ snprintf(numbuf, sizeof(numbuf), "Prepare for Wave %d...", gWave+1);
+ sw = fontserv->TextWidth(numbuf, geneva, STYLE_BOLD);
+ x = (SCREEN_WIDTH - sw)/2;
+ DrawText(x, 259, numbuf, geneva, STYLE_BOLD, 0xFF, 0xFF, 0x00);
+diff -ur Maelstrom-3.0.6-orig/netlogic/netplay.cpp Maelstrom-3.0.6/netlogic/netplay.cpp
+--- Maelstrom-3.0.6-orig/netlogic/netplay.cpp 2002-10-20 13:11:52 +0900
++++ Maelstrom-3.0.6/netlogic/netplay.cpp 2003-05-21 11:31:43 +0900
+@@ -670,7 +670,9 @@
+ strcpy(message, "Waiting for players:");
+ for ( i=0; i<gNumPlayers; ++i ) {
+ if ( ! acked[i] )
+- sprintf(&message[strlen(message)], " %d", i+1);
++ snprintf(&message[strlen(message)],
++ sizeof(message)-strlen(message),
++ " %d", i+1);
+ }
+ Message(message);
+
+@@ -725,7 +727,7 @@
+ /* Check the player... */
+ if ( (i != gOurPlayer) && (netbuf[1] == gOurPlayer) ) {
+ /* Print message, sleep 3 seconds absolutely */
+- sprintf(message,
++ snprintf(message, sizeof(message),
+ "Error: Another player (%d) thinks they are player 1!\r\n", i+1);
+ ErrorMessage(message);
+ /* Suck up retransmission packets */
+diff -ur Maelstrom-3.0.6-orig/netscore.cpp Maelstrom-3.0.6/netscore.cpp
+--- Maelstrom-3.0.6-orig/netscore.cpp 2001-07-23 12:25:17 +0900
++++ Maelstrom-3.0.6/netscore.cpp 2003-05-21 11:27:18 +0900
+@@ -59,7 +59,7 @@
+
+ /* Send the scores */
+ crc = get_checksum(key, KEY_LEN);
+- sprintf(netbuf, SCOREFMT, crc, high.name, high.score, high.wave);
++ snprintf(netbuf, sizeof(netbuf), SCOREFMT, crc, high.name, high.score, high.wave);
+ SDLNet_TCP_Send(remote, netbuf, strlen(netbuf));
+ n = SDLNet_TCP_Recv(remote, netbuf, 1024);
+ if ( n > 0 ) {
+diff -ur Maelstrom-3.0.6-orig/screenlib/SDL_FrameBuf.cpp Maelstrom-3.0.6/screenlib/SDL_FrameBuf.cpp
+--- Maelstrom-3.0.6-orig/screenlib/SDL_FrameBuf.cpp 2001-07-23 06:03:13 +0900
++++ Maelstrom-3.0.6/screenlib/SDL_FrameBuf.cpp 2003-05-21 11:31:01 +0900
+@@ -628,7 +628,7 @@
+
+ found = 0;
+ for ( which=0; !found; ++which ) {
+- sprintf(file, "%s%d.bmp", prefix, which);
++ snprintf(file, sizeof(file), "%s%d.bmp", prefix, which);
+ if ( ((fp=fopen(file, "r")) == NULL) &&
+ ((fp=fopen(file, "w")) != NULL) ) {
+ found = 1;
+diff -ur Maelstrom-3.0.6-orig/screenlib/SDL_FrameBuf.h Maelstrom-3.0.6/screenlib/SDL_FrameBuf.h
+--- Maelstrom-3.0.6-orig/screenlib/SDL_FrameBuf.h 2000-09-25 02:55:39 +0900
++++ Maelstrom-3.0.6/screenlib/SDL_FrameBuf.h 2003-05-21 11:27:41 +0900
+@@ -165,7 +165,7 @@
+ va_list ap;
+
+ va_start(ap, fmt);
+- vsprintf(errbuf, fmt, ap);
++ vsnprintf(errbuf, sizeof(errbuf), fmt, ap);
+ va_end(ap);
+ errstr = errbuf;
+ }
diff --git a/games-action/maelstrom/files/maelstrom-3.0.6-warnings.patch b/games-action/maelstrom/files/maelstrom-3.0.6-warnings.patch
new file mode 100644
index 000000000000..aa374b096c32
--- /dev/null
+++ b/games-action/maelstrom/files/maelstrom-3.0.6-warnings.patch
@@ -0,0 +1,20 @@
+--- Maelstrom-netd.c.orig 2014-03-18 01:00:28.408099526 -0400
++++ Maelstrom-netd.c 2014-03-18 01:01:29.892142782 -0400
+@@ -1,7 +1,9 @@
+
+ /* Here we go... */
+
++#include <stdlib.h>
+ #include <stdio.h>
++#include <time.h>
+ #include <string.h>
+ #include <signal.h>
+ #include <errno.h>
+@@ -9,6 +11,7 @@
+ #include <sys/time.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
++#include <arpa/inet.h>
+ #include <netdb.h>
+ #include <unistd.h>
+
diff --git a/games-action/maelstrom/maelstrom-3.0.6-r2.ebuild b/games-action/maelstrom/maelstrom-3.0.6-r2.ebuild
new file mode 100644
index 000000000000..3bb822ff3ef9
--- /dev/null
+++ b/games-action/maelstrom/maelstrom-3.0.6-r2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-action/maelstrom/maelstrom-3.0.6-r2.ebuild,v 1.1 2014/03/18 06:33:58 mr_bones_ Exp $
+
+EAPI=5
+inherit autotools eutils games
+
+MY_P=Maelstrom-${PV}
+DESCRIPTION="An asteroids battle game"
+HOMEPAGE="http://www.libsdl.org/projects/Maelstrom/"
+SRC_URI="http://www.libsdl.org/projects/Maelstrom/src/${MY_P}.tar.gz"
+
+KEYWORDS="~alpha ~amd64 ~ppc ~x86"
+SLOT="0"
+LICENSE="GPL-2"
+IUSE=""
+
+DEPEND="media-libs/libsdl[audio,joystick,video]
+ media-libs/sdl-net"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-security.patch \
+ "${FILESDIR}"/${P}-64bits.patch \
+ "${FILESDIR}"/${P}-gcc34.patch \
+ "${FILESDIR}"/${P}-warnings.patch
+
+ # Install the data into $(datadir)/..., not $(prefix)/games/...
+ sed -i \
+ -e "s:(prefix)/games/:(datadir)/:" configure.in || die
+ sed -i \
+ -e '/make install_gamedata/ { s:=:=$(DESTDIR)/:; s/make/$(MAKE)/; s/install_gamedata/install-binPROGRAMS install_gamedata/; }' Makefile.am || die
+ # Install the high scores file in ${GAMES_STATEDIR}
+ sed -i \
+ -e "s:path.Path(MAELSTROM_SCORES):\"${GAMES_STATEDIR}/\"MAELSTROM_SCORES:" scores.cpp || die
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc Changelog README* Docs/{Maelstrom-Announce,*FAQ,MaelstromGPL_press_release,*.Paper,Technical_Notes*}
+ newicon "${D}${GAMES_DATADIR}"/Maelstrom/icon.xpm maelstrom.xpm
+ make_desktop_entry Maelstrom "Maelstrom" maelstrom
+
+ # Put the high scores file in the right place
+ insinto "${GAMES_STATEDIR}"
+ doins "${D}${GAMES_DATADIR}"/Maelstrom/Maelstrom-Scores
+ # clean up some cruft
+ rm -f \
+ "${D}${GAMES_DATADIR}"/Maelstrom/Maelstrom-Scores \
+ "${D}${GAMES_DATADIR}"/Maelstrom/Images/Makefile*
+ # make sure we can update the high scores
+ fperms 664 "${GAMES_STATEDIR}"/Maelstrom-Scores
+ prepgamesdirs
+}