From 808962fe31b2a144274e2bf0eeb2bee0eb538c82 Mon Sep 17 00:00:00 2001 From: Kim Simmons Date: Tue, 29 Oct 2013 17:14:53 +0100 Subject: [PATCH 1/4] Attempt at compiling MilkyTracker, but recent zlib version may have broken it. There's a zlib version included with milkytracker, but there's no makefiles for it. I've only included the header here, but it fails at link-time with several 'undefined reference' errors, which simply means it can't find the definitions, e.g. compiled zlib. There's bug reports on other package systems although unfortunately still unresolved. https://bugs.archlinux.org/task/31324 http://lists.freebsd.org/pipermail/freebsd-ports/2013-March/082180.html --- .../audio/milkytracker/default.nix | 49 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/applications/audio/milkytracker/default.nix diff --git a/pkgs/applications/audio/milkytracker/default.nix b/pkgs/applications/audio/milkytracker/default.nix new file mode 100644 index 00000000000..c0ce0058ba4 --- /dev/null +++ b/pkgs/applications/audio/milkytracker/default.nix @@ -0,0 +1,49 @@ +{ stdenv, fetchurl, alsaLib, SDL, automake, autoconf, perl}: + +stdenv.mkDerivation rec { + version = "0.90.85"; + name = "milkytracker-${version}"; + + src = fetchurl { + url = "http://milkytracker.org/files/milkytracker-0.90.85.tar.gz"; + sha256 = "184pk0k9nv461a61sh6lb62wfadjwwk8ri3z5kpdbqnyssz0zfpv"; + }; + + # Get two official patches. + no_zzip_patch = fetchurl { + url = "http://www.milkytracker.org/files/patches-0.90.85/no_zziplib_dep.patch"; + sha256 = "1w550q7pxa7w6v2v19ljk03hayacrs6y887izg11a1983wk7qzb3"; + }; + + fix_64bit_patch = fetchurl { + url = "http://www.milkytracker.org/files/patches-0.90.85/64bit_freebsd_fix.patch"; + sha256 = "0gwd4zslbd8kih80k4v7n2c65kvm2cq3kl6d7y33z1l007vzyvf6"; + }; + + preConfigure = '' + patch ./src/tracker/sdl/SDL_Main.cpp < ${fix_64bit_patch} + patch < ${no_zzip_patch} + ''; + + # There's a zlib version included with milkytracker, + # but there's no makefiles for it. I've only included + # the header here, but it fails at link-time with + # several 'undefined reference' errors, which simply + # means it can't find the definitions, e.g. compiled + # zlib. + # There's bug reports on other package systems although + # unfortunately still unresolved. + # https://bugs.archlinux.org/task/31324 + # http://lists.freebsd.org/pipermail/freebsd-ports/2013-March/082180.html + preBuild='' + export CPATH="`pwd`/src/compression/zlib/generic" + ''; + + buildInputs = [ alsaLib SDL automake autoconf perl]; + + meta = { + description = "Music tracker application, similar to Fasttracker II."; + homepage = http://milkytracker.org; + license = "GPLv3"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0f03e3482bb..3b6f55ffd0c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7358,6 +7358,8 @@ let audacity = callPackage ../applications/audio/audacity { }; + milkytracker = callPackage ../applications/audio/milkytracker { }; + aumix = callPackage ../applications/audio/aumix { gtkGUI = false; }; From 39525c52d8540a2e4103e09a7fde4553cec9be25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cillian=20de=20R=C3=B3iste?= Date: Wed, 30 Oct 2013 00:00:46 +0100 Subject: [PATCH 2/4] MilkyTracker: fix build, use system zlib and decompressor patch Also add JACK support --- .../milkytracker/decompressor_gzip.patch | 20 ++++++++++++++++ .../audio/milkytracker/default.nix | 23 ++++++------------- 2 files changed, 27 insertions(+), 16 deletions(-) create mode 100644 pkgs/applications/audio/milkytracker/decompressor_gzip.patch diff --git a/pkgs/applications/audio/milkytracker/decompressor_gzip.patch b/pkgs/applications/audio/milkytracker/decompressor_gzip.patch new file mode 100644 index 00000000000..c64421116de --- /dev/null +++ b/pkgs/applications/audio/milkytracker/decompressor_gzip.patch @@ -0,0 +1,20 @@ +https://bugs.archlinux.org/task/31324 +https://410333.bugs.gentoo.org/attachment.cgi?id=322456 + +diff -ur src.old/compression/DecompressorGZIP.cpp src/compression/DecompressorGZIP.cpp +--- src.old/compression/DecompressorGZIP.cpp 2012-08-28 17:54:46.000000000 +0200 ++++ src/compression/DecompressorGZIP.cpp 2012-08-28 17:55:21.000000000 +0200 +@@ -57,11 +57,11 @@ + + bool DecompressorGZIP::decompress(const PPSystemString& outFileName, Hints hint) + { +- gzFile *gz_input_file = NULL; ++ gzFile gz_input_file = NULL; + int len = 0; + pp_uint8 *buf; + +- if ((gz_input_file = (void **)gzopen (fileName.getStrBuffer(), "r")) == NULL) ++ if ((gz_input_file = gzopen (fileName.getStrBuffer(), "r")) == NULL) + return false; + + if ((buf = new pp_uint8[0x10000]) == NULL) diff --git a/pkgs/applications/audio/milkytracker/default.nix b/pkgs/applications/audio/milkytracker/default.nix index c0ce0058ba4..3a464fb9fdb 100644 --- a/pkgs/applications/audio/milkytracker/default.nix +++ b/pkgs/applications/audio/milkytracker/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, alsaLib, SDL, automake, autoconf, perl}: +{ stdenv, fetchurl, alsaLib, SDL, automake, autoconf, jackaudio, perl, zlib, zziplib }: stdenv.mkDerivation rec { version = "0.90.85"; @@ -20,26 +20,17 @@ stdenv.mkDerivation rec { sha256 = "0gwd4zslbd8kih80k4v7n2c65kvm2cq3kl6d7y33z1l007vzyvf6"; }; - preConfigure = '' - patch ./src/tracker/sdl/SDL_Main.cpp < ${fix_64bit_patch} - patch < ${no_zzip_patch} + patchPhase = '' + patch ./src/tracker/sdl/SDL_Main.cpp < ${fix_64bit_patch} + patch < ${no_zzip_patch} + patch ./src/compression/DecompressorGZIP.cpp < ${./decompressor_gzip.patch} ''; - # There's a zlib version included with milkytracker, - # but there's no makefiles for it. I've only included - # the header here, but it fails at link-time with - # several 'undefined reference' errors, which simply - # means it can't find the definitions, e.g. compiled - # zlib. - # There's bug reports on other package systems although - # unfortunately still unresolved. - # https://bugs.archlinux.org/task/31324 - # http://lists.freebsd.org/pipermail/freebsd-ports/2013-March/082180.html preBuild='' - export CPATH="`pwd`/src/compression/zlib/generic" + export CPATH=${zlib}/lib ''; - buildInputs = [ alsaLib SDL automake autoconf perl]; + buildInputs = [ alsaLib SDL automake autoconf jackaudio perl zlib zziplib ]; meta = { description = "Music tracker application, similar to Fasttracker II."; From 9f6f87f76aed81c5d51a87d6934755d5dc4816a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cillian=20de=20R=C3=B3iste?= Date: Wed, 30 Oct 2013 00:07:18 +0100 Subject: [PATCH 3/4] MilkyTracker: Tidy up, sort buildInputs and use the attrPath for the license --- pkgs/applications/audio/milkytracker/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/audio/milkytracker/default.nix b/pkgs/applications/audio/milkytracker/default.nix index 3a464fb9fdb..8cbf85306b6 100644 --- a/pkgs/applications/audio/milkytracker/default.nix +++ b/pkgs/applications/audio/milkytracker/default.nix @@ -1,4 +1,6 @@ -{ stdenv, fetchurl, alsaLib, SDL, automake, autoconf, jackaudio, perl, zlib, zziplib }: +{ stdenv, fetchurl, SDL, alsaLib, autoconf, automake, jackaudio, perl +, zlib, zziplib +}: stdenv.mkDerivation rec { version = "0.90.85"; @@ -30,11 +32,11 @@ stdenv.mkDerivation rec { export CPATH=${zlib}/lib ''; - buildInputs = [ alsaLib SDL automake autoconf jackaudio perl zlib zziplib ]; + buildInputs = [ SDL alsaLib autoconf automake jackaudio perl zlib zziplib ]; meta = { description = "Music tracker application, similar to Fasttracker II."; homepage = http://milkytracker.org; - license = "GPLv3"; + license = stdenv.lib.licenses.gpl3Plus; }; } From db2075b6d826bd92d2187d2e641707dccc9ad96a Mon Sep 17 00:00:00 2001 From: Kim Simmons Date: Thu, 7 Nov 2013 11:05:13 +0100 Subject: [PATCH 4/4] Added milkytracker: Compiles and runs. --- lib/maintainers.nix | 1 + pkgs/applications/audio/milkytracker/default.nix | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 06c71b2b7ac..25545fae65d 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -62,4 +62,5 @@ winden = "Antonio Vargas Gonzalez "; z77z = "Marco Maggesi "; zef = "Zef Hemel "; + zoomulator = "Kim Simmons "; } diff --git a/pkgs/applications/audio/milkytracker/default.nix b/pkgs/applications/audio/milkytracker/default.nix index 8cbf85306b6..df62fb0ab0d 100644 --- a/pkgs/applications/audio/milkytracker/default.nix +++ b/pkgs/applications/audio/milkytracker/default.nix @@ -38,5 +38,7 @@ stdenv.mkDerivation rec { description = "Music tracker application, similar to Fasttracker II."; homepage = http://milkytracker.org; license = stdenv.lib.licenses.gpl3Plus; + platforms = [ "x86_64-linux" "i686-linux" ]; + maintainers = [ maintainers.zoomulator ]; }; }