commit fc00dd5f5484c9d0e2c6ffb8d59ef818f6cccba8
Author: Jakub Bogusz <qbo...@pld-linux.org>
Date:   Sat Sep 23 08:07:50 2023 +0200

    - updated to 0.68; added format patch

 gnurobbo-flags.patch  |  24 ++----
 gnurobbo-format.patch | 216 ++++++++++++++++++++++++++++++++++++++++++++++++++
 gnurobbo.spec         |  30 +++----
 3 files changed, 239 insertions(+), 31 deletions(-)
---
diff --git a/gnurobbo.spec b/gnurobbo.spec
index 3b3b306..67d6861 100644
--- a/gnurobbo.spec
+++ b/gnurobbo.spec
@@ -1,15 +1,16 @@
 Summary:       A clone of the famous 8bit Atari game Robbo
 Summary(pl.UTF-8):     Klon słynnej gry Robbo znanej z 8-bitowych Atari
 Name:          gnurobbo
-Version:       0.66
+Version:       0.68
 Release:       1
 License:       GPL v2+
 Group:         X11/Applications/Games
-Source0:       
http://downloads.sourceforge.net/gnurobbo/%{name}-%{version}-source.tar.gz
-# Source0-md5: 77fdf9a186a08c1f95b94bd35ebbc21c
+Source0:       
https://downloads.sourceforge.net/gnurobbo/%{name}-%{version}-source.tar.gz
+# Source0-md5: 7d1f194a67dcc66c6c88ae1037db4a50
 Source1:       %{name}.desktop
 Patch0:                %{name}-flags.patch
-URL:           http://gnurobbo.sourceforge.net/
+Patch1:                %{name}-format.patch
+URL:           https://gnurobbo.sourceforge.net/
 BuildRequires: SDL_image-devel
 BuildRequires: SDL_mixer-devel
 BuildRequires: SDL_ttf-devel
@@ -27,11 +28,12 @@ ratunkowej.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
-%{__make} \
+%{__make} -C gnurobbo \
        CC="%{__cc}" \
-       OPTFLAGS="%{rpmcflags}" \
+       OPTFLAGS="%{rpmcflags} -fcommon" \
        LDFLAGS="%{rpmldflags}" \
        PACKAGE_DATA_DIR=%{_datadir}/%{name}
 
@@ -39,24 +41,24 @@ ratunkowej.
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
 
-%{__make} install \
+%{__make} -C gnurobbo install \
        PACKAGE_DATA_DIR=$RPM_BUILD_ROOT%{_datadir}/%{name} \
        BINDIR=$RPM_BUILD_ROOT%{_bindir} \
        DOCDIR=data
 
-cp -r data/skins/tronic $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/
-cp -r data/locales $RPM_BUILD_ROOT%{_datadir}/%{name}/
+cp -pr gnurobbo/data/skins/tronic $RPM_BUILD_ROOT%{_datadir}/%{name}/skins
+cp -pr gnurobbo/data/locales $RPM_BUILD_ROOT%{_datadir}/%{name}
 
 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
