summaryrefslogtreecommitdiff
path: root/www/firefox
diff options
context:
space:
mode:
authoraymeric <aymeric>2004-08-24 14:28:33 +0000
committeraymeric <aymeric>2004-08-24 14:28:33 +0000
commit47cdebff4e8149a04ea20fc82f0ab486ae0dc556 (patch)
tree501002438713b668d74867803755d7b62ab7c939 /www/firefox
parentb8904e7851c48a9b8a8ebd991594d8d67ef9b4df (diff)
downloadpkgsrc-47cdebff4e8149a04ea20fc82f0ab486ae0dc556.tar.gz
Make firefox compile and run on macppc. Patches copied from www/mozilla.
Diffstat (limited to 'www/firefox')
-rw-r--r--www/firefox/distinfo7
-rw-r--r--www/firefox/patches/patch-bx53
-rw-r--r--www/firefox/patches/patch-bz122
-rw-r--r--www/firefox/patches/patch-ca166
-rw-r--r--www/firefox/patches/patch-cb26
5 files changed, 357 insertions, 17 deletions
diff --git a/www/firefox/distinfo b/www/firefox/distinfo
index 9916f380e1d..32dc8fab471 100644
--- a/www/firefox/distinfo
+++ b/www/firefox/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.12 2004/08/23 13:54:27 he Exp $
+$NetBSD: distinfo,v 1.13 2004/08/24 14:28:33 aymeric Exp $
SHA1 (firefox-0.9.3-source.tar.bz2) = db6290743d824559c5bb7b6bd060b65abcaea15b
Size (firefox-0.9.3-source.tar.bz2) = 33945173 bytes
@@ -29,5 +29,8 @@ SHA1 (patch-bt) = 8ee09dd2acbbc0c002283b15eafbafb4f324948a
SHA1 (patch-bu) = db33b8651e3cb1fbf9a18dbe78e1e8288cfda0ee
SHA1 (patch-bv) = 4f23dfd885131ea866f31370f1421e7c19706860
SHA1 (patch-bw) = fc3a518d3762be6e85104a6dc7fffd5ae1a463c8
-SHA1 (patch-bx) = 721c58f89c829ec3dfd72a311d49c211833b107c
+SHA1 (patch-bx) = 046e19c9c4b431369411658373b14c1822841d85
SHA1 (patch-by) = 643185af7a0df7030b2b96447ee4031dc9c82f88
+SHA1 (patch-bz) = 6f854d74a9d1d1174ce8eff7d65f8024a7da4711
+SHA1 (patch-ca) = 479ef14631ae019ae5ca1c08a2f786294f3e972b
+SHA1 (patch-cb) = fd0f033d63be066ce5c47057d72c48a085718908
diff --git a/www/firefox/patches/patch-bx b/www/firefox/patches/patch-bx
index 14ab725b71c..1ee48fcc6bc 100644
--- a/www/firefox/patches/patch-bx
+++ b/www/firefox/patches/patch-bx
@@ -1,13 +1,45 @@
-$NetBSD: patch-bx,v 1.1 2004/06/23 16:47:12 taya Exp $
+$NetBSD: patch-bx,v 1.2 2004/08/24 14:28:33 aymeric Exp $
-diff -ru ../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 2001-09-29 05:12:53.000000000 +0900
-+++ ./xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp 2004-06-15 23:56:59.000000000 +0900
-@@ -195,6 +195,47 @@
+--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp.orig 2001-09-28 22:12:53.000000000 +0200
++++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp
+@@ -119,8 +119,10 @@ PrepareAndDispatch(nsXPTCStubBase* self,
+ if ((PRUint32) ap & 4) ap++; // doubles are 8-byte aligned on stack
+ dp->val.d = *(double*) ap;
+ ap += 2;
++#if __GXX_ABI_VERSION < 100
+ if (gpr < GPR_COUNT)
+ gpr += 2;
++#endif
+ }
+ continue;
+ }
+@@ -130,8 +132,10 @@ PrepareAndDispatch(nsXPTCStubBase* self,
+ else {
+ dp->val.f = *(float*) ap;
+ ap += 1;
++#if __GXX_ABI_VERSION < 100
+ if (gpr < GPR_COUNT)
+ gpr += 1;
++#endif
+ }
+ continue;
+ }
+@@ -195,7 +199,9 @@ PrepareAndDispatch(nsXPTCStubBase* self,
// however, it's quick, dirty, and'll break when the ABI changes on
// us, which is what we want ;-).
-+#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
+-#define STUB_ENTRY(n) \
++#if __GXX_ABI_VERSION < 100
++// gcc-2 version
++# define STUB_ENTRY(n) \
+ __asm__ ( \
+ ".section \".text\" \n\t" \
+ ".align 2 \n\t" \
+@@ -206,6 +212,46 @@ __asm__ (
+ "li 11,"#n" \n\t" \
+ "b SharedStub@local \n" \
+ );
++#else
+// gcc-3 version
+//
+// As G++3 ABI contains the length of the functionname in the mangled
@@ -23,7 +55,6 @@ diff -ru ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.
+
+# define STUB_ENTRY(n) \
+__asm__ ( \
-+ ".section \".text\" \n\t" \
+ ".align 2 \n\t" \
+ ".if "#n" < 10 \n\t" \
+ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \
@@ -47,14 +78,6 @@ diff -ru ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.
+ "li 11,"#n" \n\t" \
+ "b SharedStub@local \n" \
+);
-+#else
- #define STUB_ENTRY(n) \
- __asm__ ( \
- ".section \".text\" \n\t" \
-@@ -206,6 +247,7 @@
- "li 11,"#n" \n\t" \
- "b SharedStub@local \n" \
- );
+#endif
#define SENTINEL_ENTRY(n) \
diff --git a/www/firefox/patches/patch-bz b/www/firefox/patches/patch-bz
new file mode 100644
index 00000000000..513edd82a8c
--- /dev/null
+++ b/www/firefox/patches/patch-bz
@@ -0,0 +1,122 @@
+$NetBSD: patch-bz,v 1.1 2004/08/24 14:28:33 aymeric Exp $
+
+--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_netbsd.s.orig 2001-03-11 18:22:22.000000000 +0100
++++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_netbsd.s
+@@ -1,27 +1,27 @@
+-# -*- Mode: Asm -*-
+-#
+-# The contents of this file are subject to the Netscape 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/NPL/
+-#
+-# 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 Netscape are
+-# Copyright (C) 1999 Netscape Communications Corporation. All
+-# Rights Reserved.
+-#
+-# Contributor(s):
+-# Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
+-# beard@netscape.com (Patrick Beard)
+-# waterson@netscape.com (Chris Waterson)
+-#
++// -*- Mode: Asm -*-
++//
++// The contents of this file are subject to the Netscape 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/NPL/
++//
++// 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 Netscape are
++// Copyright (C) 1999 Netscape Communications Corporation. All
++// Rights Reserved.
++//
++// Contributor(s):
++// Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
++// beard@netscape.com (Patrick Beard)
++// waterson@netscape.com (Chris Waterson)
++//
+
+ .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
+@@ -44,23 +44,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)
+@@ -69,21 +69,20 @@ 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/firefox/patches/patch-ca b/www/firefox/patches/patch-ca
new file mode 100644
index 00000000000..a5d320f47ef
--- /dev/null
+++ b/www/firefox/patches/patch-ca
@@ -0,0 +1,166 @@
+$NetBSD: patch-ca,v 1.1 2004/08/24 14:28:33 aymeric Exp $
+
+--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_netbsd.s.orig 2001-03-11 18:22:17.000000000 +0100
++++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_netbsd.s
+@@ -1,27 +1,28 @@
+-# -*- Mode: Asm -*-
+-#
+-# The contents of this file are subject to the Netscape 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/NPL/
+-#
+-# 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 Netscape are
+-# Copyright (C) 1999 Netscape Communications Corporation. All
+-# Rights Reserved.
+-#
+-# Contributor(s):
+-# Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
+-# beard@netscape.com (Patrick Beard)
+-# waterson@netscape.com (Chris Waterson)
+-#
++// -*- Mode: Asm -*-
++//
++// The contents of this file are subject to the Netscape 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/NPL/
++//
++// 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 Netscape are
++// Copyright (C) 1999 Netscape Communications Corporation. All
++// Rights Reserved.
++//
++// Contributor(s):
++// Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
++// beard@netscape.com (Patrick Beard)
++// waterson@netscape.com (Chris Waterson)
++//
++
+ .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
+@@ -42,38 +43,38 @@
+ .globl XPTC_InvokeByIndex
+ .type XPTC_InvokeByIndex,@function
+
+-#
+-# XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
+-# PRUint32 paramCount, nsXPTCVariant* params)
+-#
++//
++// 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
++ 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
+-
+- 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 )
++ stwux r9,sp,r0 // reserve stack space 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 )
+
+- 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)
+@@ -82,18 +83,18 @@ 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 )
++#if !((__GNUC__ == 3 && __GNUC_MINOR__ < 2) || __GXX_ABI_VERSION >= 100) // G++ pre-V3 ABI is like that of AIX under NetBSD
++ slwi r4,r4,3 // convert to offset ( *= 8 )
++ addi r4,r4,8 // skip garbage before vtable
++#else
++ slwi r4,r4,2 // convert to offset ( *= 4 )
++#endif
++ lwzx r0,r5,r4 // 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)
+@@ -101,13 +102,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/firefox/patches/patch-cb b/www/firefox/patches/patch-cb
new file mode 100644
index 00000000000..a46063c0071
--- /dev/null
+++ b/www/firefox/patches/patch-cb
@@ -0,0 +1,26 @@
+$NetBSD: patch-cb,v 1.1 2004/08/24 14:28:33 aymeric Exp $
+
+--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp.orig 2001-09-28 22:12:52.000000000 +0200
++++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp
+@@ -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;
++#if __GXX_ABI_VERSION < 100
+ if (gpr < GPR_COUNT)
+ gpr += 2;
++#endif
+ }
+ }
+ else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
+@@ -114,8 +116,10 @@ invoke_copy_to_stack(PRUint32* d,
+ else {
+ *((float*) d) = s->val.f;
+ d += 1;
++#if __GXX_ABI_VERSION < 100
+ if (gpr < GPR_COUNT)
+ gpr += 1;
++#endif
+ }
+ }
+ else if (!s->IsPtrData() && (s->type == nsXPTType::T_I64