mediastreamer: 2.16.1 -> unstable-2020-03-20

+95 -40
+81 -20
pkgs/development/libraries/mediastreamer/default.nix
··· 1 - { stdenv, pkgconfig, intltool, alsaLib, libpulseaudio, speex, gsm 2 - , libopus, ffmpeg, libX11, libXv, libGLU, libGL, glew, libtheora, libvpx, SDL, libupnp 3 - , ortp, libv4l, libpcap, srtp, fetchFromGitHub, cmake, bctoolbox, doxygen 4 - , python, libXext, libmatroska, fetchpatch 1 + { alsaLib 2 + , bctoolbox 3 + , bzrtp 4 + , cmake 5 + , doxygen 6 + , fetchFromGitLab 7 + , fetchpatch 8 + , ffmpeg 9 + , glew 10 + , gsm 11 + , intltool 12 + , libGL 13 + , libGLU 14 + , libX11 15 + , libXext 16 + , libXv 17 + , libmatroska 18 + , libopus 19 + , libpcap 20 + , libpulseaudio 21 + , libtheora 22 + , libupnp 23 + , libv4l 24 + , libvpx 25 + , ortp 26 + , pkgconfig 27 + , python 28 + , SDL 29 + , speex 30 + , srtp 31 + , stdenv 5 32 }: 6 33 7 34 stdenv.mkDerivation rec { 8 35 pname = "mediastreamer2"; 9 - version = "2.16.1"; 36 + # Using master branch for linphone-desktop caused a chain reaction that many 37 + # of its dependencies needed to use master branch too. 38 + version = "unstable-2020-03-20"; 10 39 11 - src = fetchFromGitHub { 12 - owner = "BelledonneCommunications"; 40 + src = fetchFromGitLab { 41 + domain = "gitlab.linphone.org"; 42 + owner = "public"; 43 + group = "BC"; 13 44 repo = pname; 14 - rev = version; 15 - sha256 = "02745bzl2r1jqvdqzyv94fjd4w92zr976la4c4nfvsy52waqah7j"; 45 + rev = "c5eecb72cb44376d142949051dd0cb7c982608fb"; 46 + sha256 = "1vp260jxvjlmrmjdl4p23prg4cjln20a7z6zq8dqvfh4iq3ya033"; 16 47 }; 17 48 18 49 patches = [ 19 - (fetchpatch { 20 - name = "allow-build-without-git.patch"; 21 - url = "https://github.com/BelledonneCommunications/mediastreamer2/commit/de3a24b795d7a78e78eab6b974e7ec5abf2259ac.patch"; 22 - sha256 = "1zqkrab42n4dha0knfsyj4q0wc229ma125gk9grj67ps7r7ipscy"; 23 - }) 50 + # Plugins directory is normally fixed during compile time. This patch makes 51 + # it possible to set the plugins directory run time with an environment 52 + # variable MEDIASTREAMER_PLUGINS_DIR. This makes it possible to construct a 53 + # plugin directory with desired plugins and wrap executables so that the 54 + # environment variable points to that directory. 24 55 ./plugins_dir.patch 25 56 ]; 26 57 27 - nativeBuildInputs = [ pkgconfig intltool cmake doxygen python ]; 58 + nativeBuildInputs = [ 59 + cmake 60 + doxygen 61 + intltool 62 + pkgconfig 63 + python 64 + ]; 28 65 29 66 propagatedBuildInputs = [ 30 - alsaLib libpulseaudio speex gsm libopus 31 - ffmpeg libX11 libXv libGLU libGL glew libtheora libvpx SDL libupnp 32 - ortp libv4l libpcap srtp bctoolbox libXext libmatroska 67 + alsaLib 68 + bctoolbox 69 + bzrtp 70 + ffmpeg 71 + glew 72 + gsm 73 + libGL 74 + libGLU 75 + libX11 76 + libXext 77 + libXv 78 + libmatroska 79 + libopus 80 + libpcap 81 + libpulseaudio 82 + libtheora 83 + libupnp 84 + libv4l 85 + libvpx 86 + ortp 87 + SDL 88 + speex 89 + srtp 33 90 ]; 91 + 92 + # Do not build static libraries 93 + cmakeFlags = [ "-DENABLE_STATIC=NO" ]; 34 94 35 95 NIX_CFLAGS_COMPILE = toString [ 36 96 "-DGIT_VERSION=\"v${version}\"" ··· 43 103 44 104 meta = with stdenv.lib; { 45 105 description = "A powerful and lightweight streaming engine specialized for voice/video telephony applications"; 46 - homepage = http://www.linphone.org/technical-corner/mediastreamer2; 47 - license = licenses.gpl2; 106 + homepage = "http://www.linphone.org/technical-corner/mediastreamer2"; 107 + license = licenses.gpl3; 48 108 platforms = platforms.linux; 109 + maintainers = with maintainers; [ jluttine ]; 49 110 }; 50 111 }
+14 -20
pkgs/development/libraries/mediastreamer/plugins_dir.patch
··· 1 - diff -uNr mediastreamer2/src/base/msfactory.c mediastreamer2-new/src/base/msfactory.c 2 - --- a/src/base/msfactory.c 2015-05-13 16:53:49.801113249 +0200 3 - +++ b/src/base/msfactory.c 2015-08-26 21:35:44.994724647 +0200 4 - @@ -630,12 +630,18 @@ 1 + diff --git a/src/base/msfactory.c b/src/base/msfactory.c 2 + index 14f868e3..2e3445a1 100644 3 + --- a/src/base/msfactory.c 4 + +++ b/src/base/msfactory.c 5 + @@ -770,7 +770,12 @@ void ms_factory_uninit_plugins(MSFactory *factory){ 5 6 } 6 7 7 8 void ms_factory_init_plugins(MSFactory *obj) { 9 + - if (obj->plugins_dir == NULL) { 8 10 + char *package_plugins_dir; 9 - if (obj->plugins_dir == NULL) { 10 - + package_plugins_dir=getenv("MEDIASTREAMER_PLUGINS_DIR"); 11 - + if (package_plugins_dir!=NULL){ 12 - + obj->plugins_dir = ms_strdup(package_plugins_dir); 13 - + } else { 14 - #ifdef PACKAGE_PLUGINS_DIR 15 - - obj->plugins_dir = ms_strdup(PACKAGE_PLUGINS_DIR); 16 - + obj->plugins_dir = ms_strdup(PACKAGE_PLUGINS_DIR); 17 - #else 18 - - obj->plugins_dir = ms_strdup(""); 19 - + obj->plugins_dir = ms_strdup(""); 20 - #endif 21 - + } 22 - } 23 - if (strlen(obj->plugins_dir) > 0) { 24 - ms_message("Loading ms plugins from [%s]",obj->plugins_dir); 11 + + // Force plugin dir from environment variable if set 12 + + package_plugins_dir = getenv("MEDIASTREAMER_PLUGINS_DIR"); 13 + + if (package_plugins_dir != NULL) { 14 + + ms_factory_set_plugins_dir(obj, package_plugins_dir); 15 + + } else if (obj->plugins_dir == NULL) { 16 + #ifdef __APPLE__ 17 + char *dir = getPluginsDir(); 18 + if (dir != NULL) {