Index: head/games/apricots/Makefile =================================================================== --- head/games/apricots/Makefile (revision 252598) +++ head/games/apricots/Makefile (revision 252599) @@ -1,62 +1,60 @@ # New ports collection makefile for: apricots # Date created: 07 Jan 2008 # Whom: Dmitry Marakasov # # $FreeBSD$ # PORTNAME= apricots PORTVERSION= 0.2.6 PORTREVISION= 2 CATEGORIES= games MASTER_SITES= http://www.fishies.org.uk/ \ http://mirror.amdmi3.ru/distfiles/ MAINTAINER= amdmi3@FreeBSD.org COMMENT= Fly a little plane around and shoot things and drop bombs -BROKEN= does not compile - USE_AUTOTOOLS= libtool:22 GNU_CONFIGURE= yes USE_GMAKE= yes USE_SDL= sdl MAKE_JOBS_SAFE= yes CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib" CPPFLAGS="-I${LOCALBASE}/include" PORTDOCS= README DESKTOP_ENTRIES="Apricots" \ "Fly a little plane around and shoot things and drop bombs" \ "" \ "apricots" \ "Game;ArcadeGame;" \ false OPTIONS= OPENAL "Enable OpenAL audio" on .include .if !defined(WITHOUT_OPENAL) USE_OPENAL= al alut .endif post-patch: .if defined(WITHOUT_OPENAL) @${REINPLACE_CMD} -e 's|-DAP_AUDIO_OPENAL||' ${WRKSRC}/configure .else @${REINPLACE_CMD} -e '/^LIBS = / s|$$| -lopenal -lalut|' \ ${WRKSRC}/apricots/Makefile.in .endif @${REINPLACE_CMD} -e 's|-O2||' ${WRKSRC}/configure .if !defined(NOPORTDOCS) post-install: ${MKDIR} ${DOCSDIR} .for f in ${PORTDOCS} ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR} .endfor .endif .include Property changes on: head/games/apricots/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.10 \ No newline at end of property +1.11 \ No newline at end of property Index: head/games/apricots/files/patch-sampleio.cpp =================================================================== --- head/games/apricots/files/patch-sampleio.cpp (revision 252598) +++ head/games/apricots/files/patch-sampleio.cpp (nonexistent) @@ -1,19 +0,0 @@ ---- apricots/sampleio.cpp.orig 2003-08-06 03:21:22.000000000 +0400 -+++ apricots/sampleio.cpp 2008-01-08 02:12:27.000000000 +0300 -@@ -81,16 +81,10 @@ - ALsizei 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){ - cerr << "sampleio: could not open " << filenames[i] << endl; - exit(1); Property changes on: head/games/apricots/files/patch-sampleio.cpp ___________________________________________________________________ Deleted: cvs2svn:cvs-rev ## -1 +0,0 ## -1.1 \ No newline at end of property Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Index: head/games/apricots/files/patch-apricots-sampleio.cpp =================================================================== --- head/games/apricots/files/patch-apricots-sampleio.cpp (nonexistent) +++ head/games/apricots/files/patch-apricots-sampleio.cpp (revision 252599) @@ -0,0 +1,46 @@ +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 +@@ -107,8 +100,6 @@ + alSourcefv(sources[j], AL_ORIENTATION, back ); + } + +- free(data); +- + } + + // Clearup routine Property changes on: head/games/apricots/files/patch-apricots-sampleio.cpp ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property