1 |
commit: 367cd47dbfa80a8cdc08acc2e22c70ba35bff0fc |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 22 13:31:50 2013 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 22 13:31:50 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mozilla.git;a=commit;h=367cd47d |
7 |
|
8 |
Attempt to install extensions into correct location with ff>=21 |
9 |
|
10 |
--- |
11 |
eclass/mozconfig-3.eclass | 43 ++--------------------------- |
12 |
eclass/mozcoreconf-2.eclass | 17 +---------- |
13 |
eclass/mozextension.eclass | 62 +++++++++++++++++++++++++++++++++++++++++++ |
14 |
3 files changed, 67 insertions(+), 55 deletions(-) |
15 |
|
16 |
diff --git a/eclass/mozconfig-3.eclass b/eclass/mozconfig-3.eclass |
17 |
index bab655c..25aa3e9 100644 |
18 |
--- a/eclass/mozconfig-3.eclass |
19 |
+++ b/eclass/mozconfig-3.eclass |
20 |
@@ -40,27 +40,6 @@ mozconfig_config() { |
21 |
fi |
22 |
fi |
23 |
|
24 |
- if ! $(mozversion_is_new_enough) ; then |
25 |
- mozconfig_use_enable alsa ogg |
26 |
- mozconfig_use_enable alsa wave |
27 |
- mozconfig_use_enable libnotify |
28 |
- mozconfig_use_enable debug debugger-info-modules |
29 |
- if has +ipc ${IUSE}; then |
30 |
- mozconfig_use_enable ipc |
31 |
- fi |
32 |
- if [[ ${PN} != thunderbird ]] ; then |
33 |
- mozconfig_annotate 'places' --enable-storage --enable-places --enable-places_bookmarks |
34 |
- mozconfig_annotate '' --enable-oji --enable-mathml |
35 |
- mozconfig_annotate 'broken' --disable-mochitest |
36 |
- fi |
37 |
- if use system-sqlite; then |
38 |
- mozconfig_annotate '' --with-sqlite-prefix="${EPREFIX}"/usr |
39 |
- fi |
40 |
- if use amd64 || use x86 || use arm || use sparc; then |
41 |
- mozconfig_annotate '' --enable-tracejit |
42 |
- fi |
43 |
- fi |
44 |
- |
45 |
mozconfig_use_enable dbus |
46 |
mozconfig_use_enable debug |
47 |
mozconfig_use_enable debug tests |
48 |
@@ -71,25 +50,9 @@ mozconfig_config() { |
49 |
mozconfig_use_enable system-sqlite |
50 |
mozconfig_use_enable wifi necko-wifi |
51 |
|
52 |
- if $(mozversion_is_new_enough) ; then |
53 |
- mozconfig_annotate 'required' --enable-ogg |
54 |
- mozconfig_annotate 'required' --enable-wave |
55 |
- mozconfig_annotate 'required' --with-system-libvpx |
56 |
- elif has +webm ${IUSE} && use webm; then |
57 |
- if ! use alsa; then |
58 |
- echo "Enabling alsa support due to webm request" |
59 |
- mozconfig_annotate '+webm -alsa' --enable-ogg |
60 |
- mozconfig_annotate '+webm -alsa' --enable-wave |
61 |
- mozconfig_annotate '+webm' --enable-webm |
62 |
- mozconfig_annotate '+webm' --with-system-libvpx |
63 |
- else |
64 |
- mozconfig_use_enable webm |
65 |
- mozconfig_annotate '+webm' --with-system-libvpx |
66 |
- fi |
67 |
- else |
68 |
- mozconfig_annotate '' --disable-webm |
69 |
- mozconfig_annotate '' --disable-system-libvpx |
70 |
- fi |
71 |
+ mozconfig_annotate 'required' --enable-ogg |
72 |
+ mozconfig_annotate 'required' --enable-wave |
73 |
+ mozconfig_annotate 'required' --with-system-libvpx |
74 |
|
75 |
# These are enabled by default in all mozilla applications |
76 |
mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${EPREFIX}"/usr |
77 |
|
78 |
diff --git a/eclass/mozcoreconf-2.eclass b/eclass/mozcoreconf-2.eclass |
79 |
index 8c663f0..986c252 100644 |
80 |
--- a/eclass/mozcoreconf-2.eclass |
81 |
+++ b/eclass/mozcoreconf-2.eclass |
82 |
@@ -66,12 +66,12 @@ mozconfig_use_extension() { |
83 |
mozversion_is_new_enough() { |
84 |
case ${PN} in |
85 |
firefox|thunderbird) |
86 |
- if [[ $(get_version_component_range 1) -ge 17 ]] ; then |
87 |
+ if [[ $(get_version_component_range 1) -ge 21 ]] ; then |
88 |
return 0 |
89 |
fi |
90 |
;; |
91 |
seamonkey) |
92 |
- if [[ $(get_version_component_range 1) -eq 2 ]] && [[ $(get_version_component_range 2) -ge 14 ]] ; then |
93 |
+ if [[ $(get_version_component_range 1) -eq 2 ]] && [[ $(get_version_component_range 2) -ge 18 ]] ; then |
94 |
return 0 |
95 |
fi |
96 |
;; |
97 |
@@ -208,29 +208,16 @@ mozconfig_init() { |
98 |
--with-system-zlib \ |
99 |
--enable-pango \ |
100 |
--enable-system-cairo |
101 |
- if ! $(mozversion_is_new_enough) ; then |
102 |
- mozconfig_annotate system-libs --enable-svg |
103 |
- fi |
104 |
|
105 |
mozconfig_annotate disable_update_strip \ |
106 |
--disable-pedantic \ |
107 |
--disable-updater \ |
108 |
--disable-strip \ |
109 |
--disable-install-strip |
110 |
- if ! $(mozversion_is_new_enough) ; then |
111 |
- mozconfig_annotate disable_update_strip \ |
112 |
- --disable-installer \ |
113 |
- --disable-strip-libs |
114 |
- fi |
115 |
|
116 |
if [[ ${PN} != seamonkey ]]; then |
117 |
mozconfig_annotate basic_profile \ |
118 |
--disable-profilelocking |
119 |
- if ! $(mozversion_is_new_enough) ; then |
120 |
- mozconfig_annotate basic_profile \ |
121 |
- --enable-single-profile \ |
122 |
- --disable-profilesharing |
123 |
- fi |
124 |
fi |
125 |
|
126 |
# Here is a strange one... |
127 |
|
128 |
diff --git a/eclass/mozextension.eclass b/eclass/mozextension.eclass |
129 |
new file mode 100644 |
130 |
index 0000000..c8c5502 |
131 |
--- /dev/null |
132 |
+++ b/eclass/mozextension.eclass |
133 |
@@ -0,0 +1,62 @@ |
134 |
+# Copyright 1999-2013 Gentoo Foundation |
135 |
+# Distributed under the terms of the GNU General Public License v2 |
136 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/mozextension.eclass,v 1.8 2013/04/05 15:27:40 floppym Exp $ |
137 |
+# |
138 |
+# @ECLASS: mozextension.eclass |
139 |
+# @MAINTAINER: |
140 |
+# Mozilla team <mozilla@g.o> |
141 |
+# @BLURB: Install extensions for use in mozilla products. |
142 |
+ |
143 |
+ |
144 |
+inherit eutils |
145 |
+ |
146 |
+DEPEND="app-arch/unzip" |
147 |
+ |
148 |
+xpi_unpack() { |
149 |
+ local xpi xpiname srcdir |
150 |
+ |
151 |
+ # Not gonna use ${A} as we are looking for a specific option being passed to function |
152 |
+ # You must specify which xpi to use |
153 |
+ [[ -z "$*" ]] && die "Nothing passed to the $FUNCNAME command. please pass which xpi to unpack" |
154 |
+ |
155 |
+ for xpi in "$@"; do |
156 |
+ einfo "Unpacking ${xpi} to ${PWD}" |
157 |
+ xpiname=$(basename ${xpi%.*}) |
158 |
+ |
159 |
+ if [[ "${xpi:0:2}" != "./" ]] && [[ "${xpi:0:1}" != "/" ]] ; then |
160 |
+ srcdir="${DISTDIR}/" |
161 |
+ fi |
162 |
+ |
163 |
+ [[ -s "${srcdir}${xpi}" ]] || die "${xpi} does not exist" |
164 |
+ |
165 |
+ case "${xpi##*.}" in |
166 |
+ ZIP|zip|jar|xpi) |
167 |
+ mkdir "${WORKDIR}/${xpiname}" && \ |
168 |
+ unzip -qo "${srcdir}${xpi}" -d "${WORKDIR}/${xpiname}" || die "failed to unpack ${xpi}" |
169 |
+ ;; |
170 |
+ *) |
171 |
+ einfo "unpack ${xpi}: file format not recognized. Ignoring." |
172 |
+ ;; |
173 |
+ esac |
174 |
+ done |
175 |
+} |
176 |
+ |
177 |
+ |
178 |
+xpi_install() { |
179 |
+ local emid |
180 |
+ |
181 |
+ # You must tell xpi_install which xpi to use |
182 |
+ [[ ${#} -ne 1 ]] && die "$FUNCNAME takes exactly one argument, please specify an xpi to unpack" |
183 |
+ |
184 |
+ x="${1}" |
185 |
+ cd ${x} |
186 |
+ # determine id for extension |
187 |
+ emid="$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${x}"/install.rdf)" \ |
188 |
+ || die "failed to determine extension id" |
189 |
+ fi $(mozversion_is_new_enough) ; then |
190 |
+ insinto "${MOZILLA_FIVE_HOME}"/browser/extensions/${emid} |
191 |
+ else |
192 |
+ insinto "${MOZILLA_FIVE_HOME}"/extensions/${emid} |
193 |
+ fi |
194 |
+ doins -r "${x}"/* || die "failed to copy extension" |
195 |
+} |