diff options
author | Tristan Heaven <nyhm@gentoo.org> | 2008-02-14 21:21:15 +0000 |
---|---|---|
committer | Tristan Heaven <nyhm@gentoo.org> | 2008-02-14 21:21:15 +0000 |
commit | 15f2d5356eced3fc040772c6177dca0d38ce0eb9 (patch) | |
tree | a111553f374d6a75fe52829ed547a223ed1dd707 /games-puzzle/candycrisis/files | |
parent | Version bump. (diff) | |
download | gentoo-2-15f2d5356eced3fc040772c6177dca0d38ce0eb9.tar.gz gentoo-2-15f2d5356eced3fc040772c6177dca0d38ce0eb9.tar.bz2 gentoo-2-15f2d5356eced3fc040772c6177dca0d38ce0eb9.zip |
Respect CXXFLAGS; Save prefs to HOME
(Portage version: 2.1.4.4)
Diffstat (limited to 'games-puzzle/candycrisis/files')
-rw-r--r-- | games-puzzle/candycrisis/files/candycrisis-1.0-gentoo.patch | 87 |
1 files changed, 59 insertions, 28 deletions
diff --git a/games-puzzle/candycrisis/files/candycrisis-1.0-gentoo.patch b/games-puzzle/candycrisis/files/candycrisis-1.0-gentoo.patch index aae9cfe74fa9..235cab0fffcc 100644 --- a/games-puzzle/candycrisis/files/candycrisis-1.0-gentoo.patch +++ b/games-puzzle/candycrisis/files/candycrisis-1.0-gentoo.patch @@ -1,6 +1,33 @@ ---- main.cpp.old 2007-12-10 22:33:59.000000000 +0100 -+++ main.cpp 2007-12-10 22:34:30.000000000 +0100 -@@ -592,7 +592,7 @@ +--- fmodsoundfx.cpp ++++ fmodsoundfx.cpp +@@ -22,7 +22,7 @@ + + for( index=0; index<kNumSounds; index++ ) + { +- sound[index] = FSOUND_Sample_Load( FSOUND_UNMANAGED, QuickResourceName( "snd", index+128, ".wav" ), FSOUND_NORMAL | FSOUND_LOOP_OFF | FSOUND_2D, 0 ); ++ sound[index] = FSOUND_Sample_Load( FSOUND_UNMANAGED, QuickResourceName( "snd", index+128, ".wav" ), FSOUND_NORMAL | FSOUND_LOOP_OFF | FSOUND_2D, 0, 0 ); + if( sound[index] == NULL ) + { + Error( "InitSound: files are missing" ); +--- main.cpp ++++ main.cpp +@@ -232,6 +232,7 @@ + + #include <string.h> + #include <stdlib.h> ++#include <unistd.h> + + #include "hiscore.h" + #include "control.h" +@@ -283,6 +284,7 @@ + int main(int argc, char *argv[]) + { + argc, argv; ++ chdir(getenv("HOME")); + + Initialize( ); + if( IsRegistered( ) ) exit(0); +@@ -592,7 +594,7 @@ strcpy( candyCrisisResources, ":CandyCrisisResources:" ); #endif #ifdef linux @@ -9,7 +36,7 @@ #endif if( SDL_Init( SDL_INIT_VIDEO | SDL_INIT_AUDIO ) < 0 ) -@@ -626,7 +626,6 @@ +@@ -626,7 +628,6 @@ } #else SDL_WM_IconifyWindow(); @@ -17,7 +44,7 @@ WaitForRegainFocus(); #endif } -@@ -703,7 +703,7 @@ +@@ -703,7 +704,7 @@ void InitRegistration() { @@ -26,18 +53,24 @@ } ---- Makefile.old 2007-12-10 22:38:42.000000000 +0100 -+++ Makefile 2007-12-10 22:39:59.000000000 +0100 -@@ -1,7 +1,7 @@ +--- Makefile ++++ Makefile +@@ -1,9 +1,10 @@ ++CXX ?= g++ ++CXXFLAGS ?= -O3 ++CXXFLAGS += $(shell sdl-config --cflags) ++LIBS := $(shell sdl-config --libs) -lSDL_image -lfmod - OPTIMIZE := -O3 - CXXFLAGS := $(shell sdl-config --cflags) -DHAVE_MIKMOD $(OPTIMIZE) +-OPTIMIZE := -O3 +-CXXFLAGS := $(shell sdl-config --cflags) -DHAVE_MIKMOD $(OPTIMIZE) -LIBS := $(shell sdl-config --libs) -lSDL_image -lmikmod -+LIBS := $(shell sdl-config --libs) -lSDL_image -lfmod - TARGET := CandyCrisis +-TARGET := CandyCrisis ++TARGET := candycrisis -@@ -18,7 +18,9 @@ + OBJECTS := \ + blitter.o \ +@@ -18,7 +19,9 @@ keyselect.o \ level.o \ main.o \ @@ -48,25 +81,23 @@ moving.o \ MTypes.o \ next.o \ ---- fmodsoundfx.cpp.old 2007-12-10 22:41:02.000000000 +0100 -+++ fmodsoundfx.cpp 2007-12-10 22:41:37.000000000 +0100 -@@ -22,7 +22,7 @@ - - for( index=0; index<kNumSounds; index++ ) - { -- sound[index] = FSOUND_Sample_Load( FSOUND_UNMANAGED, QuickResourceName( "snd", index+128, ".wav" ), FSOUND_NORMAL | FSOUND_LOOP_OFF | FSOUND_2D, 0 ); -+ sound[index] = FSOUND_Sample_Load( FSOUND_UNMANAGED, QuickResourceName( "snd", index+128, ".wav" ), FSOUND_NORMAL | FSOUND_LOOP_OFF | FSOUND_2D, 0, 0 ); - if( sound[index] == NULL ) - { - Error( "InitSound: files are missing" ); ---- prefs.cpp.old 2007-12-10 23:10:49.000000000 +0100 -+++ prefs.cpp 2007-12-10 23:18:45.000000000 +0100 +@@ -36,7 +39,7 @@ + zap.o + + $(TARGET): $(OBJECTS) +- $(CXX) -o $@ $^ $(LIBS) ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) -o $(TARGET) $(LIBS) + + clean: + $(RM) $(OBJECTS) +--- prefs.cpp ++++ prefs.cpp @@ -37,7 +37,7 @@ int fileSize, count, digitsLeft; unsigned char info, *infoAt, *dataAt, *fileData; - F = fopen( QuickResourceName( "Preferences", 0, ".txt" ), "r" ); -+ F = fopen( "@GENTOO_STATEDIR@/Preferences.txt", "r" ); ++ F = fopen( ".candycrisis", "r" ); if( F != NULL ) { @@ -75,7 +106,7 @@ unsigned char* dataAt; - F = fopen( QuickResourceName( "Preferences", 0, ".txt" ), "w" ); -+ F = fopen( "@GENTOO_STATEDIR@/Preferences.txt", "w" ); ++ F = fopen( ".candycrisis", "w" ); if( F != NULL ) { |