about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorJaakko Luttinen <jaakko.luttinen@iki.fi>2020-03-20 17:04:15 +0200
committerJaakko Luttinen <jaakko.luttinen@iki.fi>2020-03-28 11:25:30 +0200
commitd4988c7c31902d21e9346df708a4135dcd93ef97 (patch)
tree2d4004139e01396c00eca6a0f8ef042a22713d8d /pkgs/development
parent7c5bff5428bc6a0173527ff0d1c9a699e03da615 (diff)
downloadnixlib-d4988c7c31902d21e9346df708a4135dcd93ef97.tar
nixlib-d4988c7c31902d21e9346df708a4135dcd93ef97.tar.gz
nixlib-d4988c7c31902d21e9346df708a4135dcd93ef97.tar.bz2
nixlib-d4988c7c31902d21e9346df708a4135dcd93ef97.tar.lz
nixlib-d4988c7c31902d21e9346df708a4135dcd93ef97.tar.xz
nixlib-d4988c7c31902d21e9346df708a4135dcd93ef97.tar.zst
nixlib-d4988c7c31902d21e9346df708a4135dcd93ef97.zip
mediastreamer: 2.16.1 -> unstable-2020-03-20
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/mediastreamer/default.nix101
-rw-r--r--pkgs/development/libraries/mediastreamer/plugins_dir.patch34
2 files changed, 95 insertions, 40 deletions
diff --git a/pkgs/development/libraries/mediastreamer/default.nix b/pkgs/development/libraries/mediastreamer/default.nix
index 0204223d127c..5f7daa83b2f5 100644
--- a/pkgs/development/libraries/mediastreamer/default.nix
+++ b/pkgs/development/libraries/mediastreamer/default.nix
@@ -1,37 +1,97 @@
-{ stdenv, pkgconfig, intltool, alsaLib, libpulseaudio, speex, gsm
-, libopus, ffmpeg, libX11, libXv, libGLU, libGL, glew, libtheora, libvpx, SDL, libupnp
-, ortp, libv4l, libpcap, srtp, fetchFromGitHub, cmake, bctoolbox, doxygen
-, python, libXext, libmatroska, fetchpatch
+{ alsaLib
+, bctoolbox
+, bzrtp
+, cmake
+, doxygen
+, fetchFromGitLab
+, fetchpatch
+, ffmpeg
+, glew
+, gsm
+, intltool
+, libGL
+, libGLU
+, libX11
+, libXext
+, libXv
+, libmatroska
+, libopus
+, libpcap
+, libpulseaudio
+, libtheora
+, libupnp
+, libv4l
+, libvpx
+, ortp
+, pkgconfig
+, python
+, SDL
+, speex
+, srtp
+, stdenv
 }:
 
 stdenv.mkDerivation rec {
   pname = "mediastreamer2";
-  version = "2.16.1";
+  # Using master branch for linphone-desktop caused a chain reaction that many
+  # of its dependencies needed to use master branch too.
+  version = "unstable-2020-03-20";
 
-  src = fetchFromGitHub {
-    owner = "BelledonneCommunications";
+  src = fetchFromGitLab {
+    domain = "gitlab.linphone.org";
+    owner = "public";
+    group = "BC";
     repo = pname;
-    rev = version;
-    sha256 = "02745bzl2r1jqvdqzyv94fjd4w92zr976la4c4nfvsy52waqah7j";
+    rev = "c5eecb72cb44376d142949051dd0cb7c982608fb";
+    sha256 = "1vp260jxvjlmrmjdl4p23prg4cjln20a7z6zq8dqvfh4iq3ya033";
   };
 
   patches = [
-    (fetchpatch {
-      name = "allow-build-without-git.patch";
-      url = "https://github.com/BelledonneCommunications/mediastreamer2/commit/de3a24b795d7a78e78eab6b974e7ec5abf2259ac.patch";
-      sha256 = "1zqkrab42n4dha0knfsyj4q0wc229ma125gk9grj67ps7r7ipscy";
-    })
+    # Plugins directory is normally fixed during compile time. This patch makes
+    # it possible to set the plugins directory run time with an environment
+    # variable MEDIASTREAMER_PLUGINS_DIR. This makes it possible to construct a
+    # plugin directory with desired plugins and wrap executables so that the
+    # environment variable points to that directory.
     ./plugins_dir.patch
   ];
 
-  nativeBuildInputs = [ pkgconfig intltool cmake doxygen python ];
+  nativeBuildInputs = [
+    cmake
+    doxygen
+    intltool
+    pkgconfig
+    python
+  ];
 
   propagatedBuildInputs = [
-    alsaLib libpulseaudio speex gsm libopus
-    ffmpeg libX11 libXv libGLU libGL glew libtheora libvpx SDL libupnp
-    ortp libv4l libpcap srtp bctoolbox libXext libmatroska
+    alsaLib
+    bctoolbox
+    bzrtp
+    ffmpeg
+    glew
+    gsm
+    libGL
+    libGLU
+    libX11
+    libXext
+    libXv
+    libmatroska
+    libopus
+    libpcap
+    libpulseaudio
+    libtheora
+    libupnp
+    libv4l
+    libvpx
+    ortp
+    SDL
+    speex
+    srtp
   ];
 
+  # Do not build static libraries
+  cmakeFlags = [ "-DENABLE_STATIC=NO" ];
+
   NIX_CFLAGS_COMPILE = toString [
     "-DGIT_VERSION=\"v${version}\""
     "-Wno-error=deprecated-declarations"
@@ -43,8 +103,9 @@ stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     description = "A powerful and lightweight streaming engine specialized for voice/video telephony applications";
-    homepage = http://www.linphone.org/technical-corner/mediastreamer2;
-    license = licenses.gpl2;
+    homepage = "http://www.linphone.org/technical-corner/mediastreamer2";
+    license = licenses.gpl3;
     platforms = platforms.linux;
+    maintainers = with maintainers; [ jluttine ];
   };
 }
diff --git a/pkgs/development/libraries/mediastreamer/plugins_dir.patch b/pkgs/development/libraries/mediastreamer/plugins_dir.patch
index e64bfc5a43a1..43e398aafee4 100644
--- a/pkgs/development/libraries/mediastreamer/plugins_dir.patch
+++ b/pkgs/development/libraries/mediastreamer/plugins_dir.patch
@@ -1,24 +1,18 @@
-diff -uNr mediastreamer2/src/base/msfactory.c mediastreamer2-new/src/base/msfactory.c
---- a/src/base/msfactory.c	2015-05-13 16:53:49.801113249 +0200
-+++ b/src/base/msfactory.c	2015-08-26 21:35:44.994724647 +0200
-@@ -630,12 +630,18 @@
+diff --git a/src/base/msfactory.c b/src/base/msfactory.c
+index 14f868e3..2e3445a1 100644
+--- a/src/base/msfactory.c
++++ b/src/base/msfactory.c
+@@ -770,7 +770,12 @@ void ms_factory_uninit_plugins(MSFactory *factory){
  }
  
  void ms_factory_init_plugins(MSFactory *obj) {
+-	if (obj->plugins_dir == NULL) {
 +	char *package_plugins_dir;
- 	if (obj->plugins_dir == NULL) {
-+		package_plugins_dir=getenv("MEDIASTREAMER_PLUGINS_DIR");
-+		if (package_plugins_dir!=NULL){
-+			obj->plugins_dir = ms_strdup(package_plugins_dir);
-+		} else {
- #ifdef PACKAGE_PLUGINS_DIR
--		obj->plugins_dir = ms_strdup(PACKAGE_PLUGINS_DIR);
-+			obj->plugins_dir = ms_strdup(PACKAGE_PLUGINS_DIR);
- #else
--		obj->plugins_dir = ms_strdup("");
-+			obj->plugins_dir = ms_strdup("");
- #endif
-+		}
- 	}
- 	if (strlen(obj->plugins_dir) > 0) {
- 		ms_message("Loading ms plugins from [%s]",obj->plugins_dir);
++	// Force plugin dir from environment variable if set
++	package_plugins_dir = getenv("MEDIASTREAMER_PLUGINS_DIR");
++	if (package_plugins_dir != NULL) {
++		ms_factory_set_plugins_dir(obj, package_plugins_dir);
++	} else if (obj->plugins_dir == NULL) {
+ #ifdef __APPLE__
+ 	char *dir = getPluginsDir();
+ 	if (dir != NULL) {