[packages/ltris] - updated to 1.3.2
qboosh
qboosh at pld-linux.org
Sat Jun 15 21:22:13 CEST 2024
commit 4b1a88420d95c58baebc52f1b2a0d568c123b0aa
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Jun 15 21:12:43 2024 +0200
- updated to 1.3.2
ltris-desktop.patch | 28 +-----
ltris-format.patch | 11 +++
ltris-inline.patch | 266 ----------------------------------------------------
ltris.spec | 28 ++++--
4 files changed, 33 insertions(+), 300 deletions(-)
---
diff --git a/ltris.spec b/ltris.spec
index e5a9d95..f8086ab 100644
--- a/ltris.spec
+++ b/ltris.spec
@@ -1,21 +1,23 @@
Summary: A tetris clone for Linux
Summary(pl.UTF-8): Klon tetrisa dla Linuksa
Name: ltris
-Version: 1.0.19
-Release: 2
+Version: 1.3.2
+Release: 1
License: GPL v2+
Group: X11/Applications/Games
-Source0: http://downloads.sourceforge.net/lgames/%{name}-%{version}.tar.gz
-# Source0-md5: 63486b90e59699823f7093bc9ab87725
+Source0: https://downloads.sourceforge.net/lgames/%{name}-%{version}.tar.gz
+# Source0-md5: c0ea65634a111f3952609e4db9b0eef4
Patch0: %{name}-desktop.patch
-Patch1: %{name}-inline.patch
-URL: http://lgames.sourceforge.net/LTris
-BuildRequires: autoconf
-BuildRequires: automake
+Patch1: %{name}-format.patch
+URL: https://lgames.sourceforge.net/LTris
BuildRequires: SDL-devel >= 1.2.4
BuildRequires: SDL_mixer-devel
+BuildRequires: autoconf >= 2.71
+BuildRequires: automake
BuildRequires: gettext-tools
+Requires(post,postun): gtk-update-icon-cache
Requires: SDL >= 1.2.4
+Requires: hicolor-icon-theme
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _localstatedir /var/games
@@ -33,7 +35,7 @@ LTris jest klonem gry Tetris dla Linuksa. Korzysta z biblioteki SDL.
%build
%{__gettextize}
-%{__aclocal}
+%{__aclocal} -I m4
%{__autoconf}
%{__autoheader}
%{__automake}
@@ -51,11 +53,17 @@ rm -rf $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
+%post
+%update_icon_cache hicolor
+
+%postun
+%update_icon_cache hicolor
+
%files -f %{name}.lang
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog README
%attr(2755,root,games) %{_bindir}/ltris
%{_desktopdir}/ltris.desktop
-%{_pixmapsdir}/ltris48.gif
+%{_iconsdir}/hicolor/48x48/apps/ltris.png
%{_datadir}/ltris
%attr(664,root,games) %config(noreplace) %verify(not md5 mtime size) /var/games/ltris.hscr
diff --git a/ltris-desktop.patch b/ltris-desktop.patch
index 1a6db03..fe760ec 100644
--- a/ltris-desktop.patch
+++ b/ltris-desktop.patch
@@ -1,32 +1,12 @@
---- ltris-1.0.19/ltris.desktop.in.orig 2013-05-03 19:13:13.000000000 +0200
-+++ ltris-1.0.19/ltris.desktop.in 2016-09-07 18:22:49.937133008 +0200
+--- ltris-1.3.2/ltris.desktop.orig 2023-09-05 08:25:16.000000000 +0200
++++ ltris-1.3.2/ltris.desktop 2024-06-15 20:50:25.817896535 +0200
@@ -1,7 +1,8 @@
[Desktop Entry]
Name=LTris
Comment=A tetris clone with nice graphics.
-+Comment[pl]=Klon tetrisa z �adn� grafik�.
++Comment[pl]=Klon tetrisa z ładną grafiką.
Exec=ltris
- Icon=
+ Icon=ltris
Type=Application
-Categories=Game;
+Categories=Game;ArcadeGame;
---- ltris-1.0.19/Makefile.am.orig 2013-05-03 19:13:13.000000000 +0200
-+++ ltris-1.0.19/Makefile.am 2016-09-07 18:24:26.810465235 +0200
-@@ -6,7 +6,7 @@
-
- desktopdir = $(datadir)/applications
- desktop_DATA = ltris.desktop
--icondir = $(datadir)/icons
-+icondir = $(datadir)/pixmaps
- icon_DATA = ltris48.gif
-
- AUTOMAKE_OPTIONS = foreign
-@@ -15,7 +15,7 @@
- # the right way to handle it? At least it works... as long as $datadir
- # does not contain plus signs. :-)
- ltris.desktop:
-- @sed -e "s+Icon=+Icon=$(datadir)/icons/ltris48.gif+" \
-+ @sed -e "s+Icon=+Icon=$(datadir)/pixmaps/ltris48.gif+" \
- < ltris.desktop.in > ltris.desktop
-
- ACLOCAL_AMFLAGS = -I m4
diff --git a/ltris-format.patch b/ltris-format.patch
new file mode 100644
index 0000000..7eb997e
--- /dev/null
+++ b/ltris-format.patch
@@ -0,0 +1,11 @@
+--- ltris-1.3.2/configure.ac.orig 2024-06-08 11:24:46.000000000 +0200
++++ ltris-1.3.2/configure.ac 2024-06-15 21:06:26.012694713 +0200
+@@ -14,7 +14,7 @@ AC_PROG_RANLIB
+ # Checks for libraries.
+ AM_PATH_SDL(1.0.0,, AC_MSG_ERROR(lib SDL is needed))
+
+-CFLAGS="$CFLAGS -Wall -Wno-int-conversion -Wno-format -Wno-implicit-function-declaration"
++CFLAGS="$CFLAGS -Wall -Wno-int-conversion"
+
+ dnl Check Zarus install
+ AC_ARG_ENABLE( zaurus,
diff --git a/ltris-inline.patch b/ltris-inline.patch
deleted file mode 100644
index b8d7ccc..0000000
--- a/ltris-inline.patch
+++ /dev/null
@@ -1,266 +0,0 @@
---- ltris-1.0.19/src/sdl.c.orig 2013-10-29 16:21:35.000000000 +0100
-+++ ltris-1.0.19/src/sdl.c 2016-09-07 21:25:02.878555994 +0200
-@@ -244,7 +244,7 @@ done:
- #endif
-
- /* return full path of bitmap */
--inline void get_full_bmp_path( char *full_path, char *file_name )
-+void get_full_bmp_path( char *full_path, char *file_name )
- {
- sprintf(full_path, "%s/gfx/%s", SRC_DIR, file_name );
- }
-@@ -330,7 +330,7 @@ void free_surf( SDL_Surface **surf )
- /*
- lock surface
- */
--inline void lock_surf(SDL_Surface *sur)
-+void lock_surf(SDL_Surface *sur)
- {
- if (SDL_MUSTLOCK(sur))
- SDL_LockSurface(sur);
-@@ -339,7 +339,7 @@ inline void lock_surf(SDL_Surface *sur)
- /*
- unlock surface
- */
--inline void unlock_surf(SDL_Surface *sur)
-+void unlock_surf(SDL_Surface *sur)
- {
- if (SDL_MUSTLOCK(sur))
- SDL_UnlockSurface(sur);
-@@ -666,7 +666,7 @@ int write_text(Font *fnt, SDL_Surface *d
- /*
- lock font surface
- */
--inline void lock_font(Font *fnt)
-+void lock_font(Font *fnt)
- {
- if (SDL_MUSTLOCK(fnt->pic))
- SDL_LockSurface(fnt->pic);
-@@ -675,7 +675,7 @@ inline void lock_font(Font *fnt)
- /*
- unlock font surface
- */
--inline void unlock_font(Font *fnt)
-+void unlock_font(Font *fnt)
- {
- if (SDL_MUSTLOCK(fnt->pic))
- SDL_UnlockSurface(fnt->pic);
-@@ -905,7 +905,7 @@ void hardware_cap()
- /*
- update rectangle (0,0,0,0)->fullscreen
- */
--inline void refresh_screen(int x, int y, int w, int h)
-+void refresh_screen(int x, int y, int w, int h)
- {
- SDL_UpdateRect(sdl.screen, x, y, w, h);
- }
-@@ -1055,7 +1055,7 @@ void wait_for_click()
- /*
- lock surface
- */
--inline void lock_screen()
-+void lock_screen()
- {
- if (SDL_MUSTLOCK(sdl.screen))
- SDL_LockSurface(sdl.screen);
-@@ -1064,7 +1064,7 @@ inline void lock_screen()
- /*
- unlock surface
- */
--inline void unlock_screen()
-+void unlock_screen()
- {
- if (SDL_MUSTLOCK(sdl.screen))
- SDL_UnlockSurface(sdl.screen);
-@@ -1073,7 +1073,7 @@ inline void unlock_screen()
- /*
- flip hardware screens (double buffer)
- */
--inline void flip_screen()
-+void flip_screen()
- {
- SDL_Flip(sdl.screen);
- }
-@@ -1132,7 +1132,7 @@ SDL_Cursor* create_cursor( int width, in
- /*
- get milliseconds since last call
- */
--inline int get_time()
-+int get_time()
- {
- int ms;
- cur_time = SDL_GetTicks();
-@@ -1148,7 +1148,7 @@ inline int get_time()
- /*
- reset timer
- */
--inline void reset_timer()
-+void reset_timer()
- {
- last_time = SDL_GetTicks();
- }
---- ltris-1.0.19/src/sdl.h.orig 2013-05-03 19:13:11.000000000 +0200
-+++ ltris-1.0.19/src/sdl.h 2016-09-07 21:24:48.301133428 +0200
-@@ -41,8 +41,8 @@ typedef struct {
- SDL_Surface* load_surf(char *fname, int f);
- SDL_Surface* create_surf(int w, int h, int f);
- void free_surf( SDL_Surface **surf );
--inline void lock_surf(SDL_Surface *sur);
--inline void unlock_surf(SDL_Surface *sur);
-+void lock_surf(SDL_Surface *sur);
-+void unlock_surf(SDL_Surface *sur);
- void blit_surf(void);
- void alpha_blit_surf(int alpha);
- void fill_surf(int c);
-@@ -86,8 +86,8 @@ Font* load_font(char *fname);
- Font* load_fixed_font(char *fname, int off, int len, int w);
- void free_font(Font **sfnt);
- int write_text(Font *sfnt, SDL_Surface *dest, int x, int y, char *str, int alpha);
--inline void lock_font(Font *sfnt);
--inline void unlock_font(Font *sfnt);
-+void lock_font(Font *sfnt);
-+void unlock_font(Font *sfnt);
- SDL_Rect last_write_rect(Font *fnt);
- int text_width(Font *fnt, char *str);
-
-@@ -132,14 +132,14 @@ Video_Mode* cur_video_mode();
- char** get_mode_names( int *count );
- int set_video_mode( Video_Mode mode );
- void hardware_cap();
--inline void refresh_screen( int x, int y, int w, int h );
-+void refresh_screen( int x, int y, int w, int h );
- void refresh_rects();
- void add_refresh_rect(int x, int y, int w, int h);
- int wait_for_key();
- void wait_for_click();
--inline void lock_screen();
--inline void unlock_screen();
--inline void flip_screen();
-+void lock_screen();
-+void unlock_screen();
-+void flip_screen();
- void fade_screen( int type, int ms );
- void take_screenshot( int i );
-
-@@ -148,8 +148,8 @@ void take_screenshot( int i );
- SDL_Cursor* create_cursor( int width, int height, int hot_x, int hot_y, char *source );
-
- /* timer */
--inline int get_time();
--inline void reset_timer();
-+int get_time();
-+void reset_timer();
-
- #ifdef __cplusplus
- };
---- ltris-1.0.19/src/tools.c.orig 2013-05-03 19:13:11.000000000 +0200
-+++ ltris-1.0.19/src/tools.c 2016-09-07 21:26:05.741815705 +0200
-@@ -23,27 +23,27 @@
- #include "ltris.h"
-
- /* compares to strings and returns true if their first strlen(str1) chars are equal */
--inline int strequal( char *str1, char *str2 )
-+int strequal( char *str1, char *str2 )
- {
- if ( strlen( str1 ) != strlen( str2 ) ) return 0;
- return ( !strncmp( str1, str2, strlen( str1 ) ) );
- }
-
- /* set delay to ms milliseconds */
--inline void delay_set( Delay *delay, int ms )
-+void delay_set( Delay *delay, int ms )
- {
- delay->limit = ms;
- delay->cur = 0;
- }
-
- /* reset delay ( cur = 0 )*/
--inline void delay_reset( Delay *delay )
-+void delay_reset( Delay *delay )
- {
- delay->cur = 0;
- }
-
- /* check if times out and reset */
--inline int delay_timed_out( Delay *delay, int ms )
-+int delay_timed_out( Delay *delay, int ms )
- {
- delay->cur += ms;
- if ( delay->cur >= delay->limit ) {
-@@ -56,12 +56,12 @@ inline int delay_timed_out( Delay *delay
- }
-
- /* set timer so that we have a time out next call of delay_timed_out() */
--inline void delay_force_time_out( Delay *delay )
-+void delay_force_time_out( Delay *delay )
- {
- delay->cur = delay->limit;
- }
-
--inline void goto_tile( int *x, int *y, int d )
-+void goto_tile( int *x, int *y, int d )
- {
- /* 0 -up, clockwise, 5 - left up */
- switch ( d ) {
-@@ -326,24 +326,24 @@ Counter with a current float value and a
- the target value until reached when counter_update() is called.
- ====================================================================
- */
--inline void counter_set( Counter *counter, double value )
-+void counter_set( Counter *counter, double value )
- {
- counter->value = value;
- counter->approach = value;
- }
--inline void counter_add( Counter *counter, double add )
-+void counter_add( Counter *counter, double add )
- {
- counter->value += add;
- }
--inline double counter_get_approach( Counter counter )
-+double counter_get_approach( Counter counter )
- {
- return counter.approach;
- }
--inline double counter_get( Counter counter )
-+double counter_get( Counter counter )
- {
- return counter.value;
- }
--inline void counter_update( Counter *counter, int ms )
-+void counter_update( Counter *counter, int ms )
- {
- double change;
- if ( counter->approach == counter->value ) return;
---- ltris-1.0.19/src/tools.h.orig 2013-05-03 19:13:11.000000000 +0200
-+++ ltris-1.0.19/src/tools.h 2016-09-07 21:25:39.397116293 +0200
-@@ -33,7 +33,7 @@
- #define VEC_DIST( vec1, vec2 ) ( sqrt( ( vec1.x - vec2.x ) * ( vec1.x - vec2.x ) + ( vec1.y - vec2.y ) * ( vec1.y - vec2.y ) ) )
-
- /* compares to strings and returns true if their first strlen(str1) chars are equal */
--inline int strequal( char *str1, char *str2 );
-+int strequal( char *str1, char *str2 );
-
- /* delete lines */
- void delete_lines( char **lines, int line_number );
-@@ -45,16 +45,16 @@ typedef struct {
- } Delay;
-
- /* set delay to ms milliseconds */
--inline void delay_set( Delay *delay, int ms );
-+void delay_set( Delay *delay, int ms );
-
- /* reset delay ( cur = 0 )*/
--inline void delay_reset( Delay *delay );
-+void delay_reset( Delay *delay );
-
- /* check if time's out ( add ms milliseconds )and reset */
--inline int delay_timed_out( Delay *delay, int ms );
-+int delay_timed_out( Delay *delay, int ms );
-
- /* set timer so that we have a time out next call of delay_timed_out() */
--inline void delay_force_time_out( Delay *delay );
-+void delay_force_time_out( Delay *delay );
-
- /* return distance betwteen to map positions */
- int get_dist( int x1, int y1, int x2, int y2 );
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ltris.git/commitdiff/4b1a88420d95c58baebc52f1b2a0d568c123b0aa
More information about the pld-cvs-commit
mailing list