pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/www/firefox3 Make firefox3 work on sparc64.
details: https://anonhg.NetBSD.org/pkgsrc/rev/9661ec4938ea
branches: trunk
changeset: 551315:9661ec4938ea
user: martin <martin%pkgsrc.org@localhost>
date: Sat Dec 13 00:42:26 2008 +0000
description:
Make firefox3 work on sparc64.
ok: tnn
diffstat:
www/firefox3/Makefile | 3 +-
www/firefox3/distinfo | 3 +-
www/firefox3/files/moz-install | 77 +++++++++++++
www/firefox3/files/mozilla-ELF.in | 6 +
www/firefox3/files/mozilla-Mach-O.in | 4 +
www/firefox3/files/mozilla-a.out.in | 6 +
www/firefox3/files/xptcinvoke_asm_sparc64_netbsd.s | 112 ++++++++++++++++++++
www/firefox3/files/xptcinvoke_sparc64_netbsd.cpp | 84 +++++++++++++++
www/firefox3/files/xptcstubs_asm_sparc64_netbsd.s | 66 +++++++++++
www/firefox3/files/xptcstubs_sparc64_netbsd.cpp | 117 +++++++++++++++++++++
www/firefox3/patches/patch-ee | 30 +++++
11 files changed, 506 insertions(+), 2 deletions(-)
diffs (truncated from 572 to 300 lines):
diff -r 81c05f3516da -r 9661ec4938ea www/firefox3/Makefile
--- a/www/firefox3/Makefile Fri Dec 12 23:27:39 2008 +0000
+++ b/www/firefox3/Makefile Sat Dec 13 00:42:26 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2008/11/13 14:44:00 tron Exp $
+# $NetBSD: Makefile,v 1.9 2008/12/13 00:42:26 martin Exp $
MOZILLA= firefox3 # allow coexisting with firefox2
COMMENT= Lightweight gecko-based web browser
@@ -25,6 +25,7 @@
MAINTAINER= tnn%NetBSD.org@localhost
MOZ_VER= 3.0.4
+FILESDIR= ${.CURDIR}/files
DESCR_SRC= ${.CURDIR}/../../www/firefox/DESCR
DISTINFO_FILE= ${.CURDIR}/../../www/firefox3/distinfo
diff -r 81c05f3516da -r 9661ec4938ea www/firefox3/distinfo
--- a/www/firefox3/distinfo Fri Dec 12 23:27:39 2008 +0000
+++ b/www/firefox3/distinfo Sat Dec 13 00:42:26 2008 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2008/12/11 09:34:12 tnn Exp $
+$NetBSD: distinfo,v 1.9 2008/12/13 00:42:26 martin Exp $
SHA1 (firefox-3.0.4-source.tar.bz2) = 16715b4af7ca2bad6baa8d450a3fd9cb375ad6d6
RMD160 (firefox-3.0.4-source.tar.bz2) = 99e34b76feca22c74287b1e8d78a042c313c3f97
@@ -36,6 +36,7 @@
SHA1 (patch-ea) = 14e31d17c2493e468cd01f99abfc996853a11032
SHA1 (patch-eb) = dc9232b10075d17f7ed742e7be8ea036db2f0241
SHA1 (patch-ed) = 3c6281a75373843c5767fc1213d8cc67dc549e03
+SHA1 (patch-ee) = d5aeca91305ed2e1f522b2c0ed4bb17f7f8b881b
SHA1 (patch-eh) = 60aca7f94ee04c957386014f7d4df9e3c8ac8ff1
SHA1 (patch-wc) = 2de8665ed6c23c26566ca6d50165c0cf413a753d
SHA1 (patch-wd) = fc5c3103ae6f2a2eccc01911a8207f3ca614008b
diff -r 81c05f3516da -r 9661ec4938ea www/firefox3/files/moz-install
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox3/files/moz-install Sat Dec 13 00:42:26 2008 +0000
@@ -0,0 +1,77 @@
+#!/bin/sh
+#
+# $NetBSD: moz-install,v 1.1 2008/12/13 00:42:26 martin Exp $
+
+${BSD_INSTALL_PROGRAM_DIR} ${DESTDIR}${PREFIX}/bin
+${SED} -e "s,@PREFIX@,${PREFIX},g" -e "s,@MOZILLA@,${MOZILLA}," -e "s,@MOZILLA_BIN@,${MOZILLA_BIN}," ${FILESDIR}/mozilla-${OBJECT_FMT}.in > ${DESTDIR}${PREFIX}/bin/${MOZILLA}
+${CHOWN} ${BINOWN} ${DESTDIR}${PREFIX}/bin/${MOZILLA}
+${CHGRP} ${BINGRP} ${DESTDIR}${PREFIX}/bin/${MOZILLA}
+${CHMOD} ${BINMODE} ${DESTDIR}${PREFIX}/bin/${MOZILLA}
+
+#
+# Substitute variables
+#
+TMP_PLIST=${WRKDIR}/TMP_PLIST.$$
+trap "${RM} -f ${TMP_PLIST}" 1 2 15
+
+${SED} -e "s/\${MOZILLA}/${MOZILLA}/g" -e "s/\${SO_SUFFIX}/${SO_SUFFIX}/" -e "s/\${MOZILLA_BIN}/${MOZILLA_BIN}/g" < ${PLIST_SRC} > ${TMP_PLIST}
+
+# make directories
+for i in `${SED} -n -e '/^@comment begin DIRS$/,/^@comment end DIRS$/p' ${TMP_PLIST} | ${EGREP} ^@dirrm | ${SED} -e 's/^@dirrm//'` ; do
+ ${BSD_INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/$i
+done
+
+# install programs
+for i in `${SED} -n -e '/^@comment begin PROGRAMS$/,/^@comment end PROGRAMS$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
+ src=`echo $i | ${SED} -e "s@lib/${MOZILLA}@dist/bin@"`;
+ ${BSD_INSTALL_PROGRAM} ${WRKSRC}/${src} ${DESTDIR}${PREFIX}/$i
+done
+
+# install scripts
+for i in `${SED} -n -e '/^@comment begin SCRIPTS$/,/^@comment end SCRIPTS$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
+ src=`echo $i | ${SED} -e "s@lib/${MOZILLA}@dist/bin@"`;
+ ${BSD_INSTALL_SCRIPT} ${WRKSRC}/${src} ${DESTDIR}${PREFIX}/$i
+done
+
+# install DSO
+for i in `${SED} -n -e '/^@comment begin DSO$/,/^@comment end DSO$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
+ src=`echo $i | ${SED} -e "s@lib/${MOZILLA}@dist/bin@"`;
+ ${MOZ_INSTALL_LIB} ${WRKSRC}/${src} ${DESTDIR}${PREFIX}/$i
+done
+
+# install PKGCONFIG
+for i in `${SED} -n -e '/^@comment begin PKGCONFIG$/,/^@comment end PKGCONFIG$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
+ src=`echo $i | ${SED} -e "s@lib/pkgconfig@build/unix@"`;
+ ${BSD_INSTALL_DATA} ${WRKSRC}/${src} ${DESTDIR}${PREFIX}/$i
+done
+
+# install DATA
+for i in `${SED} -n -e '/^@comment begin DATA$/,/^@comment end DATA$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
+ src=`echo $i | ${SED} -e "s@lib/${MOZILLA}@dist/bin@"`;
+ ${BSD_INSTALL_DATA} ${WRKSRC}/${src} ${DESTDIR}${PREFIX}/$i
+done
+
+# install INCLUDE
+for i in `${SED} -n -e '/^@comment begin INCLUDE$/,/^@comment end INCLUDE$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
+ src=`echo $i | ${SED} -e "s@include/${MOZILLA}@dist/include@"`;
+ ${BSD_INSTALL_DATA} ${WRKSRC}/${src} ${DESTDIR}${PREFIX}/$i
+done
+
+# install INCLUDE-PUBLIC
+for i in `${SED} -n -e '/^@comment begin INCLUDE-PUBLIC$/,/^@comment end INCLUDE-PUBLIC$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
+ src=`echo $i | ${SED} -e "s@include/${MOZILLA}@dist/public@"`;
+ ${BSD_INSTALL_DATA} ${WRKSRC}/${src} ${DESTDIR}${PREFIX}/$i
+done
+
+# install INCLUDE-SDK
+for i in `${SED} -n -e '/^@comment begin INCLUDE-SDK$/,/^@comment end INCLUDE-SDK$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
+ src=`echo $i | ${SED} -e "s@include/${MOZILLA}@dist/sdk/include@"`;
+ ${BSD_INSTALL_DATA} ${WRKSRC}/${src} ${DESTDIR}${PREFIX}/$i
+done
+
+${RM} -f ${TMP_PLIST}
+
+#
+# remove generated user conf directory ${WRKDIR}/.mozilla
+#
+${RM} -rf ${WRKDIR}/.mozilla
diff -r 81c05f3516da -r 9661ec4938ea www/firefox3/files/mozilla-ELF.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox3/files/mozilla-ELF.in Sat Dec 13 00:42:26 2008 +0000
@@ -0,0 +1,6 @@
+#!/bin/sh
+MOZILLA_FIVE_HOME=@PREFIX@/lib/@MOZILLA@
+export MOZILLA_FIVE_HOME
+LD_LIBRARY_PATH=@PREFIX@/lib/@MOZILLA@:@PREFIX@/lib:${LD_LIBRARY_PATH}
+export LD_LIBRARY_PATH
+exec @PREFIX@/lib/@MOZILLA@/@MOZILLA_BIN@ "$@"
diff -r 81c05f3516da -r 9661ec4938ea www/firefox3/files/mozilla-Mach-O.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox3/files/mozilla-Mach-O.in Sat Dec 13 00:42:26 2008 +0000
@@ -0,0 +1,4 @@
+#!/bin/sh
+MOZILLA_FIVE_HOME=@PREFIX@/lib/@MOZILLA@
+export MOZILLA_FIVE_HOME
+exec @PREFIX@/lib/@MOZILLA@/@MOZILLA_BIN@ "$@"
diff -r 81c05f3516da -r 9661ec4938ea www/firefox3/files/mozilla-a.out.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox3/files/mozilla-a.out.in Sat Dec 13 00:42:26 2008 +0000
@@ -0,0 +1,6 @@
+#!/bin/sh
+MOZILLA_FIVE_HOME=@PREFIX@/lib/@MOZILLA@
+LD_LIBRARY_PATH=@PREFIX@/lib/@MOZILLA@
+export MOZILLA_FIVE_HOME
+export LD_LIBRARY_PATH
+exec @PREFIX@/lib/@MOZILLA@/@MOZILLA_BIN@ "$@"
diff -r 81c05f3516da -r 9661ec4938ea www/firefox3/files/xptcinvoke_asm_sparc64_netbsd.s
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox3/files/xptcinvoke_asm_sparc64_netbsd.s Sat Dec 13 00:42:26 2008 +0000
@@ -0,0 +1,112 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * 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) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+/* Platform specific code to invoke XPCOM methods on native objects */
+ .global NS_InvokeByIndex_P
+ .type NS_InvokeByIndex_P, #function
+/*
+ NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
+ PRUint32 paramCount, nsXPTCVariant* params);
+
+*/
+/*
+ * Note: To simplify stack handling we allocate an extra stack
+ * frame here. In principle invoke_copy_to_stack() could
+ * save the parameters our caller's frame and we could
+ * reclaim the stackframe and do a tail call to the
+ * function. However, this gets complicated....
+ *
+ * The vtable consist of be:
+ *
+ * struct {
+ * short __delta;
+ * short __index;
+ * union {
+ * P __pfn;
+ * short __delta2;
+ * } __pfn_or_delta2;
+ * };
+ *
+ * See gcc/cp/cp-tree.h
+ */
+
+NS_InvokeByIndex_P:
+ save %sp,-(128 + 64),%sp ! room for the register window and
+ ! struct pointer, rounded up to 0 % 64
+ sll %i2,4,%l0 ! assume the worst case
+ ! paramCount * 2 * 8 bytes
+ cmp %l0, 0 ! are there any args? If not,
+ be .invoke ! no need to copy args to stack
+ nop
+
+ sub %sp,%l0,%sp ! create the additional stack space
+ add %sp,0x7ff+136,%o0 ! step past the register window, the
+ ! struct result pointer and the 'this' slot
+ mov %i2,%o1 ! paramCount
+ call invoke_copy_to_stack
+ mov %i3,%o2 ! params
+
+!
+! load arguments from stack into the outgoing registers
+! BIAS is 0x7ff (2047)
+!
+
+! load the %o1..5 64bit (extended word) output registers registers
+ ldx [%sp + 0x7ff + 136],%o1 ! %i1
+ ldx [%sp + 0x7ff + 144],%o2 ! %i2
+ ldx [%sp + 0x7ff + 152],%o3 ! %i3
+ ldx [%sp + 0x7ff + 160],%o4 ! %i4
+ ldx [%sp + 0x7ff + 168],%o5 ! %i5
+
+! load the even number double registers starting with %f2
+ ldd [%sp + 0x7ff + 136],%f2
+ ldd [%sp + 0x7ff + 144],%f4
+ ldd [%sp + 0x7ff + 152],%f6
+ ldd [%sp + 0x7ff + 160],%f8
+ ldd [%sp + 0x7ff + 168],%f10
+ ldd [%sp + 0x7ff + 176],%f12
+ ldd [%sp + 0x7ff + 184],%f14
+ ldd [%sp + 0x7ff + 192],%f16
+ ldd [%sp + 0x7ff + 200],%f18
+ ldd [%sp + 0x7ff + 208],%f20
+ ldd [%sp + 0x7ff + 216],%f22
+ ldd [%sp + 0x7ff + 224],%f24
+ ldd [%sp + 0x7ff + 232],%f26
+ ldd [%sp + 0x7ff + 240],%f28
+ ldd [%sp + 0x7ff + 248],%f30
+
+!
+! calculate the target address from the vtable
+!
+.invoke:
+ sll %i1,3,%l0 ! index *= 8
+ ldx [%i0],%l1 ! *this --> address of vtable
+ ldx [%l0 + %l1],%l0 ! this->vtable[index] --> address
+
+ jmpl %l0,%o7 ! call the routine
+ mov %i0,%o0 ! move 'this' pointer to out register
+
+ mov %o0,%i0 ! propagate return value
+ ret
+ restore
+
+ .size NS_InvokeByIndex_P, .-NS_InvokeByIndex_P
diff -r 81c05f3516da -r 9661ec4938ea www/firefox3/files/xptcinvoke_sparc64_netbsd.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox3/files/xptcinvoke_sparc64_netbsd.cpp Sat Dec 13 00:42:26 2008 +0000
@@ -0,0 +1,84 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * 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) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+/* Platform specific code to invoke XPCOM methods on native objects */
+
+#include "xptcprivate.h"
+
+#if !defined(__sparc64__) && !defined(_LP64)
+#error "This code is for Sparc64 only"
+#endif
+
+extern "C" PRUint32
+invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s)
+{
+ /*
+ We need to copy the parameters for this function to locals and use them
+ from there since the parameters occupy the same stack space as the stack
+ we're trying to populate.
Home |
Main Index |
Thread Index |
Old Index