diff options
Diffstat (limited to 'net-libs')
-rw-r--r-- | net-libs/xulrunner/ChangeLog | 11 | ||||
-rw-r--r-- | net-libs/xulrunner/Manifest | 9 | ||||
-rw-r--r-- | net-libs/xulrunner/files/xulrunner-1.9-no_sunstudio.patch | 14 | ||||
-rw-r--r-- | net-libs/xulrunner/files/xulrunner-1.9-solaris64.patch | 493 | ||||
-rw-r--r-- | net-libs/xulrunner/files/xulrunner-1.9.1.5-solaris-undef-regs.patch | 19 | ||||
-rw-r--r-- | net-libs/xulrunner/files/xulrunner-1.9.2-solaris-madvise.patch | 13 | ||||
-rw-r--r-- | net-libs/xulrunner/files/xulrunner-1.9_beta5-prefix.patch | 59 | ||||
-rw-r--r-- | net-libs/xulrunner/xulrunner-1.9.2.7.ebuild | 42 |
8 files changed, 644 insertions, 16 deletions
diff --git a/net-libs/xulrunner/ChangeLog b/net-libs/xulrunner/ChangeLog index 0abb2b4e1887..6e88855fafd4 100644 --- a/net-libs/xulrunner/ChangeLog +++ b/net-libs/xulrunner/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-libs/xulrunner # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-libs/xulrunner/ChangeLog,v 1.332 2010/07/22 16:57:52 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/xulrunner/ChangeLog,v 1.333 2010/07/22 22:33:06 darkside Exp $ + + 22 Jul 2010; Jeremy Olexa <darkside@gentoo.org> + +files/xulrunner-1.9.1.5-solaris-undef-regs.patch, + +files/xulrunner-1.9_beta5-prefix.patch, xulrunner-1.9.2.7.ebuild, + +files/xulrunner-1.9.2-solaris-madvise.patch, + +files/xulrunner-1.9-no_sunstudio.patch, + +files/xulrunner-1.9-solaris64.patch: + Migrate changes from Gentoo Prefix overlay. Convert to EAPI3, add patches, + modify paths, etc. Approved by mozilla team in IRC. 22 Jul 2010; Jeroen Roovers <jer@gentoo.org> xulrunner-1.9.2.7.ebuild: Stable for PPC (bug #329279). diff --git a/net-libs/xulrunner/Manifest b/net-libs/xulrunner/Manifest index 3f18e1533290..94eb8103b705 100644 --- a/net-libs/xulrunner/Manifest +++ b/net-libs/xulrunner/Manifest @@ -4,9 +4,14 @@ AUX 1000_fix_alignment.patch 796 RMD160 d6098c483a90d47ead8cc7c643bf51270465b4cd AUX 1002_fix-system-hunspell-dict-detections.patch 3394 RMD160 5db17109743eeff4550dd23c7780afb5eead6505 SHA1 3855eec6b3fc23652bb113ce4215555e7375566e SHA256 335e6f51c5e22ef8735c5a4c99b21b903f6d5dd32d6e766761c39a421ee651f3 AUX 301-xulrunner-xpctools.diff 550 RMD160 12d370d5473de5c54233a70533cd35e37305ef86 SHA1 e3812ce6a4446b0b9d496a9dd4760d03bf0de449 SHA256 6bf510f7df5a41f47501cbdbcffc46d0c04865e3597dc6a575cd4a9cfae1def4 AUX 801-enable-x86_64-tracemonkey.patch 501 RMD160 e8341671a9ab7f05cf58735a2b862ded55d82829 SHA1 d0c194c79993c3c47a8c46726d3f024e044766a0 SHA256 20f558efbf4ed1960b390c353c7eeb94108fcdb8aaf33f1fea6caf44468aeb7c +AUX xulrunner-1.9-no_sunstudio.patch 416 RMD160 fbd1be7182ff8a7aead935cf2f2ce5432aa5f5b8 SHA1 b50c3c30485ef140a0aeeb6de3875761cd906bcb SHA256 2dce8f5a07c623701ce5ae8c2517bd8776adff6c3a371d4762570e806ccf0a34 +AUX xulrunner-1.9-solaris64.patch 18082 RMD160 8d1b3e2b8a6eb191b0d775f0e96391a321d6e981 SHA1 b984870ff665613ece1af103220f7a7a2d4296cb SHA256 d6c8a8f5835aa3075f1da70aa7524dc81d4a081d9b78503ec929d22e5c742f05 +AUX xulrunner-1.9.1.5-solaris-undef-regs.patch 433 RMD160 11f805b661ce8ded829b00ae5e3b134a32420ac4 SHA1 d90ef838e52c3f3d7d21e91bb2451614a9ebefbc SHA256 730150845b311b394dc0c398afb72ef74c7d220dbc6013872d922610189ab0f8 AUX xulrunner-1.9.2-arm-fixes.patch 587 RMD160 495e8037785a1867fad0c088a4c834df6f02291c SHA1 5f08ef1f65771c2891a067c7baac8a4ef8466deb SHA256 a1b0aef546deecafe64c9ce70b08e7252a3eaf8d84a381a62b5edfaf1f735817 AUX xulrunner-1.9.2-fix-pkgconfig-file.patch 397 RMD160 f1724e2476d21751e59845826dfc76dadd9db048 SHA1 0f70bfb689cba2fc609b6642408c41b0032422bc SHA256 74590a970f96a767c353e5530e40048c3c1ea0f652029eb35e782029c0b45d6e AUX xulrunner-1.9.2-noalsa-fixup.patch 1031 RMD160 6eae45ee3e29fa47a7b31688cfcbfb594fcdd79b SHA1 845d4962708281bbd0cba45db82335739a50897b SHA256 1c4e017b6a8d81267a9d4b29b10cc4cfe69b090f8f8903a663f25b5e300eddd5 +AUX xulrunner-1.9.2-solaris-madvise.patch 339 RMD160 50228123c1e85a5bbbe9b53d669f219916addac4 SHA1 363f9a62cd28bc4c0a326b73041c0b9f76909079 SHA256 8380ccd3153e9f31a1c6dcd45cc3ca8a772b2f7663d2839e92831c0198d3f90c +AUX xulrunner-1.9_beta5-prefix.patch 1824 RMD160 e784c2fe11620a39699aea341d2e363ca4ce9e1e SHA1 6992f18c0ea289a28bcf2ea23f00bec88a791af0 SHA256 0d3c6f761dfce8d86be4af75c994100152e889065ad3aa78d5ff7cdfad0a86ad AUX xulrunner-default-prefs.js 677 RMD160 73ec130da332c1d6517a6f838d5fab0cc134289a SHA1 b9efc3ef5e95ad3081f6b68d771e32e848b4b9ac SHA256 53493080276f221f1619153c114caf268206a6fa107972b33a4eb7f1c1cf6fe8 DIST firefox-3.5.6.source.tar.bz2 46914620 RMD160 1002ff196eb8e281c06ef451154b64a903104664 SHA1 fc1de4ddb9c20c7ba9e297737f926e9d8e32eed4 SHA256 60462020c1935702cf87928a886778b3b52e73b0121a8264630b72d370ea3fd1 DIST firefox-3.5.8.source.tar.bz2 46954234 RMD160 97a4394d895fc0d8e7be34c090ebe75540108a90 SHA1 4bfb9a274113fb9ee590c00da69d995dc500d4cc SHA256 9b9b9b0f6e783fd4184a2f08264a3470de4cbf1c41cf9cf887a8373d220bb4db @@ -25,6 +30,6 @@ EBUILD xulrunner-1.9.1.6.ebuild 7948 RMD160 b3bca093dcb0ae36a7d493cb2990d7fe519a EBUILD xulrunner-1.9.1.8.ebuild 7951 RMD160 235df30f6c383961147c5114ab2bbc39e12aad05 SHA1 5fb4b96ba83ef678ac01faa354d4b67b53149dbd SHA256 d2d1768a7ecf76e310cfec673961605fe9c36c836dc50242541b3a46e3fc2938 EBUILD xulrunner-1.9.2.4.ebuild 7191 RMD160 8633d7a9e174309d378bed99dcce757350a5e031 SHA1 f1da98486f1c78d5cb01da2e5b7174618e9694ea SHA256 9105361d24aec4de8f012180008d848b9672be2dc17fb8bc0762831381558149 EBUILD xulrunner-1.9.2.6.ebuild 7360 RMD160 b755a170bf55899f4a7db7cd2f194aa49728fb22 SHA1 21bd2f0bf9ec6797768596c32c6ed9acff97b4e7 SHA256 3269c7adcbf563917ec1a660ca0f4da3c7f6b437f0e527d21e7645eda0e03369 -EBUILD xulrunner-1.9.2.7.ebuild 7305 RMD160 f193dee80e29303795183e999d731e6cd052f82c SHA1 8fa987eed75fa04ae6ccbe706fda32a5fe6042f4 SHA256 c63f24541979a0c23515b1a1a2af3e6c6576ddf647a3b7a7919e5db914c60d0f -MISC ChangeLog 45128 RMD160 616e4addcb2a0dd87f8ea618081c7a50be13fd27 SHA1 cda940b7460ae5e5adf4a04938bb0aaefed2d5de SHA256 19b953e0580acd2b4a53ca6a4517ed4a709b1c0234aafae1e518ab70f70e8d92 +EBUILD xulrunner-1.9.2.7.ebuild 8243 RMD160 8ede82cea64cc53a9157b6846c7b9a112d1499d8 SHA1 4c0764de5a24a7ecb9b72d2acbdb3e9026594688 SHA256 72b27a79b1c40cfc844aa9c5c0243b4aefa038c4771855f1241ad43870387253 +MISC ChangeLog 45568 RMD160 72db73440c8da0fc00f70e8337099ae10785f101 SHA1 2f2fcb9dee0e52f30057efe7d5098755bc6b4cdd SHA256 9923588bcb303876371095c968e8411e3b500e9247751292ee4d08ac9be102e6 MISC metadata.xml 534 RMD160 6f9915565c51559c0e4726fed4e43cffce894306 SHA1 7ababd8846ab59b3ea43ac0153750584aa792055 SHA256 60f561d9e9846e96bfa0d6a9161058986c65dba93879073e7138477b6ce61978 diff --git a/net-libs/xulrunner/files/xulrunner-1.9-no_sunstudio.patch b/net-libs/xulrunner/files/xulrunner-1.9-no_sunstudio.patch new file mode 100644 index 000000000000..7bfb5f181d9c --- /dev/null +++ b/net-libs/xulrunner/files/xulrunner-1.9-no_sunstudio.patch @@ -0,0 +1,14 @@ +http://bugs.gentoo.org/show_bug.cgi?id=228717 + +diff -ur a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in +--- a/toolkit/library/Makefile.in 2008-05-08 11:20:45.000000000 +0200 ++++ b/toolkit/library/Makefile.in 2008-06-21 12:18:33.373338400 +0200 +@@ -227,7 +227,7 @@ + endif + + ifeq ($(OS_ARCH),SunOS) +-EXTRA_DSO_LDOPTS += -lelf -ldemangle -lCstd ++EXTRA_DSO_LDOPTS += -lelf + endif + + ifeq ($(OS_ARCH),WINNT) diff --git a/net-libs/xulrunner/files/xulrunner-1.9-solaris64.patch b/net-libs/xulrunner/files/xulrunner-1.9-solaris64.patch new file mode 100644 index 000000000000..0f2c5acccc8f --- /dev/null +++ b/net-libs/xulrunner/files/xulrunner-1.9-solaris64.patch @@ -0,0 +1,493 @@ +Don't use -G, it results in a relocation error against _DYNAMIC on +amd64, use -shared instead per the manpage, and as it works as well. + +Add assemblyish files for x86_64 solaris + +--- configure.in ++++ configure.in +@@ -2481,7 +2481,7 @@ + AC_LANG_RESTORE + else + ASFLAGS="$ASFLAGS -fPIC" +- DSO_LDOPTS='-G' ++ DSO_LDOPTS='-shared' + _WARNINGS_CFLAGS='' + _WARNINGS_CXXFLAGS='' + if test "$OS_RELEASE" = "5.3"; then +--- js/src/configure.in ++++ js/src/configure.in +@@ -2339,7 +2339,7 @@ + AC_LANG_RESTORE + else + ASFLAGS="$ASFLAGS -fPIC" +- DSO_LDOPTS='-G' ++ DSO_LDOPTS='-shared' + _WARNINGS_CFLAGS='' + _WARNINGS_CXXFLAGS='' + if test "$OS_RELEASE" = "5.3"; then +--- xpcom/reflect/xptcall/src/md/unix/Makefile.in ++++ xpcom/reflect/xptcall/src/md/unix/Makefile.in +@@ -130,7 +130,11 @@ + # + ifeq ($(OS_ARCH),SunOS) + ifeq (86,$(findstring 86,$(OS_TEST))) ++ifdef HAVE_64BIT_OS ++CPPSRCS := xptcinvoke_x86_64_solaris.cpp xptcstubs_x86_64_solaris.cpp ++else + CPPSRCS := xptcinvoke_x86_solaris.cpp xptcstubs_x86_solaris.cpp ++endif + # 28817: if Solaris Intel OS, and native compiler, always build optimised. + ifndef GNU_CC + ASFILES := xptcinvoke_asm_x86_solaris_SUNW.s xptcstubs_asm_x86_solaris_SUNW.s +--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_solaris.cpp ++++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_solaris.cpp +@@ -0,0 +1,210 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- ++ * ++ * ***** 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): ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either of 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 ***** */ ++ ++// Platform specific code to invoke XPCOM methods on native objects ++ ++#include "xptcprivate.h" ++ ++// 6 integral parameters are passed in registers ++const PRUint32 GPR_COUNT = 6; ++ ++// 8 floating point parameters are passed in SSE registers ++const PRUint32 FPR_COUNT = 8; ++ ++// Remember that these 'words' are 64-bit long ++static inline void ++invoke_count_words(PRUint32 paramCount, nsXPTCVariant * s, ++ PRUint32 & nr_gpr, PRUint32 & nr_fpr, PRUint32 & nr_stack) ++{ ++ nr_gpr = 1; // skip one GP register for 'that' ++ nr_fpr = 0; ++ nr_stack = 0; ++ ++ /* Compute number of eightbytes of class MEMORY. */ ++ for (uint32 i = 0; i < paramCount; i++, s++) { ++ if (!s->IsPtrData() ++ && (s->type == nsXPTType::T_FLOAT || s->type == nsXPTType::T_DOUBLE)) { ++ if (nr_fpr < FPR_COUNT) ++ nr_fpr++; ++ else ++ nr_stack++; ++ } ++ else { ++ if (nr_gpr < GPR_COUNT) ++ nr_gpr++; ++ else ++ nr_stack++; ++ } ++ } ++} ++ ++static void ++invoke_copy_to_stack(PRUint64 * d, PRUint32 paramCount, nsXPTCVariant * s, ++ PRUint64 * gpregs, double * fpregs) ++{ ++ PRUint32 nr_gpr = 1; // skip one GP register for 'that' ++ PRUint32 nr_fpr = 0; ++ PRUint64 value; ++ ++ for (uint32 i = 0; i < paramCount; i++, s++) { ++ if (s->IsPtrData()) ++ value = (PRUint64) s->ptr; ++ else { ++ switch (s->type) { ++ case nsXPTType::T_FLOAT: break; ++ case nsXPTType::T_DOUBLE: break; ++ case nsXPTType::T_I8: value = s->val.i8; break; ++ case nsXPTType::T_I16: value = s->val.i16; break; ++ case nsXPTType::T_I32: value = s->val.i32; break; ++ case nsXPTType::T_I64: value = s->val.i64; break; ++ case nsXPTType::T_U8: value = s->val.u8; break; ++ case nsXPTType::T_U16: value = s->val.u16; break; ++ case nsXPTType::T_U32: value = s->val.u32; break; ++ case nsXPTType::T_U64: value = s->val.u64; break; ++ case nsXPTType::T_BOOL: value = s->val.b; break; ++ case nsXPTType::T_CHAR: value = s->val.c; break; ++ case nsXPTType::T_WCHAR: value = s->val.wc; break; ++ default: value = (PRUint64) s->val.p; break; ++ } ++ } ++ ++ if (!s->IsPtrData() && s->type == nsXPTType::T_DOUBLE) { ++ if (nr_fpr < FPR_COUNT) ++ fpregs[nr_fpr++] = s->val.d; ++ else { ++ *((double *)d) = s->val.d; ++ d++; ++ } ++ } ++ else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) { ++ if (nr_fpr < FPR_COUNT) ++ // The value in %xmm register is already prepared to ++ // be retrieved as a float. Therefore, we pass the ++ // value verbatim, as a double without conversion. ++ fpregs[nr_fpr++] = s->val.d; ++ else { ++ *((float *)d) = s->val.f; ++ d++; ++ } ++ } ++ else { ++ if (nr_gpr < GPR_COUNT) ++ gpregs[nr_gpr++] = value; ++ else ++ *d++ = value; ++ } ++ } ++} ++ ++EXPORT_XPCOM_API(nsresult) ++NS_InvokeByIndex_P(nsISupports * that, PRUint32 methodIndex, ++ PRUint32 paramCount, nsXPTCVariant * params) ++{ ++ PRUint32 nr_gpr, nr_fpr, nr_stack; ++ invoke_count_words(paramCount, params, nr_gpr, nr_fpr, nr_stack); ++ ++ // Stack, if used, must be 16-bytes aligned ++ if (nr_stack) ++ nr_stack = (nr_stack + 1) & ~1; ++ ++ // Load parameters to stack, if necessary ++ PRUint64 *stack = (PRUint64 *) __builtin_alloca(nr_stack * 8); ++ PRUint64 gpregs[GPR_COUNT]; ++ double fpregs[FPR_COUNT]; ++ invoke_copy_to_stack(stack, paramCount, params, gpregs, fpregs); ++ ++ // Load FPR registers from fpregs[] ++ register double d0 asm("xmm0"); ++ register double d1 asm("xmm1"); ++ register double d2 asm("xmm2"); ++ register double d3 asm("xmm3"); ++ register double d4 asm("xmm4"); ++ register double d5 asm("xmm5"); ++ register double d6 asm("xmm6"); ++ register double d7 asm("xmm7"); ++ ++ switch (nr_fpr) { ++#define ARG_FPR(N) \ ++ case N+1: d##N = fpregs[N]; ++ ARG_FPR(7); ++ ARG_FPR(6); ++ ARG_FPR(5); ++ ARG_FPR(4); ++ ARG_FPR(3); ++ ARG_FPR(2); ++ ARG_FPR(1); ++ ARG_FPR(0); ++ case 0:; ++#undef ARG_FPR ++ } ++ ++ // Load GPR registers from gpregs[] ++ register PRUint64 a0 asm("rdi"); ++ register PRUint64 a1 asm("rsi"); ++ register PRUint64 a2 asm("rdx"); ++ register PRUint64 a3 asm("rcx"); ++ register PRUint64 a4 asm("r8"); ++ register PRUint64 a5 asm("r9"); ++ ++ switch (nr_gpr) { ++#define ARG_GPR(N) \ ++ case N+1: a##N = gpregs[N]; ++ ARG_GPR(5); ++ ARG_GPR(4); ++ ARG_GPR(3); ++ ARG_GPR(2); ++ ARG_GPR(1); ++ case 1: a0 = (PRUint64) that; ++ case 0:; ++#undef ARG_GPR ++ } ++ ++ // Ensure that assignments to SSE registers won't be optimized away ++ asm("" :: ++ "x" (d0), "x" (d1), "x" (d2), "x" (d3), ++ "x" (d4), "x" (d5), "x" (d6), "x" (d7)); ++ ++ // Get pointer to method ++ PRUint64 methodAddress = *((PRUint64 *)that); ++ methodAddress += 8 * methodIndex; ++ methodAddress = *((PRUint64 *)methodAddress); ++ ++ typedef PRUint32 (*Method)(PRUint64, PRUint64, PRUint64, PRUint64, PRUint64, PRUint64); ++ PRUint32 result = ((Method)methodAddress)(a0, a1, a2, a3, a4, a5); ++ return result; ++} +--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_solaris.cpp ++++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_solaris.cpp +@@ -0,0 +1,236 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- ++ * ++ * ***** 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): ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either of 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 ***** */ ++ ++// Implement shared vtbl methods. ++ ++#include "xptcprivate.h" ++#include "xptiprivate.h" ++ ++ ++const PRUint32 PARAM_BUFFER_COUNT = 16; ++const PRUint32 GPR_COUNT = 6; ++const PRUint32 FPR_COUNT = 8; ++ ++// PrepareAndDispatch() is called by SharedStub() and calls the actual method. ++// ++// - 'args[]' contains the arguments passed on stack ++// - 'gpregs[]' contains the arguments passed in integer registers ++// - 'fpregs[]' contains the arguments passed in floating point registers ++// ++// The parameters are mapped into an array of type 'nsXPTCMiniVariant' ++// and then the method gets called. ++ ++extern "C" nsresult ++PrepareAndDispatch(nsXPTCStubBase * self, PRUint32 methodIndex, ++ PRUint64 * args, PRUint64 * gpregs, double *fpregs) ++{ ++ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; ++ nsXPTCMiniVariant* dispatchParams = NULL; ++ const nsXPTMethodInfo* info; ++ PRUint32 paramCount; ++ PRUint32 i; ++ nsresult result = NS_ERROR_FAILURE; ++ ++ NS_ASSERTION(self,"no self"); ++ ++ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info); ++ NS_ASSERTION(info,"no method info"); ++ if (!info) ++ return NS_ERROR_UNEXPECTED; ++ ++ paramCount = info->GetParamCount(); ++ ++ // setup variant array pointer ++ if (paramCount > PARAM_BUFFER_COUNT) ++ dispatchParams = new nsXPTCMiniVariant[paramCount]; ++ else ++ dispatchParams = paramBuffer; ++ ++ NS_ASSERTION(dispatchParams,"no place for params"); ++ if (!dispatchParams) ++ return NS_ERROR_OUT_OF_MEMORY; ++ ++ PRUint64* ap = args; ++ PRUint32 nr_gpr = 1; // skip one GPR register for 'that' ++ PRUint32 nr_fpr = 0; ++ PRUint64 value; ++ ++ for (i = 0; i < paramCount; i++) { ++ const nsXPTParamInfo& param = info->GetParam(i); ++ const nsXPTType& type = param.GetType(); ++ nsXPTCMiniVariant* dp = &dispatchParams[i]; ++ ++ if (!param.IsOut() && type == nsXPTType::T_DOUBLE) { ++ if (nr_fpr < FPR_COUNT) ++ dp->val.d = fpregs[nr_fpr++]; ++ else ++ dp->val.d = *(double*) ap++; ++ continue; ++ } ++ else if (!param.IsOut() && type == nsXPTType::T_FLOAT) { ++ if (nr_fpr < FPR_COUNT) ++ // The value in %xmm register is already prepared to ++ // be retrieved as a float. Therefore, we pass the ++ // value verbatim, as a double without conversion. ++ dp->val.d = *(double*) ap++; ++ else ++ dp->val.f = *(float*) ap++; ++ continue; ++ } ++ else { ++ if (nr_gpr < GPR_COUNT) ++ value = gpregs[nr_gpr++]; ++ else ++ value = *ap++; ++ } ++ ++ if (param.IsOut() || !type.IsArithmetic()) { ++ dp->val.p = (void*) value; ++ continue; ++ } ++ ++ switch (type) { ++ case nsXPTType::T_I8: dp->val.i8 = (PRInt8) value; break; ++ case nsXPTType::T_I16: dp->val.i16 = (PRInt16) value; break; ++ case nsXPTType::T_I32: dp->val.i32 = (PRInt32) value; break; ++ case nsXPTType::T_I64: dp->val.i64 = (PRInt64) value; break; ++ case nsXPTType::T_U8: dp->val.u8 = (PRUint8) value; break; ++ case nsXPTType::T_U16: dp->val.u16 = (PRUint16) value; break; ++ case nsXPTType::T_U32: dp->val.u32 = (PRUint32) value; break; ++ case nsXPTType::T_U64: dp->val.u64 = (PRUint64) value; break; ++ case nsXPTType::T_BOOL: dp->val.b = (PRBool) value; break; ++ case nsXPTType::T_CHAR: dp->val.c = (char) value; break; ++ case nsXPTType::T_WCHAR: dp->val.wc = (wchar_t) value; break; ++ ++ default: ++ NS_ASSERTION(0, "bad type"); ++ break; ++ } ++ } ++ ++ result = self->mOuter->CallMethod((PRUint16) methodIndex, info, dispatchParams); ++ ++ if (dispatchParams != paramBuffer) ++ delete [] dispatchParams; ++ ++ return result; ++} ++ ++#ifdef __GNUC__ /* Gnu Compiler. */ ++#define STUB_ENTRY(n) \ ++asm(".section \".text\"\n\t" \ ++ ".align 2\n\t" \ ++ ".if " #n " < 10\n\t" \ ++ ".globl _ZN14nsXPTCStubBase5Stub" #n "Ev\n\t" \ ++ ".hidden _ZN14nsXPTCStubBase5Stub" #n "Ev\n\t" \ ++ ".type _ZN14nsXPTCStubBase5Stub" #n "Ev,@function\n" \ ++ "_ZN14nsXPTCStubBase5Stub" #n "Ev:\n\t" \ ++ ".elseif " #n " < 100\n\t" \ ++ ".globl _ZN14nsXPTCStubBase6Stub" #n "Ev\n\t" \ ++ ".hidden _ZN14nsXPTCStubBase6Stub" #n "Ev\n\t" \ ++ ".type _ZN14nsXPTCStubBase6Stub" #n "Ev,@function\n" \ ++ "_ZN14nsXPTCStubBase6Stub" #n "Ev:\n\t" \ ++ ".elseif " #n " < 1000\n\t" \ ++ ".globl _ZN14nsXPTCStubBase7Stub" #n "Ev\n\t" \ ++ ".hidden _ZN14nsXPTCStubBase7Stub" #n "Ev\n\t" \ ++ ".type _ZN14nsXPTCStubBase7Stub" #n "Ev,@function\n" \ ++ "_ZN14nsXPTCStubBase7Stub" #n "Ev:\n\t" \ ++ ".else\n\t" \ ++ ".err \"stub number " #n " >= 1000 not yet supported\"\n\t" \ ++ ".endif\n\t" \ ++ "movl $" #n ", %eax\n\t" \ ++ "jmp SharedStub\n\t" \ ++ ".if " #n " < 10\n\t" \ ++ ".size _ZN14nsXPTCStubBase5Stub" #n "Ev,.-_ZN14nsXPTCStubBase5Stub" #n "Ev\n\t" \ ++ ".elseif " #n " < 100\n\t" \ ++ ".size _ZN14nsXPTCStubBase6Stub" #n "Ev,.-_ZN14nsXPTCStubBase6Stub" #n "Ev\n\t" \ ++ ".else\n\t" \ ++ ".size _ZN14nsXPTCStubBase7Stub" #n "Ev,.-_ZN14nsXPTCStubBase7Stub" #n "Ev\n\t" \ ++ ".endif"); ++ ++// static nsresult SharedStub(PRUint32 methodIndex) ++asm(".section \".text\"\n\t" ++ ".align 2\n\t" ++ ".type SharedStub,@function\n\t" ++ "SharedStub:\n\t" ++ // make room for gpregs (48), fpregs (64) ++ "pushq %rbp\n\t" ++ "movq %rsp,%rbp\n\t" ++ "subq $112,%rsp\n\t" ++ // save GP registers ++ "movq %rdi,-112(%rbp)\n\t" ++ "movq %rsi,-104(%rbp)\n\t" ++ "movq %rdx, -96(%rbp)\n\t" ++ "movq %rcx, -88(%rbp)\n\t" ++ "movq %r8 , -80(%rbp)\n\t" ++ "movq %r9 , -72(%rbp)\n\t" ++ "leaq -112(%rbp),%rcx\n\t" ++ // save FP registers ++ "movsd %xmm0,-64(%rbp)\n\t" ++ "movsd %xmm1,-56(%rbp)\n\t" ++ "movsd %xmm2,-48(%rbp)\n\t" ++ "movsd %xmm3,-40(%rbp)\n\t" ++ "movsd %xmm4,-32(%rbp)\n\t" ++ "movsd %xmm5,-24(%rbp)\n\t" ++ "movsd %xmm6,-16(%rbp)\n\t" ++ "movsd %xmm7, -8(%rbp)\n\t" ++ "leaq -64(%rbp),%r8\n\t" ++ // rdi has the 'self' pointer already ++ "movl %eax,%esi\n\t" ++ "leaq 16(%rbp),%rdx\n\t" ++ "call PrepareAndDispatch@plt\n\t" ++ "leave\n\t" ++ "ret\n\t" ++ ".size SharedStub,.-SharedStub"); ++ ++#elif defined(__SUNPRO_CC) /* Sun Workshop Compiler. */ ++ ++#define STUB_ENTRY(n) ++ ++#else ++#error "can't find a compiler to use" ++#endif /* __GNUC__ */ ++ ++#define SENTINEL_ENTRY(n) \ ++nsresult nsXPTCStubBase::Sentinel##n() \ ++{ \ ++ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ ++ return NS_ERROR_NOT_IMPLEMENTED; \ ++} ++ ++#include "xptcstubsdef.inc" diff --git a/net-libs/xulrunner/files/xulrunner-1.9.1.5-solaris-undef-regs.patch b/net-libs/xulrunner/files/xulrunner-1.9.1.5-solaris-undef-regs.patch new file mode 100644 index 000000000000..2ed620ebcbd5 --- /dev/null +++ b/net-libs/xulrunner/files/xulrunner-1.9.1.5-solaris-undef-regs.patch @@ -0,0 +1,19 @@ +http://marc.info/?l=opensolaris-desktop-discuss&m=124625949400704&w=2 + +--- firefox/js/src/nanojit/Nativei386.h.orig 2008-12-19 16:11:09.743712966 +0800 ++++ firefox/js/src/nanojit/Nativei386.h 2008-12-19 16:12:32.156744648 +0800 +@@ -40,6 +40,14 @@ + #ifndef __nanojit_Nativei386__ + #define __nanojit_Nativei386__ + ++#undef EAX ++#undef EBX ++#undef ECX ++#undef EDX ++#undef ESP ++#undef EBP ++#undef ESI ++#undef EDI + + namespace nanojit + { diff --git a/net-libs/xulrunner/files/xulrunner-1.9.2-solaris-madvise.patch b/net-libs/xulrunner/files/xulrunner-1.9.2-solaris-madvise.patch new file mode 100644 index 000000000000..fd3b34571987 --- /dev/null +++ b/net-libs/xulrunner/files/xulrunner-1.9.2-solaris-madvise.patch @@ -0,0 +1,13 @@ +--- layout/base/nsPresArena.cpp ++++ layout/base/nsPresArena.cpp +@@ -73,6 +73,10 @@ + #else + # include <unistd.h> + # include <sys/mman.h> ++# ifdef SOLARIS ++/* madvise is not declared for C++ */ ++extern "C" int madvise(void *addr, size_t len, int behav); ++# endif + # ifndef MAP_ANON + # ifdef MAP_ANONYMOUS + # define MAP_ANON MAP_ANONYMOUS diff --git a/net-libs/xulrunner/files/xulrunner-1.9_beta5-prefix.patch b/net-libs/xulrunner/files/xulrunner-1.9_beta5-prefix.patch new file mode 100644 index 000000000000..a06a92b50fca --- /dev/null +++ b/net-libs/xulrunner/files/xulrunner-1.9_beta5-prefix.patch @@ -0,0 +1,59 @@ +* gre conf location is a bit hardcoded unfortunately :( + +--- extensions/java/xpcom/interfaces/org/mozilla/xpcom/Mozilla.java ++++ extensions/java/xpcom/interfaces/org/mozilla/xpcom/Mozilla.java +@@ -470,8 +470,8 @@ + + final String greUserConfFile = ".gre.config"; + final String greUserConfDir = ".gre.d"; +- final String greConfPath = "/etc/gre.conf"; +- final String greConfDir = "/etc/gre.d"; ++ final String greConfPath = "@GENTOO_PORTAGE_EPREFIX@/etc/gre.conf"; ++ final String greConfDir = "@GENTOO_PORTAGE_EPREFIX@/etc/gre.d"; + + env = System.getProperty("user.home"); + if (env != null) { +--- xpcom/build/nsXPCOMPrivate.h ++++ xpcom/build/nsXPCOMPrivate.h +@@ -245,8 +245,8 @@ + #endif + + #define GRE_CONF_NAME ".gre.config" +-#define GRE_CONF_PATH "/etc/gre.conf" +-#define GRE_CONF_DIR "/etc/gre.d" ++#define GRE_CONF_PATH "@GENTOO_PORTAGE_EPREFIX@/etc/gre.conf" ++#define GRE_CONF_DIR "@GENTOO_PORTAGE_EPREFIX@/etc/gre.d" + #define GRE_USER_CONF_DIR ".gre.d" + #endif + +--- xulrunner/installer/Makefile.in ++++ xulrunner/installer/Makefile.in +@@ -73,7 +73,7 @@ + + ifndef SKIP_GRE_REGISTRATION + # to register xulrunner per-user, override this with $HOME/.gre.d +-regdir = /etc/gre.d ++regdir = @sysconfdir@/gre.d + + install:: $(MOZILLA_VERSION).system.conf + $(NSINSTALL) -D $(DESTDIR)$(regdir) +--- xulrunner/app/nsRegisterGREUnix.cpp ++++ xulrunner/app/nsRegisterGREUnix.cpp +@@ -130,7 +130,7 @@ + + nsresult rv; + +- char root[MAXPATHLEN] = "/etc/gre.d"; ++ char root[MAXPATHLEN] = "@GENTOO_PORTAGE_EPREFIX@/etc/gre.d"; + + if (!aRegisterGlobally) { + char *home = PR_GetEnv("HOME"); +@@ -222,7 +222,7 @@ + { + nsresult rv; + +- char root[MAXPATHLEN] = "/etc/gre.d"; ++ char root[MAXPATHLEN] = "@GENTOO_PORTAGE_EPREFIX@/etc/gre.d"; + + if (!aRegisterGlobally) { + char *home = PR_GetEnv("HOME"); diff --git a/net-libs/xulrunner/xulrunner-1.9.2.7.ebuild b/net-libs/xulrunner/xulrunner-1.9.2.7.ebuild index 852f821adcd1..28d1eda3a77a 100644 --- a/net-libs/xulrunner/xulrunner-1.9.2.7.ebuild +++ b/net-libs/xulrunner/xulrunner-1.9.2.7.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-libs/xulrunner/xulrunner-1.9.2.7.ebuild,v 1.5 2010/07/22 16:57:52 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/xulrunner/xulrunner-1.9.2.7.ebuild,v 1.6 2010/07/22 22:33:06 darkside Exp $ -EAPI="2" +EAPI="3" WANT_AUTOCONF="2.1" inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib java-pkg-opt-2 autotools python @@ -17,7 +17,7 @@ HOMEPAGE="http://developer.mozilla.org/en/docs/XULRunner" SRC_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${MY_PV}/source/firefox-${MY_PV}.source.tar.bz2 http://dev.gentoo.org/~anarchy/dist/${PATCH}.tar.bz2" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ppc ~ppc64 ~sparc x86" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" SLOT="1.9" LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )" IUSE="+alsa debug +ipc libnotify system-sqlite wifi" @@ -67,6 +67,17 @@ src_prepare() { # Fix broken mozilla-plugin.pc epatch "${FILESDIR}/${PN}-1.9.2-fix-pkgconfig-file.patch" + epatch "${FILESDIR}"/${PN}-1.9-no_sunstudio.patch # breaks sunstudio + epatch "${FILESDIR}"/${PN}-1.9-solaris64.patch + epatch "${FILESDIR}"/${PN}-1.9.1.5-solaris-undef-regs.patch + epatch "${FILESDIR}"/${PN}-1.9.2-solaris-madvise.patch + epatch "${FILESDIR}"/${PN}-1.9_beta5-prefix.patch + eprefixify \ + extensions/java/xpcom/interfaces/org/mozilla/xpcom/Mozilla.java \ + xpcom/build/nsXPCOMPrivate.h \ + xulrunner/installer/Makefile.in \ + xulrunner/app/nsRegisterGREUnix.cpp + # Ensure we find myspell dict. epatch "${FILESDIR}/1002_fix-system-hunspell-dict-detections.patch" @@ -142,8 +153,9 @@ src_configure() { # Use system libraries mozconfig_annotate '' --enable-system-cairo mozconfig_annotate '' --enable-system-hunspell - mozconfig_annotate '' --with-system-nspr - mozconfig_annotate '' --with-system-nss + mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${EPREFIX}"/usr + mozconfig_annotate '' --with-system-nss --with-nss-prefix="${EPREFIX}"/usr + mozconfig_annotate '' --x-includes="${EPREFIX}"/usr/include --x-libraries="${EPREFIX}"/usr/$(get_libdir) mozconfig_annotate '' --with-system-bz2 mozconfig_use_enable ipc # +ipc, upstream default @@ -182,20 +194,24 @@ src_configure() { sed -i -e "s:/usr/lib/mozilla/plugins:/usr/$(get_libdir)/nsbrowser/plugins:" \ "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path!" + # hack added to workaround bug 299905 on hosts with libc that doesn't + # support tls, (probably will only hit this condition with Gentoo Prefix) + tc-has-tls -l || export ac_cv_thread_keyword=no + CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" PYTHON="$(PYTHON)" econf } src_install() { emake DESTDIR="${D}" install || die "emake install failed" - rm "${D}"/usr/bin/xulrunner + rm "${ED}"/usr/bin/xulrunner MOZLIBDIR="/usr/$(get_libdir)/${PN}-${MAJ_PV}" SDKDIR="/usr/$(get_libdir)/${PN}-devel-${MAJ_PV}/sdk" if has_multilib_profile; then local config - for config in "${D}"/etc/gre.d/*.system.conf ; do + for config in "${ED}"/etc/gre.d/*.system.conf ; do mv "${config}" "${config%.conf}.${CHOST}.conf" done fi @@ -205,18 +221,18 @@ src_install() { # env.d file for ld search path dodir /etc/env.d - echo "LDPATH=${MOZLIBDIR}" > "${D}"/etc/env.d/08xulrunner || die "env.d failed" + echo "LDPATH=${EPREFIX}/${MOZLIBDIR}" > "${ED}"/etc/env.d/08xulrunner || die "env.d failed" # Add our defaults to xulrunner and out of firefox cp "${FILESDIR}"/xulrunner-default-prefs.js \ - "${D}/${MOZLIBDIR}/defaults/pref/all-gentoo.js" || \ + "${ED}/${MOZLIBDIR}/defaults/pref/all-gentoo.js" || \ die "failed to cp xulrunner-default-prefs.js" if use java ; then - java-pkg_regjar "${D}/${MOZLIBDIR}/javaxpcom.jar" - java-pkg_regso "${D}/${MOZLIBDIR}/libjavaxpcomglue.so" - java-pkg_regjar "${D}/${SDKDIR}/lib/MozillaGlue.jar" - java-pkg_regjar "${D}/${SDKDIR}/lib/MozillaInterfaces.jar" + java-pkg_regjar "${ED}/${MOZLIBDIR}/javaxpcom.jar" + java-pkg_regso "${ED}/${MOZLIBDIR}/libjavaxpcomglue.so" + java-pkg_regjar "${ED}/${SDKDIR}/lib/MozillaGlue.jar" + java-pkg_regjar "${ED}/${SDKDIR}/lib/MozillaInterfaces.jar" fi } |