mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-18 02:46:28 +00:00
mediastreamer: introduce environment variable to set plugins directory
This commit is contained in:
parent
444b8484d7
commit
dbd3584590
|
@ -11,11 +11,12 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "1g6gawrlz1lixzs1kzckm3rxc401ww8pi00x7r5kb84bdijb02cc";
|
||||
};
|
||||
|
||||
patches = [ ./plugins_dir.patch ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i "s/\(SRTP_LIBS=\"\$SRTP_LIBS -lsrtp\"\)/SRTP_LIBS=\"$(pkg-config --libs-only-l libsrtp)\"/g" configure
|
||||
'';
|
||||
|
||||
# TODO: make it load plugins from *_PLUGIN_PATH
|
||||
nativeBuildInputs = [ pkgconfig intltool ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -28,6 +29,8 @@ stdenv.mkDerivation rec {
|
|||
configureFlags = [
|
||||
"--enable-external-ortp"
|
||||
"--with-srtp=${srtp}"
|
||||
"--enable-xv"
|
||||
"--enable-glx"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
24
pkgs/development/libraries/mediastreamer/plugins_dir.patch
Normal file
24
pkgs/development/libraries/mediastreamer/plugins_dir.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
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 @@
|
||||
}
|
||||
|
||||
void ms_factory_init_plugins(MSFactory *obj) {
|
||||
+ 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);
|
Loading…
Reference in a new issue