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 {
|
stdenv.mkDerivation rec {
|
||||||
name = "portaudio-19-20140130";
|
name = "portaudio-19-20140130";
|
||||||
@ -11,8 +12,9 @@ stdenv.mkDerivation rec {
|
|||||||
buildInputs = [ pkgconfig ]
|
buildInputs = [ pkgconfig ]
|
||||||
++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
|
++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
|
||||||
|
|
||||||
configureFlags = stdenv.lib.optionals stdenv.isDarwin
|
configureFlags = [ "--disable-mac-universal" ];
|
||||||
[ "--build=x86_64" "--without-oss" "--enable-static" "--enable-shared" ];
|
|
||||||
|
propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [ AudioUnit AudioToolbox CoreAudio CoreServices Carbon ];
|
||||||
|
|
||||||
preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
|
preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
sed -i '50 i\
|
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
|
# not sure why, but all the headers seem to be installed by the make install
|
||||||
installPhase = if stdenv.isDarwin then ''
|
installPhase = ''
|
||||||
mkdir -p "$out"
|
|
||||||
cp -r include "$out"
|
|
||||||
cp -r lib "$out"
|
|
||||||
'' else ''
|
|
||||||
make install
|
make install
|
||||||
|
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||||
# fixup .pc file to find alsa library
|
# fixup .pc file to find alsa library
|
||||||
sed -i "s|-lasound|-L${alsaLib.out}/lib -lasound|" "$out/lib/pkgconfig/"*.pc
|
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; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -8987,7 +8987,9 @@ in
|
|||||||
|
|
||||||
popt = callPackage ../development/libraries/popt { };
|
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 {};
|
portmidi = callPackage ../development/libraries/portmidi {};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user