From dad3714ec16c96b4512d5ebdff84f88867dfb291 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 24 Apr 2018 15:06:15 -0500 Subject: live555: supports darwin --- pkgs/development/libraries/live555/default.nix | 27 +++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/live555/default.nix b/pkgs/development/libraries/live555/default.nix index 1479f7b6153b..69c16878fdf5 100644 --- a/pkgs/development/libraries/live555/default.nix +++ b/pkgs/development/libraries/live555/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, lib, darwin }: # Based on https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD let @@ -12,19 +12,22 @@ stdenv.mkDerivation { sha256 = "0zi47asv1qmb09g321m02q684i3c90vci0mgkdh1mlmx2rbg1d1d"; }; - postPatch = "sed 's,/bin/rm,rm,g' -i genMakefiles" - + stdenv.lib.optionalString (stdenv ? glibc) '' - + postPatch = '' + sed 's,/bin/rm,rm,g' -i genMakefiles + sed \ + -e 's/$(INCLUDES) -I. -O2 -DSOCKLEN_T/$(INCLUDES) -I. -O2 -I. -fPIC -DRTSPCLIENT_SYNCHRONOUS_INTERFACE=1 -DSOCKLEN_T/g' \ + -i config.linux + '' + stdenv.lib.optionalString (stdenv ? glibc) '' substituteInPlace liveMedia/include/Locale.hh \ --replace '' '' ''; configurePhase = '' - sed \ - -e 's/$(INCLUDES) -I. -O2 -DSOCKLEN_T/$(INCLUDES) -I. -O2 -I. -fPIC -DRTSPCLIENT_SYNCHRONOUS_INTERFACE=1 -DSOCKLEN_T/g' \ - -i config.linux - - ./genMakefiles linux + ./genMakefiles ${{ + x86_64-darwin = "macosx"; + i686-linux = "linux"; + x86_64-linux = "linux-64bit"; + }.${stdenv.system}} ''; installPhase = '' @@ -35,10 +38,12 @@ stdenv.mkDerivation { done ''; - meta = with stdenv.lib; { + nativeBuildInputs = lib.optional stdenv.isDarwin darwin.cctools; + + meta = with lib; { description = "Set of C++ libraries for multimedia streaming, using open standard protocols (RTP/RTCP, RTSP, SIP)"; homepage = http://www.live555.com/liveMedia/; license = licenses.lgpl21Plus; - platforms = platforms.linux; + platforms = platforms.unix; }; } -- cgit 1.4.1