portaudio: fix on Darwin
This commit is contained in:
parent
5c09b223f9
commit
6c6db7b58b
|
@ -1,4 +1,5 @@
|
|||
{ stdenv, fetchurl, alsaLib, pkgconfig }:
|
||||
{ stdenv, fetchurl, alsaLib, pkgconfig
|
||||
, AudioUnit, AudioToolbox, CoreAudio, CoreServices, Carbon }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "portaudio-19-20140130";
|
||||
|
@ -11,8 +12,9 @@ stdenv.mkDerivation rec {
|
|||
buildInputs = [ pkgconfig ]
|
||||
++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
|
||||
|
||||
configureFlags = stdenv.lib.optionals stdenv.isDarwin
|
||||
[ "--build=x86_64" "--without-oss" "--enable-static" "--enable-shared" ];
|
||||
configureFlags = [ "--disable-mac-universal" ];
|
||||
|
||||
propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [ AudioUnit AudioToolbox CoreAudio CoreServices Carbon ];
|
||||
|
||||
preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
sed -i '50 i\
|
||||
|
@ -27,15 +29,13 @@ stdenv.mkDerivation rec {
|
|||
'';
|
||||
|
||||
# not sure why, but all the headers seem to be installed by the make install
|
||||
installPhase = if stdenv.isDarwin then ''
|
||||
mkdir -p "$out"
|
||||
cp -r include "$out"
|
||||
cp -r lib "$out"
|
||||
'' else ''
|
||||
installPhase = ''
|
||||
make install
|
||||
|
||||
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||
# fixup .pc file to find alsa library
|
||||
sed -i "s|-lasound|-L${alsaLib.out}/lib -lasound|" "$out/lib/pkgconfig/"*.pc
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
cp include/pa_mac_core.h $out/include/pa_mac_core.h
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -8987,7 +8987,9 @@ in
|
|||
|
||||
popt = callPackage ../development/libraries/popt { };
|
||||
|
||||
portaudio = callPackage ../development/libraries/portaudio { };
|
||||
portaudio = callPackage ../development/libraries/portaudio {
|
||||
inherit (darwin.apple_sdk.frameworks) AudioToolbox AudioUnit CoreAudio CoreServices Carbon;
|
||||
};
|
||||
|
||||
portmidi = callPackage ../development/libraries/portmidi {};
|
||||
|
||||
|
|
Loading…
Reference in New Issue