summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Heaven <nyhm@gentoo.org>2009-02-04 17:00:50 +0000
committerTristan Heaven <nyhm@gentoo.org>2009-02-04 17:00:50 +0000
commit33de70cf645927a3e8a1d1db6657be324382c90d (patch)
tree4d4b2d4c9b1ee7c1622cc9f7d76a48131bf9ecd9 /games-arcade/excido
parentDepend on media-libs/libpng thanks to Constantine D. Kardaris (bug #257437). (diff)
downloadgentoo-2-33de70cf645927a3e8a1d1db6657be324382c90d.tar.gz
gentoo-2-33de70cf645927a3e8a1d1db6657be324382c90d.tar.bz2
gentoo-2-33de70cf645927a3e8a1d1db6657be324382c90d.zip
Fix segfault with recent openal/freealut; more makefile cleanup
(Portage version: 2.2_rc23/cvs/Linux i686)
Diffstat (limited to 'games-arcade/excido')
-rw-r--r--games-arcade/excido/ChangeLog9
-rw-r--r--games-arcade/excido/excido-0.1.5c-r2.ebuild38
-rw-r--r--games-arcade/excido/files/excido-0.1.5c-build.patch29
-rw-r--r--games-arcade/excido/files/excido-0.1.5c-freealut.patch38
4 files changed, 113 insertions, 1 deletions
diff --git a/games-arcade/excido/ChangeLog b/games-arcade/excido/ChangeLog
index 8ad0de5299d7..65134ddb774b 100644
--- a/games-arcade/excido/ChangeLog
+++ b/games-arcade/excido/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for games-arcade/excido
# Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-arcade/excido/ChangeLog,v 1.16 2009/02/03 23:37:20 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-arcade/excido/ChangeLog,v 1.17 2009/02/04 17:00:50 nyhm Exp $
+
+*excido-0.1.5c-r2 (04 Feb 2009)
+
+ 04 Feb 2009; Tristan Heaven <nyhm@gentoo.org>
+ +files/excido-0.1.5c-build.patch, +files/excido-0.1.5c-freealut.patch,
+ +excido-0.1.5c-r2.ebuild:
+ Fix segfault with recent openal/freealut; more makefile cleanup
03 Feb 2009; Michael Sterrett <mr_bones_@gentoo.org>
excido-0.1.5c-r1.ebuild:
diff --git a/games-arcade/excido/excido-0.1.5c-r2.ebuild b/games-arcade/excido/excido-0.1.5c-r2.ebuild
new file mode 100644
index 000000000000..35c42fac9519
--- /dev/null
+++ b/games-arcade/excido/excido-0.1.5c-r2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-arcade/excido/excido-0.1.5c-r2.ebuild,v 1.1 2009/02/04 17:00:50 nyhm Exp $
+
+EAPI=2
+inherit games
+
+DESCRIPTION="A fast paced action game"
+HOMEPAGE="http://icculus.org/excido/"
+SRC_URI="http://icculus.org/excido/${P}-src.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="dev-games/physfs
+ media-libs/libsdl[opengl]
+ media-libs/sdl-mixer
+ media-libs/sdl-ttf
+ media-libs/sdl-image[png]
+ media-libs/openal
+ media-libs/freealut"
+
+PATCHES=( "${FILESDIR}"/${P}-freealut.patch "${FILESDIR}"/${P}-build.patch )
+
+src_compile() {
+ emake DATADIR="${GAMES_DATADIR}"/${PN}/ || die "emake failed"
+}
+
+src_install() {
+ dogamesbin ${PN} || die "dogamesbin failed"
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins data/* || die "doins failed"
+ dodoc BUGS CHANGELOG HACKING README TODO \
+ keyguide.txt data/CREDITS data/*.txt
+ prepgamesdirs
+}
diff --git a/games-arcade/excido/files/excido-0.1.5c-build.patch b/games-arcade/excido/files/excido-0.1.5c-build.patch
new file mode 100644
index 000000000000..779d9c3f4066
--- /dev/null
+++ b/games-arcade/excido/files/excido-0.1.5c-build.patch
@@ -0,0 +1,29 @@
+--- Makefile
++++ Makefile
+@@ -1,8 +1,8 @@
+-CC=g++
+-CFLAGS=`sdl-config --cflags` #-g -Wall #-O2
++CXX?=g++
++CXXFLAGS+=$(shell sdl-config --cflags) #-g -Wall #-O2
+ #CFLAGS=`sdl-config --cflags` -I./physfs#-g -Wall #-O2
+ OBJS := ${patsubst %.cpp, %.o, ${wildcard src/*.cpp}}
+-LIBS = -s -Bstatic `sdl-config --static-libs` -lSDL_image -lSDL_ttf -L. -lphysfs -lopenal -Bdynamic -lGL -lGLU
++LIBS = $(shell sdl-config --libs) -lSDL_image -lSDL_ttf -lphysfs -lopenal -lalut -lGL -lGLU
+ #LIBS = -s -Bstatic `sdl-config --static-libs` SDL_image/*.o SDL_ttf/*.o -L. physfs/*.o openal/*.o -ljpeg -lpng -ltiff -lfreetype -Bdynamic -lGL -lGLU
+ PREFIX=/usr/local
+ BINDIR=$(PREFIX)/bin/
+@@ -16,12 +16,12 @@
+
+
+ .cpp.o:
+- $(CC) $(CFLAGS) $(DEFINES) -o ${patsubst %.cpp, %.o, $<} -c $<
++ $(CXX) $(CXXFLAGS) $(DEFINES) -o ${patsubst %.cpp, %.o, $<} -c $<
+
+ all: $(TARGET)
+
+ $(TARGET): $(OBJS)
+- $(CC) $(CFLAGS) -o $(TARGET) $(LIBS) $(OBJS)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
+
+ clean:
+ rm -f $(OBJS) $(TARGET)
diff --git a/games-arcade/excido/files/excido-0.1.5c-freealut.patch b/games-arcade/excido/files/excido-0.1.5c-freealut.patch
new file mode 100644
index 000000000000..d0538083af1f
--- /dev/null
+++ b/games-arcade/excido/files/excido-0.1.5c-freealut.patch
@@ -0,0 +1,38 @@
+--- src/SoundCore.cpp
++++ src/SoundCore.cpp
+@@ -352,32 +352,13 @@
+
+ PHYSFS_close(filehandle);
+
+- ALenum format;
+- ALvoid *data;
+- ALsizei size,freq;
+- ALboolean loop=AL_FALSE;
+ ALenum error;
+
+ alGetError();
+
+- alGenBuffers(1,&newsample.alid);
+- if((error=alGetError())!=AL_NO_ERROR){
+- fprintf(stderr,"SoundCore::LoadSample: Error on alGenBuffers\n");
+- PrintALError(error);
+- }
+- alutLoadWAVMemory((ALbyte*)filedata,&format,&data,&size,&freq,&loop);
+- if((error=alGetError())!=AL_NO_ERROR){
+- fprintf(stderr,"SoundCore::LoadSample: Error on alutLoadWAVMemory\n");
+- PrintALError(error);
+- }
+- alBufferData(newsample.alid,format,data,size,freq);
+- if((error=alGetError())!=AL_NO_ERROR){
+- fprintf(stderr,"SoundCore::LoadSample: Error on alBufferData\n");
+- PrintALError(error);
+- }
+- alutUnloadWAV(format,data,size,freq);
+- if((error=alGetError())!=AL_NO_ERROR){
+- fprintf(stderr,"SoundCore::LoadSample: Error on alutUnloadWAV\n");
++ newsample.alid=alutCreateBufferFromFileImage(filedata, filesize);
++ if(((error=alGetError())!=AL_NO_ERROR)||(newsample.alid==AL_NONE)){
++ fprintf(stderr,"SoundCore::LoadSample: Error on alutCreateBufferFromFileImage\n");
+ PrintALError(error);
+ }
+