Gentoo Archives: gentoo-commits

From: "Raul Porcel (armin76)" <armin76@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/mozilla-firefox/3.0.2: 000_flex-configure-LANG.patch 001-firefox_gentoo_install_dirs.patch 003-bz386904_config_rules_install_dist_files.patch 005-installer_shouldnt_copy_xulrunner.patch 007-xulonly-dont_depend_on_nspr_sources.patch 009-xulonly-nspr_flags_by_pkg_config_hack.patch 020_noxul-mips-asm.patch 021_noxul-mips-fpic.patch 030-firefox_encode_spaces.patch 055_firefox-2.0_gfbsd-pthreads.patch 063_firefox-rpath-3.patch 064_noxul-nsplugins-v3.patch 068_noxul-nss-gentoo-fix.patch 100-system-hunspell-corrections.patch 150_passwordmgr-fix.patch 300-xulonly-gnome_firefox_default_browser.patch 667_typeahead-broken-v4.patch 800-noxul-bsd-include.patch
Date: Wed, 24 Sep 2008 20:18:38
Message-Id: E1Kiaoj-0005Zp-VY@stork.gentoo.org
1 armin76 08/09/24 20:18:33
2
3 Added: 000_flex-configure-LANG.patch
4 001-firefox_gentoo_install_dirs.patch
5 003-bz386904_config_rules_install_dist_files.patch
6 005-installer_shouldnt_copy_xulrunner.patch
7 007-xulonly-dont_depend_on_nspr_sources.patch
8 009-xulonly-nspr_flags_by_pkg_config_hack.patch
9 020_noxul-mips-asm.patch 021_noxul-mips-fpic.patch
10 030-firefox_encode_spaces.patch
11 055_firefox-2.0_gfbsd-pthreads.patch
12 063_firefox-rpath-3.patch
13 064_noxul-nsplugins-v3.patch
14 068_noxul-nss-gentoo-fix.patch
15 100-system-hunspell-corrections.patch
16 150_passwordmgr-fix.patch
17 300-xulonly-gnome_firefox_default_browser.patch
18 667_typeahead-broken-v4.patch
19 800-noxul-bsd-include.patch
20 Log:
21 Add patches for 3.0.2
22
23 Revision Changes Path
24 1.1 src/patchsets/mozilla-firefox/3.0.2/000_flex-configure-LANG.patch
25
26 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/000_flex-configure-LANG.patch?rev=1.1&view=markup
27 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/000_flex-configure-LANG.patch?rev=1.1&content-type=text/plain
28
29 Index: 000_flex-configure-LANG.patch
30 ===================================================================
31 The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in
32 option parsing, it may break.
33
34 http://bugs.gentoo.org/103483
35
36 --- configure
37 +++ configure
38 @@ -54,6 +54,16 @@
39 infodir='${prefix}/info'
40 mandir='${prefix}/man'
41
42 +# NLS nuisances.
43 +# Only set these to C if already set. These must not be set unconditionally
44 +# because not all systems understand e.g. LANG=C (notably SCO).
45 +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
46 +# Non-C LC_CTYPE values break the ctype check.
47 +if test "${LANG+set}" = set; then LANG=C; export LANG; fi
48 +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
49 +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
50 +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
51 +
52 # Initialize some other variables.
53 subdirs=
54 MFLAGS= MAKEFLAGS=
55 @@ -452,16 +463,6 @@
56 esac
57 done
58
59 -# NLS nuisances.
60 -# Only set these to C if already set. These must not be set unconditionally
61 -# because not all systems understand e.g. LANG=C (notably SCO).
62 -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
63 -# Non-C LC_CTYPE values break the ctype check.
64 -if test "${LANG+set}" = set; then LANG=C; export LANG; fi
65 -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
66 -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
67 -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
68 -
69 # confdefs.h avoids OS command line length limits that DEFS can exceed.
70 rm -rf conftest* confdefs.h
71 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
72
73
74
75 1.1 src/patchsets/mozilla-firefox/3.0.2/001-firefox_gentoo_install_dirs.patch
76
77 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/001-firefox_gentoo_install_dirs.patch?rev=1.1&view=markup
78 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/001-firefox_gentoo_install_dirs.patch?rev=1.1&content-type=text/plain
79
80 Index: 001-firefox_gentoo_install_dirs.patch
81 ===================================================================
82 --- config/autoconf.mk.in.orig 2007-08-03 22:02:32.000000000 +0200
83 +++ config/autoconf.mk.in 2007-08-03 22:07:00.000000000 +0200
84 @@ -58,14 +58,14 @@
85 prefix = @prefix@
86 exec_prefix = @exec_prefix@
87 bindir = @bindir@
88 -includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
89 +includedir = @includedir@/mozilla-firefox
90 libdir = @libdir@
91 datadir = @datadir@
92 mandir = @mandir@
93 -idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
94 +idldir = $(includedir)/idl
95
96 -installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
97 -sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
98 +installdir = $(libdir)/mozilla-firefox
99 +sdkdir = $(libdir)/mozilla-firefox
100
101 DIST = $(DEPTH)/dist
102 LIBXUL_SDK = @LIBXUL_SDK@
103
104
105
106 1.1 src/patchsets/mozilla-firefox/3.0.2/003-bz386904_config_rules_install_dist_files.patch
107
108 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/003-bz386904_config_rules_install_dist_files.patch?rev=1.1&view=markup
109 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/003-bz386904_config_rules_install_dist_files.patch?rev=1.1&content-type=text/plain
110
111 Index: 003-bz386904_config_rules_install_dist_files.patch
112 ===================================================================
113 This is from:
114 https://bugzilla.mozilla.org/show_bug.cgi?id=386904
115 https://bugzilla.mozilla.org/attachment.cgi?id=270967
116
117
118 -- Summary:
119
120 This patch implements DIST_FILES install:: target as well as
121 DIST_CHROME_FILES install target.
122
123 -- Evaluation:
124
125 DIST_FILES is now used in browser/app/Makefile.in to install
126 application.ini; however, DEST_FILES is only implemented for
127 libs::, but not for install::.
128
129 In consequence, make install'ed installs of firefox now break
130 with missing application.ini file.
131
132 When writing this fix, it became obvious that DIST_CHROME_FILES
133 install: target is missing too ... though it doesn't cause any
134 problems because its not really used.
135
136 ---
137 config/rules.mk | 28 ++++++++++++++++++++++++++++
138 1 file changed, 28 insertions(+)
139
140 Index: mozilla/config/rules.mk
141 ===================================================================
142 --- mozilla.orig/config/rules.mk 2007-08-18 15:15:17.000000000 +0000
143 +++ mozilla/config/rules.mk 2007-08-18 15:15:36.000000000 +0000
144 @@ -1699,28 +1699,56 @@
145 @$(EXIT_ON_ERROR) \
146 for f in $(DIST_FILES); do \
147 dest=$(FINAL_TARGET)/`basename $$f`; \
148 $(RM) -f $$dest; \
149 $(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py \
150 $(XULAPP_DEFINES) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) \
151 $(srcdir)/$$f > $$dest; \
152 done
153 +
154 +install:: $(DIST_FILES)
155 +ifndef XPI_NAME
156 +ifndef NO_INSTALL
157 + @$(EXIT_ON_ERROR) \
158 + for f in $(DIST_FILES); do \
159 + dest=$(DESTDIR)$(mozappdir)/`basename $$f`; \
160 + $(RM) -f $$dest; \
161 + $(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py \
162 + $(XULAPP_DEFINES) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) \
163 + $(srcdir)/$$f > $$dest; \
164 + done
165 +endif
166 +endif
167 endif
168
169 ifneq ($(DIST_CHROME_FILES),)
170 libs:: $(DIST_CHROME_FILES)
171 @$(EXIT_ON_ERROR) \
172 for f in $(DIST_CHROME_FILES); do \
173 dest=$(FINAL_TARGET)/chrome/`basename $$f`; \
174 $(RM) -f $$dest; \
175 $(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py \
176 $(XULAPP_DEFINES) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) \
177 $(srcdir)/$$f > $$dest; \
178 done
179 +
180 +install:: $(DIST_CHROME_FILES)
181 +ifndef XPI_NAME
182 +ifndef NO_INSTALL
183 + @$(EXIT_ON_ERROR) \
184 + for f in $(DIST_CHROME_FILES); do \
185 + dest=$(DESTDIR)$(mozappdir)/chrome/`basename $$f`; \
186 + $(RM) -f $$dest; \
187 + $(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py \
188 + $(XULAPP_DEFINES) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) \
189 + $(srcdir)/$$f > $$dest; \
190 + done
191 +endif
192 +endif
193 endif
194
195 ifneq ($(XPI_PKGNAME),)
196 libs realchrome::
197 ifdef STRIP_XPI
198 ifndef MOZ_DEBUG
199 @echo "Stripping $(XPI_PKGNAME) package directory..."
200 @echo $(FINAL_TARGET)
201
202
203
204 1.1 src/patchsets/mozilla-firefox/3.0.2/005-installer_shouldnt_copy_xulrunner.patch
205
206 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/005-installer_shouldnt_copy_xulrunner.patch?rev=1.1&view=markup
207 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/005-installer_shouldnt_copy_xulrunner.patch?rev=1.1&content-type=text/plain
208
209 Index: 005-installer_shouldnt_copy_xulrunner.patch
210 ===================================================================
211 ---
212 config/rules.mk | 5 +++++
213 1 file changed, 5 insertions(+)
214
215 Index: mozilla/config/rules.mk
216 ===================================================================
217 --- mozilla.orig/config/rules.mk
218 +++ mozilla/config/rules.mk
219 @@ -57,16 +57,21 @@
220 REPORT_BUILD = @echo $(notdir $<)
221
222 ifeq ($(OS_ARCH),OS2)
223 EXEC =
224 else
225 EXEC = exec
226 endif
227
228 +# Don't copy xulrunner files at install time, when using system xulrunner
229 +ifdef LIBXUL_SDK
230 + SKIP_COPY_XULRUNNER=1
231 +endif
232 +
233 # ELOG prints out failed command when building silently (gmake -s).
234 ifneq (,$(findstring -s,$(MAKEFLAGS)))
235 ELOG := $(EXEC) sh $(BUILD_TOOLS)/print-failed-commands.sh
236 else
237 ELOG :=
238 endif
239
240 ifeq ($(MOZ_OS2_TOOLS),VACPP)
241
242
243
244 1.1 src/patchsets/mozilla-firefox/3.0.2/007-xulonly-dont_depend_on_nspr_sources.patch
245
246 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/007-xulonly-dont_depend_on_nspr_sources.patch?rev=1.1&view=markup
247 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/007-xulonly-dont_depend_on_nspr_sources.patch?rev=1.1&content-type=text/plain
248
249 Index: 007-xulonly-dont_depend_on_nspr_sources.patch
250 ===================================================================
251 ---
252 config/Makefile.in | 2 -
253 config/make-system-wrappers.pl | 59 +++++++++++++++++++++++++++++++++++++++++
254 2 files changed, 60 insertions(+), 1 deletion(-)
255
256 Index: mozilla/config/Makefile.in
257 ===================================================================
258 --- mozilla.orig/config/Makefile.in
259 +++ mozilla/config/Makefile.in
260 @@ -121,17 +121,17 @@
261 -DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \
262 -DMOZ_ENABLE_LIBXUL=$(MOZ_ENABLE_LIBXUL) \
263 -DMOZ_NATIVE_HUNSPELL=$(MOZ_NATIVE_HUNSPELL) \
264 -DMOZ_NATIVE_BZ2=$(MOZ_NATIVE_BZ2) \
265 -DMOZ_NATIVE_ZLIB=$(MOZ_NATIVE_ZLIB) \
266 -DMOZ_NATIVE_PNG=$(MOZ_NATIVE_PNG) \
267 -DMOZ_NATIVE_JPEG=$(MOZ_NATIVE_JPEG) \
268 -DMOZ_NATIVE_LCMS=$(MOZ_NATIVE_LCMS) \
269 - $(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
270 + $(srcdir)/system-headers | $(PERL) $(topsrcdir)/config/make-system-wrappers.pl system_wrappers
271 $(INSTALL) system_wrappers $(DIST)/include
272
273 GARBAGE_DIRS += system_wrappers
274 endif
275
276 install::
277 $(SYSINSTALL) $(IFLAGS1) $(DEPTH)/mozilla-config.h $(DESTDIR)$(includedir)
278
279 Index: mozilla/config/make-system-wrappers.pl
280 ===================================================================
281 --- /dev/null
282 +++ mozilla/config/make-system-wrappers.pl
283 @@ -0,0 +1,59 @@
284 +#!/usr/bin/perl
285 +#
286 +# ***** BEGIN LICENSE BLOCK *****
287 +# Version: MPL 1.1/GPL 2.0/LGPL 2.1
288 +#
289 +# The contents of this file are subject to the Mozilla Public License Version
290 +# 1.1 (the "License"); you may not use this file except in compliance with
291 +# the License. You may obtain a copy of the License at
292 +# http://www.mozilla.org/MPL/
293 +#
294 +# Software distributed under the License is distributed on an "AS IS" basis,
295 +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
296 +# for the specific language governing rights and limitations under the
297 +# License.
298 +#
299 +# The Original Code is mozilla.org code.
300 +#
301 +# The Initial Developer of the Original Code is
302 +# IBM Corporation.
303 +# Portions created by the Initial Developer are Copyright (C) 2004
304 +# the Initial Developer. All Rights Reserved.
305 +#
306 +# Contributor(s):
307 +# Brian Ryner <bryner@××××××××××.com>
308 +#
309 +# Alternatively, the contents of this file may be used under the terms of
310 +# either of the GNU General Public License Version 2 or later (the "GPL"),
311 +# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
312 +# in which case the provisions of the GPL or the LGPL are applicable instead
313 +# of those above. If you wish to allow use of your version of this file only
314 +# under the terms of either the GPL or the LGPL, and not to allow others to
315 +# use your version of this file under the terms of the MPL, indicate your
316 +# decision by deleting the provisions above and replace them with the notice
317 +# and other provisions required by the GPL or the LGPL. If you do not delete
318 +# the provisions above, a recipient may use your version of this file under
319 +# the terms of any one of the MPL, the GPL or the LGPL.
320 +#
321 +# ***** END LICENSE BLOCK *****
322 +
323 +$output_dir = shift;
324 +
325 +while (<STDIN>) {
326 + chomp;
327 + if (-e "$output_dir/$_") {
328 + next;
329 + }
330 +
331 + if (/(.*)\/[^\/*]/) {
332 + mkdir "$output_dir/$1";
333 + }
334 +
335 + open OUT, ">$output_dir/$_";
336 + print OUT "#pragma GCC system_header\n"; # suppress include_next warning
337 + print OUT "#pragma GCC visibility push(default)\n";
338 + print OUT "#include_next \<$_\>\n";
339 + print OUT "#pragma GCC visibility pop\n";
340 + close OUT;
341 +}
342 +
343
344
345
346 1.1 src/patchsets/mozilla-firefox/3.0.2/009-xulonly-nspr_flags_by_pkg_config_hack.patch
347
348 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/009-xulonly-nspr_flags_by_pkg_config_hack.patch?rev=1.1&view=markup
349 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/009-xulonly-nspr_flags_by_pkg_config_hack.patch?rev=1.1&content-type=text/plain
350
351 Index: 009-xulonly-nspr_flags_by_pkg_config_hack.patch
352 ===================================================================
353 ---
354 configure.in | 21 +++-----------
355
356 Index: mozilla/configure.in
357 ===================================================================
358 --- mozilla.orig/configure.in
359 +++ mozilla/configure.in
360 @@ -3872,32 +3872,33 @@
361 AC_TRY_COMPILE([#include "prlog.h"],
362 [#ifndef PR_STATIC_ASSERT
363 #error PR_STATIC_ASSERT not defined
364 #endif],
365 [MOZ_NATIVE_NSPR=1],
366 AC_MSG_ERROR([system NSPR does not support PR_STATIC_ASSERT]))
367 CFLAGS=$_SAVE_CFLAGS
368 else
369 - NSPR_CFLAGS='`$(DEPTH)/nsprpub/config/nspr-config --prefix=$(LIBXUL_DIST) --includedir=$(LIBXUL_DIST)/include/nspr --cflags`'
370 + NSPR_CFLAGS=`pkg-config mozilla-nspr --cflags`
371 + NSPR_LIBS=`pkg-config mozilla-nspr --libs`
372 # explicitly set libs for Visual Age C++ for OS/2
373 if test "$OS_ARCH" = "OS2" -a "$VACPP" = "yes"; then
374 NSPR_LIBS='$(LIBXUL_DIST)/lib/nspr'$NSPR_VERSION'.lib $(LIBXUL_DIST)/lib/plc'$NSPR_VERSION'.lib $(LIBXUL_DIST)/lib/plds'$NSPR_VERSION'.lib '$_PTHREAD_LDFLAGS''
375 elif test "$OS_ARCH" = "WINCE"; then
376 NSPR_CFLAGS='-I$(LIBXUL_DIST)/include/nspr'
377 NSPR_LIBS='$(LIBXUL_DIST)/lib/nspr'$NSPR_VERSION'.lib $(LIBXUL_DIST)/lib/plc'$NSPR_VERSION'.lib $(LIBXUL_DIST)/lib/plds'$NSPR_VERSION'.lib '
378 elif test "$OS_ARCH" = "WINNT"; then
379 NSPR_CFLAGS='-I$(LIBXUL_DIST)/include/nspr'
380 if test -n "$GNU_CC"; then
381 NSPR_LIBS="-L\$(LIBXUL_DIST)/lib -lnspr$NSPR_VERSION -lplc$NSPR_VERSION -lplds$NSPR_VERSION"
382 else
383 NSPR_LIBS='$(LIBXUL_DIST)/lib/nspr'$NSPR_VERSION'.lib $(LIBXUL_DIST)/lib/plc'$NSPR_VERSION'.lib $(LIBXUL_DIST)/lib/plds'$NSPR_VERSION'.lib '
384 fi
385 else
386 - NSPR_LIBS='`$(DEPTH)/nsprpub/config/nspr-config --prefix=$(LIBXUL_DIST) --libdir=$(LIBXUL_DIST)/lib --libs`'
387 + NSPR_LIBS=`pkg-config mozilla-nspr --libs`
388 fi
389 fi
390
391 dnl ========================================================
392 dnl = If NSS was not detected in the system,
393 dnl = use the one in the source tree (mozilla/security/nss)
394 dnl ========================================================
395
396 @@ -7617,17 +7618,19 @@
397 AC_SUBST(MOZ_ZLIB_CFLAGS)
398 AC_SUBST(MOZ_ZLIB_LIBS)
399 AC_SUBST(MOZ_BZ2_CFLAGS)
400 AC_SUBST(MOZ_BZ2_LIBS)
401 AC_SUBST(MOZ_PNG_CFLAGS)
402 AC_SUBST(MOZ_PNG_LIBS)
403
404 AC_SUBST(NSPR_CFLAGS)
405 +AC_DEFINE(NSPR_CFLAGS)
406 AC_SUBST(NSPR_LIBS)
407 +AC_DEFINE(NSPR_LIBS)
408 AC_SUBST(MOZ_NATIVE_NSPR)
409
410 AC_SUBST(NSS_CFLAGS)
411 AC_SUBST(NSS_LIBS)
412 AC_SUBST(NSS_DEP_LIBS)
413 AC_SUBST(MOZ_NATIVE_NSS)
414
415 AC_SUBST(CFLAGS)
416 @@ -7961,30 +7964,16 @@
417 fi
418 if test -n "$HAVE_64BIT_OS"; then
419 ac_configure_args="$ac_configure_args --enable-64bit"
420 fi
421 AC_OUTPUT_SUBDIRS(nsprpub)
422 ac_configure_args="$_SUBDIR_CONFIG_ARGS"
423 fi
424
425 -if test -z "$MOZ_NATIVE_NSPR"; then
426 - # Hack to deal with the fact that we use NSPR_CFLAGS everywhere
427 - AC_MSG_WARN([Recreating autoconf.mk with updated nspr-config output])
428 - if test ! "$VACPP" && test "$OS_ARCH" != "WINNT" && test "$OS_ARCH" != "WINCE"; then
429 - _libs=`./nsprpub/config/nspr-config --prefix=$\(LIBXUL_DIST\) --exec-prefix=$\(DIST\) --libdir=$\(LIBXUL_DIST\)/lib --libs`
430 - $PERL -pi.bak -e "s '^NSPR_LIBS\\s*=.*'NSPR_LIBS = $_libs'" config/autoconf.mk
431 - fi
432 - if test "$OS_ARCH" != "WINNT" && test "$OS_ARCH" != "WINCE" ; then
433 - _cflags=`./nsprpub/config/nspr-config --prefix=$\(LIBXUL_DIST\) --exec-prefix=$\(DIST\) --includedir=$\(LIBXUL_DIST\)/include/nspr --cflags`
434 - $PERL -pi.bak -e "s '^NSPR_CFLAGS\\s*=.*'NSPR_CFLAGS = $_cflags'" config/autoconf.mk
435 - fi
436 - rm -f config/autoconf.mk.bak
437 -fi
438 -
439 # if we're building the LDAP XPCOM component, we need to build
440 # the c-sdk first.
441 #
442 if test "$MOZ_LDAP_XPCOM"; then
443
444 # these subdirs may not yet have been created in the build tree.
445 # don't use the "-p" switch to mkdir, since not all platforms have it
446 #
447
448
449
450 1.1 src/patchsets/mozilla-firefox/3.0.2/020_noxul-mips-asm.patch
451
452 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/020_noxul-mips-asm.patch?rev=1.1&view=markup
453 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/020_noxul-mips-asm.patch?rev=1.1&content-type=text/plain
454
455 Index: 020_noxul-mips-asm.patch
456 ===================================================================
457 Upstream Bug: http://bugzilla.mozilla.org/show_bug.cgi?id=258429
458
459 This patch is required to fix build issues with Mozilla on MIPS architectures.
460 The out-of-the-box code is coded to build on a PlayStation 2 game console, which
461 is a highly specialised MIPS machine based around the Toshiba TX5900. This CPU
462 is very non-standard, causing problems with generic MIPS machines like Silicon
463 Graphics workstations.
464
465 The following patch fixes the assembly language routines for generic MIPS
466 machines. In the case where it is being compiled for a PlayStation 2, the older
467 PS2-specific implementation is used instead.
468
469 Patch $Revision: 1.1 $
470 diff --git a/configure.in b/configure.in
471 index f49bf6c..2423b6c 100644
472 --- a/configure.in
473 +++ b/configure.in
474 @@ -1806,8 +1806,7 @@ case "$target" in
475 MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS=1
476 ;;
477 mips*)
478 - CFLAGS="$CFLAGS -Wa,-xgot"
479 - CXXFLAGS="$CXXFLAGS -Wa,-xgot"
480 + MOZ_DEBUG_FLAGS="-g" # We want inlining
481 ;;
482 esac
483 ;;
484 diff --git a/xpcom/reflect/xptcall/src/md/unix/Makefile.in b/xpcom/reflect/xptcall/src/md/unix/Makefile.in
485 index 559fd96..6181699 100644
486 --- a/xpcom/reflect/xptcall/src/md/unix/Makefile.in
487 +++ b/xpcom/reflect/xptcall/src/md/unix/Makefile.in
488 @@ -276,11 +276,7 @@ ifeq ($(OS_ARCH),Linux)
489 ifneq (,$(findstring mips, $(OS_TEST)))
490 CPPSRCS := xptcinvoke_mips.cpp xptcstubs_mips.cpp
491 ASFILES := xptcinvoke_asm_mips.s xptcstubs_asm_mips.s
492 -#xptcstubs_mips.cpp
493 -# xptcstubs_asm_mips.s
494 -ifdef GNU_CC
495 -ASFLAGS += $(INCLUDES) -x assembler-with-cpp -D__GNUC__
496 -endif
497 +ASFLAGS += -I$(PUBLIC) -x assembler-with-cpp
498 endif
499 endif
500
501 @@ -466,10 +462,7 @@ LOCAL_INCLUDES += \
502
503 ifeq ($(OS_ARCH),Linux)
504 ifneq (,$(findstring mips, $(OS_TEST)))
505 -xptcstubs_asm_mips.o: xptcstubs_asm_mips.s.m4 $(PUBLIC)/xptcstubsdef.inc
506 - m4 $(INCLUDES) $< > ./xptcstubs_asm_mips.s && \
507 - $(AS) -o $@ $(ASFLAGS) $(AS_DASH_C_FLAG) ./xptcstubs_asm_mips.s
508 - $(RM) -f ./xptcstubs_asm_mips.s
509 +xptcstubs_asm_mips.o: $(PUBLIC)/xptcstubsdef.inc
510 endif
511 endif
512
513 diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s
514 index 8704247..6cf9deb 100644
515 --- a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s
516 +++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s
517 @@ -24,6 +24,7 @@
518 * Contributor(s):
519 * Brendan Eich <brendan@×××××××.org>
520 * Stuart Parmenter <pavlov@××××××××.com>
521 + * Thiemo Seufer <seufer@×××××××××××××××××××××.de>
522 *
523 * Alternatively, the contents of this file may be used under the terms of
524 * either the GNU General Public License Version 2 or later (the "GPL"), or
525 @@ -44,139 +45,123 @@
526 #include <sys/regdef.h>
527 #include <sys/asm.h>
528
529 -.text
530 -.globl invoke_count_words
531 -.globl invoke_copy_to_stack
532 -
533 -# We need a variable number of words allocated from the stack for copies of
534 -# the params, and this space must come between the high frame (where ra, gp,
535 -# and s0 are saved) and the low frame (where a0-a3 are saved by the callee
536 -# functions we invoke).
537 -
538 -LOCALSZ=4 # s0, s1, ra, gp
539 -NARGSAVE=4 # a0, a1, a2, a3
540 -HIFRAMESZ=(LOCALSZ*SZREG)
541 -LOFRAMESZ=(NARGSAVE*SZREG)
542 -FRAMESZ=(HIFRAMESZ+LOFRAMESZ+ALSZ)&ALMASK
543 -
544 -# XXX these 2*SZREG, etc. are very magic -- we *know* that ALSZ&ALMASK cause
545 -# FRAMESZ to be 0 mod 8, in this case to be 16 and not 12.
546 -RAOFF=FRAMESZ - (2*SZREG)
547 -GPOFF=FRAMESZ - (3*SZREG)
548 -S0OFF=FRAMESZ - (4*SZREG)
549 -S1OFF=FRAMESZ - (5*SZREG)
550 -
551 -# These are not magic -- they are just our argsave slots in the caller frame.
552 -A0OFF=FRAMESZ
553 -A1OFF=FRAMESZ + (1*SZREG)
554 -A2OFF=FRAMESZ + (2*SZREG)
555 -A3OFF=FRAMESZ + (3*SZREG)
556 -
557 - #
558 - # _XPTC_InvokeByIndex(that, methodIndex, paramCount, params)
559 - # a0 a1 a2 a3
560 -
561 -NESTED(_XPTC_InvokeByIndex, FRAMESZ, ra)
562 -
563 - .set noreorder
564 - .cpload t9
565 - .set reorder
566 -
567 +# NARGSAVE is the argument space in the callers frame, including extra
568 +# 'shadowed' space for the argument registers. The minimum of 4
569 +# argument slots is sometimes predefined in the header files.
570 +#ifndef NARGSAVE
571 +#define NARGSAVE 4
572 +#endif
573 +
574 +#define LOCALSZ 3 /* gp, fp, ra */
575 +#define FRAMESZ ((((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK)
576 +
577 +#define RAOFF (FRAMESZ - (1*SZREG))
578 +#define FPOFF (FRAMESZ - (2*SZREG))
579 +#define GPOFF (FRAMESZ - (3*SZREG))
580 +
581 +#define A0OFF (FRAMESZ + (0*SZREG))
582 +#define A1OFF (FRAMESZ + (1*SZREG))
583 +#define A2OFF (FRAMESZ + (2*SZREG))
584 +#define A3OFF (FRAMESZ + (3*SZREG))
585 +
586 + .text
587 +
588 +#
589 +# _NS_InvokeByIndex_P(that, methodIndex, paramCount, params)
590 +# a0 a1 a2 a3
591 +
592 + .globl _NS_InvokeByIndex_P
593 + .align 2
594 + .type _NS_InvokeByIndex_P,@function
595 + .ent _NS_InvokeByIndex_P,0
596 + .frame fp, FRAMESZ, ra
597 +_NS_InvokeByIndex_P:
598 + SETUP_GP
599 subu sp, FRAMESZ
600
601 - # specify the save register mask -- XXX do we want the a0-a3 here, given
602 - # our "split" frame where the args are saved below a dynamicly allocated
603 - # region under the high frame?
604 - #
605 - # 10010000000000010000000011110000
606 - .mask 0x900100F0, -((NARGSAVE+LOCALSZ)*SZREG)
607 + # specify the save register mask for gp, fp, ra, a3 - a0
608 + .mask 0xD00000F0, RAOFF-FRAMESZ
609
610 - # thou shalt not use .cprestore if yer frame has variable size...
611 - # .cprestore GPOFF
612 + sw ra, RAOFF(sp)
613 + sw fp, FPOFF(sp)
614
615 - REG_S ra, RAOFF(sp)
616 + # we can't use .cprestore in a variable stack frame
617 + sw gp, GPOFF(sp)
618
619 - # this happens automatically with .cprestore, but we cannot use that op...
620 - REG_S gp, GPOFF(sp)
621 - REG_S s0, S0OFF(sp)
622 - REG_S s1, S1OFF(sp)
623 + sw a0, A0OFF(sp)
624 + sw a1, A1OFF(sp)
625 + sw a2, A2OFF(sp)
626 + sw a3, A3OFF(sp)
627
628 - REG_S a0, A0OFF(sp)
629 - REG_S a1, A1OFF(sp)
630 - REG_S a2, A2OFF(sp)
631 - REG_S a3, A3OFF(sp)
632 + # save bottom of fixed frame
633 + move fp, sp
634
635 - # invoke_count_words(paramCount, params)
636 + # extern "C" uint32
637 + # invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s);
638 + la t9, invoke_count_words
639 move a0, a2
640 move a1, a3
641 -
642 - jal invoke_count_words
643 - lw gp, GPOFF(sp)
644 -
645 - # save the old sp so we can pop the param area and any "low frame"
646 - # needed as an argsave area below the param block for callees that
647 - # we invoke.
648 - move s0, sp
649 -
650 - REG_L a1, A2OFF(sp) # a1 = paramCount
651 - REG_L a2, A3OFF(sp) # a2 = params
652 -
653 - # we define a word as 4 bytes, period end of story!
654 - sll v0, 2 # 4 bytes * result of invoke_copy_words
655 - subu v0, LOFRAMESZ # but we take back the argsave area built into
656 - # our stack frame -- SWEET!
657 - subu sp, sp, v0 # make room
658 - move a0, sp # a0 = param stack address
659 - move s1, a0 # save it for later -- it should be safe here
660 -
661 - # the old sp is still saved in s0, but we now need another argsave
662 - # area ("low frame") for the invoke_copy_to_stack call.
663 - subu sp, sp, LOFRAMESZ
664 -
665 - # copy the param into the stack areas
666 + jalr t9
667 + lw gp, GPOFF(fp)
668 +
669 + # allocate variable stack, with a size of:
670 + # wordsize (of 4 bytes) * result (already aligned to dword)
671 + # but a minimum of 16 byte
672 + sll v0, 2
673 + slt t0, v0, 16
674 + beqz t0, 1f
675 + li v0, 16
676 +1: subu sp, v0
677 +
678 + # let a0 point to the bottom of the variable stack, allocate
679 + # another fixed stack for:
680 + # extern "C" void
681 # invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount,
682 - # nsXPTCVariant* s)
683 - jal invoke_copy_to_stack
684 - lw gp, GPOFF(s0)
685 -
686 - move sp, s0 # get orig sp back, popping params and argsave
687 -
688 - REG_L a0, A0OFF(sp) # a0 = set "that" to be "this"
689 - REG_L a1, A1OFF(sp) # a1 = methodIndex
690 -
691 - # t1 = methodIndex * 4
692 - # (use shift instead of mult)
693 - sll t1, a1, 2
694 -
695 - # calculate the function we need to jump to,
696 - # which must then be saved in t9
697 + # nsXPTCVariant* s);
698 + la t9, invoke_copy_to_stack
699 + move a0, sp
700 + lw a1, A2OFF(fp)
701 + lw a2, A3OFF(fp)
702 + subu sp, 16
703 + jalr t9
704 + lw gp, GPOFF(fp)
705 +
706 + # back to the variable stack frame
707 + addu sp, 16
708 +
709 + # calculate the function we need to jump to, which must then be
710 + # stored in t9
711 + lw a0, A0OFF(fp) # a0 = set "that" to be "this"
712 + lw t0, A1OFF(fp) # a1 = methodIndex
713 lw t9, 0(a0)
714 - addu t9, t9, t1
715 - lw t9, 8(t9)
716 -
717 - # a1..a3 and f13..f14 should now be set to what
718 - # invoke_copy_to_stack told us. skip a0 and f12
719 - # because that is the "this" pointer
720 -
721 - REG_L a1, 1*SZREG(s1)
722 - REG_L a2, 2*SZREG(s1)
723 - REG_L a3, 3*SZREG(s1)
724 -
725 - l.d $f13, 8(s1)
726 - l.d $f14, 16(s1)
727 -
728 - # Create the stack pointer for the function, which must have 4 words
729 - # of space for callee-saved args. invoke_count_words allocated space
730 - # for a0 starting at s1, so we just move s1 into sp.
731 - move sp, s1
732 -
733 - jalr ra, t9
734 - lw gp, GPOFF(s0)
735 -
736 - move sp, s0
737 -
738 - REG_L ra, RAOFF(sp)
739 - REG_L s0, S0OFF(sp)
740 - addu sp, FRAMESZ
741 + # t0 = methodIndex << PTRLOG
742 + sll t0, t0, PTRLOG
743 + addu t9, t0
744 +#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
745 + lw t9, (t9)
746 +#else /* not G++ V3 ABI */
747 + lw t9, 2*PTRSIZE(t9)
748 +#endif /* G++ V3 ABI */
749 +
750 + # Set a1-a3 to what invoke_copy_to_stack told us. a0 is already
751 + # the "this" pointer. We don't have to care about floating
752 + # point arguments, the non-FP "this" pointer as first argument
753 + # means they'll never be used.
754 + lw a1, 1*SZREG(sp)
755 + lw a2, 2*SZREG(sp)
756 + lw a3, 3*SZREG(sp)
757 +
758 + jalr t9
759 + # Micro-optimization: There's no gp usage below this point, so
760 + # we don't reload.
761 + # lw gp, GPOFF(fp)
762 +
763 + # leave variable stack frame
764 + move sp, fp
765 +
766 + lw ra, RAOFF(sp)
767 + lw fp, FPOFF(sp)
768 +
769 + addiu sp, FRAMESZ
770 j ra
771 -.end _XPTC_InvokeByIndex
772 +END(_NS_InvokeByIndex_P)
773 diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp
774 index a73e432..2c27a26 100644
775 --- a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp
776 +++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp
777 @@ -24,6 +24,7 @@
778 * Contributor(s):
779 * Stuart Parmenter <pavlov@××××××××.com>
780 * Brendan Eich <brendan@×××××××.org>
781 + * Thiemo Seufer <seufer@×××××××××××××××××××××.de>
782 *
783 * Alternatively, the contents of this file may be used under the terms of
784 * either of the GNU General Public License Version 2 or later (the "GPL"),
785 @@ -52,10 +53,8 @@ invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
786 // Count a word for a0 even though it's never stored or loaded
787 // We do this only for alignment of register pairs.
788 PRUint32 result = 1;
789 - for (PRUint32 i = 0; i < paramCount; i++, s++)
790 + for (PRUint32 i = 0; i < paramCount; i++, result++, s++)
791 {
792 - result++;
793 -
794 if (s->IsPtrData())
795 continue;
796
797 @@ -68,6 +67,9 @@ invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
798 result++;
799 result++;
800 break;
801 +
802 + default:
803 + break;
804 }
805 }
806 return (result + 1) & ~(PRUint32)1;
807 @@ -88,8 +90,6 @@ invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount,
808 continue;
809 }
810
811 - *((void**)d) = s->val.p;
812 -
813 switch(s->type)
814 {
815 case nsXPTType::T_I64 :
816 @@ -104,19 +104,20 @@ invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount,
817 if ((PRWord)d & 4) d++;
818 *((double*) d) = s->val.d; d++;
819 break;
820 + default:
821 + *((void**)d) = s->val.p;
822 + break;
823 }
824 }
825 }
826
827 -extern "C" nsresult _XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
828 +extern "C" nsresult _NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
829 PRUint32 paramCount,
830 nsXPTCVariant* params);
831
832 -extern "C"
833 -XPTC_PUBLIC_API(nsresult)
834 -XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
835 +EXPORT_XPCOM_API(nsresult)
836 +NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
837 PRUint32 paramCount, nsXPTCVariant* params)
838 {
839 - return _XPTC_InvokeByIndex(that, methodIndex, paramCount, params);
840 -}
841 -
842 + return _NS_InvokeByIndex_P(that, methodIndex, paramCount, params);
843 +}
844 diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s
845 new file mode 100644
846 index 0000000..c2dc0c7
847 --- /dev/null
848 +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s
849 @@ -0,0 +1,142 @@
850 +/* -*- Mode: asm; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
851 + * Version: MPL 1.1
852 + *
853 + * The contents of this file are subject to the Mozilla Public License Version
854 + * 1.1 (the "License"); you may not use this file except in compliance with
855 + * the License. You may obtain a copy of the License at
856 + * http://www.mozilla.org/MPL/
857 + *
858 + * Software distributed under the License is distributed on an "AS IS" basis,
859 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
860 + * for the specific language governing rights and limitations under the
861 + * License.
862 + *
863 + * The Original Code is mozilla.org code.
864 + *
865 + * The Initial Developer of the Original Code is
866 + * Netscape Communications Corp, Inc.
867 + * Portions created by the Initial Developer are Copyright (C) 2001
868 + * the Initial Developer. All Rights Reserved.
869 + *
870 + * Contributor(s):
871 + * Stuart Parmenter <pavlov@××××××××.com>
872 + * Chris Waterson <waterson@××××××××.com>
873 + * Thiemo Seufer <seufer@×××××××××××××××××××××.de>
874 + */
875 +
876 +/* This code is for MIPS using the O32 ABI. */
877 +
878 +#include <sys/regdef.h>
879 +#include <sys/asm.h>
880 +
881 +# NARGSAVE is the argument space in the callers frame, including extra
882 +# 'shadowed' space for the argument registers. The minimum of 4
883 +# argument slots is sometimes predefined in the header files.
884 +#ifndef NARGSAVE
885 +#define NARGSAVE 4
886 +#endif
887 +
888 +#define LOCALSZ 2 /* gp, ra */
889 +#define FRAMESZ ((((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK)
890 +
891 +#define RAOFF (FRAMESZ - (1*SZREG))
892 +#define GPOFF (FRAMESZ - (2*SZREG))
893 +
894 +#define A0OFF (FRAMESZ + (0*SZREG))
895 +#define A1OFF (FRAMESZ + (1*SZREG))
896 +#define A2OFF (FRAMESZ + (2*SZREG))
897 +#define A3OFF (FRAMESZ + (3*SZREG))
898 +
899 + .text
900 +
901 +#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
902 +#define STUB_ENTRY(x) \
903 + .if x < 10; \
904 + .globl _ZN14nsXPTCStubBase5Stub ##x ##Ev; \
905 + .type _ZN14nsXPTCStubBase5Stub ##x ##Ev,@function; \
906 + .aent _ZN14nsXPTCStubBase5Stub ##x ##Ev,0; \
907 +_ZN14nsXPTCStubBase5Stub ##x ##Ev:; \
908 + SETUP_GP; \
909 + li t0,x; \
910 + b sharedstub; \
911 + .elseif x < 100; \
912 + .globl _ZN14nsXPTCStubBase6Stub ##x ##Ev; \
913 + .type _ZN14nsXPTCStubBase6Stub ##x ##Ev,@function; \
914 + .aent _ZN14nsXPTCStubBase6Stub ##x ##Ev,0; \
915 +_ZN14nsXPTCStubBase6Stub ##x ##Ev:; \
916 + SETUP_GP; \
917 + li t0,x; \
918 + b sharedstub; \
919 + .elseif x < 1000; \
920 + .globl _ZN14nsXPTCStubBase7Stub ##x ##Ev; \
921 + .type _ZN14nsXPTCStubBase7Stub ##x ##Ev,@function; \
922 + .aent _ZN14nsXPTCStubBase7Stub ##x ##Ev,0; \
923 +_ZN14nsXPTCStubBase7Stub ##x ##Ev:; \
924 + SETUP_GP; \
925 + li t0,x; \
926 + b sharedstub; \
927 + .else; \
928 + .err; \
929 + .endif
930 +#else /* not G++ V3 ABI */
931 +#define STUB_ENTRY(x) \
932 + .globl Stub ##x ##__14nsXPTCStubBase; \
933 + .type Stub ##x ##__14nsXPTCStubBase,@function; \
934 + .aent Stub ##x ##__14nsXPTCStubBase,0; \
935 +Stub ##x ##__14nsXPTCStubBase:; \
936 + SETUP_GP; \
937 + li t0,x; \
938 + b sharedstub
939 +#endif /* G++ V3 ABI */
940 +
941 +# SENTINEL_ENTRY is handled in the cpp file.
942 +#define SENTINEL_ENTRY(x)
943 +
944 +#
945 +# open a dummy frame for the function entries
946 +#
947 + .align 2
948 + .type dummy,@function
949 + .ent dummy, 0
950 + .frame sp, FRAMESZ, ra
951 +dummy:
952 + SETUP_GP
953 +
954 +#include "xptcstubsdef.inc"
955 +
956 +sharedstub:
957 + subu sp, FRAMESZ
958 +
959 + # specify the save register mask for gp, ra, a0-a3
960 + .mask 0x900000F0, RAOFF-FRAMESZ
961 +
962 + sw ra, RAOFF(sp)
963 + SAVE_GP(GPOFF)
964 +
965 + # Micro-optimization: a0 is already loaded, and its slot gets
966 + # ignored by PrepareAndDispatch, so no need to save it here.
967 + # sw a0, A0OFF(sp)
968 + sw a1, A1OFF(sp)
969 + sw a2, A2OFF(sp)
970 + sw a3, A3OFF(sp)
971 +
972 + la t9, PrepareAndDispatch
973 +
974 + # t0 is methodIndex
975 + move a1, t0
976 + # have a2 point to the begin of the argument space on stack
977 + addiu a2, sp, FRAMESZ
978 +
979 + # PrepareAndDispatch(that, methodIndex, args)
980 + jalr t9
981 +
982 + # Micro-optimization: Using jalr explicitly has the side-effect
983 + # of not triggering .cprestore. This is ok because we have no
984 + # gp reference below this point. It also allows better
985 + # instruction sscheduling.
986 + # lw gp, GPOFF(fp)
987 +
988 + lw ra, RAOFF(sp)
989 + addiu sp, FRAMESZ
990 + j ra
991 + END(dummy)
992 diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp
993 index 4d60f7b..bdce59c 100644
994 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp
995 +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp
996 @@ -39,6 +39,7 @@
997 * ***** END LICENSE BLOCK ***** */
998
999 #include "xptcprivate.h"
1000 +#include "xptiprivate.h"
1001
1002 /*
1003 * This is for MIPS O32 ABI
1004 @@ -54,7 +55,6 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint32* args)
1005
1006 nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
1007 nsXPTCMiniVariant* dispatchParams = NULL;
1008 - nsIInterfaceInfo* iface_info = NULL;
1009 const nsXPTMethodInfo* info;
1010 PRUint8 paramCount;
1011 PRUint8 i;
1012 @@ -62,11 +62,8 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint32* args)
1013
1014 NS_ASSERTION(self,"no self");
1015
1016 - self->GetInterfaceInfo(&iface_info);
1017 - NS_ASSERTION(iface_info,"no interface info");
1018 -
1019 - iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
1020 - NS_ASSERTION(info,"no interface info");
1021 + self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
1022 + NS_ASSERTION(info,"no method info");
1023
1024 paramCount = info->GetParamCount();
1025
1026 @@ -109,9 +106,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint32* args)
1027 }
1028 }
1029
1030 - result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
1031 -
1032 - NS_RELEASE(iface_info);
1033 + result = self->mOuter->CallMethod((PRUint16)methodIndex, info, dispatchParams);
1034
1035 if(dispatchParams != paramBuffer)
1036 delete [] dispatchParams;
1037
1038
1039
1040 1.1 src/patchsets/mozilla-firefox/3.0.2/021_noxul-mips-fpic.patch
1041
1042 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/021_noxul-mips-fpic.patch?rev=1.1&view=markup
1043 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/021_noxul-mips-fpic.patch?rev=1.1&content-type=text/plain
1044
1045 Index: 021_noxul-mips-fpic.patch
1046 ===================================================================
1047 Upstream bug: https://bugzilla.mozilla.org/attachment.cgi?id=321598
1048
1049 We've had an issue on debian with the mips xpcom stubs because gcc 4.3 changed
1050 its default from PIC to non-PIC. While the whole c++ code is built as PIC code,
1051 the xptc stubs assembly ends up built as non-PIC.
1052
1053 It would be safer to build the assembly with -fPIC when C++ is built with -fPIC,
1054 to avoid future possible problems with gcc changing its default again on
1055 some random architecture. The attached patch does it for linux, but it might be
1056 necessary to do the same on other architectures.
1057
1058 Patch $Revision: 1.1 $
1059 diff --git a/configure.in b/configure.in
1060 index 3730f0e..516da66 100644
1061 --- a/configure.in
1062 +++ b/configure.in
1063 @@ -1279,6 +1279,7 @@ if test "$GNU_CC"; then
1064 WARNINGS_AS_ERRORS='-Werror'
1065 DSO_CFLAGS=''
1066 DSO_PIC_CFLAGS='-fPIC'
1067 + ASFLAGS="$ASFLAGS -fPIC"
1068 _MOZ_RTTI_FLAGS_ON=${_COMPILER_PREFIX}-frtti
1069 _MOZ_RTTI_FLAGS_OFF=${_COMPILER_PREFIX}-fno-rtti
1070 _MOZ_EXCEPTIONS_FLAGS_ON='-fhandle-exceptions'
1071
1072
1073
1074 1.1 src/patchsets/mozilla-firefox/3.0.2/030-firefox_encode_spaces.patch
1075
1076 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/030-firefox_encode_spaces.patch?rev=1.1&view=markup
1077 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/030-firefox_encode_spaces.patch?rev=1.1&content-type=text/plain
1078
1079 Index: 030-firefox_encode_spaces.patch
1080 ===================================================================
1081 # Upstream bug 440075
1082 diff --git a/browser/base/content/urlbarBindings.xml b/browser/base/content/urlbarBindings.xml
1083 --- a/browser/base/content/urlbarBindings.xml
1084 +++ b/browser/base/content/urlbarBindings.xml
1085 @@ -139,54 +139,55 @@
1086 // haven't seen that, so hopefully that behavior has changed.
1087 flavourSet.appendFlavour("text/x-moz-url");
1088 flavourSet.appendFlavour("text/unicode");
1089 flavourSet.appendFlavour("application/x-moz-file", "nsIFile");
1090 return flavourSet;
1091 ]]></body>
1092 </method>
1093
1094 + <method name="_getSelectedValueForClipboard">
1095 + <body><![CDATA[
1096 + var val = this.value.substring(this.selectionStart, this.selectionEnd);
1097 +
1098 + // If the entire value is selected and it's a valid non-javascript,
1099 + // non-data URI, encode it.
1100 + if (val == this.value &&
1101 + this.getAttribute("pageproxystate") == "valid") {
1102 + let uri;
1103 + let ioService = Cc["@mozilla.org/network/io-service;1"]
1104 + .getService(Ci.nsIIOService);
1105 + try {
1106 + uri = ioService.newURI(val, null, null);
1107 + } catch (e) {}
1108 + if (uri && !uri.schemeIs("javascript") && !uri.schemeIs("data"))
1109 + val = uri.spec;
1110 + }
1111 +
1112 + return val;
1113 + ]]></body>
1114 + </method>
1115 +
1116 <field name="_copyCutController"><![CDATA[
1117 ({
1118 urlbar: this,
1119 doCommand: function(aCommand) {
1120 var urlbar = this.urlbar;
1121 - var start = urlbar.selectionStart;
1122 - var end = urlbar.selectionEnd;
1123 - if (start == end)
1124 + var val = urlbar._getSelectedValueForClipboard();
1125 + if (!val)
1126 return;
1127 - var val;
1128 - if (start == 0 && end == urlbar.textLength) {
1129 - val = urlbar.value;
1130
1131 - // If the entire value is selected and it's a valid non-javascript,
1132 - // non-data URI, encode it.
1133 - var uri;
1134 - if (urlbar.getAttribute("pageproxystate") == "valid") {
1135 - var ioService = Cc["@mozilla.org/network/io-service;1"]
1136 - .getService(Ci.nsIIOService);
1137 - try {
1138 - uri = ioService.newURI(val, null, null);
1139 - } catch (e) {}
1140 - }
1141 - if (uri && !uri.schemeIs("javascript") && !uri.schemeIs("data"))
1142 - val = uri.spec;
1143 + if (aCommand == "cmd_cut" && this.isCommandEnabled(aCommand)) {
1144 + let start = urlbar.selectionStart;
1145 + let end = urlbar.selectionEnd;
1146 + urlbar.value = urlbar.value.substring(0, start) + urlbar.value.substring(end);
1147 + urlbar.selectionStart = urlbar.selectionEnd = start;
1148 + SetPageProxyState("invalid");
1149 + }
1150
1151 - if (aCommand == "cmd_cut" && this.isCommandEnabled(aCommand)) {
1152 - urlbar.value = "";
1153 - SetPageProxyState("invalid");
1154 - }
1155 - } else {
1156 - val = urlbar.value.substring(start, end);
1157 - if (aCommand == "cmd_cut" && this.isCommandEnabled(aCommand)) {
1158 - urlbar.value = urlbar.value.substring(0, start) + urlbar.value.substring(end);
1159 - urlbar.selectionStart = urlbar.selectionEnd = start;
1160 - SetPageProxyState("invalid");
1161 - }
1162 - }
1163 Cc["@mozilla.org/widget/clipboardhelper;1"]
1164 .getService(Ci.nsIClipboardHelper)
1165 .copyString(val);
1166 },
1167 supportsCommand: function(aCommand) {
1168 switch (aCommand) {
1169 case "cmd_copy":
1170 case "cmd_cut":
1171 @@ -268,16 +269,30 @@
1172 </setter>
1173 </property>
1174 </implementation>
1175
1176 <handlers>
1177 <handler event="focus" phase="capturing" action="this._hideURLTooltip();"/>
1178 <handler event="dragover" phase="capturing" action="nsDragAndDrop.dragOver(event, this);"/>
1179 <handler event="dragdrop" phase="capturing" action="nsDragAndDrop.drop(event, this);"/>
1180 + <handler event="select"><![CDATA[
1181 + if (!Cc["@mozilla.org/widget/clipboard;1"]
1182 + .getService(Ci.nsIClipboard)
1183 + .supportsSelectionClipboard())
1184 + return;
1185 +
1186 + var val = this._getSelectedValueForClipboard();
1187 + if (!val)
1188 + return;
1189 +
1190 + Cc["@mozilla.org/widget/clipboardhelper;1"]
1191 + .getService(Ci.nsIClipboardHelper)
1192 + .copyStringToClipboard(val, Ci.nsIClipboard.kSelectionClipboard);
1193 + ]]></handler>
1194 </handlers>
1195
1196 </binding>
1197
1198 <!-- Note: this binding is applied to the autocomplete popup used in the Search bar and in web page content -->
1199 <binding id="browser-autocomplete-result-popup" extends="chrome://global/content/bindings/autocomplete.xml#autocomplete-result-popup">
1200 <implementation>
1201 <method name="openAutocompletePopup">
1202
1203
1204
1205 1.1 src/patchsets/mozilla-firefox/3.0.2/055_firefox-2.0_gfbsd-pthreads.patch
1206
1207 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/055_firefox-2.0_gfbsd-pthreads.patch?rev=1.1&view=markup
1208 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/055_firefox-2.0_gfbsd-pthreads.patch?rev=1.1&content-type=text/plain
1209
1210 Index: 055_firefox-2.0_gfbsd-pthreads.patch
1211 ===================================================================
1212 # https://bugs.gentoo.org/show_bug.cgi?id=169825
1213
1214 --- mozilla/config/rules.mk.orig Thu Sep 14 14:07:03 2006
1215 +++ mozilla/config/rules.mk Wed Oct 18 11:00:09 2006
1216 @@ -442,9 +442,7 @@
1217 endif
1218
1219 ifeq ($(OS_ARCH),FreeBSD)
1220 -ifdef IS_COMPONENT
1221 -EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
1222 -endif
1223 +EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic -lc
1224 endif
1225
1226 ifeq ($(OS_ARCH),NetBSD)
1227 --- mozilla/configure.in.orig 2007-02-06 02:37:37 -0300
1228 +++ mozilla/configure.in 2007-03-07 15:35:41 -0300
1229 @@ -2667,7 +2667,7 @@
1230 *-hpux11.*)
1231 ;;
1232 *)
1233 - AC_CHECK_LIB(c_r, gethostbyname_r)
1234 + AC_SEARCH_LIBS([gethostbyname_r], [c_r])
1235 ;;
1236 esac
1237 AC_CHECK_LIB(m, atan)
1238 --- mozilla/configure.in.orig 2007-02-06 02:37:37 -0300
1239 +++ mozilla/configure.in 2007-03-07 13:59:53 -0300
1240 @@ -2839,11 +2839,12 @@
1241 *-*-freebsd*)
1242 AC_DEFINE(_REENTRANT)
1243 AC_DEFINE(_THREAD_SAFE)
1244 - dnl -pthread links in -lc_r, so don't specify it explicitly.
1245 - if test "$ac_cv_have_dash_pthread" = "yes"; then
1246 - _PTHREAD_LDFLAGS="-pthread"
1247 + dnl use the environment PTHREAD_LIBS
1248 + if test -n "$PTHREAD_LIBS"; then
1249 + _PTHREAD_LDFLAGS="$PTHREAD_LIBS"
1250 else
1251 - _PTHREAD_LDFLAGS="-lc_r"
1252 + _PTHREAD_LDFLAGS="-lpthread"
1253 fi
1254 + LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}"
1255 ;;
1256
1257
1258
1259 1.1 src/patchsets/mozilla-firefox/3.0.2/063_firefox-rpath-3.patch
1260
1261 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/063_firefox-rpath-3.patch?rev=1.1&view=markup
1262 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/063_firefox-rpath-3.patch?rev=1.1&content-type=text/plain
1263
1264 Index: 063_firefox-rpath-3.patch
1265 ===================================================================
1266 # Gentoo http://bugs.gentoo.org/show_bug.cgi?id=100597
1267
1268 --- mozilla/config/rules.mk.orig 2006-07-07 06:13:36.000000000 +0200
1269 +++ mozilla/config/rules.mk 2006-07-19 13:22:04.000000000 +0200
1270 @@ -510,7 +510,12 @@
1271 #
1272 ifeq ($(OS_ARCH),Linux)
1273 ifdef IS_COMPONENT
1274 +DSO_LDOPTS += -Wl,-rpath,'$$ORIGIN:$$ORIGIN/..'
1275 +OS_LDFLAGS += -Wl,-rpath,'$$ORIGIN:$$ORIGIN/..'
1276 EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
1277 +else
1278 +DSO_LDOPTS += -Wl,-rpath,'$$ORIGIN'
1279 +OS_LDFLAGS += -Wl,-rpath,'$$ORIGIN'
1280 endif
1281 endif
1282
1283
1284
1285
1286 1.1 src/patchsets/mozilla-firefox/3.0.2/064_noxul-nsplugins-v3.patch
1287
1288 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/064_noxul-nsplugins-v3.patch?rev=1.1&view=markup
1289 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/064_noxul-nsplugins-v3.patch?rev=1.1&content-type=text/plain
1290
1291 Index: 064_noxul-nsplugins-v3.patch
1292 ===================================================================
1293 # Gentoo's Add a search path for plugins. by agriffis
1294
1295 --- xpcom/io/nsAppFileLocationProvider.cpp.original 2007-02-14 00:59:21.000000000 +0100
1296 +++ xpcom/io/nsAppFileLocationProvider.cpp 2007-02-14 01:17:35.000000000 +0100
1297 @@ -205,6 +205,14 @@
1298 if (NS_SUCCEEDED(rv))
1299 rv = localFile->AppendRelativeNativePath(PLUGINS_DIR_NAME);
1300 }
1301 + else if (nsCRT::strcmp(prop, GENTOO_NSPLUGINS_DIR) == 0)
1302 + {
1303 + rv = NS_NewNativeLocalFile(nsDependentCString(GENTOO_NSPLUGINS_DIR), PR_TRUE, getter_AddRefs(localFile));
1304 + }
1305 + else if (nsCRT::strcmp(prop, GENTOO_NSBROWSER_PLUGINS_DIR) == 0)
1306 + {
1307 + rv = NS_NewNativeLocalFile(nsDependentCString(GENTOO_NSBROWSER_PLUGINS_DIR), PR_TRUE, getter_AddRefs(localFile));
1308 + }
1309 #ifdef XP_MACOSX
1310 else if (nsCRT::strcmp(prop, NS_MACOSX_USER_PLUGIN_DIR) == 0)
1311 {
1312 @@ -592,7 +600,7 @@
1313
1314 *_retval = new nsAppDirectoryEnumerator(this, keys);
1315 #else
1316 - static const char* keys[] = { nsnull, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, nsnull };
1317 + static const char* keys[] = { nsnull, GENTOO_NSPLUGINS_DIR, GENTOO_NSBROWSER_PLUGINS_DIR, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, nsnull };
1318 if (!keys[0] && !(keys[0] = PR_GetEnv("MOZ_PLUGIN_PATH"))) {
1319 static const char nullstr = 0;
1320 keys[0] = &nullstr;
1321
1322
1323
1324 1.1 src/patchsets/mozilla-firefox/3.0.2/068_noxul-nss-gentoo-fix.patch
1325
1326 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/068_noxul-nss-gentoo-fix.patch?rev=1.1&view=markup
1327 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/068_noxul-nss-gentoo-fix.patch?rev=1.1&content-type=text/plain
1328
1329 Index: 068_noxul-nss-gentoo-fix.patch
1330 ===================================================================
1331 --- security/manager/ssl/src/nsNSSComponent.cpp.orig 2007-05-27 21:04:27.000000000 +0200
1332 +++ security/manager/ssl/src/nsNSSComponent.cpp 2007-05-27 21:17:56.000000000 +0200
1333 @@ -130,6 +130,8 @@
1334
1335 #define NS_CRYPTO_HASH_BUFFER_SIZE 4096
1336
1337 +#define GENTOO_NSS_LIBDIR NS_LITERAL_CSTRING ("nss")
1338 +
1339 static NS_DEFINE_CID(kNSSComponentCID, NS_NSSCOMPONENT_CID);
1340 int nsNSSComponent::mInstanceCount = 0;
1341
1342 @@ -708,11 +710,11 @@
1343 return;
1344
1345 const char *possible_ckbi_locations[] = {
1346 - NS_XPCOM_CURRENT_PROCESS_DIR,
1347 - NS_GRE_DIR,
1348 - 0 // This special value means:
1349 + 0,// This special value means:
1350 // search for ckbi in the directories on the shared
1351 // library/DLL search path
1352 + NS_XPCOM_CURRENT_PROCESS_DIR,
1353 + NS_GRE_DIR
1354 };
1355
1356 for (size_t il = 0; il < sizeof(possible_ckbi_locations)/sizeof(const char*); ++il) {
1357 @@ -721,7 +723,16 @@
1358
1359 if (!possible_ckbi_locations[il])
1360 {
1361 - fullLibraryPath = PR_GetLibraryName(nsnull, "nssckbi");
1362 +
1363 + directoryService->Get( NS_UNIX_LIB_DIR,
1364 + NS_GET_IID(nsILocalFile),
1365 + getter_AddRefs(mozFile));
1366 +
1367 + if (!mozFile) {
1368 + continue;
1369 + }
1370 +
1371 + mozFile->AppendNative(GENTOO_NSS_LIBDIR);
1372 }
1373 else
1374 {
1375 @@ -733,11 +744,12 @@
1376 continue;
1377 }
1378
1379 - nsCAutoString processDir;
1380 - mozFile->GetNativePath(processDir);
1381 - fullLibraryPath = PR_GetLibraryName(processDir.get(), "nssckbi");
1382 }
1383
1384 + nsCAutoString processDir;
1385 + mozFile->GetNativePath(processDir);
1386 + fullLibraryPath = PR_GetLibraryName(processDir.get(), "nssckbi");
1387 +
1388 if (!fullLibraryPath) {
1389 continue;
1390 }
1391 --- config/config.mk.orig 2007-05-27 23:32:35.000000000 +0200
1392 +++ config/config.mk 2007-05-27 23:34:30.000000000 +0200
1393 @@ -778,6 +778,7 @@
1394
1395 DEFINES += -DOSTYPE=\"$(OS_CONFIG)\"
1396 DEFINES += -DOSARCH=$(OS_ARCH)
1397 +DEFINES += -DGENTOO_LIB_DIR=\"$(libdir)\"
1398
1399 # For profiling
1400 ifdef ENABLE_EAZEL_PROFILER
1401 --- xpcom/io/SpecialSystemDirectory.cpp.orig 2007-05-27 23:36:29.000000000 +0200
1402 +++ xpcom/io/SpecialSystemDirectory.cpp 2007-05-27 23:37:48.000000000 +0200
1403 @@ -560,7 +560,7 @@
1404 PR_TRUE,
1405 aFile);
1406 case Unix_LibDirectory:
1407 - return NS_NewNativeLocalFile(nsDependentCString("/usr/local/lib/netscape/"),
1408 + return NS_NewNativeLocalFile(nsDependentCString(GENTOO_LIB_DIR),
1409 PR_TRUE,
1410 aFile);
1411
1412
1413
1414
1415 1.1 src/patchsets/mozilla-firefox/3.0.2/100-system-hunspell-corrections.patch
1416
1417 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/100-system-hunspell-corrections.patch?rev=1.1&view=markup
1418 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/100-system-hunspell-corrections.patch?rev=1.1&content-type=text/plain
1419
1420 Index: 100-system-hunspell-corrections.patch
1421 ===================================================================
1422 --- ./extensions/spellcheck/hunspell/src/mozHunspell.cpp.orig 2008-02-15 19:21:21.000000000 +0000
1423 +++ ./extensions/spellcheck/hunspell/src/mozHunspell.cpp 2008-02-15 19:23:20.000000000 +0000
1424 @@ -63,6 +63,9 @@
1425 #include "nsISimpleEnumerator.h"
1426 #include "nsIDirectoryEnumerator.h"
1427 #include "nsIFile.h"
1428 +#ifdef MOZ_NATIVE_HUNSPELL
1429 +#include "nsILocalFile.h"
1430 +#endif
1431 #include "nsDirectoryServiceUtils.h"
1432 #include "nsDirectoryServiceDefs.h"
1433 #include "mozISpellI18NManager.h"
1434 @@ -307,7 +310,16 @@
1435 return;
1436
1437 nsCOMPtr<nsIFile> dictDir;
1438 - rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY,
1439 + #ifdef MOZ_NATIVE_HUNSPELL
1440 + nsCOMPtr<nsILocalFile> localFile;
1441 + rv = NS_NewNativeLocalFile(nsDependentCString("/usr/share/myspell"),PR_TRUE, getter_AddRefs(localFile));
1442 + if (localFile && NS_SUCCEEDED(rv)) {
1443 + localFile->QueryInterface(NS_GET_IID(nsIFile), getter_AddRefs(dictDir));
1444 + LoadDictionariesFromDir(dictDir);
1445 + }
1446 + else {
1447 + #endif
1448 + rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY,
1449 NS_GET_IID(nsIFile), getter_AddRefs(dictDir));
1450 if (NS_SUCCEEDED(rv)) {
1451 LoadDictionariesFromDir(dictDir);
1452 @@ -332,6 +344,9 @@
1453 LoadDictionariesFromDir(appDir);
1454 }
1455 }
1456 +#ifdef MOZ_NATIVE_HUNSPELL
1457 + }
1458 +#endif
1459
1460 nsCOMPtr<nsISimpleEnumerator> dictDirs;
1461 rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY_LIST,
1462 --- ./extensions/spellcheck/src/Makefile.in.orig 2008-02-15 19:25:58.000000000 +0000
1463 +++ ./extensions/spellcheck/src/Makefile.in 2008-02-15 19:28:36.000000000 +0000
1464 @@ -63,9 +63,16 @@
1465 txtsvc \
1466 uconv \
1467 unicharutil \
1468 + xulapp \
1469 $(NULL)
1470
1471 -CPPSRCS = \
1472 +ifdef MOZ_NATIVE_HUNSPELL
1473 +CPPSRCS += mozHunspell.cpp
1474 +ifdef MOZ_XUL_APP
1475 +CPPSRCS += mozHunspellDirProvider.cpp
1476 +endif
1477 +endif
1478 +CPPSRCS += \
1479 mozSpellCheckerFactory.cpp \
1480 mozSpellChecker.cpp \
1481 mozPersonalDictionary.cpp \
1482 @@ -80,8 +87,14 @@
1483 SHARED_LIBRARY_LIBS += ../osxspell/src/$(LIB_PREFIX)osxspell_s.$(LIB_SUFFIX)
1484 LOCAL_INCLUDES += -I$(srcdir)/../osxspell/src
1485 else
1486 +ifndef MOZ_NATIVE_HUNSPELL
1487 SHARED_LIBRARY_LIBS += ../hunspell/src/$(LIB_PREFIX)hunspell_s.$(LIB_SUFFIX)
1488 LOCAL_INCLUDES += -I$(srcdir)/../hunspell/src
1489 +else
1490 +LOCAL_INCLUDES += $(MOZ_HUNSPELL_CFLAGS) \
1491 + -DMOZ_NATIVE_HUNSPELL \
1492 + $(NULL)
1493 +endif
1494 endif
1495
1496 EXTRA_DSO_LDOPTS = \
1497 @@ -96,3 +112,18 @@
1498 LOCAL_INCLUDES += \
1499 -I$(topsrcdir)/xpcom/io \
1500 $(NULL)
1501 +
1502 +ifdef MOZ_NATIVE_HUNSPELL
1503 +export:: $(srcdir)/../hunspell/src/mozHunspell.cpp
1504 + $(INSTALL) $(srcdir)/../hunspell/src/mozHunspell.* .
1505 +GARBAGE += mozHunspell.$(OBJ_SUFFIX) mozHunspell.cpp
1506 +clean::
1507 + rm -f mozHunspell.*
1508 +ifdef MOZ_XUL_APP
1509 +export:: $(srcdir)/../hunspell/src/mozHunspellDirProvider.cpp
1510 + $(INSTALL) $(srcdir)/../hunspell/src/mozHunspellDirProvider.* .
1511 +GARBAGE += mozHunspellDirProvider.$(OBJ_SUFFIX) mozHunspellDirProvider.cpp
1512 +clean::
1513 + rm -f mozHunspellDirProvider.*
1514 +endif
1515 +endif
1516 --- ./extensions/spellcheck/Makefile.in.orig 2008-02-15 19:23:39.000000000 +0000
1517 +++ ./extensions/spellcheck/Makefile.in 2008-02-15 19:24:34.000000000 +0000
1518 @@ -42,13 +42,19 @@
1519 include $(DEPTH)/config/autoconf.mk
1520
1521 MODULE = spellchecker
1522 -DIRS = idl locales
1523 +ifndef MOZ_NATIVE_HUNSPELL
1524 +DIRS = idl locales
1525 +else
1526 +DIRS = idl
1527 +endif
1528
1529 ifeq (camino,$(MOZ_BUILD_APP))
1530 DIRS += osxspell
1531 else
1532 +ifndef MOZ_NATIVE_HUNSPELL
1533 DIRS += hunspell
1534 endif
1535 +endif
1536
1537 DIRS += src
1538
1539
1540
1541 1.1 src/patchsets/mozilla-firefox/3.0.2/150_passwordmgr-fix.patch
1542
1543 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/150_passwordmgr-fix.patch?rev=1.1&view=markup
1544 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/150_passwordmgr-fix.patch?rev=1.1&content-type=text/plain
1545
1546 Index: 150_passwordmgr-fix.patch
1547 ===================================================================
1548 # Upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=454993
1549
1550 --- toolkit/components/passwordmgr/src/storage-Legacy.js.orig 2008-09-24 15:04:27.000000000 +0000
1551 +++ toolkit/components/passwordmgr/src/storage-Legacy.js 2008-09-24 15:06:18.000000000 +0000
1552 @@ -850,7 +850,11 @@
1553
1554 do {
1555 var hasMore = lineStream.readLine(line);
1556 - line.value = this._utfConverter.ConvertToUnicode(line.value);
1557 + try {
1558 + line.value = this._utfConverter.ConvertToUnicode(line.value);
1559 + } catch (e) {
1560 + this.log("Bad UTF8 conversion: " + line.value);
1561 + }
1562
1563 switch (parseState) {
1564 // Check file header
1565
1566
1567
1568 1.1 src/patchsets/mozilla-firefox/3.0.2/300-xulonly-gnome_firefox_default_browser.patch
1569
1570 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/300-xulonly-gnome_firefox_default_browser.patch?rev=1.1&view=markup
1571 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/300-xulonly-gnome_firefox_default_browser.patch?rev=1.1&content-type=text/plain
1572
1573 Index: 300-xulonly-gnome_firefox_default_browser.patch
1574 ===================================================================
1575 ---
1576 browser/components/shell/src/nsGNOMEShellService.cpp | 16 ++++++++++++++--
1577 1 file changed, 14 insertions(+), 2 deletions(-)
1578
1579 Index: mozilla/browser/components/shell/src/nsGNOMEShellService.cpp
1580 ===================================================================
1581 --- mozilla.orig/browser/components/shell/src/nsGNOMEShellService.cpp
1582 +++ mozilla/browser/components/shell/src/nsGNOMEShellService.cpp
1583 @@ -62,16 +62,18 @@
1584 #endif
1585
1586 #include <glib.h>
1587 #include <glib-object.h>
1588 #include <gdk-pixbuf/gdk-pixbuf.h>
1589 #include <limits.h>
1590 #include <stdlib.h>
1591
1592 +#define SYSTEM_PATH_BUILD 1
1593 +
1594 struct ProtocolAssociation
1595 {
1596 const char *name;
1597 PRBool essential;
1598 };
1599
1600 struct MimeTypeAssociation
1601 {
1602 @@ -135,17 +137,16 @@
1603 return appPath->GetNativePath(mAppPath);
1604 }
1605
1606 NS_IMPL_ISUPPORTS1(nsGNOMEShellService, nsIShellService)
1607
1608 PRBool
1609 nsGNOMEShellService::KeyMatchesAppName(const char *aKeyValue) const
1610 {
1611 -
1612 gchar *commandPath;
1613 if (mUseLocaleFilenames) {
1614 gchar *nativePath = g_filename_from_utf8(aKeyValue, -1, NULL, NULL, NULL);
1615 if (!nativePath) {
1616 NS_ERROR("Error converting path to filesystem encoding");
1617 return PR_FALSE;
1618 }
1619
1620 @@ -153,19 +154,25 @@
1621 g_free(nativePath);
1622 } else {
1623 commandPath = g_find_program_in_path(aKeyValue);
1624 }
1625
1626 if (!commandPath)
1627 return PR_FALSE;
1628
1629 +#ifdef SYSTEM_PATH_BUILD
1630 + PRBool matches = NS_LITERAL_CSTRING("/usr/bin/" MOZ_APP_NAME).Equals(commandPath);
1631 + g_free(commandPath);
1632 + return matches;
1633 +#else
1634 PRBool matches = mAppPath.Equals(commandPath);
1635 g_free(commandPath);
1636 return matches;
1637 +#endif
1638 }
1639
1640 NS_IMETHODIMP
1641 nsGNOMEShellService::IsDefaultBrowser(PRBool aStartupCheck,
1642 PRBool* aIsDefaultBrowser)
1643 {
1644 *aIsDefaultBrowser = PR_FALSE;
1645 if (aStartupCheck)
1646 @@ -211,18 +218,23 @@
1647 #ifdef DEBUG
1648 if (aForAllUsers)
1649 NS_WARNING("Setting the default browser for all users is not yet supported");
1650 #endif
1651
1652 nsCOMPtr<nsIGConfService> gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
1653
1654 nsCAutoString schemeList;
1655 +
1656 +#ifdef SYSTEM_PATH_BUILD
1657 + nsCAutoString appKeyValue(NS_LITERAL_CSTRING("/usr/bin/" MOZ_APP_NAME));
1658 +#else
1659 nsCAutoString appKeyValue(mAppPath);
1660 - appKeyValue.Append(" \"%s\"");
1661 +#endif
1662 + appKeyValue.Append(" %s");
1663 unsigned int i;
1664
1665 for (i = 0; i < NS_ARRAY_LENGTH(appProtocols); ++i) {
1666 schemeList.Append(nsDependentCString(appProtocols[i].name));
1667 schemeList.Append(',');
1668
1669 if (appProtocols[i].essential || aClaimAllTypes) {
1670 gconf->SetAppForProtocol(nsDependentCString(appProtocols[i].name),
1671
1672
1673
1674 1.1 src/patchsets/mozilla-firefox/3.0.2/667_typeahead-broken-v4.patch
1675
1676 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/667_typeahead-broken-v4.patch?rev=1.1&view=markup
1677 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/667_typeahead-broken-v4.patch?rev=1.1&content-type=text/plain
1678
1679 Index: 667_typeahead-broken-v4.patch
1680 ===================================================================
1681 --- extensions/typeaheadfind/src/Makefile.in.orig 2007-06-19 22:55:23.000000000 +0200
1682 +++ extensions/typeaheadfind/src/Makefile.in 2007-06-19 22:58:33.000000000 +0200
1683 @@ -46,8 +46,7 @@
1684 ifneq ($(OS_ARCH),WINNT)
1685 SHORT_LIBNAME = typahead
1686 endif
1687 -GRE_MODULE = 1
1688 -MOZILLA_INTERNAL_API = 1
1689 +LIBXUL_LIBRARY = 1
1690
1691 PACKAGE_FILE = typeaheadfind.pkg
1692
1693 @@ -84,9 +83,6 @@
1694 nsTypeAheadFindRegistration.cpp \
1695 $(NULL)
1696
1697 -EXTRA_DSO_LIBS = \
1698 - gkgfx \
1699 - $(NULL)
1700
1701 EXTRA_DSO_LDOPTS += \
1702 $(LIBS_DIR) \
1703 --- extensions/typeaheadfind/public/nsITypeAheadFind.idl 2007-08-05 20:29:55.000000000 +0200
1704 +++ /dev/null 2007-08-04 01:52:23.948566729 +0200
1705 @@ -1,88 +0,0 @@
1706 -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
1707 -/* ***** BEGIN LICENSE BLOCK *****
1708 - * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1709 - *
1710 - * The contents of this file are subject to the Mozilla Public License Version
1711 - * 1.1 (the "License"); you may not use this file except in compliance with
1712 - * the License. You may obtain a copy of the License at
1713 - * http://www.mozilla.org/MPL/
1714 - *
1715 - * Software distributed under the License is distributed on an "AS IS" basis,
1716 - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1717 - * for the specific language governing rights and limitations under the
1718 - * License.
1719 - *
1720 - * The Original Code is mozilla.org code.
1721 - *
1722 - * The Initial Developer of the Original Code is
1723 - * Netscape Communications Corporation.
1724 - * Portions created by the Initial Developer are Copyright (C) 1998
1725 - * the Initial Developer. All Rights Reserved.
1726 - *
1727 - * Contributor(s):
1728 - * Original Author: Aaron Leventhal (aaronl@××××××××.com)
1729 - *
1730 - * Alternatively, the contents of this file may be used under the terms of
1731 - * either the GNU General Public License Version 2 or later (the "GPL"), or
1732 - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1733 - * in which case the provisions of the GPL or the LGPL are applicable instead
1734 - * of those above. If you wish to allow use of your version of this file only
1735 - * under the terms of either the GPL or the LGPL, and not to allow others to
1736 - * use your version of this file under the terms of the MPL, indicate your
1737 - * decision by deleting the provisions above and replace them with the notice
1738 - * and other provisions required by the GPL or the LGPL. If you do not delete
1739 - * the provisions above, a recipient may use your version of this file under
1740 - * the terms of any one of the MPL, the GPL or the LGPL.
1741 - *
1742 - * ***** END LICENSE BLOCK ***** */
1743 -
1744 -#include "nsISupports.idl"
1745 -#include "domstubs.idl"
1746 -#include "nsISupportsPrimitives.idl"
1747 -
1748 -%{ C++
1749 - #include "nsIDOMEvent.h"
1750 -
1751 - #define NS_TYPEAHEADFIND_CID \
1752 - {0x46590685, 0xbc00, 0x4aac, {0xab, 0xed, 0x2c, 0x10, 0xa5, 0xb9, 0x45, 0xa4}}
1753 -
1754 - #define NS_TYPEAHEADFIND_CONTRACTID "@mozilla.org/suitetypeaheadfind;1"
1755 -%}
1756 -
1757 -interface nsIDOMEvent;
1758 -
1759 -[scriptable, uuid(AD1C62CC-72F4-4c5b-BE78-503854F9E0D8)]
1760 -interface nsISuiteTypeAheadFind : nsISupports
1761 -{
1762 - /** Is type ahead find mode currently on? */
1763 - readonly attribute boolean isActive;
1764 -
1765 - /** Manually start type ahead find mode */
1766 - void startNewFind(in nsIDOMWindow aWindow, in boolean aLinksOnly);
1767 -
1768 - /** Manually cancel type ahead find mode */
1769 - void cancelFind();
1770 -
1771 - /**
1772 - * Will find as you type start automatically if the user
1773 - * types with the focus on page content other than a textfield or select?
1774 - * If autostart is off, the startNewFind() method can be used to enact
1775 - * type ahead find, as well as cmd_findTypeLinks or cmd_findTypeText.
1776 - */
1777 - void setAutoStart(in nsIDOMWindow aWindow, in boolean aIsAutoStartOn);
1778 - boolean getAutoStart(in nsIDOMWindow aWindow);
1779 -
1780 - /**
1781 - * Find next recurrence if typeaheadfind was the last used find,
1782 - * as opposed to regular find. Returns false in nsISupportsPRBool if we
1783 - * don't handle the request.
1784 - */
1785 - void findNext(in boolean aReverse, in nsISupportsInterfacePointer aCallerWindowSupports);
1786 -
1787 - /*
1788 - * Go back and remove one character from find string
1789 - * Returns true if backspace used
1790 - */
1791 - boolean backOneChar();
1792 -};
1793 -
1794 --- /dev/null 2007-08-04 01:52:23.948566729 +0200
1795 +++ extensions/typeaheadfind/public/nsISuiteTypeAheadFind.idl 2007-08-05 20:07:55.000000000 +0200
1796 @@ -0,0 +1,88 @@
1797 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
1798 +/* ***** BEGIN LICENSE BLOCK *****
1799 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1800 + *
1801 + * The contents of this file are subject to the Mozilla Public License Version
1802 + * 1.1 (the "License"); you may not use this file except in compliance with
1803 + * the License. You may obtain a copy of the License at
1804 + * http://www.mozilla.org/MPL/
1805 + *
1806 + * Software distributed under the License is distributed on an "AS IS" basis,
1807 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1808 + * for the specific language governing rights and limitations under the
1809 + * License.
1810 + *
1811 + * The Original Code is mozilla.org code.
1812 + *
1813 + * The Initial Developer of the Original Code is
1814 + * Netscape Communications Corporation.
1815 + * Portions created by the Initial Developer are Copyright (C) 1998
1816 + * the Initial Developer. All Rights Reserved.
1817 + *
1818 + * Contributor(s):
1819 + * Original Author: Aaron Leventhal (aaronl@××××××××.com)
1820 + *
1821 + * Alternatively, the contents of this file may be used under the terms of
1822 + * either the GNU General Public License Version 2 or later (the "GPL"), or
1823 + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1824 + * in which case the provisions of the GPL or the LGPL are applicable instead
1825 + * of those above. If you wish to allow use of your version of this file only
1826 + * under the terms of either the GPL or the LGPL, and not to allow others to
1827 + * use your version of this file under the terms of the MPL, indicate your
1828 + * decision by deleting the provisions above and replace them with the notice
1829 + * and other provisions required by the GPL or the LGPL. If you do not delete
1830 + * the provisions above, a recipient may use your version of this file under
1831 + * the terms of any one of the MPL, the GPL or the LGPL.
1832 + *
1833 + * ***** END LICENSE BLOCK ***** */
1834 +
1835 +#include "nsISupports.idl"
1836 +#include "domstubs.idl"
1837 +#include "nsISupportsPrimitives.idl"
1838 +
1839 +%{ C++
1840 + #include "nsIDOMEvent.h"
1841 +
1842 + #define NS_TYPEAHEADFIND_CID \
1843 + {0x46590685, 0xbc00, 0x4aac, {0xab, 0xed, 0x2c, 0x10, 0xa5, 0xb9, 0x45, 0xa4}}
1844 +
1845 + #define NS_TYPEAHEADFIND_CONTRACTID "@mozilla.org/suitetypeaheadfind;1"
1846 +%}
1847 +
1848 +interface nsIDOMEvent;
1849 +
1850 +[scriptable, uuid(AD1C62CC-72F4-4c5b-BE78-503854F9E0D8)]
1851 +interface nsISuiteTypeAheadFind : nsISupports
1852 +{
1853 + /** Is type ahead find mode currently on? */
1854 + readonly attribute boolean isActive;
1855 +
1856 + /** Manually start type ahead find mode */
1857 + void startNewFind(in nsIDOMWindow aWindow, in boolean aLinksOnly);
1858 +
1859 + /** Manually cancel type ahead find mode */
1860 + void cancelFind();
1861 +
1862 + /**
1863 + * Will find as you type start automatically if the user
1864 + * types with the focus on page content other than a textfield or select?
1865 + * If autostart is off, the startNewFind() method can be used to enact
1866 + * type ahead find, as well as cmd_findTypeLinks or cmd_findTypeText.
1867 + */
1868 + void setAutoStart(in nsIDOMWindow aWindow, in boolean aIsAutoStartOn);
1869 + boolean getAutoStart(in nsIDOMWindow aWindow);
1870 +
1871 + /**
1872 + * Find next recurrence if typeaheadfind was the last used find,
1873 + * as opposed to regular find. Returns false in nsISupportsPRBool if we
1874 + * don't handle the request.
1875 + */
1876 + void findNext(in boolean aReverse, in nsISupportsInterfacePointer aCallerWindowSupports);
1877 +
1878 + /*
1879 + * Go back and remove one character from find string
1880 + * Returns true if backspace used
1881 + */
1882 + boolean backOneChar();
1883 +};
1884 +
1885 --- extensions/typeaheadfind/src/nsTypeAheadFind.h.orig 2007-08-05 20:27:01.000000000 +0200
1886 +++ extensions/typeaheadfind/src/nsTypeAheadFind.h 2007-08-05 20:27:12.000000000 +0200
1887 @@ -60,7 +60,7 @@
1888 #include "nsIDOMRange.h"
1889 #include "nsIDOMWindow.h"
1890 #include "nsIDocShellTreeItem.h"
1891 -#include "nsITypeAheadFind.h"
1892 +#include "nsISuiteTypeAheadFind.h"
1893 #include "nsIStringBundle.h"
1894 #include "nsISupportsArray.h"
1895 #include "nsISound.h"
1896 --- extensions/typeaheadfind/public/Makefile.in.orig 2008-02-09 15:11:25.000000000 +0100
1897 +++ extensions/typeaheadfind/public/Makefile.in 2008-02-09 15:12:54.000000000 +0100
1898 @@ -45,6 +45,6 @@
1899 XPIDL_MODULE=suitetypeaheadfind
1900 GRE_MODULE = 1
1901
1902 -XPIDLSRCS = nsITypeAheadFind.idl
1903 +XPIDLSRCS = nsISuiteTypeAheadFind.idl
1904
1905 include $(topsrcdir)/config/rules.mk
1906
1907
1908
1909 1.1 src/patchsets/mozilla-firefox/3.0.2/800-noxul-bsd-include.patch
1910
1911 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/800-noxul-bsd-include.patch?rev=1.1&view=markup
1912 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0.2/800-noxul-bsd-include.patch?rev=1.1&content-type=text/plain
1913
1914 Index: 800-noxul-bsd-include.patch
1915 ===================================================================
1916 --- configure.in.old 2007-12-10 12:29:54 +0000
1917 +++ configure.in 2007-12-10 12:38:19 +0000
1918 @@ -2862,6 +2862,7 @@
1919 ;;
1920 *)
1921 AC_CHECK_LIB(m, atan)
1922 + AC_CHECK_HEADER(dlfcn.h, AC_DEFINE(HAVE_DLCNF_H))
1923 AC_CHECK_LIB(dl, dlopen,
1924 AC_CHECK_HEADER(dlfcn.h,
1925 LIBS="-ldl $LIBS"
1926 --- xpcom/base/nsStackWalk.cpp.old 2007-12-10 12:43:02 +0000
1927 +++ xpcom/base/nsStackWalk.cpp 2007-12-10 12:43:51 +0000
1928 @@ -1111,7 +1111,7 @@
1929 #define __USE_GNU
1930 #endif
1931
1932 -#if defined(HAVE_LIBDL) || defined(XP_MACOSX)
1933 +#if defined(HAVE_DLCNF_H) || defined(XP_MACOSX)
1934 #include <dlfcn.h>
1935 #endif