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

Proposed by Saša Bodiroža
Status: Superseded
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+5142@code.launchpad.net

This proposal has been superseded by a proposal from 2009-04-02.

To post a comment you must log in.
56. By Saša Bodiroža

RELEASE 1.2.2-0ubuntu3 to ubuntu/jaunty

57. By Saša Bodiroža

Move setting of count/n_env_dirs from outside of get_env_plugin_dirs to the inside of the function

58. By Saša Bodiroža

RELEASE 1.2.2-0ubuntu3 to ubuntu/jaunty

Unmerged revisions

Preview Diff

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

Subscribers

People subscribed via source and target branches

to all changes: