summary refs log tree commit diff
path: root/pkgs/applications/audio
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2018-04-11 14:55:52 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2018-04-11 14:55:52 +0200
commitee6894ca1297afe0caf2f389c1f9a9220826b749 (patch)
tree02f96b5744cef8bc55010fb8301f5b50c0748d4c /pkgs/applications/audio
parent392874b9b1411dc7b879997bd8776b921feea61d (diff)
parent617c26df84d5670574864a9ccad0eaf8708bd86a (diff)
downloadnixlib-ee6894ca1297afe0caf2f389c1f9a9220826b749.tar
nixlib-ee6894ca1297afe0caf2f389c1f9a9220826b749.tar.gz
nixlib-ee6894ca1297afe0caf2f389c1f9a9220826b749.tar.bz2
nixlib-ee6894ca1297afe0caf2f389c1f9a9220826b749.tar.lz
nixlib-ee6894ca1297afe0caf2f389c1f9a9220826b749.tar.xz
nixlib-ee6894ca1297afe0caf2f389c1f9a9220826b749.tar.zst
nixlib-ee6894ca1297afe0caf2f389c1f9a9220826b749.zip
Merge staging into master
Diffstat (limited to 'pkgs/applications/audio')
-rw-r--r--pkgs/applications/audio/chuck/clang.patch58
-rw-r--r--pkgs/applications/audio/chuck/default.nix19
-rw-r--r--pkgs/applications/audio/fluidsynth/default.nix4
-rw-r--r--pkgs/applications/audio/ncmpc/default.nix2
4 files changed, 73 insertions, 10 deletions
diff --git a/pkgs/applications/audio/chuck/clang.patch b/pkgs/applications/audio/chuck/clang.patch
new file mode 100644
index 000000000000..77227ef0fd44
--- /dev/null
+++ b/pkgs/applications/audio/chuck/clang.patch
@@ -0,0 +1,58 @@
+diff --git a/src/ugen_osc.cpp b/src/ugen_osc.cpp
+index 6b93c6b..dbefe4f 100644
+--- a/src/ugen_osc.cpp
++++ b/src/ugen_osc.cpp
+@@ -1232,7 +1232,7 @@ CK_DLL_CTRL( gen5_coeffs )
+     Chuck_Array8 * in_args = (Chuck_Array8 *)GET_CK_OBJECT(ARGS);
+     
+     // fprintf(stdout, "calling gen10coeffs, %d\n", weights);
+-    if(in_args<0) return;
++    if(in_args!=0) return;
+     size = in_args->size();
+     if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1;
+     
+@@ -1287,7 +1287,7 @@ CK_DLL_CTRL( gen7_coeffs )
+     Chuck_Array8 * in_args = (Chuck_Array8 *)GET_CK_OBJECT(ARGS);
+     
+     // fprintf(stdout, "calling gen10coeffs, %d\n", weights);
+-    if(in_args<0) return;
++    if(in_args!=0) return;
+     size = in_args->size();
+     if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1;
+     
+@@ -1340,7 +1340,7 @@ CK_DLL_CTRL( gen9_coeffs )
+     Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS);
+     
+     // fprintf(stdout, "calling gen10coeffs, %d\n", weights);
+-    if(weights<0) return;
++    if(weights!=0) return;
+     size = weights->size();
+     if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1;
+     
+@@ -1390,7 +1390,7 @@ CK_DLL_CTRL( gen10_coeffs )
+     Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS);
+     
+     // fprintf(stdout, "calling gen10coeffs, %d\n", weights);
+-    if(weights<0) return;
++    if(weights!=0) return;
+     size = weights->size();
+     if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1;
+     
+@@ -1441,7 +1441,7 @@ CK_DLL_CTRL( gen17_coeffs )
+     Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS);
+     
+     // fprintf(stdout, "calling gen17coeffs, %d\n", weights);
+-    if(weights<0) return;
++    if(weights!=0) return;
+     size = weights->size();
+     if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1;
+     
+@@ -1502,7 +1502,7 @@ CK_DLL_CTRL( curve_coeffs )
+     Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS);
+     
+     // fprintf(stdout, "calling gen17coeffs, %d\n", weights);
+-    if(weights<0) goto done;
++    if(weights!=0) goto done;
+ 
+     nargs = weights->size();
+     if (nargs < 5 || (nargs % 3) != 2)  {   // check number of args
diff --git a/pkgs/applications/audio/chuck/default.nix b/pkgs/applications/audio/chuck/default.nix
index fd7f0c2b07c2..e94172b0f879 100644
--- a/pkgs/applications/audio/chuck/default.nix
+++ b/pkgs/applications/audio/chuck/default.nix
@@ -1,4 +1,6 @@
-{ stdenv, fetchurl, alsaLib, bison, flex, libsndfile, which }:
+{ stdenv, fetchurl, alsaLib, bison, flex, libsndfile, which
+, AppKit, Carbon, CoreAudio, CoreMIDI, CoreServices, Kernel
+}:
 
 stdenv.mkDerivation rec {
   version = "1.3.5.2";
@@ -10,19 +12,24 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ bison flex libsndfile which ]
-    ++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
+    ++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib
+    ++ stdenv.lib.optional stdenv.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel ];
 
