Merge lp:~jazzva/nspluginwrapper/ubuntu.1.2.2-0ubuntu3 into lp:nspluginwrapper

Proposed by Saša Bodiroža
Status: Rejected
Rejected by: Alexander Sack
Proposed branch: lp:~jazzva/nspluginwrapper/ubuntu.1.2.2-0ubuntu3
Merge into: lp:nspluginwrapper
Diff against target: None lines
To merge this branch: bzr merge lp:~jazzva/nspluginwrapper/ubuntu.1.2.2-0ubuntu3
Reviewer Review Type Date Requested Status
Alexander Sack Pending
Review via email: mp+5140@code.launchpad.net
To post a comment you must log in.
55. By Saša Bodiroža

Adjust npconfig_LDFLAGS to use GLIB_LDFLAGS instead of GTK_LDFLAGS in Makefile

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2009-03-19 20:51:41 +0000
+++ debian/changelog 2009-04-01 23:50:10 +0000
@@ -1,3 +1,11 @@
1nspluginwrapper (1.2.2-0ubuntu3) UNRELEASED; urgency=low
2
3 * Add patch debian/patches/005_process_env_dirs.diff to process directories
4 specified in environment variable NSPLUGIN_DIRS (see patch for more info)
5 (LP: #345606)
6
7 -- Sasa Bodiroza <jazzva@gmail.com> Wed, 01 Apr 2009 22:08:13 +0200
8
1nspluginwrapper (1.2.2-0ubuntu2) jaunty; urgency=low9nspluginwrapper (1.2.2-0ubuntu2) jaunty; urgency=low
210
3 * Remove Iceweasel dir from debian/patches/000_debian_make_symlinks.diff11 * Remove Iceweasel dir from debian/patches/000_debian_make_symlinks.diff
412
=== added file 'debian/patches/005_process_env_dirs.diff'
--- debian/patches/005_process_env_dirs.diff 1970-01-01 00:00:00 +0000
+++ debian/patches/005_process_env_dirs.diff 2009-04-02 13:57:21 +0000
@@ -0,0 +1,87 @@
1Implement get_env_plugin_dirs() to return a list of directory names
2specified by environment variable NSPLUGIN_DIRS.
3Adjust get_mozilla_plugin_dirs() to append the mentioned list at the end.
4Adjust npconfig_CFLAGS in Makefile to include glib during compile.
5
6 -- Sasa Bodiroza <jazzva@gmail.com> Wed, 01 Apr 2009 21:50:00 +0200
7Index: ubuntu.1.2.2-0ubuntu3/src/npw-config.c
8===================================================================
9--- ubuntu.1.2.2-0ubuntu3.orig/src/npw-config.c 2009-04-02 15:53:28.000000000 +0200
10+++ ubuntu.1.2.2-0ubuntu3/src/npw-config.c 2009-04-02 15:54:12.000000000 +0200
11@@ -38,6 +38,7 @@
12 #include <pwd.h>
13 #include <dirent.h>
14
15+#include <glib.h>
16
17 static bool g_auto = false;
18 static bool g_verbose = false;
19@@ -213,6 +214,20 @@
20 return plugin_path;
21 }
22
23+const gchar **get_env_plugin_dirs(int *count)
24+{
25+ char *ns_plugin_dir = getenv("NSPLUGIN_DIRS");
26+ if (ns_plugin_dir == NULL)
27+ return NULL;
28+ const gchar **ns_plugin_dirs = g_strsplit((gchar *)ns_plugin_dir, ":", -1);
29+ const gchar **iter = ns_plugin_dirs;
30+ while (*iter) {
31+ (*count)++;
32+ iter++;
33+ }
34+ return ns_plugin_dirs;
35+}
36+
37 static const char **get_mozilla_plugin_dirs(void)
38 {
39 static const char *default_dirs[] = {
40@@ -257,13 +272,23 @@
41 };
42
43 const int n_default_dirs = (sizeof(default_dirs) / sizeof(default_dirs[0]));
44- const char **dirs = malloc((n_default_dirs + 2) * sizeof(dirs[0]));
45+ int n_env_dirs = 0;
46+ const gchar **env_dirs = get_env_plugin_dirs(&n_env_dirs);
47+ const char **dirs = malloc((n_default_dirs + n_env_dirs + 2) * sizeof(dirs[0]));
48 int i, j;
49 for (i = 0, j = 0; i < n_default_dirs; i++) {
50 const char *dir = default_dirs[i];
51 if (dir && access(dir, F_OK) == 0)
52 dirs[j++] = dir;
53 }
54+ if (env_dirs) {
55+ const gchar **iter = env_dirs;
56+ while (*iter) {
57+ if (*iter && access(*iter, F_OK) == 0)
58+ dirs[j++] = (char *)*iter;
59+ iter++;
60+ }
61+ }
62 dirs[j++] = get_user_mozilla_plugin_dir();
63 dirs[j] = NULL;
64 return dirs;
65Index: ubuntu.1.2.2-0ubuntu3/Makefile
66===================================================================
67--- ubuntu.1.2.2-0ubuntu3.orig/Makefile 2009-04-02 15:53:28.000000000 +0200
68+++ ubuntu.1.2.2-0ubuntu3/Makefile 2009-04-02 15:53:28.000000000 +0200
69@@ -174,7 +174,8 @@
70 npconfig_RAWSRCS = npw-config.c
71 npconfig_SOURCES = $(npconfig_RAWSRCS:%.c=$(SRC_PATH)/src/%.c)
72 npconfig_OBJECTS = $(npconfig_RAWSRCS:%.c=npconfig-%.o)
73-npconfig_LDFLAGS = $(libdl_LDFLAGS)
74+npconfig_CFLAGS = $(GLIB_CFLAGS)
75+npconfig_LDFLAGS = $(GTK_LDFLAGS) $(libdl_LDFLAGS)
76 ifneq (,$(findstring $(OS),netbsd dragonfly))
77 # We will try to dlopen() the native plugin library. If that lib is
78 # linked against libpthread, then so must our program too.
79@@ -410,7 +411,7 @@
80 $(CC) -o $@ $(npconfig_OBJECTS) $(npconfig_LDFLAGS)
81
82 npconfig-%.o: $(SRC_PATH)/src/%.c
83- $(CC) -o $@ -c $< $(CPPFLAGS) $(CFLAGS)
84+ $(CC) -o $@ -c $< $(CPPFLAGS) $(CFLAGS) $(npconfig_CFLAGS)
85
86 $(nploader_PROGRAM): $(nploader_SOURCES)
87 sed -e "s|%NPW_LIBDIR%|$(pkglibdir)|" $< > $@
088
=== modified file 'debian/patches/series'
--- debian/patches/series 2008-12-15 22:09:17 +0000
+++ debian/patches/series 2009-04-01 20:10:03 +0000
@@ -3,3 +3,4 @@
3002_install_to_NSPLUGINDIR.diff3002_install_to_NSPLUGINDIR.diff
4003_update_help_info.diff4003_update_help_info.diff
5004_fix_threading.diff5004_fix_threading.diff
6005_process_env_dirs.diff

Subscribers

People subscribed via source and target branches

to all changes: