diff options
author | Jeremy Olexa <darkside@gentoo.org> | 2010-07-22 22:33:07 +0000 |
---|---|---|
committer | Jeremy Olexa <darkside@gentoo.org> | 2010-07-22 22:33:07 +0000 |
commit | 2ea51d866a85e2f3280f3dc8b76c814a1e8952f2 (patch) | |
tree | 0ffc6582d391bbdbdd8effc3f92d3b26ac0e072a /net-libs | |
parent | x86 stable wrt bug #329417 (diff) | |
download | gentoo-2-2ea51d866a85e2f3280f3dc8b76c814a1e8952f2.tar.gz gentoo-2-2ea51d866a85e2f3280f3dc8b76c814a1e8952f2.tar.bz2 gentoo-2-2ea51d866a85e2f3280f3dc8b76c814a1e8952f2.zip |
Migrate changes from Gentoo Prefix overlay. Convert to EAPI3, add patches, modify paths, etc. Approved by mozilla team in IRC.
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'net-libs')
7 files changed, 637 insertions, 14 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/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 } |