-  patches = [ ./darwin-limits.patch ];
+  patches = [ ./clang.patch ./darwin-limits.patch ];
+
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-Wno-missing-sysroot";
+  NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-framework MultitouchSupport";
 
   postPatch = ''
     substituteInPlace src/makefile --replace "/usr/bin" "$out/bin"
     substituteInPlace src/makefile.osx --replace "xcodebuild" "/usr/bin/xcodebuild"
     substituteInPlace src/makefile.osx --replace "weak_framework" "framework"
+    substituteInPlace src/makefile.osx --replace "MACOSX_DEPLOYMENT_TARGET=10.5" "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET"
   '';
 
-  buildPhase =
-    stdenv.lib.optionals stdenv.isLinux  ["make -C src linux-alsa"] ++
-    stdenv.lib.optionals stdenv.isDarwin ["make -C src osx"];
+  buildPhase = ''
+    make -C src ${if stdenv.isDarwin then "osx" else "linux-alsa"}
+  '';
 
   installPhase = ''
     install -Dm755 ./src/chuck $out/bin/chuck
diff --git a/pkgs/applications/audio/fluidsynth/default.nix b/pkgs/applications/audio/fluidsynth/default.nix
index 789ee35f260e..27ca539850e2 100644
--- a/pkgs/applications/audio/fluidsynth/default.nix
+++ b/pkgs/applications/audio/fluidsynth/default.nix
@@ -5,13 +5,13 @@
 
 stdenv.mkDerivation  rec {
   name = "fluidsynth-${version}";
-  version = "1.1.9";
+  version = "1.1.10";
 
   src = fetchFromGitHub {
     owner = "FluidSynth";
     repo = "fluidsynth";
     rev = "v${version}";
-    sha256 = "0krvmb1idnf95l2ydzfcb08ayyx3n4m71hf9fgwv3srzaikvpf3q";
+    sha256 = "04jlgq1d1hd8r9cnmkl3lgf1fgm7kgy4hh9nfddap41fm1wp121p";
   };
 
   nativeBuildInputs = [ pkgconfig cmake ];
diff --git a/pkgs/applications/audio/ncmpc/default.nix b/pkgs/applications/audio/ncmpc/default.nix
index 5bd2c9045f2a..ffd5b9a58582 100644
--- a/pkgs/applications/audio/ncmpc/default.nix
+++ b/pkgs/applications/audio/ncmpc/default.nix
@@ -15,8 +15,6 @@ stdenv.mkDerivation rec {
   buildInputs = [ glib ncurses mpd_clientlib ];
   nativeBuildInputs = [ meson ninja pkgconfig gettext ];
 
-  NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
-
   meta = with stdenv.lib; {
     description = "Curses-based interface for MPD (music player daemon)";
     homepage    = https://www.musicpd.org/clients/ncmpc/;