diff options
author | martin <martin@pkgsrc.org> | 2018-11-07 12:55:11 +0000 |
---|---|---|
committer | martin <martin@pkgsrc.org> | 2018-11-07 12:55:11 +0000 |
commit | 82fc2ee28180080a73a8bd1e62ccc851ec7d79d7 (patch) | |
tree | 590869ac3f21baf8ce814b787fadb3bee4b119b7 /www | |
parent | e17ed015c571ba5a6690104e42245ccf6e9b55ef (diff) | |
download | pkgsrc-82fc2ee28180080a73a8bd1e62ccc851ec7d79d7.tar.gz |
Make the pkg at least build on sparc64 (nowhere near working yet)
Diffstat (limited to 'www')
6 files changed, 63 insertions, 92 deletions
diff --git a/www/firefox/distinfo b/www/firefox/distinfo index 09701a69c60..2e1e4fbfb59 100644 --- a/www/firefox/distinfo +++ b/www/firefox/distinfo @@ -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_gc_Memory.cpp) = 40d8285d3f5a060e68a2884dd81b39950f45ff95 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_mozapps_installer_packager.mk) = b2343fbad2556504dfd13601c02 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 --git a/www/firefox/mozilla-common.mk b/www/firefox/mozilla-common.mk index c02acd93791..803478e9c08 100644 --- a/www/firefox/mozilla-common.mk +++ b/www/firefox/mozilla-common.mk @@ -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 @@ UNLIMIT_RESOURCES+= datasize .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 --git a/www/firefox/patches/patch-js_xpconnect_src_XPCMaps.cpp b/www/firefox/patches/patch-js_xpconnect_src_XPCMaps.cpp new file mode 100644 index 00000000000..fe7b50c0486 --- /dev/null +++ b/www/firefox/patches/patch-js_xpconnect_src_XPCMaps.cpp @@ -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 --git a/www/firefox/patches/patch-xpcom_reflect_xptcall_md_unix_moz.build b/www/firefox/patches/patch-xpcom_reflect_xptcall_md_unix_moz.build new file mode 100644 index 00000000000..8974365e713 --- /dev/null +++ b/www/firefox/patches/patch-xpcom_reflect_xptcall_md_unix_moz.build @@ -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 --git a/www/firefox/patches/patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__netbsd.cpp b/www/firefox/patches/patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__netbsd.cpp deleted file mode 100644 index 4f1d2a467b0..00000000000 --- a/www/firefox/patches/patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__netbsd.cpp +++ /dev/null @@ -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 --git a/www/firefox/patches/patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__openbsd.cpp b/www/firefox/patches/patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__openbsd.cpp new file mode 100644 index 00000000000..686f807c49a --- /dev/null +++ b/www/firefox/patches/patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__openbsd.cpp @@ -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) |