summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2009-04-21 12:58:22 +0000
committertnn <tnn@pkgsrc.org>2009-04-21 12:58:22 +0000
commit6cf38071e745e6e3153ae9b82b2d272b76d4ebe5 (patch)
treeb8fd0bc0b27dd21999b01844b8ca8752ad77b980 /www
parentc005c915a10caa2924eaa7b948f21ee96c7d7d79 (diff)
downloadpkgsrc-6cf38071e745e6e3153ae9b82b2d272b76d4ebe5.tar.gz
Add and update patches to enable building on NetBSD/*ppc.
Most of this work was done by "Kernigh" in PR pkg/39358.
Diffstat (limited to 'www')
-rw-r--r--www/firefox3/TODO5
-rw-r--r--www/firefox3/distinfo11
-rw-r--r--www/firefox3/patches/patch-ac22
-rw-r--r--www/firefox3/patches/patch-bx58
-rw-r--r--www/firefox3/patches/patch-bz154
-rw-r--r--www/firefox3/patches/patch-ca198
-rw-r--r--www/firefox3/patches/patch-cb32
-rw-r--r--www/firefox3/patches/patch-eo18
8 files changed, 467 insertions, 31 deletions
diff --git a/www/firefox3/TODO b/www/firefox3/TODO
index a7f66b11398..fd6758b4bb8 100644
--- a/www/firefox3/TODO
+++ b/www/firefox3/TODO
@@ -7,11 +7,8 @@ Obsolete patches(?):
da dt af ag ah ai aj ak al an ao aq aw by cd cq
ch ci cj ck cl cm cn db dc dd dw ec
-Patches from firefox 2.x that someone with clue needs to look at:
-bz ca
-
Patches that had to be updated to apply cleanly:
-aa ab ac ba bb ap ed de
+aa ab ac ap ba bb bz ca ed de
Patches that are "work in progress" and need to be reviewed/revisited:
wc wd we wf
diff --git a/www/firefox3/distinfo b/www/firefox3/distinfo
index fe5a98a1a46..2ed6b9e02ec 100644
--- a/www/firefox3/distinfo
+++ b/www/firefox3/distinfo
@@ -1,11 +1,11 @@
-$NetBSD: distinfo,v 1.20 2009/04/20 12:13:03 hasso Exp $
+$NetBSD: distinfo,v 1.21 2009/04/21 12:58:22 tnn Exp $
SHA1 (firefox-3.0.8-source.tar.bz2) = 93f82c64ae9c805964fb6459223a1061e2d328fd
RMD160 (firefox-3.0.8-source.tar.bz2) = 2b56dbb881e169ad0a3acad30b8aa0677c03a5e5
Size (firefox-3.0.8-source.tar.bz2) = 37048920 bytes
SHA1 (patch-aa) = f995b5e53fa11ecb659ab2dd10551db1c71cc5f3
SHA1 (patch-ab) = 4a1704e96b74c76adca615fdf2c9069ca17e9d70
-SHA1 (patch-ac) = c814530c1a8574739b7557d007563232b6070c51
+SHA1 (patch-ac) = af80f061bdd918a61197c9c499e7d1f5b7d10ebd
SHA1 (patch-ad) = 20f2184a7e5e98b065e884c67e4c17fc52019a79
SHA1 (patch-ae) = fea251aabc772c3d4ad3044c8295af45cc9cab2d
SHA1 (patch-ap) = 552694ac2d6ca713aec98ec394f1215c048c2392
@@ -19,8 +19,10 @@ SHA1 (patch-br) = 66940666497e82bfb39dcc9381ecd85942ab222c
SHA1 (patch-bs) = 79cb84a5ed67780e124e7c595ee4ae6ffc7617a6
SHA1 (patch-bu) = 0714f658001c363f4abbfb248ac77c4862e3ccf9
SHA1 (patch-bv) = ef06a6a774c9d4da7b3fbf6f4e274ab042926e49
-SHA1 (patch-bx) = 7d524d6d46593ba54f12a75c57822518feee84d0
-SHA1 (patch-cb) = 0929baadba9271ee8960a01997c2ded445fe39a2
+SHA1 (patch-bx) = 498f1c06acc670ba6dc9095ba2ce0d14ccad600c
+SHA1 (patch-bz) = f2f6cf120133b23d1d3f182bce90b1b2fbf81142
+SHA1 (patch-ca) = 7ff10fca5e11433b3016612417c6852db8607eb1
+SHA1 (patch-cb) = d046b6eb23a96f75d339e7b7afbf0316f121d4d5
SHA1 (patch-de) = 18e481c3e69fe95b1af87bc800d93f47388fb60a
SHA1 (patch-df) = 17912d183f754ab6661d2be8092e6a07d142632b
SHA1 (patch-dh) = 7592a6238acd5ef6e802d32103c897acb576825a
@@ -43,6 +45,7 @@ SHA1 (patch-ek) = b94debcf16ba6f0dccc0a812b5e5fa38a150c413
SHA1 (patch-el) = 8a1586e4ebb76f584dc7b1cbc19f0c389ea206f7
SHA1 (patch-em) = 6b8b470fc78a4a56400e77af1057b9266634dcc9
SHA1 (patch-en) = 39926ce5669119c358e8600e2d70d08236e67443
+SHA1 (patch-eo) = 281ec932efe607eee4c020aad3851c2aa44dddd2
SHA1 (patch-wc) = 2de8665ed6c23c26566ca6d50165c0cf413a753d
SHA1 (patch-wd) = fc5c3103ae6f2a2eccc01911a8207f3ca614008b
SHA1 (patch-we) = f7fecce05454e9794ff7a4e7789031a5ef49c42d
diff --git a/www/firefox3/patches/patch-ac b/www/firefox3/patches/patch-ac
index c0c4293e47e..6829143a5ef 100644
--- a/www/firefox3/patches/patch-ac
+++ b/www/firefox3/patches/patch-ac
@@ -1,8 +1,8 @@
-$NetBSD: patch-ac,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
+$NetBSD: patch-ac,v 1.2 2009/04/21 12:58:22 tnn Exp $
---- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2008-02-28 02:21:16.000000000 -0600
-+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in 2008-03-14 14:27:45.000000000 -0500
-@@ -64,14 +64,21 @@
+--- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2008-04-09 08:34:20.000000000 +0200
++++ xpcom/reflect/xptcall/src/md/unix/Makefile.in
+@@ -64,14 +64,21 @@ include $(topsrcdir)/config/config.mk
#
# Lots of Unixish x86 flavors
#
@@ -26,7 +26,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
#
# New code for Linux, et. al., with gcc
# Migrate other platforms here after testing
-@@ -185,7 +192,7 @@
+@@ -185,7 +192,7 @@ endif
# NetBSD/ARM
#
ifeq ($(OS_ARCH),NetBSD)
@@ -35,7 +35,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
CPPSRCS := xptcinvoke_arm_netbsd.cpp xptcstubs_arm_netbsd.cpp
endif
endif
-@@ -240,7 +247,7 @@
+@@ -240,7 +247,7 @@ endif
# NetBSD/m68k
#
ifeq ($(OS_ARCH),NetBSD)
@@ -44,15 +44,19 @@ $NetBSD: patch-ac,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
CPPSRCS := xptcinvoke_netbsd_m68k.cpp xptcstubs_netbsd_m68k.cpp
endif
endif
-@@ -332,6 +339,7 @@
- ifneq (,$(filter NetBSDmacppc NetBSDbebox NetBSDofppc NetBSDprep NetBSDamigappc,$(OS_ARCH)$(OS_TEST)))
+@@ -329,9 +336,10 @@ endif
+ #
+ # NetBSD/PPC
+ #
+-ifneq (,$(filter NetBSDmacppc NetBSDbebox NetBSDofppc NetBSDprep NetBSDamigappc,$(OS_ARCH)$(OS_TEST)))
++ifeq ($(OS_ARCH)$(OS_TEST),NetBSDpowerpc)
CPPSRCS := xptcinvoke_ppc_netbsd.cpp xptcstubs_ppc_netbsd.cpp
ASFILES := xptcinvoke_asm_ppc_netbsd.s xptcstubs_asm_ppc_netbsd.s
+AS := $(CC) -c -x assembler-with-cpp
endif
#
-@@ -403,6 +411,13 @@
+@@ -403,6 +411,13 @@ CPPSRCS := xptcinvoke_sparc64_openbsd.c
ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.s
endif
#
diff --git a/www/firefox3/patches/patch-bx b/www/firefox3/patches/patch-bx
index 3fbbfadfbbd..542f3caae65 100644
--- a/www/firefox3/patches/patch-bx
+++ b/www/firefox3/patches/patch-bx
@@ -1,9 +1,38 @@
-$NetBSD: patch-bx,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
+$NetBSD: patch-bx,v 1.2 2009/04/21 12:58:22 tnn Exp $
-diff -ruN ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp ./xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp
---- ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp 2004-04-18 23:18:18.000000000 +0900
-+++ ./xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp 2005-12-04 19:34:41.000000000 +0900
-@@ -119,8 +119,10 @@
+--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp.orig 2004-04-18 16:18:18.000000000 +0200
++++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp
+@@ -41,6 +41,7 @@
+ // Implement shared vtbl methods.
+
+ #include "xptcprivate.h"
++#include "xptiprivate.h"
+
+ // The Linux/PPC ABI (aka PPC/SYSV ABI) passes the first 8 integral
+ // parameters and the first 8 floating point parameters in registers
+@@ -71,7 +72,6 @@ PrepareAndDispatch(nsXPTCStubBase* self,
+ {
+ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
+ nsXPTCMiniVariant* dispatchParams = NULL;
+- nsIInterfaceInfo* iface_info = NULL;
+ const nsXPTMethodInfo* info;
+ PRUint32 paramCount;
+ PRUint32 i;
+@@ -79,12 +79,7 @@ PrepareAndDispatch(nsXPTCStubBase* self,
+
+ NS_ASSERTION(self,"no self");
+
+- self->GetInterfaceInfo(&iface_info);
+- NS_ASSERTION(iface_info,"no interface info");
+- if (! iface_info)
+- return NS_ERROR_UNEXPECTED;
+-
+- iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
++ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
+ NS_ASSERTION(info,"no method info");
+ if (! info)
+ return NS_ERROR_UNEXPECTED;
+@@ -119,8 +114,10 @@ PrepareAndDispatch(nsXPTCStubBase* self,
if ((PRUint32) ap & 4) ap++; // doubles are 8-byte aligned on stack
dp->val.d = *(double*) ap;
ap += 2;
@@ -14,7 +43,7 @@ diff -ruN ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd
}
continue;
}
-@@ -130,8 +132,10 @@
+@@ -130,8 +127,10 @@ PrepareAndDispatch(nsXPTCStubBase* self,
else {
dp->val.f = *(float*) ap;
ap += 1;
@@ -25,7 +54,20 @@ diff -ruN ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd
}
continue;
}
-@@ -195,7 +199,9 @@
+@@ -179,9 +178,9 @@ PrepareAndDispatch(nsXPTCStubBase* self,
+ }
+ }
+
+- result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams);
+-
+- NS_RELEASE(iface_info);
++ result = self->mOuter->CallMethod((PRUint16) methodIndex,
++ info,
++ dispatchParams);
+
+ if (dispatchParams != paramBuffer)
+ delete [] dispatchParams;
+@@ -195,7 +194,9 @@ PrepareAndDispatch(nsXPTCStubBase* self,
// however, it's quick, dirty, and'll break when the ABI changes on
// us, which is what we want ;-).
@@ -36,7 +78,7 @@ diff -ruN ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd
__asm__ ( \
".section \".text\" \n\t" \
".align 2 \n\t" \
-@@ -206,6 +212,46 @@
+@@ -206,6 +207,46 @@ __asm__ (
"li 11,"#n" \n\t" \
"b SharedStub@local \n" \
);
diff --git a/www/firefox3/patches/patch-bz b/www/firefox3/patches/patch-bz
new file mode 100644
index 00000000000..2be850a77e4
--- /dev/null
+++ b/www/firefox3/patches/patch-bz
@@ -0,0 +1,154 @@
+$NetBSD: patch-bz,v 1.1 2009/04/21 12:58:22 tnn Exp $
+
+--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_netbsd.s.orig 2006-12-11 10:45:40.000000000 +0100
++++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_netbsd.s
+@@ -1,43 +1,43 @@
+-# -*- Mode: Asm -*-
+-#
+-# ***** BEGIN LICENSE BLOCK *****
+-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+-#
+-# The contents of this file are subject to the Mozilla Public License Version
+-# 1.1 (the "License"); you may not use this file except in compliance with
+-# the License. You may obtain a copy of the License at
+-# http://www.mozilla.org/MPL/
+-#
+-# Software distributed under the License is distributed on an "AS IS" basis,
+-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+-# for the specific language governing rights and limitations under the
+-# License.
+-#
+-# The Original Code is mozilla.org code.
+-#
+-# The Initial Developer of the Original Code is
+-# Netscape Communications Corporation.
+-# Portions created by the Initial Developer are Copyright (C) 1999
+-# the Initial Developer. All Rights Reserved.
+-#
+-# Contributor(s):
+-# Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
+-# beard@netscape.com (Patrick Beard)
+-# waterson@netscape.com (Chris Waterson)
+-#
+-# Alternatively, the contents of this file may be used under the terms of
+-# either the GNU General Public License Version 2 or later (the "GPL"), or
+-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+-# in which case the provisions of the GPL or the LGPL are applicable instead
+-# of those above. If you wish to allow use of your version of this file only
+-# under the terms of either the GPL or the LGPL, and not to allow others to
+-# use your version of this file under the terms of the MPL, indicate your
+-# decision by deleting the provisions above and replace them with the notice
+-# and other provisions required by the GPL or the LGPL. If you do not delete
+-# the provisions above, a recipient may use your version of this file under
+-# the terms of any one of the MPL, the GPL or the LGPL.
+-#
+-# ***** END LICENSE BLOCK *****
++// -*- Mode: Asm -*-
++//
++// ***** BEGIN LICENSE BLOCK *****
++// Version: MPL 1.1/GPL 2.0/LGPL 2.1
++//
++// The contents of this file are subject to the Mozilla Public License Version
++// 1.1 (the "License"); you may not use this file except in compliance with
++// the License. You may obtain a copy of the License at
++// http://www.mozilla.org/MPL/
++//
++// Software distributed under the License is distributed on an "AS IS" basis,
++// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
++// for the specific language governing rights and limitations under the
++// License.
++//
++// The Original Code is mozilla.org code.
++//
++// The Initial Developer of the Original Code is
++// Netscape Communications Corporation.
++// Portions created by the Initial Developer are Copyright (C) 1999
++// the Initial Developer. All Rights Reserved.
++//
++// Contributor(s):
++// Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
++// beard@netscape.com (Patrick Beard)
++// waterson@netscape.com (Chris Waterson)
++//
++// Alternatively, the contents of this file may be used under the terms of
++// either the GNU General Public License Version 2 or later (the "GPL"), or
++// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
++// in which case the provisions of the GPL or the LGPL are applicable instead
++// of those above. If you wish to allow use of your version of this file only
++// under the terms of either the GPL or the LGPL, and not to allow others to
++// use your version of this file under the terms of the MPL, indicate your
++// decision by deleting the provisions above and replace them with the notice
++// and other provisions required by the GPL or the LGPL. If you do not delete
++// the provisions above, a recipient may use your version of this file under
++// the terms of any one of the MPL, the GPL or the LGPL.
++//
++// ***** END LICENSE BLOCK *****
+
+ .set r0,0; .set sp,1; .set RTOC,2; .set r3,3; .set r4,4
+ .set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
+@@ -60,23 +60,23 @@
+ .type SharedStub,@function
+
+ SharedStub:
+- stwu sp,-112(sp) # room for
+- # linkage (8),
+- # gprData (32),
+- # fprData (64),
+- # stack alignment(8)
++ stwu sp,-112(sp) // room for
++ // linkage (8),
++ // gprData (32),
++ // fprData (64),
++ // stack alignment(8)
+ mflr r0
+- stw r0,116(sp) # save LR backchain
++ stw r0,116(sp) // save LR backchain
+
+- stw r4,12(sp) # save GP registers
+- stw r5,16(sp) # (n.b. that we don't save r3
+- stw r6,20(sp) # because PrepareAndDispatch() is savvy)
++ stw r4,12(sp) // save GP registers
++ stw r5,16(sp) // (n.b. that we don't save r3
++ stw r6,20(sp) // because PrepareAndDispatch() is savvy)
+ stw r7,24(sp)
+ stw r8,28(sp)
+ stw r9,32(sp)
+ stw r10,36(sp)
+
+- stfd f1,40(sp) # save FP registers
++ stfd f1,40(sp) // save FP registers
+ stfd f2,48(sp)
+ stfd f3,56(sp)
+ stfd f4,64(sp)
+@@ -85,21 +85,21 @@ SharedStub:
+ stfd f7,88(sp)
+ stfd f8,96(sp)
+
+- # r3 has the 'self' pointer already
++ // r3 has the 'self' pointer already
+
+- mr r4,r11 # r4 <= methodIndex selector, passed
+- # via r11 in the nsXPTCStubBase::StubXX() call
++ mr r4,r11 // r4 <= methodIndex selector, passed
++ // via r11 in the nsXPTCStubBase::StubXX() call
+
+- addi r5,sp,120 # r5 <= pointer to callers args area,
+- # beyond r3-r10/f1-f8 mapped range
++ addi r5,sp,120 // r5 <= pointer to callers args area,
++ // beyond r3-r10/f1-f8 mapped range
+
+- addi r6,sp,8 # r6 <= gprData
+- addi r7,sp,40 # r7 <= fprData
++ addi r6,sp,8 // r6 <= gprData
++ addi r7,sp,40 // r7 <= fprData
+
+- bl PrepareAndDispatch@local # Go!
++ bl PrepareAndDispatch@local // Go!
+
+- lwz r0,116(sp) # restore LR
++ lwz r0,116(sp) // restore LR
+ mtlr r0
+- la sp,112(sp) # clean up the stack
++ la sp,112(sp) // clean up the stack
+ blr
+
diff --git a/www/firefox3/patches/patch-ca b/www/firefox3/patches/patch-ca
new file mode 100644
index 00000000000..03deb0a380d
--- /dev/null
+++ b/www/firefox3/patches/patch-ca
@@ -0,0 +1,198 @@
+$NetBSD: patch-ca,v 1.1 2009/04/21 12:58:22 tnn Exp $
+
+--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_netbsd.s.orig 2006-12-11 10:45:39.000000000 +0100
++++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_netbsd.s
+@@ -1,43 +1,43 @@
+-# -*- Mode: Asm -*-
+-#
+-# ***** BEGIN LICENSE BLOCK *****
+-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+-#
+-# The contents of this file are subject to the Mozilla Public License Version
+-# 1.1 (the "License"); you may not use this file except in compliance with
+-# the License. You may obtain a copy of the License at
+-# http://www.mozilla.org/MPL/
+-#
+-# Software distributed under the License is distributed on an "AS IS" basis,
+-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+-# for the specific language governing rights and limitations under the
+-# License.
+-#
+-# The Original Code is mozilla.org code.
+-#
+-# The Initial Developer of the Original Code is
+-# Netscape Communications Corporation.
+-# Portions created by the Initial Developer are Copyright (C) 1999
+-# the Initial Developer. All Rights Reserved.
+-#
+-# Contributor(s):
+-# Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
+-# beard@netscape.com (Patrick Beard)
+-# waterson@netscape.com (Chris Waterson)
+-#
+-# Alternatively, the contents of this file may be used under the terms of
+-# either the GNU General Public License Version 2 or later (the "GPL"), or
+-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+-# in which case the provisions of the GPL or the LGPL are applicable instead
+-# of those above. If you wish to allow use of your version of this file only
+-# under the terms of either the GPL or the LGPL, and not to allow others to
+-# use your version of this file under the terms of the MPL, indicate your
+-# decision by deleting the provisions above and replace them with the notice
+-# and other provisions required by the GPL or the LGPL. If you do not delete
+-# the provisions above, a recipient may use your version of this file under
+-# the terms of any one of the MPL, the GPL or the LGPL.
+-#
+-# ***** END LICENSE BLOCK *****
++// -*- Mode: Asm -*-
++//
++// ***** BEGIN LICENSE BLOCK *****
++// Version: MPL 1.1/GPL 2.0/LGPL 2.1
++//
++// The contents of this file are subject to the Mozilla Public License Version
++// 1.1 (the "License"); you may not use this file except in compliance with
++// the License. You may obtain a copy of the License at
++// http://www.mozilla.org/MPL/
++//
++// Software distributed under the License is distributed on an "AS IS" basis,
++// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
++// for the specific language governing rights and limitations under the
++// License.
++//
++// The Original Code is mozilla.org code.
++//
++// The Initial Developer of the Original Code is
++// Netscape Communications Corporation.
++// Portions created by the Initial Developer are Copyright (C) 1999
++// the Initial Developer. All Rights Reserved.
++//
++// Contributor(s):
++// Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
++// beard@netscape.com (Patrick Beard)
++// waterson@netscape.com (Chris Waterson)
++//
++// Alternatively, the contents of this file may be used under the terms of
++// either the GNU General Public License Version 2 or later (the "GPL"), or
++// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
++// in which case the provisions of the GPL or the LGPL are applicable instead
++// of those above. If you wish to allow use of your version of this file only
++// under the terms of either the GPL or the LGPL, and not to allow others to
++// use your version of this file under the terms of the MPL, indicate your
++// decision by deleting the provisions above and replace them with the notice
++// and other provisions required by the GPL or the LGPL. If you do not delete
++// the provisions above, a recipient may use your version of this file under
++// the terms of any one of the MPL, the GPL or the LGPL.
++//
++// ***** END LICENSE BLOCK *****
+ .set r0,0; .set sp,1; .set RTOC,2; .set r3,3; .set r4,4
+ .set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
+ .set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
+@@ -55,41 +55,41 @@
+
+ .section ".text"
+ .align 2
+- .globl XPTC_InvokeByIndex
+- .type XPTC_InvokeByIndex,@function
++ .globl NS_InvokeByIndex_P
++ .type NS_InvokeByIndex_P,@function
+
+-#
+-# XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
+-# PRUint32 paramCount, nsXPTCVariant* params)
+-#
+-
+-XPTC_InvokeByIndex:
+- stwu sp,-32(sp) # setup standard stack frame
+- mflr r0 # save LR
+- stw r3,8(sp) # r3 <= that
+- stw r4,12(sp) # r4 <= methodIndex
++//
++// NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
++// PRUint32 paramCount, nsXPTCVariant* params)
++//
++
++NS_InvokeByIndex_P:
++ stwu sp,-32(sp) // setup standard stack frame
++ mflr r0 // save LR
++ stw r3,8(sp) // r3 <= that
++ stw r4,12(sp) // r4 <= methodIndex
+ stw r30,16(sp)
+ stw r31,20(sp)
+
+- stw r0,36(sp) # store LR backchain
++ stw r0,36(sp) // store LR backchain
+ mr r31,sp
+
+- rlwinm r10,r5,3,0,27 # r10 = (ParamCount * 2 * 4) & ~0x0f
+- addi r0,r10,96 # reserve stack for GPR and FPR register save area r0 = r10 + 96
+- lwz r9,0(sp) # r9 = backchain
++ rlwinm r10,r5,3,0,27 // r10 = (ParamCount * 2 * 4) & ~0x0f
++ addi r0,r10,96 // reserve stack for GPR and FPR register save area r0 = r10 + 96
++ lwz r9,0(sp) // r9 = backchain
+ neg r0,r0
+- stwux r9,sp,r0 # reserve stack sapce and save SP backchain
++ stwux r9,sp,r0 // reserve stack sapce and save SP backchain
+
+- addi r3,sp,8 # r3 <= args
+- mr r4,r5 # r4 <= paramCount
+- mr r5,r6 # r5 <= params
+- add r6,r3,r10 # r6 <= gpregs ( == args + r10 )
+- mr r30,r6 # store in r30 for use later...
+- addi r7,r6,32 # r7 <= fpregs ( == gpregs + 32 )
++ addi r3,sp,8 // r3 <= args
++ mr r4,r5 // r4 <= paramCount
++ mr r5,r6 // r5 <= params
++ add r6,r3,r10 // r6 <= gpregs ( == args + r10 )
++ mr r30,r6 // store in r30 for use later...
++ addi r7,r6,32 // r7 <= fpregs ( == gpregs + 32 )
+
+- bl invoke_copy_to_stack@local # (args, paramCount, params, gpregs, fpregs)
++ bl invoke_copy_to_stack@local // (args, paramCount, params, gpregs, fpregs)
+
+- lfd f1,32(r30) # load FP registers with method parameters
++ lfd f1,32(r30) // load FP registers with method parameters
+ lfd f2,40(r30)
+ lfd f3,48(r30)
+ lfd f4,56(r30)
+@@ -98,18 +98,13 @@ XPTC_InvokeByIndex:
+ lfd f7,80(r30)
+ lfd f8,88(r30)
+
+- lwz r3,8(r31) # r3 <= that
+- lwz r4,12(r31) # r4 <= methodIndex
+- lwz r5,0(r3) # r5 <= vtable ( == *that )
+- slwi r4,r4,3 # convert to offset ( *= 8 )
+- addi r4,r4,8 # skip first two vtable entries
+- add r4,r4,r5
+- lhz r0,0(r4) # virtual base offset
+- extsh r0,r0
+- add r3,r3,r0
+- lwz r0,4(r4) # r0 <= methodpointer ( == vtable + offset )
++ lwz r3,8(r31) // r3 <= that
++ lwz r4,12(r31) // r4 <= methodIndex
++ lwz r5,0(r3) // r5 <= vtable ( == *that )
++ slwi r4,r4,2 // convert to offset ( *= 4 )
++ lwzx r0,r4,r5 // r0 <= methodpointer ( == vtable + offset )
+
+- lwz r4,4(r30) # load GP regs with method parameters
++ lwz r4,4(r30) // load GP regs with method parameters
+ lwz r5,8(r30)
+ lwz r6,12(r30)
+ lwz r7,16(r30)
+@@ -117,13 +112,13 @@ XPTC_InvokeByIndex:
+ lwz r9,24(r30)
+ lwz r10,28(r30)
+
+- mtlr r0 # copy methodpointer to LR
+- blrl # call method
++ mtlr r0 // copy methodpointer to LR
++ blrl // call method
+
+- lwz r30,16(r31) # restore r30 & r31
++ lwz r30,16(r31) // restore r30 & r31
+ lwz r31,20(r31)
+
+- lwz r11,0(sp) # clean up the stack
++ lwz r11,0(sp) // clean up the stack
+ lwz r0,4(r11)
+ mtlr r0
+ mr sp,r11
diff --git a/www/firefox3/patches/patch-cb b/www/firefox3/patches/patch-cb
index 2c8bbe5910e..dc8af2ef4df 100644
--- a/www/firefox3/patches/patch-cb
+++ b/www/firefox3/patches/patch-cb
@@ -1,9 +1,20 @@
-$NetBSD: patch-cb,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
+$NetBSD: patch-cb,v 1.2 2009/04/21 12:58:22 tnn Exp $
-diff -ruN ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp ./xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp
---- ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp 2004-04-18 23:18:18.000000000 +0900
-+++ ./xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp 2005-12-04 19:35:01.000000000 +0900
-@@ -104,8 +104,10 @@
+--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp.orig 2008-01-06 04:46:24.000000000 +0100
++++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp
+@@ -40,9 +40,9 @@
+
+ // Platform specific code to invoke XPCOM methods on native objects
+
+-// The purpose of XPTC_InvokeByIndex() is to map a platform
++// The purpose of NS_InvokeByIndex_P() is to map a platform
+ // indepenpent call to the platform ABI. To do that,
+-// XPTC_InvokeByIndex() has to determine the method to call via vtable
++// NS_InvokeByIndex_P() has to determine the method to call via vtable
+ // access. The parameters for the method are read from the
+ // nsXPTCVariant* and prepared for the native ABI. For the Linux/PPC
+ // ABI this means that the first 8 integral and floating point
+@@ -104,8 +104,10 @@ invoke_copy_to_stack(PRUint32* d,
if ((PRUint32) d & 4) d++; // doubles are 8-byte aligned on stack
*((double*) d) = s->val.d;
d += 2;
@@ -14,7 +25,7 @@ diff -ruN ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbs
}
}
else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
-@@ -114,8 +116,10 @@
+@@ -114,8 +116,10 @@ invoke_copy_to_stack(PRUint32* d,
else {
*((float*) d) = s->val.f;
d += 1;
@@ -25,3 +36,12 @@ diff -ruN ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbs
}
}
else if (!s->IsPtrData() && (s->type == nsXPTType::T_I64
+@@ -142,6 +146,6 @@ invoke_copy_to_stack(PRUint32* d,
+ }
+
+ extern "C"
+-XPTC_PUBLIC_API(nsresult)
+-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
++EXPORT_XPCOM_API(nsresult)
++NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
+ PRUint32 paramCount, nsXPTCVariant* params);
diff --git a/www/firefox3/patches/patch-eo b/www/firefox3/patches/patch-eo
new file mode 100644
index 00000000000..cf9b5f33141
--- /dev/null
+++ b/www/firefox3/patches/patch-eo
@@ -0,0 +1,18 @@
+$NetBSD: patch-eo,v 1.1 2009/04/21 12:58:22 tnn Exp $
+
+This is a hack for:
+cc1plus: warnings being treated as errors
+../../../dist/include/xpcom/nsVoidArray.h: In member function 'void nsAutoVoidArray::ResetToAutoBuffer()':
+../../../dist/include/xpcom/nsVoidArray.h:193: warning: cast from 'char*' to 'nsVoidArray::Impl*' increases required alignment of target type
+
+... which happens on PowerPC and possibly other architectures.
+
+--- netwerk/cookie/src/Makefile.in.orig 2007-08-28 18:02:43.000000000 +0200
++++ netwerk/cookie/src/Makefile.in
+@@ -60,5 +60,5 @@ CPPSRCS = \
+
+ include $(topsrcdir)/config/rules.mk
+
+-CXXFLAGS += $(WARNINGS_AS_ERRORS)
++#CXXFLAGS += $(WARNINGS_AS_ERRORS)
+ DEFINES += -DIMPL_NS_NET