[packages/lpairs] - added inline patch (remove incorrectly used inline), release 2

qboosh qboosh at pld-linux.org
Wed Sep 7 16:05:34 CEST 2016


commit 2d9ffeb79861ea3a51696e710c5741dec4d90383
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Sep 7 16:06:52 2016 +0200

    - added inline patch (remove incorrectly used inline), release 2

 lpairs-inline.patch | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 lpairs.spec         |   4 +-
 2 files changed, 131 insertions(+), 1 deletion(-)
---
diff --git a/lpairs.spec b/lpairs.spec
index 49b6688..cb56684 100644
--- a/lpairs.spec
+++ b/lpairs.spec
@@ -2,11 +2,12 @@ Summary:	LPairs - a classic memory game for Linux
 Summary(pl.UTF-8):	LPairs - klasyczna gra pamięciowa pod Linuksa
 Name:		lpairs
 Version:	1.0.4
-Release:	1
+Release:	2
 License:	GPL v2+
 Group:		X11/Applications/Games
 Source0:	http://downloads.sourceforge.net/lgames/%{name}-%{version}.tar.gz
 # Source0-md5:	5eb00da9f7fc15dc5ce840c312e76cfa
+Patch0:		%{name}-inline.patch
 URL:		http://lgames.sourceforge.net/LPairs
 BuildRequires:	SDL-devel >= 1.0.0
 BuildRequires:	autoconf
@@ -23,6 +24,7 @@ LPairs - klasyczna gra pamięciowa pod Linuksa.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %{__perl} -pi -e 's@^inst_dir=\$datadir/games/lpairs$@inst_dir=\$datadir/lpairs@' \
 	configure.in
diff --git a/lpairs-inline.patch b/lpairs-inline.patch
new file mode 100644
index 0000000..68a146e
--- /dev/null
+++ b/lpairs-inline.patch
@@ -0,0 +1,128 @@
+--- lpairs-1.0.4/lpairs/sdl.c.orig	2001-03-16 19:48:14.000000000 +0100
++++ lpairs-1.0.4/lpairs/sdl.c	2016-09-07 16:01:02.420830871 +0200
+@@ -31,7 +31,7 @@ int cur_time, last_time;
+ // sdl surface //
+ 
+ /* 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,  "%sgfx/%s", SRC_DIR, file_name );
+ }
+@@ -110,7 +110,7 @@ int disp_format(SDL_Surface *sur)
+ /*
+     lock surface
+ */
+-inline void lock_surf(SDL_Surface *sur)
++void lock_surf(SDL_Surface *sur)
+ {
+     if (SDL_MUSTLOCK(sur))
+         SDL_LockSurface(sur);
+@@ -119,7 +119,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);
+@@ -354,7 +354,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);
+@@ -363,7 +363,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);
+@@ -480,7 +480,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);
+ }
+@@ -630,7 +630,7 @@ void wait_for_click()
+ /*
+     lock surface
+ */
+-inline void lock_screen()
++void lock_screen()
+ {
+     if (SDL_MUSTLOCK(sdl.screen))
+         SDL_LockSurface(sdl.screen);
+@@ -639,7 +639,7 @@ inline void lock_screen()
+ /*
+     unlock surface
+ */
+-inline void unlock_screen()
++void unlock_screen()
+ {
+     if (SDL_MUSTLOCK(sdl.screen))
+         SDL_UnlockSurface(sdl.screen);
+@@ -648,7 +648,7 @@ inline void unlock_screen()
+ /*
+     flip hardware screens (double buffer)
+ */
+-inline void flip_screen()
++void flip_screen()
+ {
+     SDL_Flip(sdl.screen);
+ }
+--- lpairs-1.0.4/lpairs/sdl.h.orig	2001-03-16 19:43:22.000000000 +0100
++++ lpairs-1.0.4/lpairs/sdl.h	2016-09-07 16:00:39.709654249 +0200
+@@ -40,8 +40,8 @@ typedef struct {
+ SDL_Surface* load_surf(char *fname, int f);
+ SDL_Surface* create_surf(int w, int h, int f);
+ int  disp_format(SDL_Surface *sur);
+-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);
+ 
+@@ -116,16 +116,16 @@ void init_sdl( int f );
+ void quit_sdl();
+ int  set_video_mode( int w, int h, int d, int f );
+ 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);
+ void dim_screen(int steps, int delay, int trp);
+ void undim_screen(int steps, int delay, int trp);
+ 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();
+ 
+ /* cursor */
+ /* creates cursor */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lpairs.git/commitdiff/2d9ffeb79861ea3a51696e710c5741dec4d90383



More information about the pld-cvs-commit mailing list