2022-01-27 00:19:43 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, darwin
|
|
|
|
, openssl
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
# major and only downstream dependency
|
|
|
|
, vlc
|
2022-01-27 00:19:43 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "live555";
|
2022-03-05 16:20:37 +00:00
|
|
|
version = "2022.02.07";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
src = fetchurl {
|
2020-04-24 23:36:52 +00:00
|
|
|
urls = [
|
2022-01-27 00:19:43 +00:00
|
|
|
"http://www.live555.com/liveMedia/public/live.${version}.tar.gz"
|
2020-04-24 23:36:52 +00:00
|
|
|
"https://download.videolan.org/contrib/live555/live.${version}.tar.gz"
|
2022-01-27 00:19:43 +00:00
|
|
|
"mirror://sourceforge/slackbuildsdirectlinks/live.${version}.tar.gz"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2022-03-05 16:20:37 +00:00
|
|
|
sha256 = "sha256-bwwfinHOtQa8v5abArSww2l7ThXa623LqYcsh0XOksY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
nativeBuildInputs = lib.optional stdenv.isDarwin darwin.cctools;
|
|
|
|
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
2022-01-27 00:19:43 +00:00
|
|
|
substituteInPlace config.macosx-catalina \
|
|
|
|
--replace '/usr/lib/libssl.46.dylib' "${openssl.out}/lib/libssl.dylib" \
|
|
|
|
--replace '/usr/lib/libcrypto.44.dylib' "${openssl.out}/lib/libcrypto.dylib"
|
|
|
|
sed -i -e 's|/bin/rm|rm|g' genMakefiles
|
|
|
|
sed -i \
|
2020-04-24 23:36:52 +00:00
|
|
|
-e 's/$(INCLUDES) -I. -O2 -DSOCKLEN_T/$(INCLUDES) -I. -O2 -I. -fPIC -DRTSPCLIENT_SYNCHRONOUS_INTERFACE=1 -DSOCKLEN_T/g' \
|
2022-01-27 00:19:43 +00:00
|
|
|
config.linux
|
2021-02-05 17:12:51 +00:00
|
|
|
'' + lib.optionalString (stdenv ? glibc) ''
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace liveMedia/include/Locale.hh \
|
|
|
|
--replace '<xlocale.h>' '<locale.h>'
|
|
|
|
'';
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
runHook preConfigure
|
|
|
|
|
|
|
|
./genMakefiles ${{
|
2022-01-27 00:19:43 +00:00
|
|
|
x86_64-darwin = "macosx-catalina";
|
2020-04-24 23:36:52 +00:00
|
|
|
i686-linux = "linux";
|
|
|
|
x86_64-linux = "linux-64bit";
|
|
|
|
aarch64-linux = "linux-64bit";
|
2021-08-18 13:19:15 +00:00
|
|
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported platform ${stdenv.hostPlatform.system}")}
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
runHook postConfigure
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit vlc;
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "http://www.live555.com/liveMedia/";
|
2022-01-27 00:19:43 +00:00
|
|
|
description = "Set of C++ libraries for multimedia streaming, using open standard protocols (RTP/RTCP, RTSP, SIP)";
|
2020-04-24 23:36:52 +00:00
|
|
|
changelog = "http://www.live555.com/liveMedia/public/changelog.txt";
|
|
|
|
license = licenses.lgpl21Plus;
|
2022-01-27 00:19:43 +00:00
|
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
broken = stdenv.hostPlatform.isAarch64;
|
|
|
|
};
|
|
|
|
}
|