diff options
author | Beat Gaetzi <beat@FreeBSD.org> | 2010-08-08 08:56:06 +0000 |
---|---|---|
committer | Beat Gaetzi <beat@FreeBSD.org> | 2010-08-08 08:56:06 +0000 |
commit | ab0a516e661ae48fb407ef8b80022d443cf346c6 (patch) | |
tree | 5e64dfeb065ed4bdd55d8630ac90a8b36370a169 /www/libxul | |
parent | cad06c607721cb6b742d84e81d329b3f8fc554e4 (diff) | |
download | ports-ab0a516e661ae48fb407ef8b80022d443cf346c6.tar.gz ports-ab0a516e661ae48fb407ef8b80022d443cf346c6.zip |
Notes
Diffstat (limited to 'www/libxul')
29 files changed, 948 insertions, 537 deletions
diff --git a/www/libxul/Makefile b/www/libxul/Makefile index 106fdaf2836d..b646c4fbfcd3 100644 --- a/www/libxul/Makefile +++ b/www/libxul/Makefile @@ -3,40 +3,40 @@ # Whom: Michael Johnson <ahze@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/www/libxul/Makefile,v 1.25 2009/04/07 17:47:01 marcus Exp $ # PORTNAME= libxul -PORTVERSION= 1.9.0.17 -PORTREVISION= 2 +DISTVERSION= 1.9.2.8 CATEGORIES?= www devel MASTER_SITES= ${MASTER_SITE_MOZILLA} -MASTER_SITE_SUBDIR= xulrunner/releases/${PORTVERSION}/source/ -DISTNAME= xulrunner-${PORTVERSION}-source +MASTER_SITE_SUBDIR= xulrunner/releases/${DISTVERSION}/source +DISTNAME= xulrunner-${DISTVERSION}.source MAINTAINER?= gecko@FreeBSD.org COMMENT?= Mozilla runtime package that can be used to bootstrap XUL+XPCOM apps -LIB_DEPENDS?= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib - -CONFLICTS= mozilla-[0-9]* xulrunner-[0-9]* +WRKSRC= ${WRKDIR}/mozilla-1.9.2 +CONFLICTS= mozilla-[0-9]* GECKO_PLIST_PRE_DIRS= lib/${MOZILLA}/bin lib/${MOZILLA}/idl \ - lib/${MOZILLA}/include lib/${MOZILLA}/lib \ - lib/${MOZILLA}/sdk/idl lib/${MOZILLA}/sdk/include + lib/${MOZILLA}/include lib/${MOZILLA}/lib +USE_AUTOTOOLS= autoconf:213 WANT_GNOME= yes WANT_PERL= yes ALL_TARGET= default HAS_CONFIGURE= yes USE_BZIP2= yes USE_GMAKE= yes +MAKE_JOBS_SAFE= yes MAKE_ENV= SKIP_GRE_REGISTRATION=1 mozappdir=${PREFIX}/lib/${MOZILLA} LDFLAGS+= -Wl,-rpath,${PREFIX}/lib/${MOZ_RPATH} +USE_LDCONFIG= ${PREFIX}/lib/${MOZILLA} PORT_MOZCONFIG= ${WRKSRC}/xulrunner/config/mozconfig MOZ_OPTIONS?= --with-default-mozilla-five-home=${PREFIX}/lib/${MOZILLA} \ --disable-javaxpcom --enable-canvas \ - --enable-system-cairo + --enable-system-cairo --disable-updater \ + --disable-necko-wifi --disable-ipc MOZ_EXTENSIONS= default,cookie,permissions OPTIONS= # Empty, used for generic gecko OPTIONS USE_GECKO_OPTIONS= java debug logging optimized_cflags @@ -44,16 +44,42 @@ USE_GECKO= gecko MOZILLA_EXEC_NAME=xulrunner MOZ_TOOLKIT= cairo-gtk2 USE_MOZILLA= -png -nss -dbm -jpeg -MOZ_PKGCONFIG_FILES= libxul-embedding-unstable libxul-embedding \ - libxul-unstable libxul mozilla-gtkmozembed-embedding \ +MOZ_PKGCONFIG_FILES= libxul-embedding libxul mozilla-gtkmozembed-embedding \ mozilla-gtkmozembed mozilla-js mozilla-nss mozilla-plugin +OPTIONS= DBUS "Enable D-BUS support" on + .include <bsd.port.pre.mk> +GECKO_PTHREAD_LIBS!=${CC} -dumpspecs | ${GREP} -m 1 '%{\!pg: %{pthread:' | ${SED +} -e 's|^.*%{\!pg: %{pthread:|| ; s|}.*$$||' || ${TRUE} + +.if ${OSVERSION} < 700000 +LIB_DEPENDS+= pulse.0:${PORTSDIR}/audio/pulseaudio +EXTRA_PATCHES= ${FILESDIR}/releng6_pulseaudio +.else +EXTRA_PATCHES= ${FILESDIR}/libsydney_oss +.endif + +.if defined(WITHOUT_DBUS) +MOZ_OPTIONS+= --disable-dbus --disable-libnotify +.else +LIB_DEPENDS+= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib \ + notify.1:${PORTSDIR}/devel/libnotify +.endif + post-patch: ${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS:C/-pthread/${GECKO_PTHREAD_LIBS}/}|' \ ${WRKSRC}/storage/build/Makefile.in \ ${WRKSRC}/db/sqlite3/src/Makefile.in + @${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g ; \ + s|-lpthread|${PTHREAD_LIBS}|g ; \ + s|echo aout|echo elf|g ; \ + s|/usr/X11R6|${LOCALBASE}|g' \ + ${WRKSRC}/js/src/configure + +pre-configure: + (cd ${WRKSRC}/js/src/ && ${AUTOCONF}) post-build: @${REINPLACE_CMD} -e "s|\(Libs:.*\)\($$\)|\1 -Wl,-rpath,${PREFIX}/lib/${MOZ_RPATH}\2| ; \ diff --git a/www/libxul/distinfo b/www/libxul/distinfo index fbf5ad0cddad..3e161d021e40 100644 --- a/www/libxul/distinfo +++ b/www/libxul/distinfo @@ -1,3 +1,3 @@ -MD5 (xulrunner-1.9.0.17-source.tar.bz2) = 25b8f426abe7d5d3fec7fb789250cf23 -SHA256 (xulrunner-1.9.0.17-source.tar.bz2) = 78fad9fa3ba081642610220d34fc79e49c68c5d767bbfc847363d6cc2c4c4845 -SIZE (xulrunner-1.9.0.17-source.tar.bz2) = 37382767 +MD5 (xulrunner-1.9.2.8.source.tar.bz2) = 75cf324216ccedd655d0d913ae122a7b +SHA256 (xulrunner-1.9.2.8.source.tar.bz2) = 55999f277737a07f144a1b1e11cdd6acbaeae6979e92089518aeb0991aeca829 +SIZE (xulrunner-1.9.2.8.source.tar.bz2) = 51233312 diff --git a/www/libxul/files/libsydney_oss b/www/libxul/files/libsydney_oss new file mode 100644 index 000000000000..a68d549b2fef --- /dev/null +++ b/www/libxul/files/libsydney_oss @@ -0,0 +1,15 @@ +--- media/libsydneyaudio/src/Makefile.in.orig 2009-08-17 14:21:06.000000000 +0200 ++++ media/libsydneyaudio/src/Makefile.in 2009-08-17 14:21:53.000000000 +0200 +@@ -45,6 +45,12 @@ + LIBRARY_NAME = sydneyaudio + FORCE_STATIC_LIB= 1 + ++ifeq ($(OS_ARCH),FreeBSD) ++CSRCS = \ ++ sydney_audio_oss.c \ ++ $(NULL) ++endif ++ + ifeq ($(OS_ARCH),Linux) + CSRCS = \ + sydney_audio_alsa.c \ diff --git a/www/libxul/files/patch-configure b/www/libxul/files/patch-configure deleted file mode 100644 index 768a178142d2..000000000000 --- a/www/libxul/files/patch-configure +++ /dev/null @@ -1,38 +0,0 @@ ---- configure.orig 2008-05-28 11:31:02.000000000 -0700 -+++ configure 2008-07-26 07:27:03.712894513 -0700 -@@ -10808,7 +10808,7 @@ - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_save_LIBS="$LIBS" --LIBS="-liconv $LIBS" -+LIBS="-L$LOCALBASE/lib -liconv $LIBS" - cat > conftest.$ac_ext <<EOF - #line 10814 "configure" - #include "confdefs.h" -@@ -10839,7 +10839,7 @@ - fi - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 -- _ICONV_LIBS="$_ICONV_LIBS -liconv" -+ _ICONV_LIBS="$_ICONV_LIBS -L$LOCALBASE/lib -liconv" - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6 -@@ -10849,7 +10849,7 @@ - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_save_LIBS="$LIBS" --LIBS="-liconv $LIBS" -+LIBS="-L$LOCALBASE/lib -liconv $LIBS" - cat > conftest.$ac_ext <<EOF - #line 10855 "configure" - #include "confdefs.h" -@@ -10880,7 +10880,7 @@ - fi - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 -- _ICONV_LIBS="$_ICONV_LIBS -liconv" -+ _ICONV_LIBS="$_ICONV_LIBS -L$LOCALBASE/lib -liconv" - else - echo "$ac_t""no" 1>&6 - fi diff --git a/www/libxul/files/patch-configure.in b/www/libxul/files/patch-configure.in new file mode 100644 index 000000000000..aab5aa4ba2df --- /dev/null +++ b/www/libxul/files/patch-configure.in @@ -0,0 +1,22 @@ +--- configure.in.orig 2009-10-29 23:11:31.000000000 +0100 ++++ configure.in 2009-11-16 19:51:19.000000000 +0100 +@@ -1352,7 +1352,7 @@ + CPU_ARCH=sparc + ;; + +-x86_64 | ia64) ++amd64 | x86_64 | ia64) + CPU_ARCH="$OS_TEST" + ;; + +@@ -3582,8 +3582,8 @@ + *) + + AC_CHECK_LIB(c, iconv, [_ICONV_LIBS="$_ICONV_LIBS"], +- AC_CHECK_LIB(iconv, iconv, [_ICONV_LIBS="$_ICONV_LIBS -liconv"], +- AC_CHECK_LIB(iconv, libiconv, [_ICONV_LIBS="$_ICONV_LIBS -liconv"]))) ++ AC_CHECK_LIB(iconv, iconv, [_ICONV_LIBS="$_ICONV_LIBS -L$LOCALBASE/lib -liconv"], ++ AC_CHECK_LIB(iconv, libiconv, [_ICONV_LIBS="$_ICONV_LIBS -L$LOCALBASE/lib -liconv"]))) + _SAVE_LIBS=$LIBS + LIBS="$LIBS $_ICONV_LIBS" + AC_CACHE_CHECK( diff --git a/www/libxul/files/patch-content-xslt-public-txDouble.h b/www/libxul/files/patch-content-xslt-public-txDouble.h new file mode 100644 index 000000000000..cd4acfc534bf --- /dev/null +++ b/www/libxul/files/patch-content-xslt-public-txDouble.h @@ -0,0 +1,11 @@ +--- content/xslt/public/txDouble.h.orig 2009-08-16 21:46:27.000000000 +0200 ++++ content/xslt/public/txDouble.h 2009-08-16 21:49:53.000000000 +0200 +@@ -43,7 +43,7 @@ + //A trick to handle IEEE floating point exceptions on FreeBSD - E.D. + #ifdef __FreeBSD__ + #include <ieeefp.h> +-#ifdef __alpha__ ++#if !defined(__amd64__) && !defined(__i386__) + static fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP; + #else + static fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP|FP_X_DNML; diff --git a/www/libxul/files/patch-content_xslt_public_txDouble.h b/www/libxul/files/patch-content_xslt_public_txDouble.h deleted file mode 100644 index 534bccba48be..000000000000 --- a/www/libxul/files/patch-content_xslt_public_txDouble.h +++ /dev/null @@ -1,20 +0,0 @@ ---- content/xslt/public/txDouble.h.orig Fri Oct 13 00:00:29 2006 -+++ content/xslt/public/txDouble.h Fri Oct 13 00:00:53 2006 -@@ -41,7 +41,7 @@ - #define __txdouble_h__ - - //A trick to handle IEEE floating point exceptions on FreeBSD - E.D. --#ifdef __FreeBSD__ -+/* #ifdef __FreeBSD__ - #include <ieeefp.h> - #ifdef __alpha__ - fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP; -@@ -50,7 +50,7 @@ - #endif - fp_except_t oldmask = fpsetmask(~allmask); - #endif -- -+*/ - /** - * Macros to workaround math-bugs bugs in various platforms - */ diff --git a/www/libxul/files/patch-js-src-Makefile.in b/www/libxul/files/patch-js-src-Makefile.in new file mode 100644 index 000000000000..751596240adf --- /dev/null +++ b/www/libxul/files/patch-js-src-Makefile.in @@ -0,0 +1,11 @@ +--- js/src/Makefile.in.orig 2009-05-11 15:21:19.000000000 +0200 ++++ js/src/Makefile.in 2009-05-11 15:21:34.000000000 +0200 +@@ -427,7 +427,7 @@ + endif # WINNT + + ifeq ($(OS_ARCH),FreeBSD) +-EXTRA_LIBS += -pthread ++EXTRA_LIBS += -pthread -lc + endif + ifeq ($(OS_ARCH),IRIX) + ifdef USE_N32 diff --git a/www/libxul/files/patch-js-src-config-mkdepend-Makefile.in b/www/libxul/files/patch-js-src-config-mkdepend-Makefile.in new file mode 100644 index 000000000000..e65ee360d347 --- /dev/null +++ b/www/libxul/files/patch-js-src-config-mkdepend-Makefile.in @@ -0,0 +1,11 @@ +--- js/src/config/mkdepend/Makefile.in.orig 2009-08-15 17:45:39.000000000 +0200 ++++ js/src/config/mkdepend/Makefile.in 2009-08-15 17:46:08.000000000 +0200 +@@ -72,7 +72,7 @@ + + include $(topsrcdir)/config/rules.mk + +-HOST_CFLAGS += -DINCLUDEDIR=\"/usr/include\" -DOBJSUFFIX=\".$(OBJ_SUFFIX)\" ++HOST_CFLAGS += -DINCLUDEDIR=\"%%LOCALBASE%%/include\" -DOBJSUFFIX=\".$(OBJ_SUFFIX)\" -I/usr/local/include + + ifdef GNU_CC + _GCCDIR = $(shell $(CC) -print-file-name=include) diff --git a/www/libxul/files/patch-js-src-configure.in b/www/libxul/files/patch-js-src-configure.in new file mode 100644 index 000000000000..962541ba9cff --- /dev/null +++ b/www/libxul/files/patch-js-src-configure.in @@ -0,0 +1,13 @@ +--- js/src/configure.in.orig 2009-09-30 21:50:26.000000000 +0200 ++++ js/src/configure.in 2009-09-30 21:50:44.000000000 +0200 +@@ -2467,10 +2467,6 @@ + ENABLE_JIT=1 + NANOJIT_ARCH=ARM + ;; +-sparc*-*) +- ENABLE_JIT=1 +- NANOJIT_ARCH=Sparc +- ;; + esac + + MOZ_ARG_DISABLE_BOOL(jit, diff --git a/www/libxul/files/patch-js-src-jslock.cpp b/www/libxul/files/patch-js-src-jslock.cpp new file mode 100644 index 000000000000..7aea14d0ebaf --- /dev/null +++ b/www/libxul/files/patch-js-src-jslock.cpp @@ -0,0 +1,18 @@ +--- js/src/jslock.cpp.orig 2009-10-07 20:15:38.000000000 +0200 ++++ js/src/jslock.cpp 2009-10-07 21:36:14.000000000 +0200 +@@ -160,8 +160,13 @@ + unsigned int res; + + __asm__ __volatile__ ( +- "stbar\n" +- "cas [%1],%2,%3\n" ++ "membar #StoreLoad | #LoadLoad\n" ++# if defined (__sparc64__) ++ "casx [%1],%2,%3\n" ++# else ++ "cas [%1],%2,%3\n" /* 32-bit version */ ++# endif ++ "membar #StoreLoad | #LoadLoad\n" + "cmp %2,%3\n" + "be,a 1f\n" + "mov 1,%0\n" diff --git a/www/libxul/files/patch-js_src_jsnum.c b/www/libxul/files/patch-js_src_jsnum.cpp index a3ef2769ab9c..cf29e7c9a869 100644 --- a/www/libxul/files/patch-js_src_jsnum.c +++ b/www/libxul/files/patch-js_src_jsnum.cpp @@ -1,16 +1,16 @@ ---- js/src/jsnum.c.orig Sun Nov 5 18:37:07 2006 -+++ js/src/jsnum.c Sun Nov 5 18:42:31 2006 -@@ -45,6 +45,9 @@ - #if defined(XP_WIN) || defined(XP_OS2) - #include <float.h> - #endif +--- js/src/jsnum.cpp.orig 2009-10-14 18:03:30.000000000 +0200 ++++ js/src/jsnum.cpp 2009-10-15 21:49:44.000000000 +0200 +@@ -43,6 +43,9 @@ + /* + * JS number type and wrapper class. + */ +#if defined(__FreeBSD__) +#include <sys/param.h> +#endif - #include <locale.h> - #include <limits.h> - #include <math.h> -@@ -532,7 +535,15 @@ static jsdouble NaN; + #ifdef XP_OS2 + #define _PC_53 PC_53 + #define _MCW_EM MCW_EM +@@ -691,8 +694,16 @@ #else @@ -21,8 +21,9 @@ +#else + #define FIX_FPU() ((void)0) -+ -+#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */ ++#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */ ++ #endif + JSBool diff --git a/www/libxul/files/patch-layout-style-nsCSSValue.h b/www/libxul/files/patch-layout-style-nsCSSValue.h deleted file mode 100644 index eb6793f08a77..000000000000 --- a/www/libxul/files/patch-layout-style-nsCSSValue.h +++ /dev/null @@ -1,215 +0,0 @@ -# Ensure correct alignment for nsCSSValue objects inside nsCSSValue::Array. -# (Bug 476345) - ---- layout/style/nsCSSValue.h.orig 2008-07-02 00:51:43.000000000 +0200 -+++ layout/style/nsCSSValue.h 2009-02-01 21:43:29.000000000 +0100 -@@ -286,104 +286,7 @@ - // failure. - static nsStringBuffer* BufferFromString(const nsString& aValue); - -- struct Array { -- -- // return |Array| with reference count of zero -- static Array* Create(PRUint16 aItemCount) { -- return new (aItemCount) Array(aItemCount); -- } -- -- nsCSSValue& operator[](PRUint16 aIndex) { -- NS_ASSERTION(aIndex < mCount, "out of range"); -- return *(First() + aIndex); -- } -- -- const nsCSSValue& operator[](PRUint16 aIndex) const { -- NS_ASSERTION(aIndex < mCount, "out of range"); -- return *(First() + aIndex); -- } -- -- nsCSSValue& Item(PRUint16 aIndex) { return (*this)[aIndex]; } -- const nsCSSValue& Item(PRUint16 aIndex) const { return (*this)[aIndex]; } -- -- PRUint16 Count() const { return mCount; } -- -- PRBool operator==(const Array& aOther) const -- { -- if (mCount != aOther.mCount) -- return PR_FALSE; -- for (PRUint16 i = 0; i < mCount; ++i) -- if ((*this)[i] != aOther[i]) -- return PR_FALSE; -- return PR_TRUE; -- } -- -- void AddRef() { -- if (mRefCnt == PR_UINT16_MAX) { -- NS_WARNING("refcount overflow, leaking nsCSSValue::Array"); -- return; -- } -- ++mRefCnt; -- NS_LOG_ADDREF(this, mRefCnt, "nsCSSValue::Array", sizeof(*this)); -- } -- void Release() { -- if (mRefCnt == PR_UINT16_MAX) { -- NS_WARNING("refcount overflow, leaking nsCSSValue::Array"); -- return; -- } -- --mRefCnt; -- NS_LOG_RELEASE(this, mRefCnt, "nsCSSValue::Array"); -- if (mRefCnt == 0) -- delete this; -- } -- -- private: -- -- PRUint16 mRefCnt; -- PRUint16 mCount; -- -- void* operator new(size_t aSelfSize, PRUint16 aItemCount) CPP_THROW_NEW { -- return ::operator new(aSelfSize + sizeof(nsCSSValue)*aItemCount); -- } -- -- void operator delete(void* aPtr) { ::operator delete(aPtr); } -- -- nsCSSValue* First() { -- return (nsCSSValue*) (((char*)this) + sizeof(*this)); -- } -- -- const nsCSSValue* First() const { -- return (const nsCSSValue*) (((const char*)this) + sizeof(*this)); -- } -- --#define CSSVALUE_LIST_FOR_VALUES(var) \ -- for (nsCSSValue *var = First(), *var##_end = var + mCount; \ -- var != var##_end; ++var) -- -- Array(PRUint16 aItemCount) -- : mRefCnt(0) -- , mCount(aItemCount) -- { -- MOZ_COUNT_CTOR(nsCSSValue::Array); -- CSSVALUE_LIST_FOR_VALUES(val) { -- new (val) nsCSSValue(); -- } -- } -- -- ~Array() -- { -- MOZ_COUNT_DTOR(nsCSSValue::Array); -- CSSVALUE_LIST_FOR_VALUES(val) { -- val->~nsCSSValue(); -- } -- } -- --#undef CSSVALUE_LIST_FOR_VALUES -- -- private: -- Array(const Array& aOther); // not to be implemented -- }; -- -+ struct Array; - struct URL { - // Methods are not inline because using an nsIPrincipal means requiring - // caps, which leads to REQUIRES hell, since this header is included all -@@ -454,5 +357,102 @@ - } mValue; - }; - --#endif /* nsCSSValue_h___ */ -+struct nsCSSValue::Array { -+ -+ // return |Array| with reference count of zero -+ static Array* Create(PRUint16 aItemCount) { -+ return new (aItemCount) Array(aItemCount); -+ } -+ -+ nsCSSValue& operator[](PRUint16 aIndex) { -+ NS_ASSERTION(aIndex < mCount, "out of range"); -+ return mArray[aIndex]; -+ } -+ -+ const nsCSSValue& operator[](PRUint16 aIndex) const { -+ NS_ASSERTION(aIndex < mCount, "out of range"); -+ return mArray[aIndex]; -+ } -+ -+ nsCSSValue& Item(PRUint16 aIndex) { return (*this)[aIndex]; } -+ const nsCSSValue& Item(PRUint16 aIndex) const { return (*this)[aIndex]; } -+ -+ PRUint16 Count() const { return mCount; } -+ -+ PRBool operator==(const Array& aOther) const -+ { -+ if (mCount != aOther.mCount) -+ return PR_FALSE; -+ for (PRUint16 i = 0; i < mCount; ++i) -+ if ((*this)[i] != aOther[i]) -+ return PR_FALSE; -+ return PR_TRUE; -+ } -+ -+ void AddRef() { -+ if (mRefCnt == PR_UINT16_MAX) { -+ NS_WARNING("refcount overflow, leaking nsCSSValue::Array"); -+ return; -+ } -+ ++mRefCnt; -+ NS_LOG_ADDREF(this, mRefCnt, "nsCSSValue::Array", sizeof(*this)); -+ } -+ void Release() { -+ if (mRefCnt == PR_UINT16_MAX) { -+ NS_WARNING("refcount overflow, leaking nsCSSValue::Array"); -+ return; -+ } -+ --mRefCnt; -+ NS_LOG_RELEASE(this, mRefCnt, "nsCSSValue::Array"); -+ if (mRefCnt == 0) -+ delete this; -+ } -+ -+private: -+ -+ PRUint16 mRefCnt; -+ const PRUint16 mCount; -+ // This must be the last sub-object, since we extend this array to -+ // be of size mCount; it needs to be a sub-object so it gets proper -+ // alignment. -+ nsCSSValue mArray[1]; - -+ void* operator new(size_t aSelfSize, PRUint16 aItemCount) CPP_THROW_NEW { -+ return ::operator new(aSelfSize + sizeof(nsCSSValue) * (aItemCount - 1)); -+ } -+ -+ void operator delete(void* aPtr) { ::operator delete(aPtr); } -+ -+ nsCSSValue* First() { return mArray; } -+ -+ const nsCSSValue* First() const { return mArray; } -+ -+#define CSSVALUE_LIST_FOR_EXTRA_VALUES(var) \ -+for (nsCSSValue *var = First() + 1, *var##_end = First() + mCount; \ -+ var != var##_end; ++var) -+ -+ Array(PRUint16 aItemCount) -+ : mRefCnt(0) -+ , mCount(aItemCount) -+ { -+ MOZ_COUNT_CTOR(nsCSSValue::Array); -+ CSSVALUE_LIST_FOR_EXTRA_VALUES(val) { -+ new (val) nsCSSValue(); -+ } -+ } -+ -+ ~Array() -+ { -+ MOZ_COUNT_DTOR(nsCSSValue::Array); -+ CSSVALUE_LIST_FOR_EXTRA_VALUES(val) { -+ val->~nsCSSValue(); -+ } -+ } -+ -+#undef CSSVALUE_LIST_FOR_VALUES -+ -+private: -+ Array(const Array& aOther); // not to be implemented -+}; -+ -+#endif /* nsCSSValue_h___ */ diff --git a/www/libxul/files/patch-layout_generic_Makefile.in b/www/libxul/files/patch-layout_generic_Makefile.in index 038b5df63eed..e39242751a1f 100644 --- a/www/libxul/files/patch-layout_generic_Makefile.in +++ b/www/libxul/files/patch-layout_generic_Makefile.in @@ -1,9 +1,9 @@ ---- layout/generic/Makefile.in.orig 2008-06-19 12:29:06.000000000 -0500 -+++ layout/generic/Makefile.in 2008-06-19 12:30:04.000000000 -0500 -@@ -188,9 +188,10 @@ +--- layout/generic/Makefile.in.orig 2009-08-07 00:49:41.000000000 +0200 ++++ layout/generic/Makefile.in 2009-08-09 20:54:53.000000000 +0200 +@@ -187,9 +187,10 @@ -I$(srcdir)/../../content/base/src \ -I$(srcdir)/../../content/html/content/src \ - -I$(srcdir)/../../dom/src/base \ + -I$(srcdir)/../../dom/base \ - $(MOZ_CAIRO_CFLAGS) \ $(NULL) diff --git a/www/libxul/files/patch-media-liboggz-include-oggz-oggz_off_t_generated.h b/www/libxul/files/patch-media-liboggz-include-oggz-oggz_off_t_generated.h new file mode 100644 index 000000000000..4c45ac9eae08 --- /dev/null +++ b/www/libxul/files/patch-media-liboggz-include-oggz-oggz_off_t_generated.h @@ -0,0 +1,11 @@ +--- media/liboggz/include/oggz/oggz_off_t_generated.h.orig 2009-08-24 17:52:50.000000000 +0200 ++++ media/liboggz/include/oggz/oggz_off_t_generated.h 2009-09-10 19:13:22.000000000 +0200 +@@ -59,7 +59,7 @@ + + #include <sys/types.h> + +-#if defined(__APPLE__) || defined(SOLARIS) || defined(OS2) ++#if defined(__APPLE__) || defined(SOLARIS) || defined(OS2) || defined(__FreeBSD__) + typedef off_t oggz_off_t; + #else + typedef loff_t oggz_off_t; diff --git a/www/libxul/files/patch-modules-libpref-src-prefapi.cpp b/www/libxul/files/patch-modules-libpref-src-prefapi.cpp new file mode 100644 index 000000000000..159f0d4340ab --- /dev/null +++ b/www/libxul/files/patch-modules-libpref-src-prefapi.cpp @@ -0,0 +1,102 @@ + +This bug is due to the fact, applications are restarted before extension +defaults are loaded. + +To reproduce, choose any preference and set the values like: +system default: + pref("prefkey",systemvalue); +extension default: + pref("prefkey", extensiondefault); +user pref: + user_pref("prefkey", systemvalue); + +Next, trigger application behaviour similar to upgrade by removing compreg.dat +from profile and start the application. + +Result: +User sees extensiondefault after upgrade, because the user_pref has been +eliminated ... which is definitly not what the user expects because he explicitly +had *systemvalue* set before the upgrade. + +Evaluation: +The bug happens because restart is performed *before* extension defaults have been +loaded and the prefapi.cpp always eliminate user preference if the user preference +is equal to the actual default (which happens to be extensiondefault normally - so +no reset, but is systemvalue during restart). + +Fix: +1. savePrefs should not try to be smart ... this patch removes the heuristic that guesses +whether a setting can be eliminated or not; it should be sufficient to only eliminate +prefs in hashPrefs. + +2. This patch prevents hashPrefs from eliminating the user pref in case we are in +*startup* ... unfortunately no such state info exists, which lets us guess that +we are in startup for the previously not dealt case: !set_default && +!pref_ValueChanged(pref->defaultPref, value, type) && !PREF_HAS_USER_VALUE(pref). + +If is the case we explicitly remember that this setting is a user-pref ... +even though it might be temporarily equal to the default pref. + +--- + modules/libpref/src/prefapi.cpp | 20 ++++++++++++++------ + 1 file changed, 14 insertions(+), 6 deletions(-) + +Index: modules/libpref/src/prefapi.cpp +=================================================================== +--- modules/libpref/src/prefapi.cpp ++++ modules/libpref/src/prefapi.cpp +@@ -324,23 +324,20 @@ + if (!pref) + return PL_DHASH_NEXT; + + nsCAutoString prefValue; + + // where we're getting our pref from + PrefValue* sourcePref; + +- if (PREF_HAS_USER_VALUE(pref) && +- pref_ValueChanged(pref->defaultPref, +- pref->userPref, +- (PrefType) PREF_TYPE(pref))) +- sourcePref = &pref->userPref; +- else if (PREF_IS_LOCKED(pref)) ++ if (PREF_IS_LOCKED(pref)) + sourcePref = &pref->defaultPref; ++ else if (PREF_HAS_USER_VALUE(pref)) ++ sourcePref = &pref->userPref; + else + // do not save default prefs that haven't changed + return PL_DHASH_NEXT; + + // strings are in quotes! + if (pref->flags & PREF_STRING) { + prefValue = '\"'; + str_escape(sourcePref->stringVal, prefValue); +@@ -742,16 +739,27 @@ + Otherwise, set the user value only if it has changed */ + if ( !pref_ValueChanged(pref->defaultPref, value, type) ) + { + if (PREF_HAS_USER_VALUE(pref)) + { + pref->flags &= ~PREF_USERSET; + if (!PREF_IS_LOCKED(pref)) + valueChanged = PR_TRUE; ++ } else { ++ // this is tricky: we have !set_default ... ++ // thus we are setting a user pref; however the user ++ // pref set is same as *current default*; this normally ++ // means to un-set ... however since we have ++ // !PREF_HAS_USER_VALUE(pref) this can only be during ++ // startup ++ pref_SetValue(&pref->userPref, value, type); ++ pref->flags |= PREF_USERSET; ++ if (!PREF_IS_LOCKED(pref)) ++ valueChanged = PR_TRUE; + } + } + else if ( !PREF_HAS_USER_VALUE(pref) || + pref_ValueChanged(pref->userPref, value, type) ) + { + pref_SetValue(&pref->userPref, value, type); + pref->flags |= PREF_USERSET; + if (!PREF_IS_LOCKED(pref)) diff --git a/www/libxul/files/patch-security_coreconf_FreeBSD.mk b/www/libxul/files/patch-security_coreconf_FreeBSD.mk index fd697f62532a..2ae0716f1bb1 100644 --- a/www/libxul/files/patch-security_coreconf_FreeBSD.mk +++ b/www/libxul/files/patch-security_coreconf_FreeBSD.mk @@ -1,57 +1,18 @@ ---- security/coreconf/FreeBSD.mk.orig 2009-11-22 11:51:31.000000000 -0800 -+++ security/coreconf/FreeBSD.mk 2009-11-22 11:51:44.000000000 -0800 -@@ -37,16 +37,32 @@ - - include $(CORE_DEPTH)/coreconf/UNIX.mk - --DEFAULT_COMPILER = gcc --CC = gcc --CCC = g++ -+CCC = ${CXX} - RANLIB = ranlib - - ifeq ($(OS_TEST),alpha) - CPU_ARCH = alpha - else -+ifeq ($(OS_TEST),powerpc) -+CPU_ARCH = powerpc -+else -+ifeq ($(OS_TEST),sparc64) -+CPU_ARCH = sparc64 -+USE_64 = 1 -+else -+ifeq ($(OS_TEST),ia64) -+CPU_ARCH = ia64 -+USE_64 = 1 -+else -+ifeq ($(OS_TEST),amd64) -+CPU_ARCH = amd64 -+else +--- security/coreconf/FreeBSD.mk.orig 2010-06-26 07:29:06.000000000 +0200 ++++ security/coreconf/FreeBSD.mk 2010-07-18 13:25:06.000000000 +0200 +@@ -49,9 +49,6 @@ + ifeq ($(CPU_ARCH),pc98) CPU_ARCH = x86 endif -+endif -+endif -+endif -+endif +-ifeq ($(CPU_ARCH),amd64) +-CPU_ARCH = x86_64 +-endif - OS_CFLAGS = $(DSO_CFLAGS) -ansi -Wall -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK + OS_CFLAGS = $(DSO_CFLAGS) -ansi -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK -@@ -73,7 +89,11 @@ - DLL_SUFFIX = so.1.0 - endif - --MKSHLIB = $(CC) $(DSO_LDOPTS) -+ifneq (,$(filter alpha ia64,$(OS_TEST))) -+MKSHLIB = $(CC) -Wl,-Bsymbolic -lc $(DSO_LDOPTS) -o $@ -+else -+MKSHLIB = $(CC) -Wl,-Bsymbolic $(DSO_LDOPTS) -o $@ -+endif - ifdef MAPFILE - MKSHLIB += -Wl,--version-script,$(MAPFILE) - endif -@@ -81,5 +101,3 @@ - sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ +@@ -87,4 +84,4 @@ G++INCLUDES = -I/usr/include/g++ -- + -INCLUDES += -I/usr/X11R6/include ++#INCLUDES += -I/usr/X11R6/include diff --git a/www/libxul/files/patch-toolkit-components-history-src-nsGlobalHistory.cpp b/www/libxul/files/patch-toolkit-components-history-src-nsGlobalHistory.cpp deleted file mode 100644 index 1cefba669bf1..000000000000 --- a/www/libxul/files/patch-toolkit-components-history-src-nsGlobalHistory.cpp +++ /dev/null @@ -1,24 +0,0 @@ ---- toolkit/components/history/src/nsGlobalHistory.cpp.orig 2006-02-02 20:55:17.000000000 +0100 -+++ toolkit/components/history/src/nsGlobalHistory.cpp -@@ -322,7 +322,9 @@ matchAgeInDaysCallback(nsIMdbRow *row, v - if (err != 0) return PR_FALSE; - - PRTime rowDate; -- PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", &rowDate); -+ long long ld; -+ PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", &ld); -+ rowDate = ld; - - PRInt32 days = GetAgeInDays(matchSearchTerm->now, rowDate); - -@@ -1067,7 +1069,9 @@ nsGlobalHistory::GetRowValue(nsIMdbRow * - if (!yarn.mYarn_Fill || !yarn.mYarn_Buf) - return NS_OK; - -- PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", aResult); -+ long long ld; -+ PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", &ld); -+ *aResult = ld; - - return NS_OK; - } diff --git a/www/libxul/files/patch-toolkit-components-places-src-nsMorkHistoryImporter.cpp b/www/libxul/files/patch-toolkit-components-places-src-nsMorkHistoryImporter.cpp deleted file mode 100644 index 8d6955be7f59..000000000000 --- a/www/libxul/files/patch-toolkit-components-places-src-nsMorkHistoryImporter.cpp +++ /dev/null @@ -1,17 +0,0 @@ ---- toolkit/components/places/src/nsMorkHistoryImporter.cpp.orig 2008-03-19 20:30:49.000000000 +0100 -+++ toolkit/components/places/src/nsMorkHistoryImporter.cpp 2008-12-17 09:38:05.000000000 +0100 -@@ -148,9 +148,12 @@ AddToHistoryCB(const nsCSubstring &aRowI - } - - PRTime date; -- if (PR_sscanf(values[kLastVisitColumn].get(), "%lld", &date) != 1) { -+ long long ld; -+ if (PR_sscanf(values[kLastVisitColumn].get(), "%lld", &ld) != 1) { - date = -1; -- } -+ } else { -+ date = ld; -+ } - - PRBool isTyped = values[kTypedColumn].EqualsLiteral("1"); - PRInt32 transition = isTyped ? diff --git a/www/libxul/files/patch-toolkit-components-url-classifier-src-nsUrlClassifierDBService.cpp b/www/libxul/files/patch-toolkit-components-url-classifier-src-nsUrlClassifierDBService.cpp deleted file mode 100644 index 09a9e6035e60..000000000000 --- a/www/libxul/files/patch-toolkit-components-url-classifier-src-nsUrlClassifierDBService.cpp +++ /dev/null @@ -1,28 +0,0 @@ -# reported upstream as: https://bugzilla.mozilla.org/show_bug.cgi?id=469276 - ---- toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp.orig 2008-08-25 22:59:14.000000000 +0200 -+++ toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp 2008-12-12 16:31:11.000000000 +0100 -@@ -2023,8 +2023,9 @@ - return NS_ERROR_FAILURE; - } - const nsCSubstring& str = Substring(chunk, start, 4); -- const PRUint32 *p = reinterpret_cast<const PRUint32*>(str.BeginReading()); -- entry->mAddChunkId = PR_ntohl(*p); -+ PRUint32 p; -+ memcpy(&p, str.BeginReading(), 4); -+ entry->mAddChunkId = PR_ntohl(p); - if (entry->mAddChunkId == 0) { - NS_WARNING("Received invalid chunk number."); - return NS_ERROR_FAILURE; -@@ -2052,8 +2053,9 @@ - - if (chunkType == CHUNK_SUB) { - const nsCSubstring& str = Substring(chunk, start, 4); -- const PRUint32 *p = reinterpret_cast<const PRUint32*>(str.BeginReading()); -- entry->mAddChunkId = PR_ntohl(*p); -+ PRUint32 p; -+ memcpy(&p, str.BeginReading(), 4); -+ entry->mAddChunkId = PR_ntohl(p); - if (entry->mAddChunkId == 0) { - NS_WARNING("Received invalid chunk number."); - return NS_ERROR_FAILURE; diff --git a/www/libxul/files/patch-toolkit_mozapps_installer_packager.mk b/www/libxul/files/patch-toolkit_mozapps_installer_packager.mk deleted file mode 100644 index 635c3c79c13c..000000000000 --- a/www/libxul/files/patch-toolkit_mozapps_installer_packager.mk +++ /dev/null @@ -1,11 +0,0 @@ ---- toolkit/mozapps/installer/packager.mk.orig 2007-09-26 13:45:01.000000000 -0400 -+++ toolkit/mozapps/installer/packager.mk 2007-09-26 13:47:29.000000000 -0400 -@@ -409,7 +409,7 @@ - (cd $(DIST)/sdk/include && tar $(TAR_CREATE_FLAGS) - .) | \ - (cd $(DESTDIR)$(includedir)/stable && tar -xf -) - # The dist/include has module subdirectories that we need to flatten -- find $(DIST)/include -xtype f -exec $(SYSINSTALL) $(IFLAGS1) {} $(DESTDIR)$(includedir)/unstable \; -+ find $(DIST)/include -type f -o -type l -exec $(SYSINSTALL) $(IFLAGS1) {} $(DESTDIR)$(includedir)/unstable \; - # IDL directory is stable (dist/sdk/idl) and unstable (dist/idl) - $(NSINSTALL) -D $(DESTDIR)$(idldir)/stable - $(NSINSTALL) -D $(DESTDIR)$(idldir)/unstable diff --git a/www/libxul/files/patch-xpcom-reflect-xptcall-src-xptcprivate.h b/www/libxul/files/patch-xpcom-reflect-xptcall-src-xptcprivate.h deleted file mode 100644 index 0440ce0a263f..000000000000 --- a/www/libxul/files/patch-xpcom-reflect-xptcall-src-xptcprivate.h +++ /dev/null @@ -1,20 +0,0 @@ ---- xpcom/reflect/xptcall/src/xptcprivate.h.orig 2009-11-09 21:43:49.000000000 -0800 -+++ xpcom/reflect/xptcall/src/xptcprivate.h 2009-11-09 21:44:05.000000000 -0800 -@@ -45,7 +45,7 @@ - - class xptiInterfaceEntry; - --#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__)) -+#if !defined(__ia64) - #define STUB_ENTRY(n) NS_IMETHOD Stub##n() = 0; - #else - #define STUB_ENTRY(n) NS_IMETHOD Stub##n(PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64) = 0; -@@ -62,7 +62,7 @@ - #undef STUB_ENTRY - #undef SENTINEL_ENTRY - --#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__)) -+#if !defined(__ia64) - #define STUB_ENTRY(n) NS_IMETHOD Stub##n(); - #else - #define STUB_ENTRY(n) NS_IMETHOD Stub##n(PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64); diff --git a/www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in b/www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in index cf4ffb04e511..244af2e49204 100644 --- a/www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in +++ b/www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in @@ -1,16 +1,16 @@ ---- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig Thu Aug 14 21:00:23 2003 -+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in Sun Feb 1 15:06:40 2004 -@@ -49,6 +49,9 @@ - ifeq (86,$(findstring 86,$(OS_TEST))) +--- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2009-09-16 04:41:25.000000000 +0200 ++++ xpcom/reflect/xptcall/src/md/unix/Makefile.in 2009-10-03 21:30:21.000000000 +0200 +@@ -73,6 +73,9 @@ + DEFINES += -DKEEP_STACK_16_BYTE_ALIGNED CPPSRCS := xptcinvoke_unixish_x86.cpp xptcstubs_unixish_x86.cpp endif +ifeq (x86_64,$(OS_TEST)) +CPPSRCS := xptcinvoke_x86_64_linux.cpp xptcstubs_x86_64_linux.cpp +endif endif - # - # New code for Linux, et. al., with gcc -@@ -60,7 +63,7 @@ + endif + +@@ -96,7 +99,7 @@ endif endif # IA64 Linux @@ -19,7 +19,18 @@ ifneq (,$(findstring ia64,$(OS_TEST))) CPPSRCS := xptcinvoke_ipf64.cpp xptcstubs_ipf64.cpp ASFILES := xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s -@@ -106,9 +109,15 @@ +@@ -111,8 +114,8 @@ + # + # FreeBSD/amd64 + # +-ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDx86_64) +-CPPSRCS := xptcinvoke_amd64_linux.cpp xptcstubs_amd64_linux.cpp ++ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDamd64) ++CPPSRCS := xptcinvoke_amd64_openbsd.cpp xptcstubs_amd64_openbsd.cpp + endif + # + # BeOS/Intel (uses the same unixish_x86 code) +@@ -165,9 +168,15 @@ ASFILES := xptcinvoke_asm_osf1_alpha.s xptcstubs_asm_osf1_alpha.s endif # @@ -36,19 +47,28 @@ CPPSRCS := xptcinvoke_linux_alpha.cpp xptcstubs_linux_alpha.cpp endif # -@@ -294,6 +303,15 @@ - ifeq ($(OS_ARCH)$(OS_TEST),NetBSDsparc) - CPPSRCS := xptcinvoke_sparc_netbsd.cpp xptcstubs_sparc_netbsd.cpp +@@ -322,7 +331,7 @@ + # + # Linux/PPC + # +-ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc) ++ifneq (,$(filter Linuxpowerpc FreeBSDpowerpc,$(OS_ARCH)$(OS_TEST))) + CPPSRCS := xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp + ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s + AS := $(CC) -c -x assembler-with-cpp +@@ -400,6 +409,15 @@ ASFILES := xptcinvoke_asm_sparc_netbsd.s xptcstubs_asm_sparc_netbsd.s -+endif -+# + endif + # +# FreeBSD/SPARC64 +# +ifeq ($(OS_ARCH),FreeBSD) +ifneq (,$(findstring sparc,$(OS_TEST))) -+CPPSRCS := xptcinvoke_sparc64_freebsd.cpp xptcstubs_sparc64_freebsd.cpp -+ASFILES := xptcinvoke_asm_sparc64_freebsd.s xptcstubs_asm_sparcv9_solaris.s ++CPPSRCS := xptcinvoke_sparc64_openbsd.cpp xptcstubs_sparc64_openbsd.cpp ++ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.s +endif - endif ++endif ++# + # OpenBSD/SPARC # - # Solaris/SPARC + ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDsparc) diff --git a/www/libxul/files/patch-xpfe-components-history-src-nsGlobalHistory.cpp b/www/libxul/files/patch-xpfe-components-history-src-nsGlobalHistory.cpp deleted file mode 100644 index ee3eede144f1..000000000000 --- a/www/libxul/files/patch-xpfe-components-history-src-nsGlobalHistory.cpp +++ /dev/null @@ -1,24 +0,0 @@ ---- xpfe/components/history/src/nsGlobalHistory.cpp.orig 2007-12-03 05:25:14.000000000 +0100 -+++ xpfe/components/history/src/nsGlobalHistory.cpp -@@ -304,7 +304,9 @@ matchAgeInDaysCallback(nsIMdbRow *row, v - if (err != 0) return PR_FALSE; - - PRTime rowDate; -- PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", &rowDate); -+ long long ld; -+ PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", &ld); -+ rowDate = ld; - - PRInt32 days = matchSearchTerm->globalHist->GetAgeInDays(rowDate); - -@@ -1000,7 +1002,9 @@ nsGlobalHistory::GetRowValue(nsIMdbRow * - if (!yarn.mYarn_Fill || !yarn.mYarn_Buf) - return NS_OK; - -- PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", aResult); -+ long long ld; -+ PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", &ld); -+ *aResult = ld; - - return NS_OK; - } diff --git a/www/libxul/files/patch-xptcall-amd64 b/www/libxul/files/patch-xptcall-amd64 index 3227cad02182..908b5fc7401c 100644 --- a/www/libxul/files/patch-xptcall-amd64 +++ b/www/libxul/files/patch-xptcall-amd64 @@ -1,5 +1,5 @@ ---- /dev/null Wed Dec 31 16:00:00 1969 -+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_amd64_freebsd.cpp Thu Oct 16 22:59:43 2003 +--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_amd64_freebsd.cpp.orig 2009-10-02 22:13:13.000000000 +0200 ++++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_amd64_freebsd.cpp 2009-10-02 22:41:36.000000000 +0200 @@ -0,0 +1,174 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +// Platform specific code to invoke XPCOM methods on native objects @@ -98,8 +98,8 @@ +} + +extern "C" -+XPTC_PUBLIC_API(nsresult) -+XPTC_InvokeByIndex(nsISupports * that, PRUint32 methodIndex, ++EXPORT_XPCOM_API(nsresult) ++NS_InvokeByIndex_P(nsISupports * that, PRUint32 methodIndex, + PRUint32 paramCount, nsXPTCVariant * params) +{ + PRUint32 nr_gpr, nr_fpr, nr_stack; @@ -175,14 +175,15 @@ + PRUint32 result = ((Method)methodAddress)(a0, a1, a2, a3, a4, a5); + return result; +} ---- /dev/null Wed Dec 31 16:00:00 1969 -+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_freebsd.cpp Thu Oct 16 23:01:08 2003 -@@ -0,0 +1,206 @@ +--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_freebsd.cpp.orig 2009-10-02 22:13:13.000000000 +0200 ++++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_freebsd.cpp 2009-10-02 22:39:37.000000000 +0200 +@@ -0,0 +1,200 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +// Implement shared vtbl methods. + +#include "xptcprivate.h" ++#include "xptiprivate.h" + +// The Linux/x86-64 ABI passes the first 6 integral parameters and the +// first 8 floating point parameters in registers (rdi, rsi, rdx, rcx, @@ -209,7 +210,6 @@ +{ + nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; + nsXPTCMiniVariant* dispatchParams = NULL; -+ nsIInterfaceInfo* iface_info = NULL; + const nsXPTMethodInfo* info; + PRUint32 paramCount; + PRUint32 i; @@ -217,12 +217,7 @@ + + NS_ASSERTION(self,"no self"); + -+ self->GetInterfaceInfo(&iface_info); -+ NS_ASSERTION(iface_info,"no interface info"); -+ if (! iface_info) -+ return NS_ERROR_UNEXPECTED; -+ -+ iface_info->GetMethodInfo(PRUint16(methodIndex), &info); ++ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info); + NS_ASSERTION(info,"no method info"); + if (! info) + return NS_ERROR_UNEXPECTED; @@ -297,9 +292,8 @@ + } + } + -+ result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams); -+ -+ NS_RELEASE(iface_info); ++ result = self->mOuter->CallMethod((PRUint16)methodIndex, info, ++ dispatchParams); + + if (dispatchParams != paramBuffer) + delete [] dispatchParams; diff --git a/www/libxul/files/patch-xptcall-powerpc b/www/libxul/files/patch-xptcall-powerpc new file mode 100644 index 000000000000..6824d8a31260 --- /dev/null +++ b/www/libxul/files/patch-xptcall-powerpc @@ -0,0 +1,580 @@ +--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_freebsd.s.orig 2009-09-26 22:23:56.000000000 +0200 ++++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_freebsd.s 2009-09-27 10:01:48.000000000 +0200 +@@ -0,0 +1,110 @@ ++# -*- Mode: Asm -*- ++# ++# 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) 1999 Netscape Communications Corporation. All ++# Rights Reserved. ++# ++# Contributor(s): ++# Franz.Sirl-kernel@lauterbach.com (Franz Sirl) ++# beard@netscape.com (Patrick Beard) ++# waterson@netscape.com (Chris Waterson) ++# ++.set r0,0; .set sp,1; .set RTOC,2; .set r3,3; .set r4,4 ++.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 ++.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14 ++.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19 ++.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24 ++.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29 ++.set r30,30; .set r31,31 ++.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4 ++.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9 ++.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14 ++.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19 ++.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24 ++.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29 ++.set f30,30; .set f31,31 ++ ++ .section ".text" ++ .align 2 ++ .globl NS_InvokeByIndex_P ++ .type NS_InvokeByIndex_P,@function ++ ++# ++# NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex, ++# PRUint32 paramCount, nsXPTCVariant* params) ++# ++ ++NS_InvokeByIndex_P: ++ stwu sp,-32(sp) # setup standard stack frame ++ mflr r0 # save LR ++ stw r3,8(sp) # r3 <= that ++ stw r4,12(sp) # r4 <= methodIndex ++ stw r30,16(sp) ++ stw r31,20(sp) ++ ++ stw r0,36(sp) # store LR backchain ++ mr r31,sp ++ ++ rlwinm r10,r5,3,0,27 # r10 = (ParamCount * 2 * 4) & ~0x0f ++ addi r0,r10,96 # reserve stack for GPR and FPR register save area r0 = r10 + 96 ++ lwz r9,0(sp) # r9 = backchain ++ neg r0,r0 ++ stwux r9,sp,r0 # reserve stack sapce and save SP backchain ++ ++ addi r3,sp,8 # r3 <= args ++ mr r4,r5 # r4 <= paramCount ++ mr r5,r6 # r5 <= params ++ add r6,r3,r10 # r6 <= gpregs ( == args + r10 ) ++ mr r30,r6 # store in r30 for use later... ++ addi r7,r6,32 # r7 <= fpregs ( == gpregs + 32 ) ++ ++ bl invoke_copy_to_stack@local # (args, paramCount, params, gpregs, fpregs) ++ ++ lfd f1,32(r30) # load FP registers with method parameters ++ lfd f2,40(r30) ++ lfd f3,48(r30) ++ lfd f4,56(r30) ++ lfd f5,64(r30) ++ lfd f6,72(r30) ++ lfd f7,80(r30) ++ lfd f8,88(r30) ++ ++ lwz r3,8(r31) # r3 <= that ++ lwz r4,12(r31) # r4 <= methodIndex ++ lwz r5,0(r3) # r5 <= vtable ( == *that ) ++ ++ slwi r4,r4,2 # convert to offset ( *= 4 ) ++ lwzx r0,r5,r4 # r0 <= methodpointer ( == vtable + offset ) ++ ++ lwz r4,4(r30) # load GP regs with method parameters ++ lwz r5,8(r30) ++ lwz r6,12(r30) ++ lwz r7,16(r30) ++ lwz r8,20(r30) ++ lwz r9,24(r30) ++ lwz r10,28(r30) ++ ++ mtlr r0 # copy methodpointer to LR ++ blrl # call method ++ ++ lwz r30,16(r31) # restore r30 & r31 ++ lwz r31,20(r31) ++ ++ lwz r11,0(sp) # clean up the stack ++ lwz r0,4(r11) ++ mtlr r0 ++ mr sp,r11 ++ blr +--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_freebsd.cpp.orig 2009-09-26 22:23:56.000000000 +0200 ++++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_freebsd.cpp 2009-09-27 09:58:59.000000000 +0200 +@@ -0,0 +1,141 @@ ++/* -*- 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) 1998 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Franz.Sirl-kernel@lauterbach.com (Franz Sirl) ++ * beard@netscape.com (Patrick Beard) ++ * waterson@netscape.com (Chris Waterson) ++ * ++ * 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 ++ ++// The purpose of NS_InvokeByIndex_P() is to map a platform ++// indepenpent call to the platform ABI. To do that, ++// NS_InvokeByIndex_P() has to determine the method to call via vtable ++// access. The parameters for the method are read from the ++// nsXPTCVariant* and prepared for th native ABI. For the Linux/PPC ++// ABI this means that the first 8 integral and floating point ++// parameters are passed in registers. ++ ++#include "xptcprivate.h" ++ ++// 8 integral parameters are passed in registers ++#define GPR_COUNT 8 ++ ++// 8 floating point parameters are passed in registers, floats are ++// promoted to doubles when passed in registers ++#define FPR_COUNT 8 ++ ++extern "C" PRUint32 ++invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s) ++{ ++ return PRUint32(((paramCount * 2) + 3) & ~3); ++} ++ ++extern "C" void ++invoke_copy_to_stack(PRUint32* d, ++ PRUint32 paramCount, ++ nsXPTCVariant* s, ++ PRUint32* gpregs, ++ double* fpregs) ++{ ++ PRUint32 gpr = 1; // skip one GP reg for 'that' ++ PRUint32 fpr = 0; ++ PRUint32 tempu32; ++ PRUint64 tempu64; ++ ++ for(uint32 i = 0; i < paramCount; i++, s++) { ++ if(s->IsPtrData()) ++ tempu32 = (PRUint32) s->ptr; ++ else { ++ switch(s->type) { ++ case nsXPTType::T_FLOAT: break; ++ case nsXPTType::T_DOUBLE: break; ++ case nsXPTType::T_I8: tempu32 = s->val.i8; break; ++ case nsXPTType::T_I16: tempu32 = s->val.i16; break; ++ case nsXPTType::T_I32: tempu32 = s->val.i32; break; ++ case nsXPTType::T_I64: tempu64 = s->val.i64; break; ++ case nsXPTType::T_U8: tempu32 = s->val.u8; break; ++ case nsXPTType::T_U16: tempu32 = s->val.u16; break; ++ case nsXPTType::T_U32: tempu32 = s->val.u32; break; ++ case nsXPTType::T_U64: tempu64 = s->val.u64; break; ++ case nsXPTType::T_BOOL: tempu32 = s->val.b; break; ++ case nsXPTType::T_CHAR: tempu32 = s->val.c; break; ++ case nsXPTType::T_WCHAR: tempu32 = s->val.wc; break; ++ default: tempu32 = (PRUint32) s->val.p; break; ++ } ++ } ++ ++ if (!s->IsPtrData() && s->type == nsXPTType::T_DOUBLE) { ++ if (fpr < FPR_COUNT) ++ fpregs[fpr++] = s->val.d; ++ else { ++ if ((PRUint32) d & 4) d++; // doubles are 8-byte aligned on stack ++ *((double*) d) = s->val.d; ++ d += 2; ++ } ++ } ++ else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) { ++ if (fpr < FPR_COUNT) ++ fpregs[fpr++] = s->val.f; // if passed in registers, floats are promoted to doubles ++ else ++ *((float*) d++) = s->val.f; ++ } ++ else if (!s->IsPtrData() && (s->type == nsXPTType::T_I64 ++ || s->type == nsXPTType::T_U64)) { ++ if ((gpr + 1) < GPR_COUNT) { ++ if (gpr & 1) gpr++; // longlongs are aligned in odd/even register pairs, eg. r5/r6 ++ *((PRUint64*) &gpregs[gpr]) = tempu64; ++ gpr += 2; ++ } ++ else { ++ if ((PRUint32) d & 4) d++; // longlongs are 8-byte aligned on stack ++ *((PRUint64*) d) = tempu64; ++ d += 2; ++ } ++ } ++ else { ++ if (gpr < GPR_COUNT) ++ gpregs[gpr++] = tempu32; ++ else ++ *d++ = tempu32; ++ } ++ ++ } ++} ++ ++extern "C" ++EXPORT_XPCOM_API(nsresult) ++NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex, ++ PRUint32 paramCount, nsXPTCVariant* params); +--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_freebsd.s.orig 2009-09-26 22:23:56.000000000 +0200 ++++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_freebsd.s 2009-09-26 22:23:56.000000000 +0200 +@@ -0,0 +1,89 @@ ++# -*- Mode: Asm -*- ++# ++# 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) 1999 Netscape Communications Corporation. All ++# Rights Reserved. ++# ++# Contributor(s): ++# Franz.Sirl-kernel@lauterbach.com (Franz Sirl) ++# beard@netscape.com (Patrick Beard) ++# waterson@netscape.com (Chris Waterson) ++# ++ ++.set r0,0; .set sp,1; .set RTOC,2; .set r3,3; .set r4,4 ++.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 ++.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14 ++.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19 ++.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24 ++.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29 ++.set r30,30; .set r31,31 ++.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4 ++.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9 ++.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14 ++.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19 ++.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24 ++.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29 ++.set f30,30; .set f31,31 ++ ++ .section ".text" ++ .align 2 ++ .globl SharedStub ++ .type SharedStub,@function ++ ++SharedStub: ++ stwu sp,-112(sp) # room for ++ # linkage (8), ++ # gprData (32), ++ # fprData (64), ++ # stack alignment(8) ++ mflr r0 ++ stw r0,116(sp) # save LR backchain ++ ++ stw r4,12(sp) # save GP registers ++ stw r5,16(sp) # (n.b. that we don't save r3 ++ stw r6,20(sp) # because PrepareAndDispatch() is savvy) ++ stw r7,24(sp) ++ stw r8,28(sp) ++ stw r9,32(sp) ++ stw r10,36(sp) ++ ++ stfd f1,40(sp) # save FP registers ++ stfd f2,48(sp) ++ stfd f3,56(sp) ++ stfd f4,64(sp) ++ stfd f5,72(sp) ++ stfd f6,80(sp) ++ stfd f7,88(sp) ++ stfd f8,96(sp) ++ ++ # r3 has the 'self' pointer already ++ ++ mr r4,r11 # r4 <= methodIndex selector, passed ++ # via r11 in the nsXPTCStubBase::StubXX() call ++ ++ addi r5,sp,120 # r5 <= pointer to callers args area, ++ # beyond r3-r10/f1-f8 mapped range ++ ++ addi r6,sp,8 # r6 <= gprData ++ addi r7,sp,40 # r7 <= fprData ++ ++ bl PrepareAndDispatch@local # Go! ++ ++ lwz r0,116(sp) # restore LR ++ mtlr r0 ++ la sp,112(sp) # clean up the stack ++ blr ++ +--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_freebsd.cpp.orig 2009-09-26 22:23:56.000000000 +0200 ++++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_freebsd.cpp 2009-09-26 22:43:57.000000000 +0200 +@@ -0,0 +1,228 @@ ++/* -*- 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): ++ * Franz.Sirl-kernel@lauterbach.com (Franz Sirl) ++ * beard@netscape.com (Patrick Beard) ++ * waterson@netscape.com (Chris Waterson) ++ * ++ * 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" ++ ++// The PPC/SYSV ABI passes the first 8 integral ++// parameters and the first 8 floating point parameters in registers ++// (r3-r10 and f1-f8), no stack space is allocated for these by the ++// caller. The rest of the parameters are passed in the callers stack ++// area. The stack pointer has to retain 16-byte alignment, longlongs ++// and doubles are aligned on 8-byte boundaries. ++ ++#define PARAM_BUFFER_COUNT 16 ++#define GPR_COUNT 8 ++#define FPR_COUNT 8 ++ ++// PrepareAndDispatch() is called by SharedStub() and calls the actual method. ++// ++// - 'args[]' contains the arguments passed on stack ++// - 'gprData[]' contains the arguments passed in integer registers ++// - 'fprData[]' 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, ++ PRUint32* args, ++ PRUint32 *gprData, ++ double *fprData) ++{ ++ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; ++ nsXPTCMiniVariant* dispatchParams = NULL; ++ const nsXPTMethodInfo* info = NULL; ++ 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; ++ ++ PRUint32* ap = args; ++ PRUint32 gpr = 1; // skip one GPR register ++ PRUint32 fpr = 0; ++ PRUint32 tempu32; ++ PRUint64 tempu64; ++ ++ 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 (fpr < FPR_COUNT) ++ dp->val.d = fprData[fpr++]; ++ else { ++ if ((PRUint32) ap & 4) ap++; // doubles are 8-byte aligned on stack ++ dp->val.d = *(double*) ap; ++ ap += 2; ++ } ++ continue; ++ } ++ else if (!param.IsOut() && type == nsXPTType::T_FLOAT) { ++ if (fpr < FPR_COUNT) ++ dp->val.f = (float) fprData[fpr++]; // in registers floats are passed as doubles ++ else ++ dp->val.f = *(float*) ap++; ++ continue; ++ } ++ else if (!param.IsOut() && (type == nsXPTType::T_I64 ++ || type == nsXPTType::T_U64)) { ++ if (gpr & 1) gpr++; // longlongs are aligned in odd/even register pairs, eg. r5/r6 ++ if ((gpr + 1) < GPR_COUNT) { ++ tempu64 = *(PRUint64*) &gprData[gpr]; ++ gpr += 2; ++ } ++ else { ++ if ((PRUint32) ap & 4) ap++; // longlongs are 8-byte aligned on stack ++ tempu64 = *(PRUint64*) ap; ++ ap += 2; ++ } ++ } ++ else { ++ if (gpr < GPR_COUNT) ++ tempu32 = gprData[gpr++]; ++ else ++ tempu32 = *ap++; ++ } ++ ++ if(param.IsOut() || !type.IsArithmetic()) { ++ dp->val.p = (void*) tempu32; ++ continue; ++ } ++ ++ switch(type) { ++ case nsXPTType::T_I8: dp->val.i8 = (PRInt8) tempu32; break; ++ case nsXPTType::T_I16: dp->val.i16 = (PRInt16) tempu32; break; ++ case nsXPTType::T_I32: dp->val.i32 = (PRInt32) tempu32; break; ++ case nsXPTType::T_I64: dp->val.i64 = (PRInt64) tempu64; break; ++ case nsXPTType::T_U8: dp->val.u8 = (PRUint8) tempu32; break; ++ case nsXPTType::T_U16: dp->val.u16 = (PRUint16) tempu32; break; ++ case nsXPTType::T_U32: dp->val.u32 = (PRUint32) tempu32; break; ++ case nsXPTType::T_U64: dp->val.u64 = (PRUint64) tempu64; break; ++ case nsXPTType::T_BOOL: dp->val.b = (PRBool) tempu32; break; ++ case nsXPTType::T_CHAR: dp->val.c = (char) tempu32; break; ++ case nsXPTType::T_WCHAR: dp->val.wc = (wchar_t) tempu32; break; ++ ++ default: ++ NS_ASSERTION(0, "bad type"); ++ break; ++ } ++ } ++ ++ result = self->mOuter->CallMethod((PRUint16)methodIndex, ++ info, ++ dispatchParams); ++ ++ if (dispatchParams != paramBuffer) ++ delete [] dispatchParams; ++ ++ return result; ++ ++} ++ ++// Load r11 with the constant 'n' and branch to SharedStub(). ++ ++// As G++3 ABI contains the length of the functionname in the mangled ++// name, it is difficult to get a generic assembler mechanism like ++// in the G++ 2.95 case. ++// Create names would be like: ++// _ZN14nsXPTCStubBase5Stub1Ev ++// _ZN14nsXPTCStubBase6Stub12Ev ++// _ZN14nsXPTCStubBase7Stub123Ev ++// _ZN14nsXPTCStubBase8Stub1234Ev ++// etc. ++// Use assembler directives to get the names right... ++ ++# define STUB_ENTRY(n) \ ++__asm__ ( \ ++ ".align 2 \n\t" \ ++ ".if "#n" < 10 \n\t" \ ++ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ ++ ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \ ++"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \ ++ \ ++ ".elseif "#n" < 100 \n\t" \ ++ ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ ++ ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \ ++"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \ ++ \ ++ ".elseif "#n" < 1000 \n\t" \ ++ ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \ ++ ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \ ++"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \ ++ \ ++ ".else \n\t" \ ++ ".err \"stub number "#n" >= 1000 not yet supported\"\n" \ ++ ".endif \n\t" \ ++ \ ++ "li 11,"#n" \n\t" \ ++ "b SharedStub@local \n" \ ++); ++ ++#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/www/libxul/files/patch-xulrunner_app_mozilla.in b/www/libxul/files/patch-xulrunner_app_mozilla.in deleted file mode 100644 index 1839a79d7d0a..000000000000 --- a/www/libxul/files/patch-xulrunner_app_mozilla.in +++ /dev/null @@ -1,18 +0,0 @@ ---- xulrunner/app/mozilla.in.orig Wed Oct 11 18:25:16 2006 -+++ xulrunner/app/mozilla.in Wed Oct 11 18:25:48 2006 -@@ -193,12 +193,12 @@ - done #others arg - - #???: needs check if othersopt begin with -* ? --if [ `expr "${_optLast}" : '.*:/.*'` -eq 0 -a \( -f "${_optLast}" -o -d "${_optLast}" \) ]; then -+if [ `expr X"${_optLast}" : 'X.*:/.*'` -eq 0 -a \( -f "${_optLast}" -o -d "${_optLast}" \) ]; then - # Last argument seems to be a local file/directory - # Check, if it is absolutely specified (ie. /home/foo/file vs. ./file) - # If it is just "relatively" (./file) specified, make it absolutely -- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}" --elif [ `expr "${_optLast}" : '.*:/.*'` -gt 0 -o -n "${_optOthers}" ]; then #???? like before... -+ [ `expr -e X"${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}" -+elif [ `expr -e X"${_optLast}" : '.*:/.*'` -gt 0 -o -n X"${_optOthers}" ]; then #???? like before... - _NEW_WINDOW=1 - fi - diff --git a/www/libxul/files/patch-xulrunner_installer_libxul.pc.in b/www/libxul/files/patch-xulrunner_installer_libxul.pc.in index 690ce9ce955d..279e6cd2f614 100644 --- a/www/libxul/files/patch-xulrunner_installer_libxul.pc.in +++ b/www/libxul/files/patch-xulrunner_installer_libxul.pc.in @@ -1,11 +1,9 @@ ---- xulrunner/installer/libxul.pc.in.orig 2007-08-03 10:46:28.000000000 -0400 -+++ xulrunner/installer/libxul.pc.in 2009-03-29 15:17:17.000000000 -0400 -@@ -12,5 +12,5 @@ Name: libxul +--- xulrunner/installer/libxul.pc.in.orig 2010-01-21 04:31:27.000000000 +0100 ++++ xulrunner/installer/libxul.pc.in 2010-06-21 19:39:57.000000000 +0200 +@@ -7,5 +7,5 @@ Description: The Mozilla Runtime and Embedding Engine Version: %MOZILLA_VERSION% Requires: %NSPR_NAME% >= %NSPR_VERSION% -Libs: -L${sdkdir}/lib -lxpcomglue_s -lxul -lxpcom --Cflags: -I${includedir}/${includetype} -fshort-wchar -\ No newline at end of file +Libs: -L${sdkdir}/lib -L%%MOZ_LIBDIR%% -lxpcomglue_s -lxul -lxpcom -+Cflags: -I${includedir}/${includetype} -fshort-wchar + Cflags: -I${includedir} %WCHAR_CFLAGS% diff --git a/www/libxul/files/releng6_pulseaudio b/www/libxul/files/releng6_pulseaudio new file mode 100644 index 000000000000..2d83f3c1c441 --- /dev/null +++ b/www/libxul/files/releng6_pulseaudio @@ -0,0 +1,32 @@ +--- media/libsydneyaudio/src/Makefile.in.orig 2009-08-11 17:22:08.000000000 +0200 ++++ media/libsydneyaudio/src/Makefile.in 2009-08-11 17:22:36.000000000 +0200 +@@ -45,6 +45,12 @@ + LIBRARY_NAME = sydneyaudio + FORCE_STATIC_LIB= 1 + ++ifeq ($(OS_ARCH),FreeBSD) ++CSRCS = \ ++ sydney_audio_pulseaudio.c \ ++ $(NULL) ++endif ++ + ifeq ($(OS_ARCH),Linux) + CSRCS = \ + sydney_audio_alsa.c \ +--- toolkit/library/Makefile.in.orig 2009-08-11 17:22:45.000000000 +0200 ++++ toolkit/library/Makefile.in 2009-08-11 17:23:22.000000000 +0200 +@@ -231,12 +231,12 @@ + endif + + ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT)) +-EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) $(MOZ_PANGO_LIBS) $(MOZ_GTK2_LIBS) $(XT_LIBS) -lgthread-2.0 ++EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) $(MOZ_PANGO_LIBS) $(MOZ_GTK2_LIBS) $(XT_LIBS) -lgthread-2.0 -lpulse -lpthread + EXTRA_DSO_LDOPTS += $(FT2_LIBS) + endif + + ifeq (qt,$(MOZ_WIDGET_TOOLKIT)) +-EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XT_LIBS) $(MOZ_QT_LIBS) -lgthread-2.0 ++EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XT_LIBS) $(MOZ_QT_LIBS) -lgthread-2.0 -lpulse -lpthread + EXTRA_DSO_LDOPTS += $(FT2_LIBS) + endif + |