From: Alexey Abramov <levenson@mmer.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Evan <evan.straw99@gmail.com>, 45707@debbugs.gnu.org
Subject: [bug#45707] [PATCH] gnu: Add obs-v4l2sink.
Date: Fri, 15 Jan 2021 17:47:46 +0100 [thread overview]
Message-ID: <87k0setadp.fsf@delta.lan> (raw)
In-Reply-To: <87pn28aoqi.fsf_-_@gnu.org> ("Ludovic Courtès"'s message of "Wed, 13 Jan 2021 15:35:49 +0100")
[-- Attachment #1: Type: text/plain, Size: 286 bytes --]
Hi,
Thanks Ludo. With this patch, obs will check OBS_PLUGINS_PATH environment variable for a *default* location of modules.
Plugins might also have some data. I am not sure if it is safe to use relative path thought. Would it be better to use OBS_PLUGINS_DATA_PATH var?
--
Alexey
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-obs-Use-an-environment-variable-for-plugins-loca.patch --]
[-- Type: text/x-patch, Size: 3879 bytes --]
From 9ade5607aab510cc88561efb7c0b08567b5e19fe Mon Sep 17 00:00:00 2001
From: Alexey Abramov <levenson@mmer.org>
Date: Fri, 15 Jan 2021 17:26:37 +0100
Subject: [PATCH] gnu: obs: Use an environment variable for plugins location.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/video.scm (obs): Use it.
* gnu/packages/patches/obs-override-default-modules-location.patch: Patch it.
---
gnu/local.mk | 1 +
...bs-override-default-modules-location.patch | 32 +++++++++++++++++++
gnu/packages/video.scm | 9 +++++-
3 files changed, 41 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/obs-override-default-modules-location.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index eb28104add..cd4085890b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1404,6 +1404,7 @@ dist_patch_DATA = \
%D%/packages/patches/nvi-dbpagesize-binpower.patch \
%D%/packages/patches/nvi-db4.patch \
%D%/packages/patches/nyacc-binary-literals.patch \
+ %D%/packages/patches/obs-override-default-modules-location.patch \
%D%/packages/patches/ocaml-bitstring-fix-configure.patch \
%D%/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch \
%D%/packages/patches/ocaml-CVE-2015-8869.patch \
diff --git a/gnu/packages/patches/obs-override-default-modules-location.patch b/gnu/packages/patches/obs-override-default-modules-location.patch
new file mode 100644
index 0000000000..88adb4a8c1
--- /dev/null
+++ b/gnu/packages/patches/obs-override-default-modules-location.patch
@@ -0,0 +1,32 @@
+From 96e3c05043eb6b682b105e9080b45efeee33dcd0 Mon Sep 17 00:00:00 2001
+From: Alexey Abramov <levenson@mmer.org>
+Date: Fri, 15 Jan 2021 17:07:17 +0100
+Subject: [PATCH] Use an environment variable for a default modules location
+
+---
+ libobs/obs-nix.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/libobs/obs-nix.c b/libobs/obs-nix.c
+index 382fa0546..d58a0b48a 100644
+--- a/libobs/obs-nix.c
++++ b/libobs/obs-nix.c
+@@ -66,8 +66,14 @@ static const int module_patterns_size =
+
+ void add_default_module_paths(void)
+ {
+- for (int i = 0; i < module_patterns_size; i++)
+- obs_add_module_path(module_bin[i], module_data[i]);
++ char *obs_plugins_path = getenv("OBS_PLUGINS_PATH");
++ if (obs_plugins_path) {
++ struct dstr obs_plugins_data_path;
++ dstr_init_copy(&obs_plugins_data_path, obs_plugins_path);
++ dstr_cat(&obs_plugins_data_path, "/../../share/obs/obs-plugins/%module%");
++ obs_add_module_path(obs_plugins_path, obs_plugins_data_path.array);
++ dstr_free(&obs_plugins_data_path);
++ }
+ }
+
+ /*
+--
+2.29.2
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index b314e4903b..15bb2e4d40 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3087,7 +3087,9 @@ be used for realtime video capture via Linux-specific APIs.")
(file-name (git-file-name name version))
(sha256
(base32
- "1k1asqiqw757v59ayx0w029ril947hs0lcp8n91knzjl891fr4nc"))))
+ "1k1asqiqw757v59ayx0w029ril947hs0lcp8n91knzjl891fr4nc"))
+ (patches
+ (search-patches "obs-override-default-modules-location.patch"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags
@@ -3102,6 +3104,11 @@ be used for realtime video capture via Linux-specific APIs.")
(wrap-program (string-append out "/bin/obs")
`("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
#t)))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "OBS_PLUGINS_PATH")
+ (separator #f) ;single entry
+ (files '("lib/obs-plugins")))))
(native-inputs
`(("cmocka" ,cmocka)
("pkg-config" ,pkg-config)))
--
2.29.2
next prev parent reply other threads:[~2021-01-15 16:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-06 23:36 [bug#45707] [PATCH] gnu: Add obs-v4l2sink Evan Straw
2021-01-06 23:42 ` Nicolò Balzarotti
2021-01-06 23:45 ` Evan Straw
2021-01-06 23:47 ` [bug#45707] [PATCH v2] " Evan Straw
2021-01-07 0:11 ` Nicolò Balzarotti
2021-01-07 4:37 ` Evan
2021-01-07 8:19 ` Alexey Abramov
2021-01-13 14:35 ` [bug#45707] [PATCH] " Ludovic Courtès
2021-01-15 16:47 ` Alexey Abramov [this message]
2021-01-16 21:47 ` Ludovic Courtès
2021-01-20 8:28 ` Alexey Abramov
2021-02-02 9:31 ` bug#45707: " Ludovic Courtès
2021-01-15 17:10 ` [bug#45707] [PATCH v2] " pelzflorian (Florian Pelz)
2021-01-15 19:25 ` Evan Straw
2021-02-02 20:00 ` [bug#45707] (no subject) Andrew Tropin
2021-02-03 14:40 ` [bug#45707] [PATCH] gnu: obs: Update obs to fb347c Andrew Tropin
2021-02-03 21:11 ` [bug#46113] " Ludovic Courtès
2021-02-04 10:45 ` guix-patches--- via
2021-02-04 12:49 ` bug#46113: " Andrew Tropin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k0setadp.fsf@delta.lan \
--to=levenson@mmer.org \
--cc=45707@debbugs.gnu.org \
--cc=evan.straw99@gmail.com \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.