Accepting request 351645 from home:susnux:branches:games

Updated to new release and fixed build with factory

OBS-URL: https://build.opensuse.org/request/show/351645
OBS-URL: https://build.opensuse.org/package/show/games/ltris?expand=0&rev=13
This commit is contained in:
Matthias Mailänder 2016-01-02 20:36:07 +00:00 committed by Git OBS Bridge
parent ff089f2892
commit afe37f58cc
5 changed files with 104 additions and 11 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2c06f249b678847ccdaef1390027a79e076b060114fb69ca8cc073ad1197289d
size 777745

3
ltris-1.0.19.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8f6a9e7719d22004aee153db29ffd9ca41c7a6cd87fc791591994eecc2e625a1
size 883543

80
ltris-fix-with-gcc5.patch Normal file
View File

@ -0,0 +1,80 @@
diff -Nur ltris-1.0.19/src/sdl.c ltris-1.0.19-new/src/sdl.c
--- ltris-1.0.19/src/sdl.c 2013-10-29 16:21:35.000000000 +0100
+++ ltris-1.0.19-new/src/sdl.c 2016-01-02 14:02:50.996108557 +0100
@@ -905,7 +905,7 @@
/*
update rectangle (0,0,0,0)->fullscreen
*/
-inline void refresh_screen(int x, int y, int w, int h)
+extern inline void refresh_screen(int x, int y, int w, int h)
{
SDL_UpdateRect(sdl.screen, x, y, w, h);
}
@@ -1132,7 +1132,7 @@
/*
get milliseconds since last call
*/
-inline int get_time()
+extern inline int get_time()
{
int ms;
cur_time = SDL_GetTicks();
@@ -1148,7 +1148,7 @@
/*
reset timer
*/
-inline void reset_timer()
+extern inline void reset_timer()
{
last_time = SDL_GetTicks();
}
diff -Nur ltris-1.0.19/src/tools.c ltris-1.0.19-new/src/tools.c
--- ltris-1.0.19/src/tools.c 2013-05-03 19:13:11.000000000 +0200
+++ ltris-1.0.19-new/src/tools.c 2016-01-02 13:48:10.219694001 +0100
@@ -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 )
+extern inline 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 )
+extern inline void delay_set( Delay *delay, int ms )
{
delay->limit = ms;
delay->cur = 0;
}
/* reset delay ( cur = 0 )*/
-inline void delay_reset( Delay *delay )
+extern inline void delay_reset( Delay *delay )
{
delay->cur = 0;
}
/* check if times out and reset */
-inline int delay_timed_out( Delay *delay, int ms )
+extern inline int delay_timed_out( Delay *delay, int ms )
{
delay->cur += ms;
if ( delay->cur >= delay->limit ) {
@@ -56,12 +56,12 @@
}
/* set timer so that we have a time out next call of delay_timed_out() */
-inline void delay_force_time_out( Delay *delay )
+extern inline void delay_force_time_out( Delay *delay )
{
delay->cur = delay->limit;
}
-inline void goto_tile( int *x, int *y, int d )
+extern inline void goto_tile( int *x, int *y, int d )
{
/* 0 -up, clockwise, 5 - left up */
switch ( d ) {

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Sat Jan 2 12:30:35 UTC 2016 - rpm@fthiessen.de
- Update to 1.0.19:
* removed link to lib math as not needed
* reset key states when unpausing to prevent unwanted movement
- Added ltris-fix-with-gcc5.patch to fix build with gcc 5 -- changed
inline function handling.
-------------------------------------------------------------------
Thu Apr 18 06:45:11 UTC 2013 - joop.boonen@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package ltris
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,23 +17,24 @@
Name: ltris
Version: 1.0.18
Version: 1.0.19
Release: 0
Summary: Tetris Clone with Multiplayer and CPU Opponents
License: GPL-2.0+
Group: Amusements/Games/Logic
Url: http://lgames.sourceforge.net/index.php?project=LTris
# http://prdownloads.sourceforge.net/lgames/ltris-%{version}.tar.gz
Source: ltris-%{version}.tar.bz2
Source: http://sourceforge.net/projects/lgames/files/ltris/ltris-%{version}.tar.gz
Source1: %{name}.desktop
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1: ltris-no_system_wide_hiscore_file.patch
Patch0: ltris-no_system_wide_hiscore_file.patch
# PATCH-FIX-UPSTREAM ltris-fix-with-gcc5.patch -- Fix build with gcc5, needed for openSUSE > 13.2
Patch1: ltris-fix-with-gcc5.patch
BuildRequires: SDL_mixer-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires: fdupes
BuildRequires: update-desktop-files
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
LTris is a very polished Tetris clone. It is highly configurable due to
@ -44,7 +45,10 @@ controlled.
%prep
%setup -q
%patch1
%patch0
%if 0%{?suse_version} > 1320
%patch1 -p1
%endif
# we patch both Makefile.am and Makefile.in; touch Makefile.in here again
# to make sure configure won't run autoreconf (which it does if the .am file
# is newer than the .in file):
@ -59,7 +63,7 @@ export CXXFLAGS="$CFLAGS"
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
install -m 0755 -d %{buildroot}%{_datadir}/pixmaps/
install -m 0644 icons/ltris48.xpm %{buildroot}%{_datadir}/pixmaps/ltris.xpm
mv %{buildroot}%{_datadir}/games/locale %{buildroot}%{_datadir}/locale