Merge pull request #105217 from prusnak/sdl2_mixer

SDL2_mixer: enable midi by default, cleanup package
This commit is contained in:
Pavol Rusnak 2020-12-11 10:41:58 +01:00 committed by GitHub
commit 8915ddba91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,19 @@
{ stdenv, lib, fetchurl, autoreconfHook, pkgconfig, which
, SDL2, libogg, libvorbis, smpeg2, flac, libmodplug, opusfile, mpg123
, CoreServices, AudioUnit, AudioToolbox
, enableNativeMidi ? false, fluidsynth ? null }:
{ stdenv
, fetchurl
, pkg-config
, AudioToolbox
, AudioUnit
, CoreServices
, SDL2
, flac
, fluidsynth
, libmodplug
, libogg
, libvorbis
, mpg123
, opusfile
, smpeg2
}:
stdenv.mkDerivation rec {
pname = "SDL2_mixer";
@ -12,19 +24,37 @@ stdenv.mkDerivation rec {
sha256 = "0694vsz5bjkcdgfdra6x9fq8vpzrl8m6q96gh58df7065hw5mkxl";
};
preAutoreconf = ''
aclocal
'';
nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [ autoreconfHook pkgconfig which ];
buildInputs = stdenv.lib.optionals stdenv.isDarwin [
AudioToolbox
AudioUnit
CoreServices
];
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CoreServices AudioUnit AudioToolbox ];
propagatedBuildInputs = [
SDL2
flac
fluidsynth
libmodplug
libogg
libvorbis
mpg123
opusfile
smpeg2
];
propagatedBuildInputs = [ SDL2 libogg libvorbis fluidsynth smpeg2 flac libmodplug opusfile mpg123 ];
configureFlags = [ "--disable-music-ogg-shared" ]
++ lib.optional enableNativeMidi "--enable-music-native-midi-gpl"
++ lib.optionals stdenv.isDarwin [ "--disable-sdltest" "--disable-smpegtest" ];
configureFlags = [
"--disable-music-ogg-shared"
"--disable-music-flac-shared"
"--disable-music-mod-modplug-shared"
"--disable-music-mp3-mpg123-shared"
"--disable-music-opus-shared"
"--disable-music-midi-fluidsynth-shared"
] ++ stdenv.lib.optionals stdenv.isDarwin [
"--disable-sdltest"
"--disable-smpegtest"
];
meta = with stdenv.lib; {
description = "SDL multi-channel audio mixer library";