2018-04-24 22:06:15 +02:00
|
|
|
{ stdenv, fetchurl, lib, darwin }:
|
2015-10-26 14:39:30 +01:00
|
|
|
|
|
|
|
# Based on https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD
|
2018-10-22 15:06:11 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2015-11-05 16:56:47 +01:00
|
|
|
name = "live555-${version}";
|
2018-10-22 15:06:11 +02:00
|
|
|
version = "2018.10.17";
|
2015-10-26 14:39:30 +01:00
|
|
|
|
2015-11-05 16:56:47 +01:00
|
|
|
src = fetchurl { # the upstream doesn't provide a stable URL
|
|
|
|
url = "mirror://sourceforge/slackbuildsdirectlinks/live.${version}.tar.gz";
|
2018-10-22 15:06:11 +02:00
|
|
|
sha256 = "1s69ipvdc6ldscp0cr1zpsll8xc3qcagr95nl84x7b1rbg4xjs3w";
|
2015-10-26 14:39:30 +01:00
|
|
|
};
|
|
|
|
|
2018-04-24 22:06:15 +02:00
|
|
|
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) ''
|
2017-11-07 07:27:32 +01:00
|
|
|
substituteInPlace liveMedia/include/Locale.hh \
|
|
|
|
--replace '<xlocale.h>' '<locale.h>'
|
|
|
|
'';
|
2015-10-26 14:39:30 +01:00
|
|
|
|
|
|
|
configurePhase = ''
|
2018-10-22 15:06:11 +02:00
|
|
|
runHook preConfigure
|
|
|
|
|
2018-04-24 22:06:15 +02:00
|
|
|
./genMakefiles ${{
|
|
|
|
x86_64-darwin = "macosx";
|
|
|
|
i686-linux = "linux";
|
|
|
|
x86_64-linux = "linux-64bit";
|
2018-04-25 07:10:08 +02:00
|
|
|
aarch64-linux = "linux-64bit";
|
2018-08-20 21:11:29 +02:00
|
|
|
}.${stdenv.hostPlatform.system}}
|
2018-10-22 15:06:11 +02:00
|
|
|
|
|
|
|
runHook postConfigure
|
2015-10-26 14:39:30 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-10-22 15:06:11 +02:00
|
|
|
runHook preInstall
|
|
|
|
|
2015-10-26 14:39:30 +01:00
|
|
|
for dir in BasicUsageEnvironment groupsock liveMedia UsageEnvironment; do
|
|
|
|
install -dm755 $out/{bin,lib,include/$dir}
|
|
|
|
install -m644 $dir/*.a "$out/lib"
|
|
|
|
install -m644 $dir/include/*.h* "$out/include/$dir"
|
|
|
|
done
|
2018-10-22 15:06:11 +02:00
|
|
|
|
|
|
|
runHook postInstall
|
2015-10-26 14:39:30 +01:00
|
|
|
'';
|
|
|
|
|
2018-04-24 22:06:15 +02:00
|
|
|
nativeBuildInputs = lib.optional stdenv.isDarwin darwin.cctools;
|
|
|
|
|
2018-10-22 15:06:11 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-04-24 22:06:15 +02:00
|
|
|
meta = with lib; {
|
2015-10-26 14:39:30 +01:00
|
|
|
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;
|
2018-04-24 22:06:15 +02:00
|
|
|
platforms = platforms.unix;
|
2015-10-26 14:39:30 +01:00
|
|
|
};
|
|
|
|
}
|