1 |
nyhm 09/02/04 17:00:50 |
2 |
|
3 |
Added: excido-0.1.5c-freealut.patch |
4 |
excido-0.1.5c-build.patch |
5 |
Log: |
6 |
Fix segfault with recent openal/freealut; more makefile cleanup |
7 |
(Portage version: 2.2_rc23/cvs/Linux i686) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 games-arcade/excido/files/excido-0.1.5c-freealut.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-arcade/excido/files/excido-0.1.5c-freealut.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-arcade/excido/files/excido-0.1.5c-freealut.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: excido-0.1.5c-freealut.patch |
16 |
=================================================================== |
17 |
--- src/SoundCore.cpp |
18 |
+++ src/SoundCore.cpp |
19 |
@@ -352,32 +352,13 @@ |
20 |
|
21 |
PHYSFS_close(filehandle); |
22 |
|
23 |
- ALenum format; |
24 |
- ALvoid *data; |
25 |
- ALsizei size,freq; |
26 |
- ALboolean loop=AL_FALSE; |
27 |
ALenum error; |
28 |
|
29 |
alGetError(); |
30 |
|
31 |
- alGenBuffers(1,&newsample.alid); |
32 |
- if((error=alGetError())!=AL_NO_ERROR){ |
33 |
- fprintf(stderr,"SoundCore::LoadSample: Error on alGenBuffers\n"); |
34 |
- PrintALError(error); |
35 |
- } |
36 |
- alutLoadWAVMemory((ALbyte*)filedata,&format,&data,&size,&freq,&loop); |
37 |
- if((error=alGetError())!=AL_NO_ERROR){ |
38 |
- fprintf(stderr,"SoundCore::LoadSample: Error on alutLoadWAVMemory\n"); |
39 |
- PrintALError(error); |
40 |
- } |
41 |
- alBufferData(newsample.alid,format,data,size,freq); |
42 |
- if((error=alGetError())!=AL_NO_ERROR){ |
43 |
- fprintf(stderr,"SoundCore::LoadSample: Error on alBufferData\n"); |
44 |
- PrintALError(error); |
45 |
- } |
46 |
- alutUnloadWAV(format,data,size,freq); |
47 |
- if((error=alGetError())!=AL_NO_ERROR){ |
48 |
- fprintf(stderr,"SoundCore::LoadSample: Error on alutUnloadWAV\n"); |
49 |
+ newsample.alid=alutCreateBufferFromFileImage(filedata, filesize); |
50 |
+ if(((error=alGetError())!=AL_NO_ERROR)||(newsample.alid==AL_NONE)){ |
51 |
+ fprintf(stderr,"SoundCore::LoadSample: Error on alutCreateBufferFromFileImage\n"); |
52 |
PrintALError(error); |
53 |
} |
54 |
|
55 |
|
56 |
|
57 |
|
58 |
1.1 games-arcade/excido/files/excido-0.1.5c-build.patch |
59 |
|
60 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-arcade/excido/files/excido-0.1.5c-build.patch?rev=1.1&view=markup |
61 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-arcade/excido/files/excido-0.1.5c-build.patch?rev=1.1&content-type=text/plain |
62 |
|
63 |
Index: excido-0.1.5c-build.patch |
64 |
=================================================================== |
65 |
--- Makefile |
66 |
+++ Makefile |
67 |
@@ -1,8 +1,8 @@ |
68 |
-CC=g++ |
69 |
-CFLAGS=`sdl-config --cflags` #-g -Wall #-O2 |
70 |
+CXX?=g++ |
71 |
+CXXFLAGS+=$(shell sdl-config --cflags) #-g -Wall #-O2 |
72 |
#CFLAGS=`sdl-config --cflags` -I./physfs#-g -Wall #-O2 |
73 |
OBJS := ${patsubst %.cpp, %.o, ${wildcard src/*.cpp}} |
74 |
-LIBS = -s -Bstatic `sdl-config --static-libs` -lSDL_image -lSDL_ttf -L. -lphysfs -lopenal -Bdynamic -lGL -lGLU |
75 |
+LIBS = $(shell sdl-config --libs) -lSDL_image -lSDL_ttf -lphysfs -lopenal -lalut -lGL -lGLU |
76 |
#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 |
77 |
PREFIX=/usr/local |
78 |
BINDIR=$(PREFIX)/bin/ |
79 |
@@ -16,12 +16,12 @@ |
80 |
|
81 |
|
82 |
.cpp.o: |
83 |
- $(CC) $(CFLAGS) $(DEFINES) -o ${patsubst %.cpp, %.o, $<} -c $< |
84 |
+ $(CXX) $(CXXFLAGS) $(DEFINES) -o ${patsubst %.cpp, %.o, $<} -c $< |
85 |
|
86 |
all: $(TARGET) |
87 |
|
88 |
$(TARGET): $(OBJS) |
89 |
- $(CC) $(CFLAGS) -o $(TARGET) $(LIBS) $(OBJS) |
90 |
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS) |
91 |
|
92 |
clean: |
93 |
rm -f $(OBJS) $(TARGET) |