pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/www/firefox Make the pkg at least build on sparc64 (no...
details: https://anonhg.NetBSD.org/pkgsrc/rev/9c9423fe3408
branches: trunk
changeset: 325027:9c9423fe3408
user: martin <martin%pkgsrc.org@localhost>
date: Wed Nov 07 12:55:11 2018 +0000
description:
Make the pkg at least build on sparc64 (nowhere near working yet)
diffstat:
www/firefox/distinfo | 6 +-
www/firefox/mozilla-common.mk | 6 +-
www/firefox/patches/patch-js_xpconnect_src_XPCMaps.cpp | 21 ++
www/firefox/patches/patch-xpcom_reflect_xptcall_md_unix_moz.build | 15 +
www/firefox/patches/patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__netbsd.cpp | 89 ----------
www/firefox/patches/patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__openbsd.cpp | 18 ++
6 files changed, 63 insertions(+), 92 deletions(-)
diffs (204 lines):
diff -r 9f14c56f69c2 -r 9c9423fe3408 www/firefox/distinfo
--- a/www/firefox/distinfo Wed Nov 07 12:52:14 2018 +0000
+++ b/www/firefox/distinfo Wed Nov 07 12:55:11 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.329 2018/11/04 09:10:40 maya Exp $
+$NetBSD: distinfo,v 1.330 2018/11/07 12:55:11 martin Exp $
SHA1 (firefox-63.0.1.source.tar.xz) = d62a85ce78904171e9f863154fb8cd031cdbe4ee
RMD160 (firefox-63.0.1.source.tar.xz) = 28f6431150deb10b967e4181ebfb5c332deedbd2
@@ -21,6 +21,7 @@
SHA1 (patch-js_src_threading_posix_Thread.cpp) = 47e612a676e614fd6dd43b8a3140218a3fbdc7fa
SHA1 (patch-js_src_util_NativeStack.cpp) = 31541b96f763024f78fb6b4ef69e0d8806b224fa
SHA1 (patch-js_src_wasm_WasmSignalHandlers.cpp) = 1c665a9383638774c00f6c5fead5d786b6c7944a
+SHA1 (patch-js_xpconnect_src_XPCMaps.cpp) = ff27c30fb34e0f1dcaade9a1163cb3407f01edef
SHA1 (patch-media_libcubeb_gtest_moz.build) = ea6dcc7ceeb76ce1fb9d508cf43080a2eef3a9e4
SHA1 (patch-media_libcubeb_src_cubeb.c) = 4fe5512c89fa9e0dd64573d2784e5e0f7fd4d866
SHA1 (patch-media_libcubeb_src_cubeb__alsa.c) = f359a66a22f11142d05746e15894d998d3e3bf5a
@@ -37,4 +38,5 @@
SHA1 (patch-toolkit_xre_glxtest.cpp) = cf048491778610454b914400e53072afedd96e7b
SHA1 (patch-xpcom_base_nscore.h) = d7c96eda884d7f370442749c43caba50da61bbe4
SHA1 (patch-xpcom_build_BinaryPath.h) = 9ec4b740388a4a887401efbb89810e96336576f7
-SHA1 (patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__netbsd.cpp) = 0792c2c626d906e71c5183994cb32bf8cdb3e239
+SHA1 (patch-xpcom_reflect_xptcall_md_unix_moz.build) = 412da80be2aa43852e08ad35e6523ae0842167ab
+SHA1 (patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__openbsd.cpp) = 569f10c29da6e8d30ee6b8568c85a629557a3943
diff -r 9f14c56f69c2 -r 9c9423fe3408 www/firefox/mozilla-common.mk
--- a/www/firefox/mozilla-common.mk Wed Nov 07 12:52:14 2018 +0000
+++ b/www/firefox/mozilla-common.mk Wed Nov 07 12:55:11 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mozilla-common.mk,v 1.118 2018/11/04 09:10:40 maya Exp $
+# $NetBSD: mozilla-common.mk,v 1.119 2018/11/07 12:55:11 martin Exp $
#
# common Makefile fragment for mozilla packages based on gecko 2.0.
#
@@ -26,7 +26,11 @@
.include "../../mk/bsd.prefs.mk"
TOOL_DEPENDS+= cbindgen-[0-9]*:../../devel/cbindgen
+.if ${MACHINE_ARCH} == "sparc64"
+CONFIGURE_ARGS+= --disable-nodejs
+.else
TOOL_DEPENDS+= nodejs-[0-9]*:../../lang/nodejs
+.endif
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
BUILD_DEPENDS+= yasm>=1.1:../../devel/yasm
diff -r 9f14c56f69c2 -r 9c9423fe3408 www/firefox/patches/patch-js_xpconnect_src_XPCMaps.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-js_xpconnect_src_XPCMaps.cpp Wed Nov 07 12:55:11 2018 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-js_xpconnect_src_XPCMaps.cpp,v 1.1 2018/11/07 12:55:11 martin Exp $
+
+Avoid alignement issues, see bugzilla
+see https://bugzilla.mozilla.org/show_bug.cgi?id=1434726
+
+--- js/xpconnect/src/XPCMaps.cpp.orig 2018-10-31 01:08:09.000000000 +0100
++++ js/xpconnect/src/XPCMaps.cpp 2018-11-07 13:03:15.754241064 +0100
+@@ -23,7 +23,13 @@ using namespace mozilla;
+ static PLDHashNumber
+ HashIIDPtrKey(const void* key)
+ {
++#ifdef __sparc__
++ uintptr_t v;
++ memcpy(&v, key, sizeof(v));
++ return HashGeneric(&v);
++#else
+ return HashGeneric(*((uintptr_t*)key));
++#endif
+ }
+
+ static bool
diff -r 9f14c56f69c2 -r 9c9423fe3408 www/firefox/patches/patch-xpcom_reflect_xptcall_md_unix_moz.build
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-xpcom_reflect_xptcall_md_unix_moz.build Wed Nov 07 12:55:11 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-xpcom_reflect_xptcall_md_unix_moz.build,v 1.11 2018/11/07 12:55:11 martin Exp $
+
+Make NetBSD/sparc64 use the same xptcall bindings as all other sparc64 ports
+
+--- ./xpcom/reflect/xptcall/md/unix/moz.build.orig 2018-10-31 01:08:15.000000000 +0100
++++ ./xpcom/reflect/xptcall/md/unix/moz.build 2018-11-07 10:29:36.234212381 +0100
+@@ -240,7 +240,7 @@
+ 'xptcstubs_sparc_openbsd.cpp',
+ ]
+
+-if CONFIG['OS_ARCH'] in ('OpenBSD', 'FreeBSD', 'Linux') and CONFIG['CPU_ARCH'] == 'sparc64':
++if CONFIG['OS_ARCH'] in ('OpenBSD', 'FreeBSD', 'NetBSD', 'Linux') and CONFIG['CPU_ARCH'] == 'sparc64':
+ SOURCES += [
+ 'xptcinvoke_asm_sparc64_openbsd.s',
+ 'xptcinvoke_sparc64_openbsd.cpp',
diff -r 9f14c56f69c2 -r 9c9423fe3408 www/firefox/patches/patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__netbsd.cpp
--- a/www/firefox/patches/patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__netbsd.cpp Wed Nov 07 12:52:14 2018 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-$NetBSD: patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__netbsd.cpp,v 1.1 2014/10/15 13:43:32 ryoon Exp $
-
---- xpcom/reflect/xptcall/md/unix/xptcinvoke_sparc64_netbsd.cpp.orig 2014-10-14 18:49:14.000000000 +0000
-+++ xpcom/reflect/xptcall/md/unix/xptcinvoke_sparc64_netbsd.cpp
-@@ -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.
-+ */
-+ PRUint64 *l_d = d;
-+ nsXPTCVariant *l_s = s;
-+ PRUint64 l_paramCount = paramCount;
-+ PRUint64 regCount = 0; // return the number of registers to load from the stack
-+
-+ for(PRUint64 i = 0; i < l_paramCount; i++, l_d++, l_s++)
-+ {
-+ if (regCount < 5) regCount++;
-+
-+ if (l_s->IsPtrData())
-+ {
-+ *l_d = (PRUint64)l_s->ptr;
-+ continue;
-+ }
-+ switch (l_s->type)
-+ {
-+ case nsXPTType::T_I8 : *((PRInt64*)l_d) = l_s->val.i8; break;
-+ case nsXPTType::T_I16 : *((PRInt64*)l_d) = l_s->val.i16; break;
-+ case nsXPTType::T_I32 : *((PRInt64*)l_d) = l_s->val.i32; break;
-+ case nsXPTType::T_I64 : *((PRInt64*)l_d) = l_s->val.i64; break;
-+
-+ case nsXPTType::T_U8 : *((PRUint64*)l_d) = l_s->val.u8; break;
-+ case nsXPTType::T_U16 : *((PRUint64*)l_d) = l_s->val.u16; break;
-+ case nsXPTType::T_U32 : *((PRUint64*)l_d) = l_s->val.u32; break;
-+ case nsXPTType::T_U64 : *((PRUint64*)l_d) = l_s->val.u64; break;
-+
-+ /* in the case of floats, we want to put the bits in to the
-+ 64bit space right justified... floats in the paramter array on
-+ sparcv9 use odd numbered registers.. %f1, %f3, so we have to skip
-+ the space that would be occupied by %f0, %f2, etc.
-+ */
-+ case nsXPTType::T_FLOAT : *(((float*)l_d) + 1) = l_s->val.f; break;
-+ case nsXPTType::T_DOUBLE: *((double*)l_d) = l_s->val.d; break;
-+ case nsXPTType::T_BOOL : *((PRInt64*)l_d) = l_s->val.b; break;
-+ case nsXPTType::T_CHAR : *((PRUint64*)l_d) = l_s->val.c; break;
-+ case nsXPTType::T_WCHAR : *((PRInt64*)l_d) = l_s->val.wc; break;
-+
-+ default:
-+ // all the others are plain pointer types
-+ *((void**)l_d) = l_s->val.p;
-+ break;
-+ }
-+ }
-+
-+ return regCount;
-+}
diff -r 9f14c56f69c2 -r 9c9423fe3408 www/firefox/patches/patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__openbsd.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__openbsd.cpp Wed Nov 07 12:55:11 2018 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__openbsd.cpp,v 1.1 2018/11/07 12:55:11 martin Exp $
+
+Fix compile: adapt to recent changes
+
+--- xpcom/reflect/xptcall/md/unix/xptcinvoke_sparc64_openbsd.cpp.orig 2018-10-31 01:08:15.000000000 +0100
++++ xpcom/reflect/xptcall/md/unix/xptcinvoke_sparc64_openbsd.cpp 2018-11-07 12:19:50.595159109 +0100
+@@ -30,9 +30,9 @@
+ {
+ if (regCount < 5) regCount++;
+
+- if (l_s->IsPtrData())
++ if (l_s->IsIndirect())
+ {
+- *l_d = (uint64_t)l_s->ptr;
++ *l_d = (uint64_t)&l_s->val;
+ continue;
+ }
+ switch (l_s->type)
Home |
Main Index |
Thread Index |
Old Index