SHA256
1
0
forked from pool/lugaru

Accepting request 40046 from home:etamPL:branches:games

Copy from home:etamPL:branches:games/lugaru via accept of submit request 40046 revision 3.
Request was accepted with message:
Reviewed ok

OBS-URL: https://build.opensuse.org/request/show/40046
OBS-URL: https://build.opensuse.org/package/show/games/lugaru?expand=0&rev=5
This commit is contained in:
Pavol Rusnak 2010-05-14 15:42:54 +00:00 committed by Git OBS Bridge
parent 37197f6f8f
commit 2fed3b4235
7 changed files with 63 additions and 91 deletions

View File

@ -0,0 +1,12 @@
diff -rupN lugaru-1.0/CMakeLists.txt lugaru-1.0_mod/CMakeLists.txt
--- lugaru-1.0/CMakeLists.txt 2010-05-14 11:09:47.000000000 +0200
+++ lugaru-1.0_mod/CMakeLists.txt 2010-05-14 15:45:58.068017200 +0200
@@ -480,8 +480,6 @@ else(WIN32)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/lugaru DESTINATION ${CMAKE_INSTALL_PREFIX})
endif(WIN32)
-install(DIRECTORY ${CMAKE_SOURCE_DIR}/Data DESTINATION ${CMAKE_INSTALL_PREFIX})
-
if (LUGARU_MISSING_DEPS)
message(STATUS "Using our copy of these libs: ${LUGARU_MISSING_DEPS}")
endif (LUGARU_MISSING_DEPS)

View File

@ -1,78 +0,0 @@
diff -rupN lugaru-1.0/Source/GameInitDispose.cpp lugaru-1.0_mod/Source/GameInitDispose.cpp
--- lugaru-1.0/Source/GameInitDispose.cpp 2010-05-12 00:34:30.000000000 +0200
+++ lugaru-1.0_mod/Source/GameInitDispose.cpp 2010-05-13 13:01:24.156014129 +0200
@@ -985,71 +985,12 @@ void Game::InitGame()
numchallengelevels=14;
- registered=0;
-
- /*char tempstring[256];
- sprintf (tempstring, "%s", registrationname);
- long num1;
- long num2;
- long num3;
- long num4;
- long long longnum;
- longnum = MD5_string ( tempstring);
- //longnum = 1111111111111111;
- num1 = longnum/100000000;
- num2 = longnum%100000000;
- sprintf (tempstring, "%d-%d-%d-%d", num1/10000, num1%10000, num2/10000, num2%10000);
- */
-
- FILE *tfile;
- tfile=fopen( ":Data:Sounds:flame.ogg", "rb" );
- if(tfile)
- {
- long num1;
- long num2;
- long long longnum;
- long long longnuma;
- long num1a;
- long num2a;
-
- int numchars;
- funpackf(tfile, "Bb", &registered);
- if(registered)
- {
- funpackf(tfile, "Bi", &numchars);
- if(numchars>0)
- {
- for(j=0;j<numchars;j++)
- {
- funpackf(tfile, "Bb", &registrationname[j]);
- }
- registrationname[numchars]='\0';
- funpackf(tfile, "Bi", &num1);
- funpackf(tfile, "Bi", &num2);
- longnum=num2+num1*100000000;
-
- char tempstring[256];
- #if defined(__APPLE__)
- sprintf (tempstring, "%s", registrationname);
- #elif defined(_MSC_VER) || defined(__linux__)
- sprintf (tempstring, "%s-windows", registrationname);
- #else
- #error Please make sure you have the right registration key stuff here!
- #endif
- longnuma = MD5_string ( tempstring);
- num1a = longnuma/100000000;
- num2a = longnuma%100000000;
- //if(num1a==num1&&num2a==num2)registered=1;
- if(numchars>2)registered=1;
- else registered=0;
- }
- }
- fclose(tfile);
- }
- else registered=0;
+ registered=1;
accountactive=-1;
+ FILE *tfile;
+
sprintf (mapname, ":Data:Users");
tfile=fopen( mapname, "rb" );
if(tfile)

View File

