MilkyTracker: fix build, use system zlib and decompressor patch

Also add JACK support

+27 -16
+20
pkgs/applications/audio/milkytracker/decompressor_gzip.patch
··· 1 + https://bugs.archlinux.org/task/31324 2 + https://410333.bugs.gentoo.org/attachment.cgi?id=322456 3 + 4 + diff -ur src.old/compression/DecompressorGZIP.cpp src/compression/DecompressorGZIP.cpp 5 + --- src.old/compression/DecompressorGZIP.cpp 2012-08-28 17:54:46.000000000 +0200 6 + +++ src/compression/DecompressorGZIP.cpp 2012-08-28 17:55:21.000000000 +0200 7 + @@ -57,11 +57,11 @@ 8 + 9 + bool DecompressorGZIP::decompress(const PPSystemString& outFileName, Hints hint) 10 + { 11 + - gzFile *gz_input_file = NULL; 12 + + gzFile gz_input_file = NULL; 13 + int len = 0; 14 + pp_uint8 *buf; 15 + 16 + - if ((gz_input_file = (void **)gzopen (fileName.getStrBuffer(), "r")) == NULL) 17 + + if ((gz_input_file = gzopen (fileName.getStrBuffer(), "r")) == NULL) 18 + return false; 19 + 20 + if ((buf = new pp_uint8[0x10000]) == NULL)
+7 -16
pkgs/applications/audio/milkytracker/default.nix
··· 1 - { stdenv, fetchurl, alsaLib, SDL, automake, autoconf, perl}: 1 + { stdenv, fetchurl, alsaLib, SDL, automake, autoconf, jackaudio, perl, zlib, zziplib }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 version = "0.90.85"; ··· 20 20 sha256 = "0gwd4zslbd8kih80k4v7n2c65kvm2cq3kl6d7y33z1l007vzyvf6"; 21 21 }; 22 22 23 - preConfigure = '' 24 - patch ./src/tracker/sdl/SDL_Main.cpp < ${fix_64bit_patch} 25 - patch < ${no_zzip_patch} 23 + patchPhase = '' 24 + patch ./src/tracker/sdl/SDL_Main.cpp < ${fix_64bit_patch} 25 + patch < ${no_zzip_patch} 26 + patch ./src/compression/DecompressorGZIP.cpp < ${./decompressor_gzip.patch} 26 27 ''; 27 28 28 - # There's a zlib version included with milkytracker, 29 - # but there's no makefiles for it. I've only included 30 - # the header here, but it fails at link-time with 31 - # several 'undefined reference' errors, which simply 32 - # means it can't find the definitions, e.g. compiled 33 - # zlib. 34 - # There's bug reports on other package systems although 35 - # unfortunately still unresolved. 36 - # https://bugs.archlinux.org/task/31324 37 - # http://lists.freebsd.org/pipermail/freebsd-ports/2013-March/082180.html 38 29 preBuild='' 39 - export CPATH="`pwd`/src/compression/zlib/generic" 30 + export CPATH=${zlib}/lib 40 31 ''; 41 32 42 - buildInputs = [ alsaLib SDL automake autoconf perl]; 33 + buildInputs = [ alsaLib SDL automake autoconf jackaudio perl zlib zziplib ]; 43 34 44 35 meta = { 45 36 description = "Music tracker application, similar to Fasttracker II.";