1 |
commit: b7f70e8d9c2d58095fc75a275ad1922c26320f76 |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 30 20:24:52 2015 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 31 23:55:57 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/eselect-java.git/commit/?id=b7f70e8d |
7 |
|
8 |
Remove the java-nsplugin eselect module |
9 |
|
10 |
There was never much need for installing more than one Java plugin and |
11 |
there is even less need now that Java plugins are all but outlawed. |
12 |
|
13 |
The need for 32-bit browser plugins on 64-bit systems has also long |
14 |
passed. A 64-bit IcedTea-Web plugin can launch a 32-bit VM anyway. |
15 |
|
16 |
I had hoped that Firefox would allow you to disable individual Java |
17 |
plugins but it disables them together and always picks Oracle's over |
18 |
IcedTea's. We will simply have icedtea-web[nsplugin] soft block |
19 |
oracle-(jdk|jre)-bin[nsplugin] instead. |
20 |
|
21 |
Makefile.am | 2 - |
22 |
README | 1 - |
23 |
src/modules/java-nsplugin.eselect.in | 216 ----------------------------------- |
24 |
3 files changed, 219 deletions(-) |
25 |
|
26 |
diff --git a/Makefile.am b/Makefile.am |
27 |
index f44bd80..30373cf 100644 |
28 |
--- a/Makefile.am |
29 |
+++ b/Makefile.am |
30 |
@@ -8,13 +8,11 @@ modulesdir=$(datadir)/eselect/modules/ |
31 |
|
32 |
modules_DATA = \ |
33 |
src/modules/ecj.eselect \ |
34 |
- src/modules/java-nsplugin.eselect \ |
35 |
src/modules/java-vm.eselect \ |
36 |
src/modules/maven.eselect |
37 |
|
38 |
EXTRA_DIST += \ |
39 |
src/modules/ecj.eselect.in \ |
40 |
- src/modules/java-nsplugin.eselect.in \ |
41 |
src/modules/java-vm.eselect.in \ |
42 |
src/modules/maven.eselect.in |
43 |
|
44 |
|
45 |
diff --git a/README b/README |
46 |
index f3d9a51..2943d68 100644 |
47 |
--- a/README |
48 |
+++ b/README |
49 |
@@ -8,7 +8,6 @@ Modules |
50 |
------- |
51 |
|
52 |
java-vm : Manage system respectively user vm. |
53 |
-java-nsplugin : Manage the nsplugin implementations. |
54 |
maven : Manage the maven implementations. |
55 |
ecj : Manage the ecj implementations. |
56 |
|
57 |
|
58 |
diff --git a/src/modules/java-nsplugin.eselect.in b/src/modules/java-nsplugin.eselect.in |
59 |
deleted file mode 100644 |
60 |
index 554a0bd..0000000 |
61 |
--- a/src/modules/java-nsplugin.eselect.in |
62 |
+++ /dev/null |
63 |
@@ -1,216 +0,0 @@ |
64 |
-# -*-eselect-*- vim: ft=eselect |
65 |
-# Copyright 1999-2013 Gentoo Foundation |
66 |
-# Distributed under the terms of the GNU General Public License v2 |
67 |
- |
68 |
-inherit tests multilib |
69 |
- |
70 |
-DESCRIPTION="Manage the Java plugin for Netscape-like Browsers" |
71 |
-MAINTAINER="java@g.o" |
72 |
-VERSION="@VERSION@" |
73 |
- |
74 |
-PLUGINS_HOME="${EROOT}/usr/share/java-config-2/nsplugin" |
75 |
-SYSTEM_PLUGIN="${EROOT}/usr/lib/nsbrowser/plugins/javaplugin.so" |
76 |
-SYSTEM_PLUGIN_32="${EROOT}/usr/lib32/nsbrowser/plugins/javaplugin.so" |
77 |
-SYSTEM_PLUGIN_64="${EROOT}/usr/lib64/nsbrowser/plugins/javaplugin.so" |
78 |
-ICEDTEA_WEB_VM="${EROOT}/etc/java-config-2/current-icedtea-web-vm" |
79 |
- |
80 |
-is_multilib() { |
81 |
- local libdirs=$(list_libdirs) |
82 |
- if has lib32 ${libdirs} && has lib64 ${libdirs}; then |
83 |
- return 0 |
84 |
- else |
85 |
- return 1 |
86 |
- fi |
87 |
-} |
88 |
- |
89 |
-get_icedtea_web_targets() { |
90 |
- local vm |
91 |
- for vm in $(echo /usr/lib/jvm/icedtea-*); do |
92 |
- echo "icedtea-web@$(basename ${vm})" |
93 |
- done |
94 |
-} |
95 |
- |
96 |
-get_targets() { |
97 |
- for plugin in $(ls ${PLUGINS_HOME}/*-javaplugin.so 2>/dev/null); |
98 |
- do |
99 |
- local vm=$(plugin_to_vm ${plugin}) |
100 |
- case ${MULTILIB_MODE} in |
101 |
- 32) |
102 |
- [[ ${vm} = emul-linux-* ]] && echo ${vm} |
103 |
- ;; |
104 |
- 64) |
105 |
- if [[ ${vm} == icedtea-web ]]; then |
106 |
- get_icedtea_web_targets |
107 |
- elif [[ ${vm} != emul-linux-* ]]; then |
108 |
- echo ${vm} |
109 |
- fi |
110 |
- ;; |
111 |
- none) |
112 |
- if [[ ${vm} == icedtea-web ]]; then |
113 |
- get_icedtea_web_targets |
114 |
- else |
115 |
- echo ${vm} |
116 |
- fi |
117 |
- ;; |
118 |
- esac |
119 |
- done |
120 |
-} |
121 |
- |
122 |
-plugin_to_vm() { |
123 |
- local base=$(basename ${1}) |
124 |
- echo ${base%-javaplugin.so} |
125 |
-} |
126 |
- |
127 |
-get_system_plugin_vm() { |
128 |
- local plugin; |
129 |
- |
130 |
- if [[ ${MULTILIB_MODE} == "32" ]]; then |
131 |
- plugin=$(readlink ${SYSTEM_PLUGIN_32}) |
132 |
- elif [[ ${MULTILIB_MODE} == "64" ]]; then |
133 |
- plugin=$(readlink ${SYSTEM_PLUGIN_64}) |
134 |
- else |
135 |
- plugin=$(readlink ${SYSTEM_PLUGIN}) |
136 |
- fi |
137 |
- plugin=$(basename ${plugin%-javaplugin.so}) |
138 |
- |
139 |
- if [[ ${plugin} == icedtea-web ]]; then |
140 |
- local icedtea=$(readlink "${ICEDTEA_WEB_VM}") |
141 |
- echo "${plugin}@$(basename ${icedtea})" |
142 |
- else |
143 |
- echo ${plugin} |
144 |
- fi |
145 |
-} |
146 |
- |
147 |
-### show action ### |
148 |
- |
149 |
-describe_show() { |
150 |
- echo "Show the current Java browser plugin" |
151 |
-} |
152 |
- |
153 |
-do_show() { |
154 |
- local system_name=$(get_system_plugin_vm) |
155 |
- write_list_start "Current Java browser plugin" |
156 |
- if [[ -z "${system_name}" ]] ; then |
157 |
- write_kv_list_entry "(unset)" "" |
158 |
- else |
159 |
- write_kv_list_entry "${system_name}" "" |
160 |
- fi |
161 |
-} |
162 |
- |
163 |
-### list action ### |
164 |
- |
165 |
-describe_list() { |
166 |
- echo "List available Java browser plugins" |
167 |
-} |
168 |
- |
169 |
-tweak_list_item() { |
170 |
- local vm=${1} |
171 |
- local system_name=${2} |
172 |
- local mark="" |
173 |
- if [[ ${vm} == ${system_name} ]]; then |
174 |
- mark="${mark} $(highlight 'current')" |
175 |
- fi |
176 |
- echo "${vm} ${mark}" |
177 |
-} |
178 |
- |
179 |
-do_list() { |
180 |
- if ! is_multilib; then |
181 |
- MULTILIB_MODE="none" |
182 |
- local system_name=$(get_system_plugin_vm) |
183 |
- local targets=( $(get_targets) ) |
184 |
- for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do |
185 |
- targets[${i}]=$(tweak_list_item ${targets[${i}]} ${system_name}) |
186 |
- done |
187 |
- |
188 |
- write_list_start "Available Java browser plugins" |
189 |
- write_numbered_list "${targets[@]}" |
190 |
- else |
191 |
- MULTILIB_MODE="32" |
192 |
- local system_name_32=$(get_system_plugin_vm) |
193 |
- local targets_32=( $(get_targets) ) |
194 |
- for (( i = 0 ; i < ${#targets_32[@]} ; i = i + 1 )) ; do |
195 |
- targets_32[${i}]=$(tweak_list_item ${targets_32[${i}]} ${system_name_32}) |
196 |
- done |
197 |
- write_list_start "Available 32-bit Java browser plugins" |
198 |
- write_numbered_list "${targets_32[@]}" |
199 |
- |
200 |
- MULTILIB_MODE="64" |
201 |
- local system_name_64=$(get_system_plugin_vm) |
202 |
- local targets_64=( $(get_targets) ) |
203 |
- for (( i = 0 ; i < ${#targets_64[@]} ; i = i + 1 )) ; do |
204 |
- targets_64[${i}]=$(tweak_list_item ${targets_64[${i}]} ${system_name_64}) |
205 |
- done |
206 |
- write_list_start "Available 64-bit Java browser plugins" |
207 |
- write_numbered_list "${targets_64[@]}" |
208 |
- fi |
209 |
-} |
210 |
- |
211 |
-### set action ### |
212 |
- |
213 |
-describe_set() { |
214 |
- echo "Set the system Java browser plugin" |
215 |
-} |
216 |
- |
217 |
-do_set() { |
218 |
- if ! is_multilib; then |
219 |
- if [[ ${#} != 1 ]] ; then |
220 |
- die -q "Usage: set [nsplugin-vm]" |
221 |
- fi |
222 |
- MULTILIB_MODE="none" |
223 |
- else |
224 |
- if [[ ${#} != 2 ]] ; then |
225 |
- die -q "Usage: set [32bit or 64bit] [nsplugin-vm]" |
226 |
- fi |
227 |
- case ${1} in |
228 |
- 32bit) ;; |
229 |
- 64bit) ;; |
230 |
- *) |
231 |
- die -q "Usage: set [32bit or 64bit] [nsplugin-vm]" |
232 |
- ;; |
233 |
- esac |
234 |
- MULTILIB_MODE=${1%bit} |
235 |
- shift |
236 |
- fi |
237 |
- |
238 |
- local vm=${1} |
239 |
- |
240 |
- if is_number "${vm}" ; then |
241 |
- local targets=( $(get_targets) ) |
242 |
- vm=${targets[$(( ${vm} - 1 ))]} |
243 |
- fi |
244 |
- |
245 |
- if [[ -z ${vm} ]] ; then |
246 |
- die -q "You didn't specify valid plugin number to set" |
247 |
- fi |
248 |
- |
249 |
- local plugin |
250 |
- if [[ ${vm} == icedtea-web@* ]]; then |
251 |
- plugin="${PLUGINS_HOME}/icedtea-web-javaplugin.so" |
252 |
- else |
253 |
- plugin="${PLUGINS_HOME}/${vm}-javaplugin.so" |
254 |
- fi |
255 |
- |
256 |
- if [[ ! -f ${plugin} ]]; then |
257 |
- write_error_msg "Expected \"${plugin}\" to exist, but it doesn't." |
258 |
- write_error_msg "Perhaps \"${vm}\" isn't a valid name of VM built with nsplugin?" |
259 |
- return |
260 |
- fi |
261 |
- |
262 |
- local system_plugin |
263 |
- case ${MULTILIB_MODE} in |
264 |
- 32) system_plugin=${SYSTEM_PLUGIN_32} ;; |
265 |
- 64) system_plugin=${SYSTEM_PLUGIN_64} ;; |
266 |
- none) system_plugin=${SYSTEM_PLUGIN} ;; |
267 |
- esac |
268 |
- mkdir -p $(dirname ${system_plugin}) || die -q "Error creating \"$(dirname ${SYSTEM_PLUGIN})\"" |
269 |
- if [[ -w $(dirname ${system_plugin}) ]] ; then |
270 |
- ln -sf ${plugin} ${system_plugin} || die -q "Error creating nsplugin symlink" |
271 |
- else |
272 |
- die -q "Sorry, you don't have enough permission to set nsplugin" |
273 |
- fi |
274 |
- |
275 |
- if [[ ${vm} == icedtea-web@* ]]; then |
276 |
- rm -f "${ICEDTEA_WEB_VM}" |
277 |
- ln -sf "${EROOT}"/usr/lib/jvm/${vm#icedtea-web@} "${ICEDTEA_WEB_VM}" |
278 |
- fi |
279 |
-} |