summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2018-05-01 13:56:18 +0200
committerPacho Ramos <pacho@gentoo.org>2018-05-01 21:32:49 +0200
commit5873ea1cc9192273e6ce5c24bb65140c1e1d6ae9 (patch)
tree81947ab27d795a5f58a087981fe7773ebd818678 /games-puzzle/gnurobbo
parentgames-puzzle/gnudoku: Drop old (diff)
downloadgentoo-5873ea1cc9192273e6ce5c24bb65140c1e1d6ae9.tar.gz
gentoo-5873ea1cc9192273e6ce5c24bb65140c1e1d6ae9.tar.bz2
gentoo-5873ea1cc9192273e6ce5c24bb65140c1e1d6ae9.zip
games-puzzle/gnurobbo: Stop using games.eclass
Package-Manager: Portage-2.3.31, Repoman-2.3.9
Diffstat (limited to 'games-puzzle/gnurobbo')
-rw-r--r--games-puzzle/gnurobbo/files/gnurobbo-0.66-hardening.patch220
-rw-r--r--games-puzzle/gnurobbo/files/gnurobbo-0.66-underlink.patch4
-rw-r--r--games-puzzle/gnurobbo/gnurobbo-0.66-r1.ebuild40
3 files changed, 262 insertions, 2 deletions
diff --git a/games-puzzle/gnurobbo/files/gnurobbo-0.66-hardening.patch b/games-puzzle/gnurobbo/files/gnurobbo-0.66-hardening.patch
new file mode 100644
index 000000000000..c1502aca4290
--- /dev/null
+++ b/games-puzzle/gnurobbo/files/gnurobbo-0.66-hardening.patch
@@ -0,0 +1,220 @@
+Index: konstruktor.c
+===================================================================
+--- a/konstruktor.c (Revision 412)
++++ b/konstruktor.c (Arbeitskopie)
+@@ -247,7 +247,7 @@
+ else if (level.w == 32 && level.h == 31)
+ gsize = 1;
+ inforedraw = 1;
+- sprintf(infostring, txt_konstruktor_Welcome_to_GNU_Robbo_Designer);
++ strcpy(infostring, txt_konstruktor_Welcome_to_GNU_Robbo_Designer);
+ robbo.keys = k_count_obj(KEY); /* count keys on a map */
+ robbo.bullets = k_count_obj(BULLET) * 9; /* count bullets */
+ game_area.redraw = REDRAW_EVERYTHING;
+@@ -688,7 +688,7 @@
+ create_object(nx, ny, BOMB2);
+ switch (K_icons[selected].game_obj) {
+ case GROUND:
+- sprintf(infostring, txt_konstruktor_Ground);
++ strcpy(infostring, txt_konstruktor_Ground);
+ break;
+ case STOP:
+ sprintf(infostring, "%s (%d %s)",
+@@ -745,7 +745,7 @@
+ txt_konstruktor_on_map);
+ break;
+ case EMPTY_FIELD:
+- sprintf(infostring, txt_konstruktor_Empty_Field);
++ strcpy(infostring, txt_konstruktor_Empty_Field);
+ break;
+ case BUTTERFLY:
+ sprintf(infostring, "%s (%d %s)",
+@@ -783,9 +783,9 @@
+ case WALL:
+ board[nx][ny].state = wallnumber;
+ if (wallnumber != 3)
+- sprintf(infostring, txt_konstruktor_Wall);
++ strcpy(infostring, txt_konstruktor_Wall);
+ else
+- sprintf(infostring, txt_konstruktor_Black_Wall);
++ strcpy(infostring, txt_konstruktor_Black_Wall);
+ // game_area.redraw=REDRAW_EVERYTHING;
+ break;
+ case TELEPORT:
+@@ -905,7 +905,7 @@
+ break;
+ case K_RELOAD:
+ if (cnt == lastselected) {
+- sprintf(infostring, txt_konstruktor_Level_reloaded);
++ strcpy(infostring, txt_konstruktor_Level_reloaded);
+ clear_screen();
+ level_init();
+ konstruktor_viewport_init();
+@@ -923,7 +923,7 @@
+ k_redraw_all();
+ cnt = -1;
+ } else {
+- sprintf(infostring,
++ strcpy(infostring,
+ txt_konstruktor_Reload_level_select_again_to_reload);
+ lastclick = 50;
+ };
+@@ -1048,7 +1048,7 @@
+ inforedraw = 1;
+ break;
+ case EMPTY_FIELD:
+- sprintf(infostring, txt_konstruktor_Empty_Field);
++ strcpy(infostring, txt_konstruktor_Empty_Field);
+ inforedraw = 1;
+ break;
+ case WALL:
+@@ -1055,9 +1055,9 @@
+ if (cnt == selected)
+ wallnumber = (wallnumber + 1) % 10;
+ if (wallnumber != 3)
+- sprintf(infostring, txt_konstruktor_Wall);
++ strcpy(infostring, txt_konstruktor_Wall);
+ else
+- sprintf(infostring, txt_konstruktor_Black_Wall);
++ strcpy(infostring, txt_konstruktor_Black_Wall);
+ inforedraw = 1;
+ break;
+ case K_LASER:
+@@ -1078,7 +1078,7 @@
+ teleportnr = (teleportnr % 11) + 1;
+ break;
+ case GROUND:
+- sprintf(infostring, txt_konstruktor_Ground);
++ strcpy(infostring, txt_konstruktor_Ground);
+ inforedraw = 1;
+ break;
+ case BIRD:
+@@ -1101,16 +1101,16 @@
+ direction = (direction + 1) % 4;
+ switch (direction) {
+ case 0:
+- sprintf(infostring, txt_konstruktor_Direction_right);
++ strcpy(infostring, txt_konstruktor_Direction_right);
+ break;
+ case 1:
+- sprintf(infostring, txt_konstruktor_Direction_down);
++ strcpy(infostring, txt_konstruktor_Direction_down);
+ break;
+ case 2:
+- sprintf(infostring, txt_konstruktor_Direction_left);
++ strcpy(infostring, txt_konstruktor_Direction_left);
+ break;
+ case 3:
+- sprintf(infostring, txt_konstruktor_Direction_up);
++ strcpy(infostring, txt_konstruktor_Direction_up);
+ break;
+ }
+ inforedraw = 1;
+@@ -1119,13 +1119,13 @@
+ ltype = (ltype + 1) % 3;
+ switch (ltype) {
+ case 0:
+- sprintf(infostring, txt_konstruktor_Laser_Gun);
++ strcpy(infostring, txt_konstruktor_Laser_Gun);
+ break;
+ case 1:
+- sprintf(infostring, txt_konstruktor_Blaster_Gun);
++ strcpy(infostring, txt_konstruktor_Blaster_Gun);
+ break;
+ case 2:
+- sprintf(infostring, txt_konstruktor_Regular_Gun);
++ strcpy(infostring, txt_konstruktor_Regular_Gun);
+ break;
+ }
+ inforedraw = 1;
+@@ -1136,16 +1136,16 @@
+ movable = (rmstate & 1);
+ switch (rmstate) {
+ case 0:
+- sprintf(infostring, txt_konstruktor_Fixed);
++ strcpy(infostring, txt_konstruktor_Fixed);
+ break;
+ case 1:
+- sprintf(infostring, txt_konstruktor_Moveable);
++ strcpy(infostring, txt_konstruktor_Moveable);
+ break;
+ case 2:
+- sprintf(infostring, txt_konstruktor_Rotating);
++ strcpy(infostring, txt_konstruktor_Rotating);
+ break;
+ case 3:
+- sprintf(infostring, txt_konstruktor_Moveable_Rotating);
++ strcpy(infostring, txt_konstruktor_Moveable_Rotating);
+ break;
+ }
+ inforedraw = 1;
+@@ -1152,7 +1152,7 @@
+ break;
+ case K_INSERT:
+ if (lastselected == cnt) {
+- sprintf(infostring, txt_konstruktor_Level_created);
++ strcpy(infostring, txt_konstruktor_Level_created);
+ insert = 1;
+ /*
+ * Clear board
+@@ -1176,7 +1176,7 @@
+ cnt = -1;
+
+ } else {
+- sprintf(infostring,
++ strcpy(infostring,
+ txt_konstruktor_New_level_select_again_to_create);
+ lastclick = 50;
+ }
+@@ -1187,7 +1187,7 @@
+ * Clear board
+ */
+ if (lastselected == cnt) {
+- sprintf(infostring, txt_konstruktor_Level_cleared);
++ strcpy(infostring, txt_konstruktor_Level_cleared);
+ robbo.screws = 0;
+ robbo.keys = 0;
+ robbo.bullets = 0; /* Thunor: I added this as it was missing */
+@@ -1206,7 +1206,7 @@
+ clear_entire_board();
+ cnt = -1;
+ } else {
+- sprintf(infostring,
++ strcpy(infostring,
+ txt_konstruktor_Clear_level_select_again_to_clear);
+ lastclick = 50;
+ }
+@@ -1215,9 +1215,9 @@
+ case K_SAVE:
+ if (lastselected == cnt) {
+ if (insert == 1)
+- sprintf(infostring, txt_konstruktor_New_level_appended_to_pack);
++ strcpy(infostring, txt_konstruktor_New_level_appended_to_pack);
+ else
+- sprintf(infostring, txt_konstruktor_Changes_saved);
++ strcpy(infostring, txt_konstruktor_Changes_saved);
+ cnt = -1;
+
+ k_save_map();
+@@ -1228,10 +1228,10 @@
+ lastclick = 50;
+
+ if (insert == 1)
+- sprintf(infostring,
++ strcpy(infostring,
+ txt_konstruktor_Save_select_again_to_save_new_level);
+ else
+- sprintf(infostring,
++ strcpy(infostring,
+ txt_konstruktor_Save_select_again_to_save_changes);
+ }
+ inforedraw = 1;
+@@ -1297,7 +1297,7 @@
+ konstruktor_end();
+ cnt = -1;
+ } else {
+- sprintf(infostring,
++ strcpy(infostring,
+ txt_konstruktor_Exit_designer_select_again_to_exit);
+ lastclick = 50; /* very long click is used as
+ * another click */
diff --git a/games-puzzle/gnurobbo/files/gnurobbo-0.66-underlink.patch b/games-puzzle/gnurobbo/files/gnurobbo-0.66-underlink.patch
index 9034a6fac0e2..af69bd9e1c9d 100644
--- a/games-puzzle/gnurobbo/files/gnurobbo-0.66-underlink.patch
+++ b/games-puzzle/gnurobbo/files/gnurobbo-0.66-underlink.patch
@@ -1,5 +1,5 @@
---- Makefile.old 2011-06-20 21:19:49.578922392 +0200
-+++ Makefile 2011-06-20 21:20:28.535421648 +0200
+--- a/Makefile.old 2011-06-20 21:19:49.578922392 +0200
++++ b/Makefile 2011-06-20 21:20:28.535421648 +0200
@@ -39,14 +39,13 @@
CFLAGS?=-O3 -pipe
CFLAGS+=-Wall `$(SDL_CONFIG) --cflags` -DPLATFORM_PC -DVERSION=\"$(VERSION)\" \
diff --git a/games-puzzle/gnurobbo/gnurobbo-0.66-r1.ebuild b/games-puzzle/gnurobbo/gnurobbo-0.66-r1.ebuild
new file mode 100644
index 000000000000..39a81fdcd790
--- /dev/null
+++ b/games-puzzle/gnurobbo/gnurobbo-0.66-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop
+
+DESCRIPTION="Robbo, a popular Atari XE/XL game ported to Linux"
+HOMEPAGE="http://gnurobbo.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gnurobbo/${P}-source.tar.gz"
+
+LICENSE="GPL-2 BitstreamVera"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ media-libs/libsdl[sound,video,joystick]
+ media-libs/sdl-image[png]
+ media-libs/sdl-mixer[vorbis]
+ media-libs/sdl-ttf
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-underlink.patch )
+
+src_compile() {
+ emake \
+ PACKAGE_DATA_DIR="/usr/share/${PN}" \
+ BINDIR="/usr/bin" \
+ DOCDIR="/usr/share/doc/${PF}"
+}
+
+src_install() {
+ dobin gnurobbo
+ insinto "/usr/share/${PN}"
+ doins -r data/{levels,skins,locales,rob,sounds}
+ dodoc AUTHORS Bugs ChangeLog README TODO
+ newicon icon32.png ${PN}.png
+ make_desktop_entry ${PN} Gnurobbo
+}