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 | |
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')
-rw-r--r-- | games-puzzle/candycrisis/ChangeLog | 11 | ||||
-rw-r--r-- | games-puzzle/candycrisis/candycrisis-1.0-r1.ebuild (renamed from games-puzzle/candycrisis/candycrisis-1.0.ebuild) | 29 | ||||
-rw-r--r-- | games-puzzle/candycrisis/files/candycrisis-1.0-gentoo.patch | 87 |
3 files changed, 81 insertions, 46 deletions
diff --git a/games-puzzle/candycrisis/ChangeLog b/games-puzzle/candycrisis/ChangeLog index 181fe346f8b1..e2c981215e42 100644 --- a/games-puzzle/candycrisis/ChangeLog +++ b/games-puzzle/candycrisis/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for games-puzzle/candycrisis -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-puzzle/candycrisis/ChangeLog,v 1.2 2007/12/13 00:06:02 tupone Exp $ +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-puzzle/candycrisis/ChangeLog,v 1.3 2008/02/14 21:21:15 nyhm Exp $ + +*candycrisis-1.0-r1 (14 Feb 2008) + + 14 Feb 2008; Tristan Heaven <nyhm@gentoo.org> + files/candycrisis-1.0-gentoo.patch, -candycrisis-1.0.ebuild, + +candycrisis-1.0-r1.ebuild: + Respect CXXFLAGS; Save prefs to HOME 13 Dec 2007; Tupone Alfredo <tupone@gentoo.org> candycrisis-1.0.ebuild: Adding dependency. Bug #202054 by Marcel Unbehaun diff --git a/games-puzzle/candycrisis/candycrisis-1.0.ebuild b/games-puzzle/candycrisis/candycrisis-1.0-r1.ebuild index f1171328990d..907895ee0c33 100644 --- a/games-puzzle/candycrisis/candycrisis-1.0.ebuild +++ b/games-puzzle/candycrisis/candycrisis-1.0-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-puzzle/candycrisis/candycrisis-1.0.ebuild,v 1.2 2007/12/13 00:06:02 tupone Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-puzzle/candycrisis/candycrisis-1.0-r1.ebuild,v 1.1 2008/02/14 21:21:15 nyhm Exp $ inherit eutils games @@ -11,9 +11,13 @@ SRC_URI="mirror://gentoo/${P}.zip" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" +IUSE="" -DEPEND="=media-libs/fmod-3* +RDEPEND="=media-libs/fmod-3* + media-libs/libsdl media-libs/sdl-image" +DEPEND="${RDEPEND} + app-arch/unzip" S=${WORKDIR}/CandyCrisis/Source @@ -23,23 +27,16 @@ src_unpack() { epatch "${FILESDIR}"/${P}-gentoo.patch sed -i \ -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}/${PN}/:g" \ - -e "s:@GENTOO_STATEDIR@:${GAMES_STATEDIR}/${PN}/:g" \ - main.cpp prefs.cpp || die "sed failed" - mv ../CandyCrisisResources/Preferences.txt . \ - || die "Move of preference file failed" + main.cpp \ + || die "sed failed" } src_install() { - dogamesbin CandyCrisis || die "dogamesbin failed" - dodoc ../CandyCrisisReadMe.rtf + dogamesbin ${PN} || die "dogamesbin failed" insinto "${GAMES_DATADIR}"/${PN} - doins ../CandyCrisisResources/* || die "Installing data failed" - if [ ! -e "${GAMES_STATEDIR}"/${PN}/Preferences.txt ]; then - insinto "${GAMES_STATEDIR}"/${PN} - insopts -m0760 - doins Preferences.txt || die "Installing preference file failed" - fi + doins ../CandyCrisisResources/* || die "doins failed" newicon ../CandyCrisisResources/PICT_10000.png ${PN}.png - make_desktop_entry "CandyCrisis" "CandyCrisis" ${PN}.png + make_desktop_entry ${PN} CandyCrisis + dodoc ../CandyCrisisReadMe.rtf prepgamesdirs } 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 ) { |