From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- games-action/maelstrom/Manifest | 11 + .../maelstrom/files/maelstrom-3.0.6-64bits.patch | 15 + .../maelstrom/files/maelstrom-3.0.6-gcc34.patch | 30 ++ .../maelstrom/files/maelstrom-3.0.6-gcc53.patch | 11 + .../maelstrom/files/maelstrom-3.0.6-security.patch | 380 +++++++++++++++++++++ .../maelstrom/files/maelstrom-3.0.6-warnings.patch | 20 ++ games-action/maelstrom/maelstrom-3.0.6-r2.ebuild | 60 ++++ games-action/maelstrom/maelstrom-3.0.6-r3.ebuild | 71 ++++ games-action/maelstrom/metadata.xml | 8 + 9 files changed, 606 insertions(+) create mode 100644 games-action/maelstrom/Manifest create mode 100644 games-action/maelstrom/files/maelstrom-3.0.6-64bits.patch create mode 100644 games-action/maelstrom/files/maelstrom-3.0.6-gcc34.patch create mode 100644 games-action/maelstrom/files/maelstrom-3.0.6-gcc53.patch create mode 100644 games-action/maelstrom/files/maelstrom-3.0.6-security.patch create mode 100644 games-action/maelstrom/files/maelstrom-3.0.6-warnings.patch create mode 100644 games-action/maelstrom/maelstrom-3.0.6-r2.ebuild create mode 100644 games-action/maelstrom/maelstrom-3.0.6-r3.ebuild create mode 100644 games-action/maelstrom/metadata.xml (limited to 'games-action/maelstrom') diff --git a/games-action/maelstrom/Manifest b/games-action/maelstrom/Manifest new file mode 100644 index 000000000000..b30e245b9a30 --- /dev/null +++ b/games-action/maelstrom/Manifest @@ -0,0 +1,11 @@ +AUX maelstrom-3.0.6-64bits.patch 499 SHA256 b80f82c7833594d512f2bf4a70a0c1174ab422e11b09025474a6d93454930940 SHA512 b75c094aa91ff443bed86b34ebb52a19221cdc69fd2745a714f1d7728dddd9886c8874054dff7a02513cff7a67cb6c115d7a2757401dd5bcaa96a52537f530a1 WHIRLPOOL adbcedb483e3423f91347a51c3b1b17400015ca1a660db99f01595dc905f341e2ff1b991e24991f689aae940b10a1c7a7fdf668fc2c3e33bc147767bedb2f599 +AUX maelstrom-3.0.6-gcc34.patch 878 SHA256 38a0a869c60e32d2873f536badd28e45f1908027d4e40936f533da2c0741dc3a SHA512 5427e198d6a595f9d68357d0ad31b8d1d7c6bc8db7dde261269a660d8e6102d83d592128e1e2f1c82285e764808f166798cb4a9121d88a8ec7c047efa6d856d6 WHIRLPOOL c1303fda8b4e2a266a3bcb14e2f444d1e332f8deafe5253cc7360ff02ea05d6d8dd4b7523db4442a9f3b06aeff6e9c46fe8df9c0e25b9730568b0d2e3ad94866 +AUX maelstrom-3.0.6-gcc53.patch 537 SHA256 507bc7d542c99d7eef5cefe404d77298f64676a1f79daff369961f0419497cdc SHA512 cfd30e1474a084a1c45831b3d7c3f2a22ca6920e84838c4ff7615f179d377713d181f6d2bca3e660ee58ba2a62378838dec52cdb24fd896efecc40ff43a9c459 WHIRLPOOL c93872a151a2a610c3f615683b173246430552d0eb740d46b2e331084fcb90a9b74822630e47fb4920739a136bd29a6157034f6dc7805f6f4f4df7bac3676058 +AUX maelstrom-3.0.6-security.patch 14189 SHA256 977d7558b094037ad82177d56ac897e376714e939568b0925ad28708aad6099f SHA512 7e8c6c5c7244fa8871fe55b95e9d2a8c631735590dba04e9e2dfed62e2dfc6264f1b990f3737d797c7762fbceda17474782b1720f944d444bdb8627b43188cb3 WHIRLPOOL da1c87ac540822895e3b7aeacb7cffb992300344b06012ea9ad920f977a4651f23db3fea65744bc4bd056ffb18886ae5ca26bc74418e4b0b66ac3d2c12628ff3 +AUX maelstrom-3.0.6-warnings.patch 438 SHA256 527254c6873d75430e773af64b35e9d8e9f459f4451bcd0c94266394460571a9 SHA512 5310843f4a126acf62686aaa9d2086a85a313258fbc0b35b27a8bf7a24389a70264691454a018252d1997bc70093dbaf80c44282c3c59ba39d8cfaa7018866f7 WHIRLPOOL 63211dca3891451681aacacb4114ec0cbd6e064ba0ac0849e8eb7209560669da242919d888268bbd018195a84153235cec2969df360a08496ea98dc07b061e69 +DIST Maelstrom-3.0.6.tar.gz 1007421 SHA256 bb6ca1952d1080e25f8716a2d08a4241614ee72d54f13c8a60eecadf7ea6198d SHA512 fecd2411f5d2109aa99e5a6c65702c74f9f79326fc9f074a53005238c846780f231776b9c170ceb54b0470894b856abaa4708c59afd912fa5b2868e6776893ca WHIRLPOOL 36e9266a246a9bd55923e81e89d6a59956d3f7c15d8231b2973c8b1c77280828b7508cbc1978ea069a7149a1b4e2ba2de2f8debd8da55c0c082f125039d60829 +EBUILD maelstrom-3.0.6-r2.ebuild 1878 SHA256 ecd012ba3def782a13a94c8994fe0669e58aa00c5de8c2c841db3f1af0ea8201 SHA512 296d2abd9abcfc0bfb089363093ebcd0d509da4931102239ee7f647a38e282e80763dfdbf96f92c1fc2e50e0ff302d26d11c0b5fd93d1d261c6378ca25d22c3a WHIRLPOOL 6e357885d39f004efaa3e6f5d791698cd63a48c994d9fbc3e8136c00555c265524666af40c58b9d9fb1a55c59172f5a6378a993b7a717b15d5fa271cf97adffb +EBUILD maelstrom-3.0.6-r3.ebuild 1946 SHA256 ae10bcbdb4856c872a16c678bf08877da6fb4185dfac43cf115752a8cdef3ff7 SHA512 b3c39bb003bb18e214347436cfa3d049cab8357ed376e2c41095371a17e16a8b9535c1914da81c3b28bd03d4954c5d14541f7e11682dbad29bd197fc13b55150 WHIRLPOOL d1d5db716e8cd8e7016b61e7c629140a7db05391162fe1a361f37c8c904fe47e1b351a72aaceba561eeb84d2e219c3bc93f8cdc920290ad87c3e08a04ae21f9c +MISC ChangeLog 3385 SHA256 53aa5690b54b138979bf5e0c60e546ffd20ffbccd5aab9dcbabc0b26aae5ec4b SHA512 6c12ab8469fa152aaf7f82e8ee16d3579d6ab6ca820f13b036b20a6c1a5946752e4a6969aabe355ab8a630f056767c44d0371b0fcf31f73505852679d2a0c7dc WHIRLPOOL 64ee92cb79c2c2ef594f6b20cf8d685e0ca4be7d6135725e2288aa48ed2ef94fd9d16a2bcc23e35eee3b495173d3a6c1c6202d2e859435c71fd8ff9de6174762 +MISC ChangeLog-2015 4166 SHA256 3946cc5cf81406efa0100353f5bd64689568f153e2e2070081bb42ef27acec0e SHA512 98a50278df1751c1c0efcc3e6326526da389cecea3f9f2afdbad0844a33e5476395bb96fa0e7c184f34497e0287919dd08c1a2ab639c87985b7b06d7e84865df WHIRLPOOL bb5ab1554007ff11f77b8decccfd0c8c2bcb6942195fe2be1910c6078eb677a3e0bed4db91ccf00e4b0dc6e740fb898c2032d14e8c39b88295a1e45b1f6d9e79 +MISC metadata.xml 249 SHA256 943b9ce0cd072229b43569ab668dd7ec741d9dfefd942c8921dabd4490b27b0c SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118 WHIRLPOOL b10e21575c78e201a652c8582cd16e3f7c86b13dd20a30f4cea44066fb139440b3c186147dbaae83478f11a20b6f457a99c8b29ee1239a4caaa21eee01250088 diff --git a/games-action/maelstrom/files/maelstrom-3.0.6-64bits.patch b/games-action/maelstrom/files/maelstrom-3.0.6-64bits.patch new file mode 100644 index 000000000000..7d6f59a5ac26 --- /dev/null +++ b/games-action/maelstrom/files/maelstrom-3.0.6-64bits.patch @@ -0,0 +1,15 @@ +--- a/screenlib/SDL_FrameBuf.cpp 2006-10-25 22:37:21.000000000 +0200 ++++ b/screenlib/SDL_FrameBuf.cpp 2006-10-25 22:38:26.000000000 +0200 +@@ -847,10 +847,8 @@ + /* Update the dirty rectangle map with the new list */ + for ( i=0; inext; 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-gcc53.patch b/games-action/maelstrom/files/maelstrom-3.0.6-gcc53.patch new file mode 100644 index 000000000000..db7624bacf91 --- /dev/null +++ b/games-action/maelstrom/files/maelstrom-3.0.6-gcc53.patch @@ -0,0 +1,11 @@ +--- Maelstrom-3.0.6/Maelstrom-netd.c.orig 2016-06-04 06:02:44.000000000 +0300 ++++ Maelstrom-3.0.6/Maelstrom-netd.c 2016-06-05 13:45:11.422533649 +0300 +@@ -204,7 +204,7 @@ + memset(&serv_addr, 0, sizeof(serv_addr)); + serv_addr.sin_family = AF_INET; + serv_addr.sin_addr.s_addr = htonl(INADDR_ANY); +- serv_addr.sin_port = htons(NETPLAY_PORT-1); ++ serv_addr.sin_port = htons(NETPLAY_PORT - 1); + if (bind(netfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) { + perror("Can't bind local address"); + exit(3); 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>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 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..8b2ca084c65f --- /dev/null +++ b/games-action/maelstrom/files/maelstrom-3.0.6-warnings.patch @@ -0,0 +1,20 @@ +--- a/Maelstrom-netd.c 2014-03-18 01:00:28.408099526 -0400 ++++ b/Maelstrom-netd.c 2014-03-18 01:01:29.892142782 -0400 +@@ -1,7 +1,9 @@ + + /* Here we go... */ + ++#include + #include ++#include + #include + #include + #include +@@ -9,6 +11,7 @@ + #include + #include + #include ++#include + #include + #include + 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..0e1fe8d3142f --- /dev/null +++ b/games-action/maelstrom/maelstrom-3.0.6-r2.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 x86" +SLOT="0" +LICENSE="GPL-2" +IUSE="" + +DEPEND="media-libs/libsdl[sound,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 \ + "${FILESDIR}"/${P}-gcc53.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 + mv configure.{in,ac} + rm aclocal.m4 acinclude.m4 + 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 +} diff --git a/games-action/maelstrom/maelstrom-3.0.6-r3.ebuild b/games-action/maelstrom/maelstrom-3.0.6-r3.ebuild new file mode 100644 index 000000000000..bd1110643dbe --- /dev/null +++ b/games-action/maelstrom/maelstrom-3.0.6-r3.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools eutils user + +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 ~x86" +SLOT="0" +LICENSE="GPL-2" +IUSE="" + +DEPEND="media-libs/libsdl[sound,joystick,video] + media-libs/sdl-net" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${MY_P} + +PATCHES=( + "${FILESDIR}"/${P}-security.patch + "${FILESDIR}"/${P}-64bits.patch + "${FILESDIR}"/${P}-gcc34.patch + "${FILESDIR}"/${P}-warnings.patch + "${FILESDIR}"/${P}-gcc53.patch +) + +pkg_setup(){ + enewgroup gamestat 36 +} + +src_prepare() { + default + + # 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):\"/var/games/\"MAELSTROM_SCORES:" scores.cpp || die + mv configure.{in,ac} + rm aclocal.m4 acinclude.m4 + eautoreconf +} + +src_install() { + default + dodoc Changelog Docs/{Maelstrom-Announce,*FAQ,MaelstromGPL_press_release,*.Paper,Technical_Notes*} + + newicon "${D}/usr/share/Maelstrom/icon.xpm" maelstrom.xpm + make_desktop_entry Maelstrom "Maelstrom" maelstrom + + # Put the high scores file in the right place + insinto /var/games + doins "${D}/usr/share/Maelstrom/Maelstrom-Scores" + + # clean up some cruft + rm -f \ + "${D}/usr/share/Maelstrom/Maelstrom-Scores" \ + "${D}/usr/share/Maelstrom/Images/Makefile*" + + # make sure we can update the high scores + fowners root:gamestat /var/games/Maelstrom-Scores /usr/bin/Maelstrom{,-netd} + fperms 2755 /usr/bin/Maelstrom{,-netd} + fperms 660 /var/games/Maelstrom-Scores +} diff --git a/games-action/maelstrom/metadata.xml b/games-action/maelstrom/metadata.xml new file mode 100644 index 000000000000..78274e0fa550 --- /dev/null +++ b/games-action/maelstrom/metadata.xml @@ -0,0 +1,8 @@ + + + + + games@gentoo.org + Gentoo Games Project + + -- cgit v1.2.3