Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=58a6912593564568138e8fcd0efe43e57cf22dc9

commit 58a6912593564568138e8fcd0efe43e57cf22dc9
Author: Devil505 <devil505li...@gmail.com>
Date:   Sun Jul 26 19:50:07 2009 +0200

apricots-0.2.6-1-i686
* new package
* added patch to build correctly

diff --git a/source/games-extra/apricots/FrugalBuild 
b/source/games-extra/apricots/FrugalBuild
new file mode 100644
index 0000000..e8ab45e
--- /dev/null
+++ b/source/games-extra/apricots/FrugalBuild
@@ -0,0 +1,17 @@
+# Compiling Time: 0.20 SBU
+# Maintainer: Devil505 <devil505li...@gmail.com>
+
+pkgname=apricots
+pkgver=0.2.6
+pkgrel=1
+pkgdesc="A simple 2D flying/bombing game similar to basic side scrollers"
+url="http://www.fishies.org.uk/apricots.html";
+depends=('openal' 'sdl' 'freealut>=1.1.0')
+groups=('games-extra')
+archs=('i686')
+up2date="Flasttar $url"
+source=(http://www.fishies.org.uk/$pkgname-$pkgver.tar.gz 
$pkgname-$pkgver-freealut.patch)
+sha1sums=('4b5b4c867fc92d4fc717d16b30dbaf8411f24a48' \
+          '7d6d42d8ad37705965ea2c4e5fedf1736d6653e3')
+
+# optimization OK
diff --git a/source/games-extra/apricots/apricots-0.2.6-freealut.patch 
b/source/games-extra/apricots/apricots-0.2.6-freealut.patch
new file mode 100644
index 0000000..4f66307
--- /dev/null
+++ b/source/games-extra/apricots/apricots-0.2.6-freealut.patch
@@ -0,0 +1,65 @@
+--- apricots/apricots.cpp
++++ apricots/apricots.cpp
+@@ -16,6 +16,7 @@
+ int main(int, char**){
+ #endif
+
++atexit(SDL_Quit);
+   // Initialize data
+   gamedata g;
+   init_data(g);
+
+--- apricots/sampleio.cpp
++++ apricots/sampleio.cpp
+@@ -74,12 +74,9 @@
+   alListenerfv(AL_ORIENTATION, front );
+
+   // Load in samples
+-  ALvoid* data = malloc(5 * (512 * 3) * 1024);
+   alGenBuffers(numsamples, samples);
+
+   for (int i = 0; i < numsamples; i++){
+-    ALsizei freq;
+-    ALboolean fileok;
+     // Evil OpenAL portability fix done here
+ #ifdef _WIN32
+     ALenum format;
+@@ -87,15 +84,12 @@
+     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);
++      samples[i] = alutCreateBufferFromFile(filenames[i]);
+ #endif
+-    if (!fileok){
++    if (samples[i] == AL_NONE){
+       cerr << "sampleio: could not open " << filenames[i] << endl;
+       exit(1);
+     }
+-    alBufferData(samples[i], format, data, filelen, freq);
+   }
+
+   // Generate Sources
+@@ -107,7 +101,6 @@
+     alSourcefv(sources[j], AL_ORIENTATION, back );
+   }
+
+-  free(data);
+
+ }
+
+
+--- configure.in
++++ configure.in
+@@ -100,7 +100,8 @@
+
+ dnl Check for OpenAL
+ AC_CHECK_HEADER(AL/al.h,[CXXFLAGS="$CXXFLAGS -DAP_AUDIO_OPENAL"])
+-AC_CHECK_LIB( openal, alutInit)
++AC_CHECK_LIB( openal, alGetError)
++AC_CHECK_LIB( alut, alutInit)
+
+ KDE_CHECK_EXTRA_LIBS
+ all_libraries="$all_libraries $USER_LDFLAGS"
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to