unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob ce382be57a192b214c9c12ed5aee5b95c3f9ade8 2811 bytes (raw)
name: gnu/packages/patches/remmina-plugin-path.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
 
From e6e3c454e380bc1e55a719907df43f73f491fca2 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Mon, 10 May 2021 18:21:02 -0400
Subject: [PATCH] [PATCH]: Change path variable for loading plugins.

Remmina is coded to load plugins from path (REMMINA_RUNTIME_PLUGINDIR)
provided during compile-time. This causes cycle between outputs 'out'
and 'plugins'. Therefore, code it to load plugins from path
(REMMINA_PLUGIN_PATH) provided during run-time.
---
 CMakeLists.txt               |  3 ---
 config.h.in                  |  1 -
 src/remmina_plugin_manager.c | 10 ++++++----
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 17a58b04..acbbe440 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -313,9 +313,6 @@ if(NOT REMMINA_LOCALEDIR)
 endif()
 if(NOT REMMINA_PLUGINDIR)
   set(REMMINA_PLUGINDIR "${CMAKE_INSTALL_FULL_LIBDIR}/remmina/plugins")
-  if(NOT REMMINA_RUNTIME_PLUGINDIR)
-    set(REMMINA_RUNTIME_PLUGINDIR "${REMMINA_PLUGINDIR}")
-  endif()
 endif()
 if(NOT REMMINA_UIDIR)
   set(REMMINA_UIDIR "${REMMINA_DATADIR}/remmina/ui")
diff --git a/config.h.in b/config.h.in
index e59bf78a..8e8da940 100644
--- a/config.h.in
+++ b/config.h.in
@@ -22,7 +22,6 @@
 
 #define REMMINA_RUNTIME_DATADIR			"${REMMINA_RUNTIME_DATADIR}"
 #define REMMINA_RUNTIME_LOCALEDIR		"${REMMINA_RUNTIME_LOCALEDIR}"
-#define REMMINA_RUNTIME_PLUGINDIR		"${REMMINA_RUNTIME_PLUGINDIR}"
 #define REMMINA_RUNTIME_UIDIR			"${REMMINA_RUNTIME_UIDIR}"
 #define REMMINA_RUNTIME_THEMEDIR		"${REMMINA_RUNTIME_THEMEDIR}"
 #define REMMINA_RUNTIME_EXTERNAL_TOOLS_DIR	"${REMMINA_RUNTIME_EXTERNAL_TOOLS_DIR}"
diff --git a/src/remmina_plugin_manager.c b/src/remmina_plugin_manager.c
index a1b713a8..74e2c0f0 100644
--- a/src/remmina_plugin_manager.c
+++ b/src/remmina_plugin_manager.c
@@ -294,7 +294,7 @@ void remmina_plugin_manager_init()
 {
 	TRACE_CALL(__func__);
 	GDir *dir;
-	const gchar *name, *ptr;
+	const gchar *remmina_plugin_path, *name, *ptr;
 	gchar *fullpath;
 	RemminaPlugin *plugin;
 	RemminaSecretPlugin *sp;
@@ -312,8 +312,10 @@ void remmina_plugin_manager_init()
 		return;
 	}
 
-	g_print("Load modules from %s\n", REMMINA_RUNTIME_PLUGINDIR);
-	dir = g_dir_open(REMMINA_RUNTIME_PLUGINDIR, 0, NULL);
+	remmina_plugin_path = g_getenv("REMMINA_PLUGIN_PATH");
+
+	g_print("Load modules from %s\n", remmina_plugin_path);
+	dir = g_dir_open(remmina_plugin_path, 0, NULL);
 
 	if (dir == NULL)
 		return;
@@ -323,7 +325,7 @@ void remmina_plugin_manager_init()
 		ptr++;
 		if (!remmina_plugin_manager_loader_supported(ptr))
 			continue;
-		fullpath = g_strdup_printf(REMMINA_RUNTIME_PLUGINDIR "/%s", name);
+		fullpath = g_strconcat(remmina_plugin_path, "/", name);
 		remmina_plugin_manager_load_plugin(fullpath);
 		g_free(fullpath);
 	}
-- 
2.31.1


debug log:

solving ce382be57a ...
found ce382be57a in https://yhetil.org/guix-patches/20210511152937.19853-1-rg@raghavgururajan.name/ ||
	https://yhetil.org/guix-patches/20210510233322.14607-1-rg@raghavgururajan.name/ ||
	https://yhetil.org/guix-patches/20210511161247.20752-1-rg@raghavgururajan.name/ ||
	https://yhetil.org/guix-patches/20210511180434.22147-1-rg@raghavgururajan.name/

applying [1/1] https://yhetil.org/guix-patches/20210511152937.19853-1-rg@raghavgururajan.name/
diff --git a/gnu/packages/patches/remmina-plugin-path.patch b/gnu/packages/patches/remmina-plugin-path.patch
new file mode 100644
index 0000000000..ce382be57a

1:41: trailing whitespace.
 
1:54: space before tab in indent.
 	TRACE_CALL(__func__);
1:55: space before tab in indent.
 	GDir *dir;
1:58: space before tab in indent.
 	gchar *fullpath;
1:59: space before tab in indent.
 	RemminaPlugin *plugin;
Checking patch gnu/packages/patches/remmina-plugin-path.patch...
Applied patch gnu/packages/patches/remmina-plugin-path.patch cleanly.
warning: squelched 15 whitespace errors
warning: 20 lines add whitespace errors.

skipping https://yhetil.org/guix-patches/20210510233322.14607-1-rg@raghavgururajan.name/ for ce382be57a
skipping https://yhetil.org/guix-patches/20210511161247.20752-1-rg@raghavgururajan.name/ for ce382be57a
skipping https://yhetil.org/guix-patches/20210511180434.22147-1-rg@raghavgururajan.name/ for ce382be57a
index at:
100644 ce382be57a192b214c9c12ed5aee5b95c3f9ade8	gnu/packages/patches/remmina-plugin-path.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).