@ -0,0 +1,17 @@
--- lugaru-orig/CMakeLists.txt 2010-05-14 11:09:47.000000000 +0200
+++ lugaru-1.0/CMakeLists.txt 2010-05-14 15:38:34.729767952 +0200
@@ -361,9 +361,11 @@ if (NOT ZLIB_FOUND)
endif (NOT ZLIB_FOUND)
option (LUGARU_FORCE_INTERNAL_GLU "Force internal libGLU, even if there's a system version" False)
-if (LUGARU_FORCE_INTERNAL_GLU)
- set(OPENGL_GLU_FOUND False)
-endif (LUGARU_FORCE_INTERNAL_GLU)
+if (NOT LUGARU_FORCE_INTERNAL_GLU)
+ find_package(GLU)
+else(NOT LUGARU_FORCE_INTERNAL_GLU)
+ set(OPENGL_GLU_FOUND False)
+endif (NOT LUGARU_FORCE_INTERNAL_GLU)
if (NOT OPENGL_GLU_FOUND)
message(STATUS "Using internal copy of libGLU")

View File

@ -0,0 +1,11 @@
diff -rupN lugaru-1.0/Source/openal_wrapper.cpp lugaru-1.0_mod/Source/openal_wrapper.cpp
--- lugaru-1.0/Source/openal_wrapper.cpp 2010-05-14 11:09:48.000000000 +0200
+++ lugaru-1.0_mod/Source/openal_wrapper.cpp 2010-05-14 16:12:58.899767177 +0200
@@ -641,6 +641,7 @@ AL_API OPENAL_STREAM *OPENAL_Stream_Open
AL_API signed char OPENAL_Stream_Close(OPENAL_STREAM *stream)
{
OPENAL_Sample_Free((OPENAL_SAMPLE *) stream);
+ return true;
}
AL_API OPENAL_SAMPLE *OPENAL_Stream_GetSample(OPENAL_STREAM *stream)

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a211352aef1e1735089b4c9224fc0e140f8823cdc5455edb1f5570fad8071dd5
size 472986
oid sha256:4070efa2ff48064e60e4cd729ab2c3d8de5cbc4d6cde0b21b93fb5ad89b9a765
size 397135

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu May 13 21:36:58 UTC 2010 - adam@mizerski.pl
- updated to rev 225
- now using cmake
-------------------------------------------------------------------
Wed May 12 22:10:14 UTC 2010 - adam@mizerski.pl

View File

@ -7,18 +7,17 @@ Version: 1.0
Release: 0
License: GPLv2
URL: http://www.wolfire.com/lugaru
# adam@mizerski.pl -- This source is a bit modified version of original. All changes were commited to upstream, but not accepted yet.
# revision 183 from
Source: %{name}-%{version}.tar.bz2
Source1: %{name}.desktop
# PATCH-FEATURE-OPENSUSE lugaru-1.0-registered.patch adam@mizerski.pl -- The game is now registered. It's Free Sorftware, isn't it?
Patch0: %{name}-1.0-registered.patch
# PATCH-FIX-UPSTREAM lugaru-1.0-rev225-cmake-fix.patch adam@mizerski.pl -- Fix detecting GLU
Patch0: lugaru-1.0-rev225-cmake-fix.patch
# PATCH-FIX-OPENSUSE lugaru-1.0-dont-install-data.patch adam@mizerski.pl -- Don't try to install Data, since it's in lugaru-1.0-data package
Patch1: lugaru-1.0-dont-install-data.patch
# PATCH-FIX-UPSTREAM lugaru-1.0-rev225-no-return.patch adam@mizerski.pl -- Add missing return statement
Patch2: lugaru-1.0-rev225-no-return.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: gcc-c++ libSDL-devel Mesa-devel openal-soft-devel libogg-devel libvorbis-devel zlib-devel libjpeg-devel fdupes update-desktop-files
%if 0%{?suse_version} > 1120
BuildRequires: libpng12-devel
%else
BuildRequires: libpng-devel
%endif
BuildRequires: cmake gcc-c++ libSDL-devel Mesa-devel xorg-x11-devel openal-soft-devel libogg-devel libvorbis-devel zlib-devel libjpeg-devel libpng-devel fdupes update-desktop-files
Requires: %{name}-data = %{version}
%description
@ -32,13 +31,18 @@ upon himself to fight against their plot and save his fellow rabbits from slaver
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS"
cmake -DLUGARU_INSTALL_PREFIX=%{_libdir}/%{name} -G "Unix Makefiles"
%build
%__make %{?_smp_mflags} OPT="%{optflags}" EXENAME=%{name}
%__make VERBOSE=1 %{?_smp_mflags}
%install
%makeinstall
mkdir -p %{buildroot}%{_datadir}/%{name}-data
%__install -D -m 755 %{name} %{buildroot}%{_libdir}/%{name}/%{name}
%__ln_s %{_datadir}/%{name}-data %{buildroot}%{_libdir}/%{name}/Data
%__install -D -d %{buildroot}%{_bindir}
%__cat >%{buildroot}%{_bindir}/%{name} <<EOF