-install icon32.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
+install gnurobbo/icon32.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS Bugs ChangeLog README TODO
-%attr(755,root,root) %{_bindir}/*
+%doc gnurobbo/{AUTHORS,Bugs,ChangeLog,NEWS,README,TODO}
+%attr(755,root,root) %{_bindir}/gnurobbo
 %{_datadir}/%{name}
-%{_desktopdir}/*.desktop
-%{_pixmapsdir}/*
+%{_desktopdir}/gnurobbo.desktop
+%{_pixmapsdir}/gnurobbo.png
diff --git a/gnurobbo-flags.patch b/gnurobbo-flags.patch
index 724c790..717324c 100644
--- a/gnurobbo-flags.patch
+++ b/gnurobbo-flags.patch
@@ -1,21 +1,11 @@
---- gnurobbo-0.66/Makefile~    2010-08-23 22:41:09.000000000 +0200
-+++ gnurobbo-0.66/Makefile     2010-11-15 09:37:56.453247079 +0100
-@@ -36,8 +36,7 @@
+--- gnurobbo-0.68/gnurobbo/Makefile.orig       2023-09-22 21:11:40.226215359 
+0200
++++ gnurobbo-0.68/gnurobbo/Makefile    2023-09-22 21:18:47.603900056 +0200
+@@ -61,7 +61,7 @@ SDL_CONFIG?=sdl-config
  
- # These should be ok for most
- SDL_CONFIG?=sdl-config
--CFLAGS?=-O3 -pipe
--CFLAGS+=-Wall `$(SDL_CONFIG) --cflags` -DPLATFORM_PC -DVERSION=\"$(VERSION)\" 
\
-+CFLAGS+=$(OPTFLAGS) `$(SDL_CONFIG) --cflags` -DPLATFORM_PC 
-DVERSION=\"$(VERSION)\" \
+ 
+ 
+-CFLAGS+=-d -Wall  `$(SDL_CONFIG) --cflags` -DPLATFORM_PC 
-DVERSION=\"$(VERSION)\" $(SMOOTH_SCRL) $(LIGHTNING)\
++CFLAGS+=$(OPTFLAGS) -Wall  `$(SDL_CONFIG) --cflags` -DPLATFORM_PC 
-DVERSION=\"$(VERSION)\" $(SMOOTH_SCRL) $(LIGHTNING)\
        -DPACKAGE_DATA_DIR=\"$(PACKAGE_DATA_DIR)\" $(FONT_USE_PIXMAP) $(MUSIC) 
$(DESIGNER)
  LDFLAGS=
  # Use these instead for debugging and/or profiling (mainly intended for GNU 
Robbo developers)
-@@ -46,7 +45,7 @@
- #     -DPACKAGE_DATA_DIR=\"$(PACKAGE_DATA_DIR)\" $(FONT_USE_PIXMAP) $(MUSIC) 
$(DESIGNER)
- #LDFLAGS=-pg
- LINK=$(CC)
--LIBS=`$(SDL_CONFIG) --libs` -lSDL_image -lSDL_mixer $(FONT_USE_SDL_TTF)
-+LIBS=`$(SDL_CONFIG) --libs` -lSDL_image -lSDL_mixer $(FONT_USE_SDL_TTF) -lm
- 
- # You won't need to alter anything below
- all: $(SOURCES) $(TARGET)
diff --git a/gnurobbo-format.patch b/gnurobbo-format.patch
new file mode 100644
index 0000000..3a86c48
--- /dev/null
+++ b/gnurobbo-format.patch
@@ -0,0 +1,216 @@
+--- gnurobbo-0.68/gnurobbo/konstruktor.c.orig  2012-01-18 21:03:07.000000000 
+0100
++++ gnurobbo-0.68/gnurobbo/konstruktor.c       2023-09-22 21:27:26.971086402 
+0200
+@@ -247,7 +247,7 @@ konstruktor_init()
+     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 @@ konstruktor_click()
+               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 @@ konstruktor_click()
+                       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 @@ konstruktor_click()
+           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 @@ konstruktor_click()
+               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 @@ konstruktor_click()
+                   k_redraw_all();
+                   cnt = -1;
+               } else {
+-                  sprintf(infostring,
++                  strcpy(infostring,
+                       txt_konstruktor_Reload_level_select_again_to_reload);
+                   lastclick = 50;
+               };
+@@ -1048,16 +1048,16 @@ konstruktor_click()
+               inforedraw = 1;
+               break;
+           case EMPTY_FIELD:
+-              sprintf(infostring, txt_konstruktor_Empty_Field);
++              strcpy(infostring, txt_konstruktor_Empty_Field);
+               inforedraw = 1;
+               break;
+           case WALL:
+               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 @@ konstruktor_click()
+                   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 @@ konstruktor_click()
+           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 @@ konstruktor_click()
+               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,23 +1136,23 @@ konstruktor_click()
+               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;
+               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 @@ konstruktor_click()
+                   cnt = -1;
+ 
+               } else {
+-                  sprintf(infostring,
++                  strcpy(infostring,
+                       txt_konstruktor_New_level_select_again_to_create);
+                   lastclick = 50;
+               }
+@@ -1187,7 +1187,7 @@ konstruktor_click()
+                * 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 @@ konstruktor_click()
+                   clear_entire_board();
+                   cnt = -1;
+               } else {
+-                  sprintf(infostring,
++                  strcpy(infostring,
+                       txt_konstruktor_Clear_level_select_again_to_clear);
+                   lastclick = 50;
+               }
+@@ -1215,9 +1215,9 @@ konstruktor_click()
+           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 @@ konstruktor_click()
+                   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_click()
+                   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 */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gnurobbo.git/commitdiff/fc00dd5f5484c9d0e2c6ffb8d59ef818f6cccba8

_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to