diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2013-07-12 23:01:45 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2013-07-12 23:01:45 +0800 |
commit | 816503d0c5051e291b1c9d153597bec2c0d90e3e (patch) | |
tree | 713942325bda393305edb21d46cd7f38d213aebc /games/apricots | |
parent | 422d267e1126322ee1278071a404f04be2383f95 (diff) | |
download | freebsd-ports-gnome-816503d0c5051e291b1c9d153597bec2c0d90e3e.tar.gz freebsd-ports-gnome-816503d0c5051e291b1c9d153597bec2c0d90e3e.tar.zst freebsd-ports-gnome-816503d0c5051e291b1c9d153597bec2c0d90e3e.zip |
- Trim Makefile headers
- Drop ABI versions from LIB_DEPENDS
- OptionsNG
- Pet portlint
- Switch to dynamic plist where useful
- Canonicalize patch names
- Fix DOS line endings in patch files
Diffstat (limited to 'games/apricots')
-rw-r--r-- | games/apricots/Makefile | 1 | ||||
-rw-r--r-- | games/apricots/files/patch-apricots-sampleio.cpp | 82 |
2 files changed, 42 insertions, 41 deletions
diff --git a/games/apricots/Makefile b/games/apricots/Makefile index 82d0dfd33766..1b28b77191a3 100644 --- a/games/apricots/Makefile +++ b/games/apricots/Makefile @@ -15,6 +15,7 @@ USE_AUTOTOOLS= libtool GNU_CONFIGURE= yes USE_GMAKE= yes USE_SDL= sdl +USE_DOS2UNIX= yes MAKE_JOBS_SAFE= yes CPPFLAGS+= -I${LOCALBASE}/include diff --git a/games/apricots/files/patch-apricots-sampleio.cpp b/games/apricots/files/patch-apricots-sampleio.cpp index 7f06df6a6655..b5fdc695941a 100644 --- a/games/apricots/files/patch-apricots-sampleio.cpp +++ b/games/apricots/files/patch-apricots-sampleio.cpp @@ -2,45 +2,45 @@ Patch to build with newer openal. Not sure whether it doesn't leak memory --- apricots/sampleio.cpp.orig 2003-08-06 03:21:22.000000000 +0400 +++ apricots/sampleio.cpp 2010-04-07 18:32:05.000000000 +0400 @@ -74,28 +74,21 @@ - alListenerfv(AL_ORIENTATION, front );
-
- // Load in samples
-- ALvoid* data = malloc(5 * (512 * 3) * 1024);
-+ ALvoid* data;
- alGenBuffers(numsamples, samples);
-
- for (int i = 0; i < numsamples; i++){
-- ALsizei freq;
-+ ALfloat freq;
- ALboolean fileok;
- // Evil OpenAL portability fix done here
--#ifdef _WIN32
- ALenum format;
-- ALboolean trash;
-- alutLoadWAVFile(filenames[i],&format,&data,&filelen,&freq,&trash);
-- fileok = (alGetError() == AL_NO_ERROR);
--#else
-- ALsizei format;
-- ALsizei trash;
-- fileok = alutLoadWAV(filenames[i],&data,&format,&filelen,&trash,&freq);
--#endif
-- if (!fileok){
-+ data = alutLoadMemoryFromFile(filenames[i], &format, &filelen, &freq);
-+ if (!data){
- cerr << "sampleio: could not open " << filenames[i] << endl;
- exit(1);
- }
- alBufferData(samples[i], format, data, filelen, freq);
-+ free(data);
- }
-
- // Generate Sources
+ alListenerfv(AL_ORIENTATION, front ); + + // Load in samples +- ALvoid* data = malloc(5 * (512 * 3) * 1024); ++ ALvoid* data; + alGenBuffers(numsamples, samples); + + for (int i = 0; i < numsamples; i++){ +- ALsizei freq; ++ ALfloat freq; + ALboolean fileok; + // Evil OpenAL portability fix done here +-#ifdef _WIN32 + ALenum format; +- ALboolean trash; +- alutLoadWAVFile(filenames[i],&format,&data,&filelen,&freq,&trash); +- fileok = (alGetError() == AL_NO_ERROR); +-#else +- ALsizei format; +- ALsizei trash; +- fileok = alutLoadWAV(filenames[i],&data,&format,&filelen,&trash,&freq); +-#endif +- if (!fileok){ ++ data = alutLoadMemoryFromFile(filenames[i], &format, &filelen, &freq); ++ if (!data){ + cerr << "sampleio: could not open " << filenames[i] << endl; + exit(1); + } + alBufferData(samples[i], format, data, filelen, freq); ++ free(data); + } + + // Generate Sources @@ -107,8 +100,6 @@ - alSourcefv(sources[j], AL_ORIENTATION, back );
- }
-
-- free(data);
--
- }
-
- // Clearup routine
+ alSourcefv(sources[j], AL_ORIENTATION, back ); + } + +- free(data); +- + } + + // Clearup routine |