SDL: cleanup and add patch to discover extensions

This commit is contained in:
Nikolay Amiantov
2016-08-22 06:30:00 +03:00
parent 3e2458a085
commit b47327ebd5
10 changed files with 75 additions and 85 deletions
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, SDL, libogg, libvorbis, smpeg, enableNativeMidi ? false, fluidsynth ? null }:
{ stdenv, lib, fetchurl, SDL, libogg, libvorbis, smpeg, enableNativeMidi ? false, fluidsynth ? null }:
stdenv.mkDerivation rec {
pname = "SDL_mixer";
@@ -10,21 +10,9 @@ stdenv.mkDerivation rec {
sha256 = "0alrhqgm40p4c92s26mimg9cm1y7rzr6m0p49687jxd9g6130i0n";
};
buildInputs = [SDL libogg libvorbis fluidsynth smpeg];
buildInputs = [ SDL libogg libvorbis fluidsynth smpeg ];
configureFlags = "--disable-music-ogg-shared" + stdenv.lib.optionalString enableNativeMidi " --enable-music-native-midi-gpl";
postInstall = ''
ln -s $out/include/SDL/SDL_mixer.h $out/include/
for f in $out/include/SDL/SDL_mixer.h
do
for i in SDL_types.h SDL_rwops.h SDL_audio.h SDL_endian.h SDL_version.h begin_code.h close_code.h
do
substituteInPlace $f --replace "#include \"$i\"" "#include <SDL/$i>"
done
done
'';
configureFlags = [ "--disable-music-ogg-shared" ] ++ lib.optional enableNativeMidi " --enable-music-native-midi-gpl";
meta = with stdenv.lib; {
description = "SDL multi-channel audio mixer library";