SDL2_mixer: build with libmodplug and smpeg2

This commit is contained in:
Orivej Desh 2017-08-26 21:54:37 +00:00
parent 5772ce1dd8
commit e5be0e82d2
2 changed files with 25 additions and 2 deletions

View File

@ -1,4 +1,6 @@
{ stdenv, lib, fetchurl, SDL2, libogg, libvorbis, smpeg, flac, enableNativeMidi ? false, fluidsynth ? null }:
{ stdenv, lib, fetchurl, autoconf, pkgconfig, which
, SDL2, libogg, libvorbis, smpeg2, flac, libmodplug
, enableNativeMidi ? false, fluidsynth ? null }:
stdenv.mkDerivation rec {
name = "SDL2_mixer-${version}";
@ -9,7 +11,15 @@ stdenv.mkDerivation rec {
sha256 = "0pv9jzjpcjlbiaybvwrb4avmv46qk7iqxlnqrd2dfj82c4mgc92s";
};
propagatedBuildInputs = [ SDL2 libogg libvorbis fluidsynth smpeg flac ];
nativeBuildInputs = [ autoconf pkgconfig which ];
propagatedBuildInputs = [ SDL2 libogg libvorbis fluidsynth smpeg2 flac libmodplug ];
patches = [ ./libmodplug.patch ];
preConfigure = ''
./autogen.sh
'';
configureFlags = [ "--disable-music-ogg-shared" ] ++ lib.optional enableNativeMidi "--enable-music-native-midi-gpl";

View File

@ -0,0 +1,13 @@
diff --git a/configure.in b/configure.in
index d511646..77dc3fe 100644
--- a/configure.in
+++ b/configure.in
@@ -258,7 +258,7 @@ if test x$enable_music_mod = xyes -a x$enable_music_mod_modplug = xyes; then
have_libmodplug_lib=yes
], [dnl
AC_CHECK_HEADER([libmodplug/modplug.h], [have_libmodplug_hdr=yes])
- AC_CHECK_LIB([modplug], [have_libmodplug_lib=yes])
+ AC_CHECK_LIB([modplug], [ModPlug_Load], [have_libmodplug_lib=yes])
])
if test x$have_libmodplug_hdr = xyes -a x$have_libmodplug_lib = xyes; then