diff options
author | Florian Smeets <flo@FreeBSD.org> | 2012-07-26 21:49:58 +0000 |
---|---|---|
committer | Florian Smeets <flo@FreeBSD.org> | 2012-07-26 21:49:58 +0000 |
commit | 30c1a0a7927d6992cbf7baf9e8e1f637b2e4f6d4 (patch) | |
tree | 89c0045d73cc71a8a86842d8aa10f24e71cb5f26 /www/seamonkey | |
parent | d7df099ed9e71aeb1cf30ae4e058f52c668df365 (diff) | |
download | ports-30c1a0a7927d6992cbf7baf9e8e1f637b2e4f6d4.tar.gz ports-30c1a0a7927d6992cbf7baf9e8e1f637b2e4f6d4.zip |
Notes
Diffstat (limited to 'www/seamonkey')
49 files changed, 1895 insertions, 1294 deletions
diff --git a/www/seamonkey/Makefile b/www/seamonkey/Makefile index 80b0f96384b0..6729760fb7a6 100644 --- a/www/seamonkey/Makefile +++ b/www/seamonkey/Makefile @@ -6,8 +6,7 @@ # PORTNAME= seamonkey -DISTVERSION= 2.9.1 -PORTREVISION= 1 +DISTVERSION= 2.11 CATEGORIES?= www ipv6 MASTER_SITES= ${MASTER_SITE_MOZILLA_EXTENDED} MASTER_SITE_SUBDIR= seamonkey/releases/${DISTVERSION}/source @@ -16,111 +15,96 @@ DISTNAME= seamonkey-${DISTVERSION}.source MAINTAINER= gecko@FreeBSD.org COMMENT= The open source, standards compliant web browser -BUILD_DEPENDS= nspr>=4.8.7:${PORTSDIR}/devel/nspr \ +BUILD_DEPENDS= nspr>=4.9:${PORTSDIR}/devel/nspr \ + nss>=3.13.2:${PORTSDIR}/security/nss \ + sqlite3>=3.7.11:${PORTSDIR}/databases/sqlite3 \ unzip:${PORTSDIR}/archivers/unzip -LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo \ - event-1.4:${PORTSDIR}/devel/libevent -USE_AUTOTOOLS= autoconf213 +USE_AUTOTOOLS= autoconf213:env CONFLICTS_BUILD= spidermonkey-1.[0-7]* USE_BZIP2= yes USE_GMAKE= yes USE_GECKO= gecko WANT_GNOME= yes +USE_QT4= # empty +QT_NONSTANDARD= yes WANT_PERL= yes -HAS_CONFIGURE= yes +GNU_CONFIGURE= yes +OBJDIR_BUILD= yes ALL_TARGET= default USE_GL= gl MAKE_JOBS_SAFE= yes MOZ_PIS_SCRIPTS= moz_pis_S50cleanhome -MAKE_ENV= LD_LIBRARY_PATH=${WRKSRC}/dist/bin -CPPFLAGS+= -I${LOCALBASE}/include/cairo -USE_GCC= 4.2+ - -CONFIGURE_ENV= LOCALBASE=${LOCALBASE} MOZ_EXTENSIONS= default MOZ_OPTIONS+= --program-transform-name='s/seamonkey/${MOZILLA}/' \ - --with-default-mozilla-five-home=${PREFIX}/lib/${MOZILLA} \ - --enable-svg \ - --enable-application=suite \ - --enable-svg-renderer=cairo \ - --enable-system-cairo \ - --enable-canvas \ - --disable-necko-wifi \ - --disable-updater \ - --with-system-libevent=${LOCALBASE} - -USE_MOZILLA= -png -nss -dbm -jpeg -xft -MOZ_TOOLKIT= cairo-gtk2 + --enable-application=suite + +USE_MOZILLA= # empty MOZILLA_PLIST_DIRS= bin lib MOZ_PKGCONFIG_FILES= NOT_FOR_ARCHS= ia64 -OPTIONS=MAILNEWS "Enable Mail and News modules" on \ - COMPOSER "Enable the HTML Composer module" on \ - LDAP "Enable LDAP support for Mailnews" on \ - CHATZILLA "Enable the Chatzilla IRC module" on \ - LIGHTNING "Enable calendar extension" off \ - DBUS "Enable D-BUS support" on \ - SMB "Enable smb:// URI support using gnomevfs" off +OPTIONS_DEFINE= CHATZILLA COMPOSER GSTREAMER LDAP LIGHTNING MAILNEWS +OPTIONS_DEFAULT=CHATZILLA COMPOSER LDAP MAILNEWS + +CHATZILLA_DESC?=Chatzilla IRC module +COMPOSER_DESC?= HTML Composer module +LDAP_DESC?= LDAP support for Mailnews +MAILNEWS_DESC?= Mail and News modules +.include "${.CURDIR}/../../www/firefox/Makefile.options" .include <bsd.port.pre.mk> -MOZSRC:= ${WRKDIR}/comm-release/mozilla WRKSRC= ${WRKDIR}/comm-release +MOZSRC:= ${WRKSRC}/mozilla -.if ${HAVE_GNOME:Mlibgnomeui}!="" -USE_GNOME+= libgnomeui -MOZ_OPTIONS+= --enable-gnomeui +.if ${ARCH} == amd64 +CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL} +.elif ${ARCH} == powerpc64 +.if ${OSVERSION} < 900033 +BROKEN= Needs binutils 2.17.50 to build .else -MOZ_OPTIONS+= --disable-gnomeui +MOZ_EXPORT+= UNAME_m="powerpc64" +CFLAGS+= -mminimal-toc .endif - -.if exists(${LOCALBASE}/include/cairo/cairo-glitz.h) -# Glitz support can only be enabled if cairo is built with glitz support -MOZ_OPTIONS+= --enable-glitz -LIB_DEPENDS+= glitz.1:${PORTSDIR}/graphics/glitz .endif -.if defined(WITHOUT_MAILNEWS) +.if ! ${PORT_OPTIONS:MMAILNEWS} EXTRA_PATCHES+= ${FILESDIR}/extra-mailnews-patch-bridge-bridge.mk \ ${FILESDIR}/extra-patch-configure.in MOZ_OPTIONS+= --disable-ldap --disable-mailnews .else # mail and news desired, but not LDAP -.if defined(WITHOUT_LDAP) +.if ! ${PORT_OPTIONS:MLDAP} EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bridge-bridge.mk MOZ_OPTIONS+= --disable-ldap --enable-mailnews .else MOZ_OPTIONS+= --enable-ldap --enable-mailnews .endif .endif -.if !defined(WITHOUT_CHATZILLA) +.if ${PORT_OPTIONS:MCHATZILLA} MOZ_EXTENSIONS:= ${MOZ_EXTENSIONS},irc .endif -.if defined(WITHOUT_COMPOSER) +.if ! ${PORT_OPTIONS:MCOMPOSER} MOZ_OPTIONS+= --disable-composer .endif -.if defined(WITHOUT_DBUS) -MOZ_OPTIONS+= --disable-dbus --disable-libnotify -.else -LIB_DEPENDS+= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib \ - notify.4:${PORTSDIR}/devel/libnotify -.endif - .if ${ARCH} == amd64 || ${ARCH} == i386 BUILD_DEPENDS+= yasm:${PORTSDIR}/devel/yasm .endif -.if defined(WITH_LIGHTNING) +.if !empty(CXX:M*clang++*) +CFLAGS+= -Wno-return-type-c-linkage +.endif + +.if ${PORT_OPTIONS:MLIGHTNING} MOZ_OPTIONS+= --enable-calendar MOZ_MK_OPTIONS+= MOZ_CO_PROJECT=calendar LIGHTNING_DIR= share/lightning -XPI_FILE= ${MOZSRC}/dist/xpi-stage/lightning.xpi +XPI_FILE= ${MOZ_OBJDIR}/mozilla/dist/xpi-stage/lightning.xpi XPI_LIBDIR= ${PREFIX}/lib/xpi XPI_ORIG_ID= {e2fda1a4-762b-4020-b5ad-a41df1933103} XPI_ID= lightning@seamonkey.mozilla.org @@ -129,19 +113,10 @@ MOZ_OPTIONS+= --disable-calendar .endif post-patch: - @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ - ${WRKSRC}/mozilla/security/manager/ssl/src/Makefile.in \ - ${WRKSRC}/mozilla/js/src/config/mkdepend/Makefile.in - ${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \ - ${MOZSRC}/storage/build/Makefile.in \ - ${MOZSRC}/toolkit/library/Makefile.in \ - ${MOZSRC}/db/sqlite3/src/Makefile.in + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ + ${WRKSRC}/suite/app/nsSuiteApp.cpp @${REINPLACE_CMD} -e '/accessibility.typeaheadfind.enablesound/s/true/false/' \ ${WRKSRC}/mozilla/modules/libpref/src/init/all.js - @${REINPLACE_CMD} -e 's|<iconv.h>|\"${LOCALBASE}/include/iconv.h\"|g' \ - ${WRKSRC}/configure.in \ - ${WRKSRC}/mozilla/configure.in \ - ${WRKSRC}/mozilla/xpcom/io/nsNativeCharsetUtils.cpp @${REINPLACE_CMD} -e 's|libgnome-2.so.0|libgnome-2.so|' \ ${WRKSRC}/mozilla/toolkit/xre/nsNativeAppSupportUnix.cpp \ ${WRKSRC}/mozilla/image/decoders/icon/gtk/nsIconChannel.cpp @@ -150,13 +125,6 @@ post-patch: ${WRKSRC}/mozilla/image/decoders/icon/gtk/nsIconChannel.cpp @${REINPLACE_CMD} -e 's|libgnomevfs-2.so.0|libgnomevfs-2.so|' \ ${WRKSRC}/mozilla/image/decoders/icon/gtk/nsIconChannel.cpp - @${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}/mozilla/js/src/configure.in \ - ${WRKSRC}/mozilla/configure.in \ - ${WRKSRC}/configure.in @${SED} -e 's|%%MOZILLA%%|${MOZILLA}|g' \ < ${FILESDIR}/seamonkey.desktop.in > \ ${WRKDIR}/${MOZILLA}.desktop @@ -177,7 +145,7 @@ do-install: ${PREFIX}/share/pixmaps/${MOZILLA}.png post-install: -.if defined(WITH_LIGHTNING) +.if ${PORT_OPTIONS:MLIGHTNING} @${MKDIR} ${XPI_LIBDIR}/${XPI_ID} ${XPI_LIBDIR}/symlinks/seamonkey @(cd ${XPI_LIBDIR}/${XPI_ID}; ${TAR} -xf ${XPI_FILE}) @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${XPI_LIBDIR}/${XPI_ID} diff --git a/www/seamonkey/distinfo b/www/seamonkey/distinfo index 43e8960c9470..5f96bcae4d63 100644 --- a/www/seamonkey/distinfo +++ b/www/seamonkey/distinfo @@ -1,2 +1,2 @@ -SHA256 (seamonkey-2.9.1.source.tar.bz2) = 1d6e65569bb2d9643c746a1aff3b3515ff56565014e95316b19e0731df9c65ac -SIZE (seamonkey-2.9.1.source.tar.bz2) = 102164308 +SHA256 (seamonkey-2.11.source.tar.bz2) = 6771ee2abb068825748e6ebcaae4e789e4c64db9b220afaf42dc13934b52c4d9 +SIZE (seamonkey-2.11.source.tar.bz2) = 105846143 diff --git a/www/seamonkey/files/patch-alsapulse b/www/seamonkey/files/patch-alsapulse new file mode 100644 index 000000000000..7851f7348511 --- /dev/null +++ b/www/seamonkey/files/patch-alsapulse @@ -0,0 +1,118 @@ +--- mozilla/config/autoconf.mk.in~ ++++ mozilla/config/autoconf.mk.in +@@ -568,8 +568,13 @@ MOZ_LIBNOTIFY_CFLAGS = @MOZ_LIBNOTIFY_CF + MOZ_LIBNOTIFY_LIBS = @MOZ_LIBNOTIFY_LIBS@ + MOZ_ENABLE_LIBNOTIFY = @MOZ_ENABLE_LIBNOTIFY@ + ++MOZ_ALSA = @MOZ_ALSA@ + MOZ_ALSA_LIBS = @MOZ_ALSA_LIBS@ + MOZ_ALSA_CFLAGS = @MOZ_ALSA_CFLAGS@ ++ ++MOZ_PULSEAUDIO = @MOZ_PULSEAUDIO@ ++MOZ_PULSEAUDIO_LIBS = @MOZ_PULSEAUDIO_LIBS@ ++MOZ_PULSEAUDIO_CFLAGS = @MOZ_PULSEAUDIO_CFLAGS@ + + GLIB_CFLAGS = @GLIB_CFLAGS@ + GLIB_LIBS = @GLIB_LIBS@ +--- mozilla/configure.in~ ++++ mozilla/configure.in +@@ -5758,17 +5775,47 @@ dnl ==================================== + dnl = Check alsa availability on Linux if using sydneyaudio + dnl ======================================================== + ++MOZ_ARG_ENABLE_BOOL(alsa, ++[ --enable-alsa Enable Alsa support], ++MOZ_ALSA=1, ++MOZ_ALSA= MOZ_ALSA_FORCE=$enableval) ++ + dnl If using sydneyaudio with Linux, ensure that the alsa library is available +-if test -n "$MOZ_SYDNEYAUDIO"; then ++if test -n "$MOZ_SYDNEYAUDIO" -a "$MOZ_ALSA_FORCE" != "no"; then + case "$target_os" in + linux*) ++ MOZ_ALSA=1 ++ ;; ++ esac ++fi ++ ++if test -n "$MOZ_ALSA"; then + PKG_CHECK_MODULES(MOZ_ALSA, alsa, , + [echo "$MOZ_ALSA_PKG_ERRORS" + AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])]) +- ;; +- esac + fi + ++AC_SUBST(MOZ_ALSA) ++ ++dnl ======================================================== ++dnl = Enable PulseAudio ++dnl ======================================================== ++ ++MOZ_ARG_ENABLE_BOOL(pulseaudio, ++[ --enable-pulseaudio Enable PulseAudio support], ++MOZ_PULSEAUDIO=1, ++MOZ_PULSEAUDIO=) ++ ++if test -n "$MOZ_PULSEAUDIO"; then ++ PKG_CHECK_MODULES(MOZ_PULSEAUDIO, libpulse, , ++ [echo "$MOZ_PULSEAUDIO_PKG_ERRORS" ++ AC_MSG_ERROR([pulseaudio audio backend requires libpulse package])]) ++fi ++ ++AC_SUBST(MOZ_PULSEAUDIO_CFLAGS) ++AC_SUBST(MOZ_PULSEAUDIO_LIBS) ++AC_SUBST(MOZ_PULSEAUDIO) ++ + dnl ======================================================== + dnl Permissions System + dnl ======================================================== +--- mozilla/media/libsydneyaudio/src/Makefile.in~ ++++ mozilla/media/libsydneyaudio/src/Makefile.in +@@ -30,10 +30,6 @@ else ifeq ($(MOZ_WIDGET_TOOLKIT),android) + CSRCS = \ + sydney_audio_android.c \ + $(NULL) +-else ifeq ($(OS_ARCH),Linux) +-CSRCS = \ +- sydney_audio_alsa.c \ +- $(NULL) + endif + + ifeq ($(OS_ARCH),WINNT) +@@ -68,6 +64,18 @@ CSRCS = \ + $(NULL) + endif + ++ifdef MOZ_ALSA ++CSRCS = \ ++ sydney_audio_alsa.c \ ++ $(NULL) ++endif ++ ++ifdef MOZ_PULSEAUDIO ++CSRCS = \ ++ sydney_audio_pulseaudio.c \ ++ $(NULL) ++endif ++ + ifeq ($(OS_ARCH),WINNT) + OS_LIBS += winmm.lib + endif +--- mozilla/toolkit/library/Makefile.in~ ++++ mozilla/toolkit/library/Makefile.in +@@ -375,10 +375,12 @@ endif + + EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib) + +-ifdef MOZ_SYDNEYAUDIO +-ifeq ($(OS_ARCH),Linux) ++ifdef MOZ_ALSA + EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS) + endif ++ ++ifdef MOZ_PULSEAUDIO ++EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS) + endif + + ifdef HAVE_CLOCK_MONOTONIC diff --git a/www/seamonkey/files/patch-bug685258 b/www/seamonkey/files/patch-bug685258 new file mode 100644 index 000000000000..cac425d6adba --- /dev/null +++ b/www/seamonkey/files/patch-bug685258 @@ -0,0 +1,17 @@ +# HG changeset patch +# User Oleg Romashin <romaxa@gmail.com> +# Parent a2291c212856ad27622416e83c8311b6a33b52f1 +Bug 685258 - Pulse audio backend does not check provided playback and crashes r=derf + +diff --git a/content/media/nsAudioStream.cpp b/content/media/nsAudioStream.cpp +--- mozilla/content/media/nsAudioStream.cpp ++++ mozilla/content/media/nsAudioStream.cpp +@@ -429,7 +429,7 @@ nsresult nsNativeAudioStream::Init(PRInt32 aNumChannels, PRInt32 aRate, SampleFo + mFormat = aFormat; + + if (sa_stream_create_pcm(reinterpret_cast<sa_stream_t**>(&mAudioHandle), +- NULL, ++ "Mozilla", + SA_MODE_WRONLY, + SA_PCM_FORMAT_S16_NE, + aRate, diff --git a/www/seamonkey/files/patch-bug753046 b/www/seamonkey/files/patch-bug753046 new file mode 100644 index 000000000000..16b3d832490c --- /dev/null +++ b/www/seamonkey/files/patch-bug753046 @@ -0,0 +1,1272 @@ +# Bug 753046 - Add support for DragonFly/NetBSD + +$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/dom/plugins/ipc/PluginModuleChild.cpp.orig 2011-12-20 23:28:14.000000000 +0000 ++++ mozilla/dom/plugins/ipc/PluginModuleChild.cpp +@@ -33,6 +33,8 @@ + #include "nsPluginsDir.h" + #include "nsXULAppAPI.h" + ++#include <unistd.h> ++ + #ifdef MOZ_X11 + # include "mozilla/X11Util.h" + #endif +@@ -228,7 +228,7 @@ PluginModuleChild::Init(const std::strin + + // TODO: use PluginPRLibrary here + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + mShutdownFunc = + (NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown"); + +@@ -1790,7 +1790,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin + PLUGIN_LOG_DEBUG_METHOD; + AssertPluginThread(); + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + return true; + #elif defined(OS_WIN) || defined(OS_MACOSX) + *_retval = mGetEntryPointsFunc(&mFunctions); +@@ -1823,7 +1823,7 @@ PluginModuleChild::AnswerNP_Initialize(N + SendBackUpXResources(FileDescriptor(xSocketFd, false/*don't close*/)); + #endif + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + *_retval = mInitializeFunc(&sBrowserFuncs, &mFunctions); + return true; + #elif defined(OS_WIN) || defined(OS_MACOSX) +$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/dom/plugins/ipc/PluginModuleChild.h.orig 2011-12-20 23:28:14.000000000 +0000 ++++ mozilla/dom/plugins/ipc/PluginModuleChild.h +@@ -340,7 +340,7 @@ private: + + // we get this from the plugin + NP_PLUGINSHUTDOWN mShutdownFunc; +-#ifdef OS_LINUX ++#if defined(OS_LINUX) || defined(OS_BSD) + NP_PLUGINUNIXINIT mInitializeFunc; + #elif defined(OS_WIN) || defined(OS_MACOSX) + NP_PLUGININIT mInitializeFunc; +$NetBSD: patch-ipc_chromium_Makefile.in,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/Makefile.in.orig 2012-02-16 06:40:33.000000000 +0000 ++++ mozilla/ipc/chromium/Makefile.in +@@ -278,6 +278,34 @@ endif + + endif # } OS_LINUX + ++ifdef OS_BSD # { ++ ++CPPSRCS += \ ++ atomicops_internals_x86_gcc.cc \ ++ file_util_bsd.cc \ ++ process_util_bsd.cc \ ++ time_posix.cc \ ++ $(NULL) ++ ++ifdef MOZ_ENABLE_GTK2 ++CPPSRCS += \ ++ message_pump_glib.cc \ ++ $(NULL) ++endif ++ ++ifdef MOZ_ENABLE_QT ++MOCSRCS = \ ++ moc_message_pump_qt.cc \ ++ $(NULL) ++ ++CPPSRCS += \ ++ $(MOCSRCS) \ ++ message_pump_qt.cc \ ++ $(NULL) ++endif ++ ++endif # } OS_BSD ++ + # libevent + + ifndef MOZ_NATIVE_LIBEVENT # { +$NetBSD: patch-ipc_chromium_chromium-config.mk,v 1.2 2012/03/15 08:30:06 ryoon Exp $ + +--- mozilla/ipc/chromium/chromium-config.mk.orig 2012-02-16 07:40:33.000000000 +0100 ++++ mozilla/ipc/chromium/chromium-config.mk 2012-03-11 11:05:40.397182000 +0100 +@@ -56,17 +56,6 @@ + -I$(DEPTH)/ipc/ipdl/_ipdlheaders \ + $(NULL) + +-ifeq ($(OS_ARCH),Darwin) # { +- +-OS_MACOSX = 1 +-OS_POSIX = 1 +- +-DEFINES += \ +- -DOS_MACOSX=1 \ +- -DOS_POSIX=1 \ +- $(NULL) +- +-else # } { + ifeq ($(OS_ARCH),WINNT) # { + OS_LIBS += $(call EXPAND_LIBNAME,psapi shell32 dbghelp) + +@@ -93,13 +82,65 @@ + endif + + else # } { +- +-OS_LINUX = 1 + OS_POSIX = 1 ++DEFINES += -DOS_POSIX=1 ++ ++ifeq ($(OS_ARCH),Darwin) # { ++ ++OS_MACOSX = 1 ++DEFINES += \ ++ -DOS_MACOSX=1 \ ++ $(NULL) ++ ++else # } { ++ifeq ($(OS_ARCH),DragonFly) # { ++ ++OS_DRAGONFLY = 1 ++OS_BSD = 1 ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++DEFINES += \ ++ -DOS_DRAGONFLY=1 \ ++ -DOS_BSD=1 \ ++ $(NULL) ++ ++else # } { ++ifeq ($(OS_ARCH),FreeBSD) # { ++ ++OS_FREEBSD = 1 ++OS_BSD = 1 ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++DEFINES += \ ++ -DOS_FREEBSD=1 \ ++ -DOS_BSD=1 \ ++ $(NULL) + ++else # } { ++ifeq ($(OS_ARCH),NetBSD) # { ++ ++OS_NETBSD = 1 ++OS_BSD = 1 ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++DEFINES += \ ++ -DOS_NETBSD=1 \ ++ -DOS_BSD=1 \ ++ $(NULL) ++ ++else # } { ++ifeq ($(OS_ARCH),OpenBSD) # { ++ ++OS_OPENBSD = 1 ++OS_BSD = 1 ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++DEFINES += \ ++ -DOS_OPENBSD=1 \ ++ -DOS_BSD=1 \ ++ $(NULL) ++ ++else # } { ++ ++OS_LINUX = 1 + DEFINES += \ + -DOS_LINUX=1 \ +- -DOS_POSIX=1 \ + $(NULL) + + # NB: to stop gcc warnings about exporting template instantiation +@@ -107,4 +147,8 @@ + + endif # } + endif # } ++endif # } ++endif # } ++endif # } ++endif # } + +$NetBSD: patch-ipc_chromium_src_base_base__paths.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/base_paths.h.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/base_paths.h +@@ -13,7 +13,7 @@ + #include "base/base_paths_win.h" + #elif defined(OS_MACOSX) + #include "base/base_paths_mac.h" +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + #include "base/base_paths_linux.h" + #endif + #include "base/path_service.h" +$NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.3 2012/04/01 15:18:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/debug_util_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/debug_util_posix.cc +@@ -5,7 +5,7 @@ + #include "build/build_config.h" + #include "base/debug_util.h" + +-#define MOZ_HAVE_EXECINFO_H (!defined(ANDROID) && !defined(__OpenBSD__)) ++#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID)) + + #include <errno.h> + #include <fcntl.h> +@@ -17,8 +17,13 @@ + #include <unistd.h> + #if MOZ_HAVE_EXECINFO_H + #include <execinfo.h> +-#include <sys/sysctl.h> + #endif ++#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) ++#include <sys/user.h> ++#elif defined(OS_FREEBSD) ++#include <sys/proc.h> ++#endif ++#include <sys/sysctl.h> + + #include "base/basictypes.h" + #include "base/eintr_wrapper.h" +@@ -32,7 +37,7 @@ bool DebugUtil::SpawnDebuggerOnProcess(u + return false; + } + +-#if defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_BSD) + + // Based on Apple's recommended method as described in + // http://developer.apple.com/qa/qa2004/qa1361.html +@@ -71,7 +76,13 @@ bool DebugUtil::BeingDebugged() { + + // This process is being debugged if the P_TRACED flag is set. + is_set = true; ++#if defined(OS_DRAGONFLY) ++ being_debugged = (info.kp_flags & P_TRACED) != 0; ++#elif defined(OS_FREEBSD) ++ being_debugged = (info.ki_flag & P_TRACED) != 0; ++#else + being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0; ++#endif + return being_debugged; + } + +diff --git ipc/chromium/src/base/dir_reader_bsd.h ipc/chromium/src/base/dir_reader_bsd.h +new file mode 100644 +index 0000000..3fc1a87 +--- /dev/null ++++ mozilla/ipc/chromium/src/base/dir_reader_bsd.h +@@ -0,0 +1,108 @@ ++// Copyright (c) 2010 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++// derived from dir_reader_linux.h ++ ++#ifndef BASE_DIR_READER_BSD_H_ ++#define BASE_DIR_READER_BSD_H_ ++#pragma once ++ ++#include <dirent.h> ++#include <errno.h> ++#include <fcntl.h> ++#include <stdint.h> ++#include <unistd.h> ++ ++#include "base/logging.h" ++#include "base/eintr_wrapper.h" ++ ++// See the comments in dir_reader_posix.h about this. ++ ++namespace base { ++ ++class DirReaderBSD { ++ public: ++ explicit DirReaderBSD(const char* directory_path) ++#ifdef O_DIRECTORY ++ : fd_(open(directory_path, O_RDONLY | O_DIRECTORY)), ++#else ++ : fd_(open(directory_path, O_RDONLY)), ++#endif ++ offset_(0), ++ size_(0) { ++ memset(buf_, 0, sizeof(buf_)); ++ } ++ ++ ~DirReaderBSD() { ++ if (fd_ >= 0) { ++ if (HANDLE_EINTR(close(fd_))) ++ DLOG(ERROR) << "Failed to close directory handle"; ++ } ++ } ++ ++ bool IsValid() const { ++ return fd_ >= 0; ++ } ++ ++ // Move to the next entry returning false if the iteration is complete. ++ bool Next() { ++ if (size_) { ++ struct dirent* dirent = reinterpret_cast<struct dirent*>(&buf_[offset_]); ++ offset_ += dirent->d_reclen; ++ } ++ ++ if (offset_ != size_) ++ return true; ++ ++#ifdef OS_OPENBSD ++ const int r = getdirentries(fd_, buf_, sizeof(buf_), basep_); ++#else ++ const int r = getdents(fd_, buf_, sizeof(buf_)); ++#endif ++ if (r == 0) ++ return false; ++ if (r == -1) { ++#ifdef OS_OPENBSD ++ DLOG(ERROR) << "getdirentries returned an error: " << errno; ++#else ++ DLOG(ERROR) << "getdents returned an error: " << errno; ++#endif ++ return false; ++ } ++ size_ = r; ++ offset_ = 0; ++ return true; ++ } ++ ++ const char* name() const { ++ if (!size_) ++ return NULL; ++ ++ const struct dirent* dirent = ++ reinterpret_cast<const struct dirent*>(&buf_[offset_]); ++ return dirent->d_name; ++ } ++ ++ int fd() const { ++ return fd_; ++ } ++ ++ static bool IsFallback() { ++ return false; ++ } ++ ++ private: ++ const int fd_; ++ char buf_[512]; ++#ifdef OS_OPENBSD ++ off_t *basep_; ++#endif ++ size_t offset_, size_; ++ ++ DISALLOW_COPY_AND_ASSIGN(DirReaderBSD); ++}; ++ ++} // namespace base ++ ++#endif // BASE_DIR_READER_BSD_H_ +diff --git ipc/chromium/src/base/dir_reader_posix.h ipc/chromium/src/base/dir_reader_posix.h +index 9a34492..62b280c 100644 +--- mozilla/ipc/chromium/src/base/dir_reader_posix.h ++++ mozilla/ipc/chromium/src/base/dir_reader_posix.h +@@ -18,16 +18,20 @@ + // seems worse than falling back to enumerating all file descriptors so we will + // probably never implement this on the Mac. + +-#if defined(OS_LINUX) && !defined(OS_OPENBSD) ++#if defined(OS_LINUX) + #include "base/dir_reader_linux.h" ++#elif defined(OS_BSD) ++#include "base/dir_reader_bsd.h" + #else + #include "base/dir_reader_fallback.h" + #endif + + namespace base { + +-#if defined(OS_LINUX) && !defined(OS_OPENBSD) ++#if defined(OS_LINUX) + typedef DirReaderLinux DirReaderPosix; ++#elif defined(OS_BSD) ++typedef DirReaderBSD DirReaderPosix; + #else + typedef DirReaderFallback DirReaderPosix; + #endif +$NetBSD: patch-ipc_chromium_src_base_file__util.h,v 1.2 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/file_util.h.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/file_util.h +@@ -16,8 +16,8 @@ + #include <sys/stat.h> + #elif defined(OS_POSIX) + #include <sys/types.h> +-#include <fts.h> + #include <sys/stat.h> ++#include <fts.h> + #endif + + #include <stdio.h> +$NetBSD: patch-ipc_chromium_src_base_file__util__bsd.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/file_util_bsd.cc.orig 2012-01-07 18:21:18.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/file_util_bsd.cc +@@ -0,0 +1,80 @@ ++// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++// this is a derivative of file_util_linux.cc ++ ++#include "base/file_util.h" ++ ++#include <fcntl.h> ++#include <unistd.h> ++ ++#include <string> ++#include <vector> ++ ++#include "base/eintr_wrapper.h" ++#include "base/file_path.h" ++#include "base/string_util.h" ++ ++namespace file_util { ++ ++bool GetTempDir(FilePath* path) { ++ const char* tmp = getenv("TMPDIR"); ++ if (tmp) ++ *path = FilePath(tmp); ++ else ++ *path = FilePath("/tmp"); ++ return true; ++} ++ ++bool GetShmemTempDir(FilePath* path) { ++ return GetTempDir(path); ++} ++ ++bool CopyFile(const FilePath& from_path, const FilePath& to_path) { ++ int infile = open(from_path.value().c_str(), O_RDONLY); ++ if (infile < 0) ++ return false; ++ ++ int outfile = creat(to_path.value().c_str(), 0666); ++ if (outfile < 0) { ++ close(infile); ++ return false; ++ } ++ ++ const size_t kBufferSize = 32768; ++ std::vector<char> buffer(kBufferSize); ++ bool result = true; ++ ++ while (result) { ++ ssize_t bytes_read = HANDLE_EINTR(read(infile, &buffer[0], buffer.size())); ++ if (bytes_read < 0) { ++ result = false; ++ break; ++ } ++ if (bytes_read == 0) ++ break; ++ // Allow for partial writes ++ ssize_t bytes_written_per_read = 0; ++ do { ++ ssize_t bytes_written_partial = HANDLE_EINTR(write( ++ outfile, ++ &buffer[bytes_written_per_read], ++ bytes_read - bytes_written_per_read)); ++ if (bytes_written_partial < 0) { ++ result = false; ++ break; ++ } ++ bytes_written_per_read += bytes_written_partial; ++ } while (bytes_written_per_read < bytes_read); ++ } ++ ++ if (HANDLE_EINTR(close(infile)) < 0) ++ result = false; ++ if (HANDLE_EINTR(close(outfile)) < 0) ++ result = false; ++ ++ return result; ++} ++ ++} // namespace file_util +$NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.2 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/file_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/file_util_posix.cc +@@ -31,7 +31,7 @@ + #include "base/time.h" + + // FreeBSD/OpenBSD lacks stat64, but its stat handles files >2GB just fine +-#if defined(OS_FREEBSD) || defined(OS_OPENBSD) ++#ifndef OS_LINUX + #define stat64 stat + #endif + +$NetBSD: patch-ipc_chromium_src_base_message__loop.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/message_loop.cc.orig 2012-02-16 07:40:33.000000000 +0100 ++++ mozilla/ipc/chromium/src/base/message_loop.cc 2012-02-21 21:24:41.000000000 +0100 +@@ -19,7 +19,7 @@ + #if defined(OS_POSIX) + #include "base/message_pump_libevent.h" + #endif +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #ifdef MOZ_WIDGET_GTK2 + #include "base/message_pump_glib.h" + #endif +@@ -119,7 +119,7 @@ + if (type_ == TYPE_UI) { + #if defined(OS_MACOSX) + pump_ = base::MessagePumpMac::Create(); +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + pump_ = new base::MessagePumpForUI(); + #endif // OS_LINUX + } else if (type_ == TYPE_IO) { +$NetBSD: patch-ipc_chromium_src_base_platform__file__posix.cc,v 1.1 2011/07/12 15:12:36 tnn Exp $ + +--- mozilla/ipc/chromium/src/base/platform_file_posix.cc.orig 2011-06-15 21:57:27.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/platform_file_posix.cc +@@ -9,6 +9,7 @@ + #ifdef ANDROID + #include <linux/stat.h> + #endif ++#include <sys/stat.h> /* for S_IRUSR */ + + #include "base/logging.h" + #include "base/string_util.h" +$NetBSD: patch-ipc_chromium_src_base_platform__thread.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/platform_thread.h.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/platform_thread.h +@@ -25,6 +25,8 @@ typedef pthread_t PlatformThreadHandle; + #if defined(OS_LINUX) + #include <unistd.h> + typedef pid_t PlatformThreadId; ++#elif defined(OS_FREEBSD) || defined(OS_DRAGONFLY) || defined (OS_NETBSD) ++typedef lwpid_t PlatformThreadId; + #elif defined(OS_MACOSX) + #include <mach/mach.h> + typedef mach_port_t PlatformThreadId; +$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc +@@ -9,9 +9,18 @@ + + #if defined(OS_MACOSX) + #include <mach/mach.h> ++#elif defined(OS_NETBSD) ++#include <lwp.h> + #elif defined(OS_LINUX) + #include <sys/syscall.h> + #include <unistd.h> ++#elif defined(OS_DRAGONFLY) ++#include <unistd.h> ++#elif defined(OS_FREEBSD) ++_Pragma("GCC visibility push(default)") ++extern "C" int thr_self(long *); // XXX #include <sys/thr.h> ++_Pragma("GCC visibility pop") ++#include <pthread_np.h> + #endif + + #if defined(OS_MACOSX) +@@ -38,7 +45,19 @@ + // into the kernel. + #if defined(OS_MACOSX) + return mach_thread_self(); +-#elif defined (__OpenBSD__) ++#elif defined(OS_NETBSD) ++ return _lwp_self(); ++#elif defined(OS_DRAGONFLY) ++ return lwp_gettid(); ++#elif defined(OS_FREEBSD) ++# if __FreeBSD_version > 900030 ++ return pthread_getthreadid_np(); ++# else ++ long lwpid; ++ thr_self(&lwpid); ++ return lwpid; ++# endif ++#elif defined(OS_OPENBSD) + // TODO(BSD): find a better thread ID + return (intptr_t)(pthread_self()); + #elif defined(OS_LINUX) +$NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/process_util.h.orig 2011-12-21 00:28:19.000000000 +0100 ++++ mozilla/ipc/chromium/src/base/process_util.h 2012-01-31 13:14:54.000000000 +0100 +@@ -280,6 +280,7 @@ class NamedProcessIterator { + const ProcessEntry* NextProcessEntry(); + + private: ++#if !defined(OS_BSD) + // Determines whether there's another process (regardless of executable) + // left in the list of all processes. Returns true and sets entry_ to + // that process's info if there is one, false otherwise. +@@ -292,18 +292,24 @@ + void InitProcessEntry(ProcessEntry* entry); + + std::wstring executable_name_; ++#endif + + #if defined(OS_WIN) + HANDLE snapshot_; + bool started_iteration_; + #elif defined(OS_LINUX) + DIR *procfs_dir_; ++#elif defined(OS_BSD) ++ std::vector<ProcessEntry> content; ++ size_t nextEntry; + #elif defined(OS_MACOSX) + std::vector<kinfo_proc> kinfo_procs_; + size_t index_of_kinfo_proc_; + #endif ++#if !defined(OS_BSD) + ProcessEntry entry_; + const ProcessFilter* filter_; ++#endif + + DISALLOW_EVIL_CONSTRUCTORS(NamedProcessIterator); + }; +$NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/process_util_bsd.cc.orig 2012-04-01 00:04:28.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/process_util_bsd.cc +@@ -0,0 +1,326 @@ ++// Copyright (c) 2008 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++// derived from process_util_linux.cc and process_util_mac.cc ++ ++#include "base/process_util.h" ++ ++#include <ctype.h> ++#include <fcntl.h> ++#include <unistd.h> ++#include <string> ++#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) ++/* DragonFly, as of v3.0.1, and FreeBSD 9.0-RELEASE do not explicitly mark symbols public */ ++#define PRE_SYS_INCLUDE _Pragma("GCC visibility push(default)") ++#define POST_SYS_INCLUDE _Pragma("GCC visibility pop") ++#else ++#define PRE_SYS_INCLUDE ++#define POST_SYS_INCLUDE ++#endif ++PRE_SYS_INCLUDE ++#include <kvm.h> ++POST_SYS_INCLUDE ++#include <sys/sysctl.h> ++#include <sys/types.h> ++#include <sys/wait.h> ++#if defined(OS_DRAGONFLY) ++PRE_SYS_INCLUDE ++#include <sys/user.h> ++POST_SYS_INCLUDE ++#define HAVE_POSIX_SPAWN 1 ++#endif ++#if defined(OS_FREEBSD) ++PRE_SYS_INCLUDE ++#include <sys/user.h> ++POST_SYS_INCLUDE ++#endif ++ ++#include "base/debug_util.h" ++#include "base/eintr_wrapper.h" ++#include "base/file_util.h" ++#include "base/logging.h" ++#include "base/string_tokenizer.h" ++#include "base/string_util.h" ++ ++#if defined(OS_NETBSD) ++#include <sys/param.h> ++#if __NetBSD_Version__ >= 600000000 ++#define HAVE_POSIX_SPAWN 1 ++#endif ++#endif ++ ++#ifdef HAVE_POSIX_SPAWN ++PRE_SYS_INCLUDE ++#include <spawn.h> ++POST_SYS_INCLUDE ++extern "C" char **environ __dso_public; ++#endif ++ ++namespace { ++ ++enum ParsingState { ++ KEY_NAME, ++ KEY_VALUE ++}; ++ ++static mozilla::EnvironmentLog gProcessLog("MOZ_PROCESS_LOG"); ++ ++} // namespace ++ ++namespace base { ++ ++#ifdef HAVE_POSIX_SPAWN ++ ++void FreeEnvVarsArray(char* array[], int length) ++{ ++ for (int i = 0; i < length; i++) { ++ free(array[i]); ++ } ++ delete[] array; ++} ++ ++bool LaunchApp(const std::vector<std::string>& argv, ++ const file_handle_mapping_vector& fds_to_remap, ++ bool wait, ProcessHandle* process_handle) { ++ return LaunchApp(argv, fds_to_remap, environment_map(), ++ wait, process_handle); ++} ++ ++bool LaunchApp(const std::vector<std::string>& argv, ++ const file_handle_mapping_vector& fds_to_remap, ++ const environment_map& env_vars_to_set, ++ bool wait, ProcessHandle* process_handle, ++ ProcessArchitecture arch) { ++ bool retval = true; ++ ++ char* argv_copy[argv.size() + 1]; ++ for (size_t i = 0; i < argv.size(); i++) { ++ argv_copy[i] = const_cast<char*>(argv[i].c_str()); ++ } ++ argv_copy[argv.size()] = NULL; ++ ++ // Make sure we don't leak any FDs to the child process by marking all FDs ++ // as close-on-exec. ++ SetAllFDsToCloseOnExec(); ++ ++ // Copy environment to a new char array and add the variables ++ // in env_vars_to_set. ++ // Existing variables are overwritten by env_vars_to_set. ++ int pos = 0; ++ environment_map combined_env_vars = env_vars_to_set; ++ while(environ[pos] != NULL) { ++ std::string varString = environ[pos]; ++ std::string varName = varString.substr(0, varString.find_first_of('=')); ++ std::string varValue = varString.substr(varString.find_first_of('=') + 1); ++ if (combined_env_vars.find(varName) == combined_env_vars.end()) { ++ combined_env_vars[varName] = varValue; ++ } ++ pos++; ++ } ++ int varsLen = combined_env_vars.size() + 1; ++ ++ char** vars = new char*[varsLen]; ++ int i = 0; ++ for (environment_map::const_iterator it = combined_env_vars.begin(); ++ it != combined_env_vars.end(); ++it) { ++ std::string entry(it->first); ++ entry += "="; ++ entry += it->second; ++ vars[i] = strdup(entry.c_str()); ++ i++; ++ } ++ vars[i] = NULL; ++ ++ posix_spawn_file_actions_t file_actions; ++ if (posix_spawn_file_actions_init(&file_actions) != 0) { ++ FreeEnvVarsArray(vars, varsLen); ++ return false; ++ } ++ ++ // Turn fds_to_remap array into a set of dup2 calls. ++ for (file_handle_mapping_vector::const_iterator it = fds_to_remap.begin(); ++ it != fds_to_remap.end(); ++ ++it) { ++ int src_fd = it->first; ++ int dest_fd = it->second; ++ ++ if (src_fd == dest_fd) { ++ int flags = fcntl(src_fd, F_GETFD); ++ if (flags != -1) { ++ fcntl(src_fd, F_SETFD, flags & ~FD_CLOEXEC); ++ } ++ } else { ++ if (posix_spawn_file_actions_adddup2(&file_actions, src_fd, dest_fd) != 0) { ++ posix_spawn_file_actions_destroy(&file_actions); ++ FreeEnvVarsArray(vars, varsLen); ++ return false; ++ } ++ } ++ } ++ ++ pid_t pid = 0; ++ int spawn_succeeded = (posix_spawnp(&pid, ++ argv_copy[0], ++ &file_actions, ++ NULL, ++ argv_copy, ++ vars) == 0); ++ ++ FreeEnvVarsArray(vars, varsLen); ++ ++ posix_spawn_file_actions_destroy(&file_actions); ++ ++ bool process_handle_valid = pid > 0; ++ if (!spawn_succeeded || !process_handle_valid) { ++ retval = false; ++ } else { ++ if (wait) ++ HANDLE_EINTR(waitpid(pid, 0, 0)); ++ ++ if (process_handle) ++ *process_handle = pid; ++ } ++ ++ return retval; ++} ++ ++bool LaunchApp(const CommandLine& cl, ++ bool wait, bool start_hidden, ProcessHandle* process_handle) { ++ // TODO(playmobil): Do we need to respect the start_hidden flag? ++ file_handle_mapping_vector no_files; ++ return LaunchApp(cl.argv(), no_files, wait, process_handle); ++} ++ ++#else // no posix_spawn, use fork/exec ++ ++bool LaunchApp(const std::vector<std::string>& argv, ++ const file_handle_mapping_vector& fds_to_remap, ++ bool wait, ProcessHandle* process_handle) { ++ return LaunchApp(argv, fds_to_remap, environment_map(), ++ wait, process_handle); ++} ++ ++bool LaunchApp(const std::vector<std::string>& argv, ++ const file_handle_mapping_vector& fds_to_remap, ++ const environment_map& env_vars_to_set, ++ bool wait, ProcessHandle* process_handle, ++ ProcessArchitecture arch) { ++ scoped_array<char*> argv_cstr(new char*[argv.size() + 1]); ++ // Illegal to allocate memory after fork and before execvp ++ InjectiveMultimap fd_shuffle1, fd_shuffle2; ++ fd_shuffle1.reserve(fds_to_remap.size()); ++ fd_shuffle2.reserve(fds_to_remap.size()); ++ ++ pid_t pid = fork(); ++ if (pid < 0) ++ return false; ++ ++ if (pid == 0) { ++ for (file_handle_mapping_vector::const_iterator ++ it = fds_to_remap.begin(); it != fds_to_remap.end(); ++it) { ++ fd_shuffle1.push_back(InjectionArc(it->first, it->second, false)); ++ fd_shuffle2.push_back(InjectionArc(it->first, it->second, false)); ++ } ++ ++ if (!ShuffleFileDescriptors(&fd_shuffle1)) ++ _exit(127); ++ ++ CloseSuperfluousFds(fd_shuffle2); ++ ++ for (environment_map::const_iterator it = env_vars_to_set.begin(); ++ it != env_vars_to_set.end(); ++it) { ++ if (setenv(it->first.c_str(), it->second.c_str(), 1/*overwrite*/)) ++ _exit(127); ++ } ++ ++ for (size_t i = 0; i < argv.size(); i++) ++ argv_cstr[i] = const_cast<char*>(argv[i].c_str()); ++ argv_cstr[argv.size()] = NULL; ++ execvp(argv_cstr[0], argv_cstr.get()); ++ // if we get here, we're in serious trouble and should complain loudly ++ DLOG(ERROR) << "FAILED TO exec() CHILD PROCESS, path: " << argv_cstr[0]; ++ exit(127); ++ } else { ++ gProcessLog.print("==> process %d launched child process %d\n", ++ GetCurrentProcId(), pid); ++ if (wait) ++ HANDLE_EINTR(waitpid(pid, 0, 0)); ++ ++ if (process_handle) ++ *process_handle = pid; ++ } ++ ++ return true; ++} ++ ++bool LaunchApp(const CommandLine& cl, ++ bool wait, bool start_hidden, ++ ProcessHandle* process_handle) { ++ file_handle_mapping_vector no_files; ++ return LaunchApp(cl.argv(), no_files, wait, process_handle); ++} ++ ++#endif ++ ++NamedProcessIterator::NamedProcessIterator(const std::wstring& executable_name, ++ const ProcessFilter* filter) ++{ ++ int numEntries; ++ kvm_t *kvm; ++ std::string exe(WideToASCII(executable_name)); ++ ++#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) ++ kvm = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL); ++ struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), &numEntries); ++ if (procs != NULL && numEntries > 0) { ++ for (int i = 0; i < numEntries; i++) { ++# if defined(OS_DRAGONFLY) ++ if (exe != procs[i].kp_comm) continue; ++ if (filter && !filter->Includes(procs[i].kp_pid, procs[i].kp_ppid)) continue; ++ ProcessEntry e; ++ e.pid = procs[i].kp_pid; ++ e.ppid = procs[i].kp_ppid; ++ strlcpy(e.szExeFile, procs[i].kp_comm, sizeof e.szExeFile); ++ content.push_back(e); ++# elif defined(OS_FREEBSD) ++ if (exe != procs[i].ki_comm) continue; ++ if (filter && !filter->Includes(procs[i].ki_pid, procs[i].ki_ppid)) continue; ++ ProcessEntry e; ++ e.pid = procs[i].ki_pid; ++ e.ppid = procs[i].ki_ppid; ++ strlcpy(e.szExeFile, procs[i].ki_comm, sizeof e.szExeFile); ++ content.push_back(e); ++# endif ++#else ++ kvm = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, NULL); ++ struct kinfo_proc2* procs = kvm_getproc2(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc2), &numEntries); ++ if (procs != NULL && numEntries > 0) { ++ for (int i = 0; i < numEntries; i++) { ++ if (exe != procs[i].p_comm) continue; ++ if (filter && !filter->Includes(procs[i].p_pid, procs[i].p_ppid)) continue; ++ ProcessEntry e; ++ e.pid = procs[i].p_pid; ++ e.ppid = procs[i].p_ppid; ++ strlcpy(e.szExeFile, procs[i].p_comm, sizeof e.szExeFile); ++ content.push_back(e); ++#endif ++ } ++ } ++ nextEntry = 0; ++ kvm_close(kvm); ++} ++ ++NamedProcessIterator::~NamedProcessIterator() { ++} ++ ++const ProcessEntry* NamedProcessIterator::NextProcessEntry() { ++ if (nextEntry >= content.size()) return NULL; ++ return &content[nextEntry++]; ++} ++ ++bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const { ++ return false; ++} ++ ++} // namespace base +$NetBSD: patch-ipc_chromium_src_base_process__util__posix.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/process_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/process_util_posix.cc +@@ -116,6 +116,11 @@ void CloseSuperfluousFds(const base::Inj + #elif defined(OS_MACOSX) + static const rlim_t kSystemDefaultMaxFds = 256; + static const char kFDDir[] = "/dev/fd"; ++#elif defined(OS_BSD) ++ // the getrlimit below should never fail, so whatever .. ++ static const rlim_t kSystemDefaultMaxFds = 1024; ++ // at least /dev/fd will exist ++ static const char kFDDir[] = "/dev/fd"; + #endif + + // Get the maximum number of FDs possible. +@@ -199,7 +204,7 @@ void CloseSuperfluousFds(const base::Inj + void SetAllFDsToCloseOnExec() { + #if defined(OS_LINUX) + const char fd_dir[] = "/proc/self/fd"; +-#elif defined(OS_MACOSX) ++#elif defined(OS_MACOSX) || defined(OS_BSD) + const char fd_dir[] = "/dev/fd"; + #endif + ScopedDIR dir_closer(opendir(fd_dir)); +$NetBSD: patch-ipc_chromium_src_base_sys__info__posix.cc,v 1.2 2011/11/27 13:09:00 tnn Exp $ + +--- mozilla/ipc/chromium/src/base/sys_info_posix.cc.orig 2011-11-04 21:34:00.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/sys_info_posix.cc +@@ -18,6 +18,11 @@ + #include <mach/mach_init.h> + #endif + ++#if defined(OS_NETBSD) ++#include <sys/param.h> ++#include <sys/sysctl.h> ++#endif ++ + #include "base/logging.h" + #include "base/string_util.h" + +@@ -26,7 +31,11 @@ namespace base { + int SysInfo::NumberOfProcessors() { + // It seems that sysconf returns the number of "logical" processors on both + // mac and linux. So we get the number of "online logical" processors. ++#ifdef _SC_NPROCESSORS_ONLN + static long res = sysconf(_SC_NPROCESSORS_ONLN); ++#else ++ static long res = 1; ++#endif + if (res == -1) { + NOTREACHED(); + return 1; +@@ -52,6 +61,20 @@ int64 SysInfo::AmountOfPhysicalMemory() + } + + return static_cast<int64>(hostinfo.max_mem); ++#elif defined(OS_NETBSD) ++ int mib[2]; ++ int rc; ++ int64_t memSize; ++ size_t len = sizeof(memSize); ++ ++ mib[0] = CTL_HW; ++ mib[1] = HW_PHYSMEM64; ++ rc = sysctl( mib, 2, &memSize, &len, NULL, 0 ); ++ if (-1 != rc) { ++ return memSize; ++ } ++ return 0; ++ + #else + long pages = sysconf(_SC_PHYS_PAGES); + long page_size = sysconf(_SC_PAGE_SIZE); +$NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prcpucfg.h,v 1.2 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h +@@ -34,7 +34,7 @@ + #include "base/third_party/nspr/prcpucfg_win.h" + #elif defined(__APPLE__) + #include "base/third_party/nspr/prcpucfg_mac.h" +-#elif defined(__linux__) || defined(ANDROID) ++#elif defined(__linux__) || defined(ANDROID) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) + #include "base/third_party/nspr/prcpucfg_linux.h" + #elif defined(__OpenBSD__) + #include "base/third_party/nspr/prcpucfg_openbsd.h" +$NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prtime.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/third_party/nspr/prtime.cc.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/third_party/nspr/prtime.cc +@@ -212,7 +212,7 @@ PR_ImplodeTime(const PRExplodedTime *exp + LL_ADD(retVal, retVal, temp); + + return retVal; +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_DRAGONFLY) + struct tm exp_tm = {0}; + exp_tm.tm_sec = exploded->tm_sec; + exp_tm.tm_min = exploded->tm_min; +@@ -245,6 +245,24 @@ PR_ImplodeTime(const PRExplodedTime *exp + result *= kSecondsToMicroseconds; + result += exploded->tm_usec; + return result; ++#elif defined(OS_FREEBSD) || defined(OS_NETBSD) ++ struct tm exp_tm = {0}; ++ exp_tm.tm_sec = exploded->tm_sec; ++ exp_tm.tm_min = exploded->tm_min; ++ exp_tm.tm_hour = exploded->tm_hour; ++ exp_tm.tm_mday = exploded->tm_mday; ++ exp_tm.tm_mon = exploded->tm_month; ++ exp_tm.tm_year = exploded->tm_year - 1900; ++ ++ // time_t is 64bit ++ time_t absolute_time = timegm(&exp_tm); ++ ++ PRTime result = static_cast<PRTime>(absolute_time); ++ result -= exploded->tm_params.tp_gmt_offset + ++ exploded->tm_params.tp_dst_offset; ++ result *= kSecondsToMicroseconds; ++ result += exploded->tm_usec; ++ return result; + #else + #error No PR_ImplodeTime implemented on your platform. + #endif +diff --git ipc/chromium/src/base/time_posix.cc ipc/chromium/src/base/time_posix.cc +index abf2a56..48791f6 100644 +--- mozilla/ipc/chromium/src/base/time_posix.cc ++++ mozilla/ipc/chromium/src/base/time_posix.cc +@@ -167,7 +167,7 @@ TimeTicks TimeTicks::Now() { + // With numer and denom = 1 (the expected case), the 64-bit absolute time + // reported in nanoseconds is enough to last nearly 585 years. + +-#elif defined(__OpenBSD__) || defined(OS_POSIX) && \ ++#elif defined(OS_OPENBSD) || defined(OS_POSIX) && \ + defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 + + struct timespec ts; +$NetBSD: patch-ipc_chromium_src_build_build__config.h,v 1.4 2012/04/01 15:18:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/build/build_config.h.orig 2012-03-13 01:36:53.000000000 +0000 ++++ mozilla/ipc/chromium/src/build/build_config.h +@@ -19,17 +19,23 @@ + #define OS_MACOSX 1 + #elif defined(__linux__) || defined(ANDROID) + #define OS_LINUX 1 ++#elif defined(__NetBSD__) ++#define OS_NETBSD 1 ++#elif defined(__DragonFly__) ++#define OS_DRAGONFLY 1 + #elif defined(__OpenBSD__) + #define OS_OPENBSD 1 + #elif defined(_WIN32) + #define OS_WIN 1 ++#elif defined(__FreeBSD__) ++#define OS_FREEBSD 1 + #else + #error Please add support for your platform in build/build_config.h + #endif + + // For access to standard POSIX features, use OS_POSIX instead of a more + // specific macro. +-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_OPENBSD) ++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) + #define OS_POSIX 1 + #endif + +diff --git ipc/chromium/src/chrome/common/ipc_channel_posix.cc ipc/chromium/src/chrome/common/ipc_channel_posix.cc +index bd866ee..2ea5b19 100644 +--- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc ++++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc +@@ -7,6 +7,7 @@ + #include <errno.h> + #include <fcntl.h> + #include <stddef.h> ++#include <unistd.h> + #include <sys/types.h> + #include <sys/socket.h> + #include <sys/stat.h> +$NetBSD: patch-ipc_chromium_src_chrome_common_ipc__channel__posix.h,v 1.1 2011/07/11 12:46:14 tnn Exp $ + +--- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h.orig 2011-06-15 21:57:27.000000000 +0000 ++++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h +@@ -92,7 +92,7 @@ class Channel::ChannelImpl : public Mess + }; + + // This is a control message buffer large enough to hold kMaxReadFDs +-#if defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_NETBSD) + // TODO(agl): OSX appears to have non-constant CMSG macros! + char input_cmsg_buf_[1024]; + #else +$NetBSD: patch-ipc_chromium_src_chrome_common_ipc__message__utils.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h +@@ -195,7 +195,7 @@ + }; + #endif + +-#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390)) ++#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || ((defined(OS_FREEBSD) || defined(OS_DRAGONFLY) || defined(OS_NETBSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390)) + // There size_t is a synonym for |unsigned long| ... + template <> + struct ParamTraits<size_t> { +@@ -248,7 +248,7 @@ + }; + #endif // defined(OS_MACOSX) + +-#if !(defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) ++#if !((defined(OS_FREEBSD) || defined(OS_DRAGONFLY) || defined(OS_NETBSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) + // int64 is |long int| on 64-bit systems, uint64 is |unsigned long| + template <> + struct ParamTraits<int64> { +$NetBSD: patch-ipc_chromium_src_chrome_common_transport__dib.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ + +--- mozilla/ipc/chromium/src/chrome/common/transport_dib.h.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/chromium/src/chrome/common/transport_dib.h +@@ -7,7 +7,7 @@ + + #include "base/basictypes.h" + +-#if defined(OS_WIN) || defined(OS_MACOSX) ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) + #include "base/shared_memory.h" + #endif + +@@ -66,7 +66,7 @@ class TransportDIB { + uint32 sequence_num; + }; + typedef HandleAndSequenceNum Id; +-#elif defined(OS_MACOSX) ++#elif defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) + typedef base::SharedMemoryHandle Handle; + // On Mac, the inode number of the backing file is used as an id. + typedef base::SharedMemoryId Id; +@@ -108,7 +108,7 @@ class TransportDIB { + + private: + TransportDIB(); +-#if defined(OS_WIN) || defined(OS_MACOSX) ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) + explicit TransportDIB(base::SharedMemoryHandle dib); + base::SharedMemory shared_memory_; + uint32 sequence_num_; +$NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.2 2012/03/15 08:30:06 ryoon Exp $ + +--- mozilla/ipc/glue/GeckoChildProcessHost.cpp.orig 2011-12-20 23:28:19.000000000 +0000 ++++ mozilla/ipc/glue/GeckoChildProcessHost.cpp +@@ -430,7 +430,7 @@ + // and passing wstrings from one config to the other is unsafe. So + // we split the logic here. + +-#if defined(OS_LINUX) || defined(OS_MACOSX) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) + base::environment_map newEnvVars; + // XPCOM may not be initialized in some subprocesses. We don't want + // to initialize XPCOM just for the directory service, especially +@@ -445,8 +445,8 @@ + if (NS_SUCCEEDED(rv)) { + nsCString path; + greDir->GetNativePath(path); +-# ifdef OS_LINUX +-# ifdef MOZ_WIDGET_ANDROID ++# if defined(OS_LINUX) || defined(OS_BSD) ++# if defined(MOZ_WIDGET_ANDROID) || defined(OS_BSD) + path += "/lib"; + # endif // MOZ_WIDGET_ANDROID + const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH"); +@@ -557,7 +557,7 @@ + childArgv.push_back(pidstring); + + #if defined(MOZ_CRASHREPORTER) +-# if defined(OS_LINUX) ++# if defined(OS_LINUX) || defined(OS_BSD) + int childCrashFd, childCrashRemapFd; + if (!CrashReporter::CreateNotificationPipeForChild( + &childCrashFd, &childCrashRemapFd)) +@@ -594,7 +594,7 @@ + #endif + + base::LaunchApp(childArgv, mFileMap, +-#if defined(OS_LINUX) || defined(OS_MACOSX) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) + newEnvVars, + #endif + false, &process, arch); +$NetBSD: patch-mm,v 1.13 2012/06/05 18:09:21 ryoon Exp $ + +--- mozilla/toolkit/library/Makefile.in.orig 2012-05-23 18:57:09.000000000 +0000 ++++ mozilla/toolkit/library/Makefile.in +@@ -534,6 +538,10 @@ EXTRA_DSO_LDOPTS += -lelf -ldemangle + endif + endif + ++ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD,$(OS_ARCH))) ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++endif ++ + ifeq ($(OS_ARCH),WINNT) + OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 version winspool comdlg32 imm32 msimg32 shlwapi psapi ws2_32 dbghelp rasapi32 rasdlg iphlpapi uxtheme setupapi secur32 sensorsapi portabledeviceguids windowscodecs wininet) + ifdef ACCESSIBILITY diff --git a/www/seamonkey/files/patch-configure.in b/www/seamonkey/files/patch-configure.in deleted file mode 100644 index 393b67a0341c..000000000000 --- a/www/seamonkey/files/patch-configure.in +++ /dev/null @@ -1,112 +0,0 @@ ---- configure.in.orig 2011-12-17 18:35:47.000000000 +0100 -+++ configure.in 2011-12-19 15:57:09.000000000 +0100 -@@ -1410,7 +1410,7 @@ - CPU_ARCH=sparc - ;; - --x86_64 | ia64) -+amd64 | x86_64 | ia64) - CPU_ARCH="$OS_TEST" - ;; - -@@ -1430,7 +1430,7 @@ - dnl =============================================================== - INTEL_ARCHITECTURE= - case "$OS_TEST" in -- x86_64|i?86) -+ amd64|x86_64|i?86) - INTEL_ARCHITECTURE=1 - esac - -@@ -1753,7 +1753,7 @@ - esac - - case "${host_cpu}" in -- x86_64) -+ amd64 | x86_64) - HOST_CFLAGS="$HOST_CFLAGS -D_AMD64_" - ;; - esac -@@ -2415,6 +2415,9 @@ - x86_64-*) - AC_DEFINE(_AMD64_) - ;; -+ amd64*) -+ AC_DEFINE(_AMD64_) -+ ;; - *) - AC_DEFINE(_CPU_ARCH_NOT_DEFINED) - ;; -@@ -2486,7 +2489,7 @@ - else - DLL_SUFFIX=".so.1.0" - fi -- MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib -Wl,-rpath-link,$(if $(X11BASE),$(X11BASE),/usr/X11R6)/lib' -+ MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib -Wl,-rpath-link,$(if $(X11BASE),$(X11BASE),/usr/local)/lib' - DSO_CFLAGS='' - DSO_PIC_CFLAGS='-fPIC' - DSO_LDOPTS='-shared -fPIC' -@@ -3304,11 +3307,11 @@ - ;; - *) - MOZ_CHECK_PTHREADS(pthreads, -- USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads", -+ USE_PTHREADS=1 _PTHREAD_LDFLAGS="-pthreads", - MOZ_CHECK_PTHREADS(pthread, -- USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread", -+ USE_PTHREADS=1 _PTHREAD_LDFLAGS="-pthread", - MOZ_CHECK_PTHREADS(c_r, -- USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r", -+ USE_PTHREADS=1 _PTHREAD_LDFLAGS="-pthread", - MOZ_CHECK_PTHREADS(c, - USE_PTHREADS=1 - ) -@@ -3383,18 +3386,18 @@ - *-*-freebsd*) - AC_DEFINE(_REENTRANT) - AC_DEFINE(_THREAD_SAFE) -- dnl -pthread links in -lc_r, so don't specify it explicitly. -+ dnl -pthread links in -pthread, so don't specify it explicitly. - if test "$ac_cv_have_dash_pthread" = "yes"; then - _PTHREAD_LDFLAGS="-pthread" - else -- _PTHREAD_LDFLAGS="-lc_r" -+ _PTHREAD_LDFLAGS="-pthread" - fi - ;; - - *-*-openbsd*|*-*-bsdi*) - AC_DEFINE(_REENTRANT) - AC_DEFINE(_THREAD_SAFE) -- dnl -pthread links in -lc_r, so don't specify it explicitly. -+ dnl -pthread links in -pthread, so don't specify it explicitly. - if test "$ac_cv_have_dash_pthread" = "yes"; then - _PTHREAD_LDFLAGS="-pthread" - fi -@@ -3569,7 +3572,7 @@ - ac_cv_func_iconv, - [AC_TRY_LINK([ - #include <stdlib.h> -- #include <iconv.h> -+ #include "/usr/local/include/iconv.h" - ], - [ - iconv_t h = iconv_open("", ""); -@@ -3590,7 +3593,7 @@ - ac_cv_func_const_iconv, - [AC_TRY_COMPILE([ - #include <stdlib.h> -- #include <iconv.h> -+ #include "/usr/local/include/iconv.h" - ], - [ - const char *input = "testing"; -@@ -4383,7 +4386,7 @@ - LDFLAGS=$_SAVE_LDFLAGS - LIBS=$_SAVE_LIBS - --if test "${ZLIB_DIR}" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then -+if test "${ZLIB_DIR}" -a "${ZLIB_DIR}" != "/usr" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then - ZLIB_CFLAGS="-I${ZLIB_DIR}/include" - ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_LIBS}" - fi diff --git a/www/seamonkey/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc b/www/seamonkey/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc deleted file mode 100644 index ffb56ac25100..000000000000 --- a/www/seamonkey/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc +++ /dev/null @@ -1,10 +0,0 @@ ---- mozilla/ipc/chromium/src/base/atomicops_internals_mutex.cc~ -+++ mozilla/ipc/chromium/src/base/atomicops_internals_mutex.cc -@@ -39,6 +39,7 @@ - * ***** END LICENSE BLOCK ***** */ - - #include "base/atomicops.h" -+#include "base/lock.h" - - namespace base { - namespace subtle { diff --git a/www/seamonkey/files/patch-ipc-chromium-src-base-file_util_linux.cc b/www/seamonkey/files/patch-ipc-chromium-src-base-file_util_linux.cc deleted file mode 100644 index d0cc3b14e68b..000000000000 --- a/www/seamonkey/files/patch-ipc-chromium-src-base-file_util_linux.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- mozilla/ipc/chromium/src/base/file_util_linux.cc~ -+++ mozilla/ipc/chromium/src/base/file_util_linux.cc -@@ -28,7 +28,7 @@ bool GetShmemTempDir(FilePath* path) { - #ifdef ANDROID - return GetTempDir(path); - #else -- *path = FilePath("/dev/shm"); -+ *path = FilePath("/tmp"); - return true; - #endif - } diff --git a/www/seamonkey/files/patch-ipc-chromium-src-base-file_util_posix.cc b/www/seamonkey/files/patch-ipc-chromium-src-base-file_util_posix.cc deleted file mode 100644 index 3c722016e77b..000000000000 --- a/www/seamonkey/files/patch-ipc-chromium-src-base-file_util_posix.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- mozilla/ipc/chromium/src/base/file_util_posix.cc~ -+++ mozilla/ipc/chromium/src/base/file_util_posix.cc -@@ -30,6 +30,8 @@ - #include "base/string_util.h" - #include "base/time.h" - -+#define stat64 stat -+ - namespace file_util { - - #if defined(GOOGLE_CHROME_BUILD) diff --git a/www/seamonkey/files/patch-ipc-chromium-src-base-platform_file_posix.cc b/www/seamonkey/files/patch-ipc-chromium-src-base-platform_file_posix.cc deleted file mode 100644 index 14e333ca339b..000000000000 --- a/www/seamonkey/files/patch-ipc-chromium-src-base-platform_file_posix.cc +++ /dev/null @@ -1,10 +0,0 @@ ---- mozilla/ipc/chromium/src/base/platform_file_posix.cc~ -+++ mozilla/ipc/chromium/src/base/platform_file_posix.cc -@@ -9,6 +9,7 @@ - #ifdef ANDROID - #include <linux/stat.h> - #endif -+#include <sys/stat.h> - - #include "base/logging.h" - #include "base/string_util.h" diff --git a/www/seamonkey/files/patch-ipc-chromium-src-base-platform_thread_posix.cc b/www/seamonkey/files/patch-ipc-chromium-src-base-platform_thread_posix.cc deleted file mode 100644 index 3445b281bc48..000000000000 --- a/www/seamonkey/files/patch-ipc-chromium-src-base-platform_thread_posix.cc +++ /dev/null @@ -1,12 +0,0 @@ ---- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2011-04-27 09:34:28.000000000 +0200 -+++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc 2011-04-27 19:47:36.344446266 +0200 -@@ -34,7 +33,8 @@ - #if defined(OS_MACOSX) - return mach_thread_self(); - #elif defined(OS_LINUX) -- return syscall(__NR_gettid); -+ // TODO(BSD): find a better thread ID -+ return reinterpret_cast<int64>(pthread_self()); - #endif - } - diff --git a/www/seamonkey/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h b/www/seamonkey/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h deleted file mode 100644 index ca7b24fa4860..000000000000 --- a/www/seamonkey/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h +++ /dev/null @@ -1,11 +0,0 @@ ---- mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h~ -+++ mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h -@@ -34,7 +34,7 @@ - #include "base/third_party/nspr/prcpucfg_win.h" - #elif defined(__APPLE__) - #include "base/third_party/nspr/prcpucfg_mac.h" --#elif defined(__linux__) || defined(ANDROID) -+#elif defined(__FreeBSD__) || defined(ANDROID) - #include "base/third_party/nspr/prcpucfg_linux.h" - #else - #error Provide a prcpucfg.h appropriate for your platform diff --git a/www/seamonkey/files/patch-ipc-chromium-src-build-build_config.h b/www/seamonkey/files/patch-ipc-chromium-src-build-build_config.h deleted file mode 100644 index e7540d38eceb..000000000000 --- a/www/seamonkey/files/patch-ipc-chromium-src-build-build_config.h +++ /dev/null @@ -1,11 +0,0 @@ ---- mozilla/ipc/chromium/src/build/build_config.h~ -+++ mozilla/ipc/chromium/src/build/build_config.h -@@ -17,7 +17,7 @@ - // A set of macros to use for platform detection. - #if defined(__APPLE__) - #define OS_MACOSX 1 --#elif defined(__linux__) || defined(ANDROID) -+#elif defined(__FreeBSD__) || defined(ANDROID) - #define OS_LINUX 1 - #elif defined(_WIN32) - #define OS_WIN 1 diff --git a/www/seamonkey/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp b/www/seamonkey/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp new file mode 100644 index 000000000000..9bae143f2e26 --- /dev/null +++ b/www/seamonkey/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp @@ -0,0 +1,20 @@ +--- mailnews/addrbook/src/nsDirPrefs.cpp~ ++++ mailnews/addrbook/src/nsDirPrefs.cpp +@@ -375,7 +375,7 @@ static bool DIR_SetServerPosition(nsVoid + DIR_Server *s=nsnull; + + switch (position) { +- case DIR_POS_APPEND: ++ case (PRInt32)DIR_POS_APPEND: + /* Do nothing if the request is to append a server that is already + * in the list. + */ +@@ -401,7 +401,7 @@ static bool DIR_SetServerPosition(nsVoid + wholeList->AppendElement(server); + break; + +- case DIR_POS_DELETE: ++ case (PRInt32)DIR_POS_DELETE: + /* Remove the prefs corresponding to the given server. If the prefName + * value is nsnull, the server has never been saved and there are no + * prefs to remove. diff --git a/www/seamonkey/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp b/www/seamonkey/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp new file mode 100644 index 000000000000..b3a6df4d2c90 --- /dev/null +++ b/www/seamonkey/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp @@ -0,0 +1,29 @@ +--- mailnews/compose/src/nsSmtpProtocol.cpp~ ++++ mailnews/compose/src/nsSmtpProtocol.cpp +@@ -127,16 +127,16 @@ nsresult nsExplainErrorDetails(nsISmtpUr + + switch (code) + { +- case NS_ERROR_SMTP_SERVER_ERROR: +- case NS_ERROR_TCP_READ_ERROR: +- case NS_ERROR_SMTP_TEMP_SIZE_EXCEEDED: +- case NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_1: +- case NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_2: +- case NS_ERROR_SENDING_FROM_COMMAND: +- case NS_ERROR_SENDING_RCPT_COMMAND: +- case NS_ERROR_SENDING_DATA_COMMAND: +- case NS_ERROR_SENDING_MESSAGE: +- case NS_ERROR_SMTP_GREETING: ++ case (int)NS_ERROR_SMTP_SERVER_ERROR: ++ case (int)NS_ERROR_TCP_READ_ERROR: ++ case (int)NS_ERROR_SMTP_TEMP_SIZE_EXCEEDED: ++ case (int)NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_1: ++ case (int)NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_2: ++ case (int)NS_ERROR_SENDING_FROM_COMMAND: ++ case (int)NS_ERROR_SENDING_RCPT_COMMAND: ++ case (int)NS_ERROR_SENDING_DATA_COMMAND: ++ case (int)NS_ERROR_SENDING_MESSAGE: ++ case (int)NS_ERROR_SMTP_GREETING: + bundle->GetStringFromID(NS_ERROR_GET_CODE(code), getter_Copies(eMsg)); + msg = nsTextFormatter::vsmprintf(eMsg.get(), args); + break; diff --git a/www/seamonkey/files/patch-mozilla-build-autoconf-config.sub b/www/seamonkey/files/patch-mozilla-build-autoconf-config.sub deleted file mode 100644 index 12a704ade44b..000000000000 --- a/www/seamonkey/files/patch-mozilla-build-autoconf-config.sub +++ /dev/null @@ -1,12 +0,0 @@ ---- mozilla/build/autoconf/config.sub.orig 2010-01-05 12:26:13.000000000 +0100 -+++ mozilla/build/autoconf/config.sub 2010-01-05 12:26:46.000000000 +0100 -@@ -403,9 +403,6 @@ - amd64) - basic_machine=x86_64-pc - ;; -- amd64-*) -- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` -- ;; - amdahl) - basic_machine=580-amdahl - os=-sysv diff --git a/www/seamonkey/files/patch-mozilla-build-unix-run-mozilla.sh b/www/seamonkey/files/patch-mozilla-build-unix-run-mozilla.sh deleted file mode 100644 index e610c0afb5ee..000000000000 --- a/www/seamonkey/files/patch-mozilla-build-unix-run-mozilla.sh +++ /dev/null @@ -1,21 +0,0 @@ ---- mozilla/build/unix/run-mozilla.sh.orig 2010-10-08 21:51:26.000000000 +0200 -+++ mozilla/build/unix/run-mozilla.sh 2010-10-10 21:45:33.000000000 +0200 -@@ -308,7 +308,7 @@ - } - if moz_should_set_ld_library_path - then -- LD_LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARY_PATH:+":$LD_LIBRARY_PATH"} -+ LD_LIBRARY_PATH=${MOZ_DIST_BIN}:%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko18:%%LOCALBASE%%/lib/npapi/symlinks/seamonkey:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"} - fi - - if [ -n "$LD_LIBRARYN32_PATH" ] -@@ -390,6 +390,9 @@ - export MOZILLA_FIVE_HOME LD_LIBRARY_PATH - export SHLIB_PATH LIBPATH LIBRARY_PATH ADDON_PATH DYLD_LIBRARY_PATH - -+MOZ_PLUGIN_PATH=%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko18:%%LOCALBASE%%/lib/npapi/symlinks/seamonkey -+export MOZ_PLUGIN_PATH -+ - if [ $moz_debug -eq 1 ] - then - moz_debug_program ${1+"$@"} diff --git a/www/seamonkey/files/patch-mozilla-config-gcc-stl-wrapper.template.h b/www/seamonkey/files/patch-mozilla-config-gcc-stl-wrapper.template.h deleted file mode 100644 index c0d470567863..000000000000 --- a/www/seamonkey/files/patch-mozilla-config-gcc-stl-wrapper.template.h +++ /dev/null @@ -1,11 +0,0 @@ ---- mozilla/config/gcc-stl-wrapper.template.h.orig 2010-05-12 13:56:18.000000000 +0000 -+++ mozilla/config/gcc-stl-wrapper.template.h 2010-05-12 13:56:52.000000000 +0000 -@@ -89,7 +89,7 @@ - // -fshort-wchar). We don't want that and so define our own inlined - // __throw_*(). - #ifndef mozilla_throw_gcc_h --# include "mozilla/throw_gcc.h" -+# include "../../memory/mozalloc/throw_gcc.h" - #endif - - #endif // if mozilla_${HEADER}_h diff --git a/www/seamonkey/files/patch-mozilla-configure.in b/www/seamonkey/files/patch-mozilla-configure.in index 4ccc7bfe5017..ce91593e1ed6 100644 --- a/www/seamonkey/files/patch-mozilla-configure.in +++ b/www/seamonkey/files/patch-mozilla-configure.in @@ -1,60 +1,29 @@ ---- mozilla/configure.in.orig 2010-11-04 21:05:18.000000000 +0100 -+++ mozilla/configure.in 2010-11-09 12:59:28.000000000 +0100 -@@ -1549,7 +1549,7 @@ - CPU_ARCH=sparc - ;; - --x86_64 | ia64) -+amd64 | x86_64 | ia64) - CPU_ARCH="$OS_TEST" - ;; - -@@ -1567,7 +1567,7 @@ dnl Set INTEL_ARCHITECTURE if we're comp - dnl =============================================================== - INTEL_ARCHITECTURE= - case "$OS_TEST" in -- x86_64|i?86) -+ amd64|x86_64|i?86) - INTEL_ARCHITECTURE=1 - esac - -@@ -3803,19 +3803,21 @@ - AC_CHECK_FUNCS(localtime_r strtok_r) - - dnl check for clock_gettime(), the CLOCK_MONOTONIC clock, and -lrt --_SAVE_LDFLAGS=$LDFLAGS --LDFLAGS="$LDFLAGS -lrt" --AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC) and -lrt, -+_SAVE_LIBS=$LIBS -+AC_SEARCH_LIBS(clock_gettime, rt) -+AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC), - ac_cv_have_clock_monotonic, - [AC_TRY_LINK([#include <time.h>], - [ struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); ], - ac_cv_have_clock_monotonic=yes, - ac_cv_have_clock_monotonic=no)]) --LDFLAGS=$_SAVE_LDFLAGS -+LIBS=$_SAVE_LIBS - if test "$ac_cv_have_clock_monotonic" = "yes"; then - HAVE_CLOCK_MONOTONIC=1 -- REALTIME_LIBS=-lrt -+ if test "$ac_cv_search_clock_gettime" != "none required"; then -+ REALTIME_LIBS=$ac_cv_search_clock_gettime -+ fi - AC_DEFINE(HAVE_CLOCK_MONOTONIC) - AC_SUBST(HAVE_CLOCK_MONOTONIC) - AC_SUBST(REALTIME_LIBS) -@@ -4808,7 +4810,7 @@ CFLAGS=$_SAVE_CFLAGS +--- mozilla/configure.in.orig 2012-05-23 20:56:34.000000000 +0200 ++++ mozilla/configure.in 2012-05-27 18:18:25.000000000 +0200 +@@ -4230,6 +4233,9 @@ + if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then + MOZ_NATIVE_LIBEVENT= + else ++PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent, ++ [MOZ_NATIVE_LIBEVENT=1 ++ MOZ_LIBEVENT_INCLUDES="$MOZ_LIBEVENT_CFLAGS"], [ + if test "${LIBEVENT_DIR}" = "yes"; then + LIBEVENT_DIR=/usr + fi +@@ -4242,10 +4248,11 @@ else + AC_MSG_ERROR([--with-system-libevent requested but event.h not found])) + AC_CHECK_LIB(event, event_init, + [MOZ_NATIVE_LIBEVENT=1 +- MOZ_LIBEVENT_INCLUDES="${LIBEVENT_DIR}/include" ++ MOZ_LIBEVENT_INCLUDES="-I${LIBEVENT_DIR}/include" + MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"], + [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_INCLUDES= MOZ_LIBEVENT_LIBS=]) + fi ++]) + CFLAGS=$_SAVE_CFLAGS LDFLAGS=$_SAVE_LDFLAGS LIBS=$_SAVE_LIBS - --if test "${ZLIB_DIR}" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then -+if test "${ZLIB_DIR}" -a "${ZLIB_DIR}" != "/usr" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then - ZLIB_CFLAGS="-I${ZLIB_DIR}/include" - ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_LIBS}" - fi -@@ -6022,6 +6024,14 @@ +@@ -5903,6 +5903,14 @@ VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC" VPX_X86_ASM=1 ;; @@ -62,14 +31,14 @@ + VPX_ASFLAGS="-f elf32 -rnasm -pnasm" + VPX_X86_ASM=1 + ;; -+ FreeBSD:amd64) ++ FreeBSD:x86_64) + VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC" + VPX_X86_ASM=1 + ;; SunOS:x86) VPX_ASFLAGS="-f elf32 -rnasm -pnasm" VPX_X86_ASM=1 -@@ -6392,6 +6402,14 @@ if test -n "$MOZ_LIBJPEG_TURBO"; then +@@ -6297,6 +6305,14 @@ LIBJPEG_TURBO_ASFLAGS="-f elf64 -rnasm -pnasm -D__x86_64__ -DPIC -DELF" LIBJPEG_TURBO_X64_ASM=1 ;; @@ -77,7 +46,7 @@ + LIBJPEG_TURBO_ASFLAGS="-f elf32 -rnasm -pnasm -DPIC -DELF" + LIBJPEG_TURBO_X86_ASM=1 + ;; -+ FreeBSD:amd64) ++ FreeBSD:x86_64) + LIBJPEG_TURBO_ASFLAGS="-f elf64 -rnasm -pnasm -D__x86_64__ -DPIC -DELF" + LIBJPEG_TURBO_X64_ASM=1 + ;; diff --git a/www/seamonkey/files/patch-mozilla-content-media-gstreamer-nsGStreamerReader.cpp b/www/seamonkey/files/patch-mozilla-content-media-gstreamer-nsGStreamerReader.cpp new file mode 100644 index 000000000000..fe7e4c54e1e7 --- /dev/null +++ b/www/seamonkey/files/patch-mozilla-content-media-gstreamer-nsGStreamerReader.cpp @@ -0,0 +1,76 @@ +commit f0a73aa +Author: Paul Adenot <paul@paul.cx> +Date: Thu Jun 21 20:44:39 2012 -0400 + + Bug 761419 - Build failure in content/media/gstreamer/nsGStreamerReader.cpp when using clang r=kinetik +--- + content/media/gstreamer/nsGStreamerReader.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git content/media/gstreamer/nsGStreamerReader.cpp content/media/gstreamer/nsGStreamerReader.cpp +index 06a09b5..c48f92e 100644 +--- mozilla/content/media/gstreamer/nsGStreamerReader.cpp ++++ mozilla/content/media/gstreamer/nsGStreamerReader.cpp +@@ -191,7 +191,7 @@ nsresult nsGStreamerReader::ReadMetadata(nsVideoInfo* aInfo) + * stream but that are otherwise decodeable. + */ + guint flags[3] = {GST_PLAY_FLAG_VIDEO|GST_PLAY_FLAG_AUDIO, +- ~GST_PLAY_FLAG_AUDIO, ~GST_PLAY_FLAG_VIDEO}; ++ static_cast<guint>(~GST_PLAY_FLAG_AUDIO), static_cast<guint>(~GST_PLAY_FLAG_VIDEO)}; + guint default_flags, current_flags; + g_object_get(mPlayBin, "flags", &default_flags, NULL); + +commit 667daed +Author: Stephen Moehle <stephen.moehle@gmail.com> +Date: Tue Jun 5 11:32:36 2012 +1200 + + Bug 760899 - Fix debug builds with gstreamer enabled - r=kinetik + + --HG-- + extra : rebase_source : 22598bc470d35d94991ea9f1b14df11ba19a461a +--- + content/media/gstreamer/nsGStreamerReader.cpp | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git content/media/gstreamer/nsGStreamerReader.cpp content/media/gstreamer/nsGStreamerReader.cpp +index 6a50e09..164fb2e 100644 +--- mozilla/content/media/gstreamer/nsGStreamerReader.cpp ++++ mozilla/content/media/gstreamer/nsGStreamerReader.cpp +@@ -278,7 +278,7 @@ nsresult nsGStreamerReader::ReadMetadata(nsVideoInfo* aInfo) + if (gst_element_query_duration(GST_ELEMENT(mPlayBin), + &format, &duration) && format == GST_FORMAT_TIME) { + ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor()); +- LOG(PR_LOG_DEBUG, ("returning duration %"GST_TIME_FORMAT, ++ LOG(PR_LOG_DEBUG, ("returning duration %" GST_TIME_FORMAT, + GST_TIME_ARGS (duration))); + duration = GST_TIME_AS_USECONDS (duration); + mDecoder->GetStateMachine()->SetDuration(duration); +@@ -422,8 +422,8 @@ bool nsGStreamerReader::DecodeVideoFrame(bool &aKeyFrameSkip, + nextTimestamp += gst_util_uint64_scale(GST_USECOND, fpsNum, fpsDen); + + if (timestamp < aTimeThreshold) { +- LOG(PR_LOG_DEBUG, ("skipping frame %"GST_TIME_FORMAT +- " threshold %"GST_TIME_FORMAT, ++ LOG(PR_LOG_DEBUG, ("skipping frame %" GST_TIME_FORMAT ++ " threshold %" GST_TIME_FORMAT, + GST_TIME_ARGS(timestamp), GST_TIME_ARGS(aTimeThreshold))); + gst_buffer_unref(buffer); + buffer = NULL; +@@ -489,7 +489,7 @@ nsresult nsGStreamerReader::Seek(PRInt64 aTarget, + NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread."); + + gint64 seekPos = aTarget * GST_USECOND; +- LOG(PR_LOG_DEBUG, ("%p About to seek to %"GST_TIME_FORMAT, ++ LOG(PR_LOG_DEBUG, ("%p About to seek to %" GST_TIME_FORMAT, + mDecoder, GST_TIME_ARGS(seekPos))); + + if (!gst_element_seek_simple(mPlayBin, GST_FORMAT_TIME, +@@ -592,7 +592,7 @@ PRInt64 nsGStreamerReader::QueryDuration() + if (gst_element_query_duration(GST_ELEMENT(mPlayBin), + &format, &duration)) { + if (format == GST_FORMAT_TIME) { +- LOG(PR_LOG_DEBUG, ("pipeline duration %"GST_TIME_FORMAT, ++ LOG(PR_LOG_DEBUG, ("pipeline duration %" GST_TIME_FORMAT, + GST_TIME_ARGS (duration))); + duration = GST_TIME_AS_USECONDS (duration); + } diff --git a/www/seamonkey/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp b/www/seamonkey/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp new file mode 100644 index 000000000000..f088ed439b95 --- /dev/null +++ b/www/seamonkey/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp @@ -0,0 +1,11 @@ +--- mozilla/dom/plugins/ipc/PluginMessageUtils.cpp~ ++++ mozilla/dom/plugins/ipc/PluginMessageUtils.cpp +@@ -94,7 +94,7 @@ ReplaceAll(const string& haystack, const + i += with.length(); + } + +- return munged; ++ return munged.c_str(); + } + #endif + diff --git a/www/seamonkey/files/patch-mozilla-gfx-harfbuzz-src-hb-ot-layout.cc b/www/seamonkey/files/patch-mozilla-gfx-harfbuzz-src-hb-ot-layout.cc new file mode 100644 index 000000000000..c8e84ca6768a --- /dev/null +++ b/www/seamonkey/files/patch-mozilla-gfx-harfbuzz-src-hb-ot-layout.cc @@ -0,0 +1,11 @@ +--- mozilla/gfx/harfbuzz/src/hb-ot-layout.cc.orig 2012-06-24 22:14:46.463741874 -0400 ++++ mozilla/gfx/harfbuzz/src/hb-ot-layout.cc 2012-06-24 22:15:06.784770042 -0400 +@@ -540,4 +540,8 @@ + GPOS::position_finish (buffer); + } + ++template int SortedArrayOf<Record<LangSys> >::search<unsigned int>(unsigned int const &) const; ++template int SortedArrayOf<Record<Script> >::search<unsigned int>(unsigned int const &) const; ++template int SortedArrayOf<IntType<unsigned short> >::search<unsigned int>(unsigned int const &) const; ++template int SortedArrayOf<RangeRecord>::search<unsigned int>(unsigned int const &) const; + diff --git a/www/seamonkey/files/patch-mozilla-gfx-qcms-Makefile.in b/www/seamonkey/files/patch-mozilla-gfx-qcms-Makefile.in deleted file mode 100644 index 44a97f7f0629..000000000000 --- a/www/seamonkey/files/patch-mozilla-gfx-qcms-Makefile.in +++ /dev/null @@ -1,11 +0,0 @@ ---- mozilla/gfx/qcms/Makefile.in.orig 2011-01-22 01:25:38.000000000 +0100 -+++ mozilla/gfx/qcms/Makefile.in 2011-01-27 18:16:39.000000000 +0100 -@@ -15,7 +15,7 @@ - - CSRCS = iccread.c transform.c - --ifeq (86,$(findstring 86,$(OS_TEST))) -+ifneq (,$(INTEL_ARCHITECTURE)) - CSRCS += transform-sse2.c - ifdef _MSC_VER - ifneq ($(OS_ARCH)_$(OS_TEST),WINNT_x86_64) diff --git a/www/seamonkey/files/patch-mozilla-gfx-ycbcr-Makefile.in b/www/seamonkey/files/patch-mozilla-gfx-ycbcr-Makefile.in new file mode 100644 index 000000000000..041689a51995 --- /dev/null +++ b/www/seamonkey/files/patch-mozilla-gfx-ycbcr-Makefile.in @@ -0,0 +1,21 @@ +--- mozilla/gfx/ycbcr/Makefile.in~ ++++ mozilla/gfx/ycbcr/Makefile.in +@@ -58,6 +58,10 @@ ifeq ($(OS_ARCH),Linux) + CPPSRCS += yuv_row_posix.cpp \ + $(NULL) + else ++ifeq ($(OS_ARCH),FreeBSD) ++CPPSRCS += yuv_row_posix.cpp \ ++ $(NULL) ++else + ifeq ($(OS_ARCH),SunOS) + CPPSRCS += yuv_row_posix.cpp \ + $(NULL) +@@ -70,6 +74,7 @@ CPPSRCS += yuv_row_other.cpp \ + $(NULL) + endif # Darwin + endif # SunOS ++endif # FreeBSD + endif # linux + endif # windows +
\ No newline at end of file diff --git a/www/seamonkey/files/patch-mozilla-ipc-chromium-Makefile.in b/www/seamonkey/files/patch-mozilla-ipc-chromium-Makefile.in new file mode 100644 index 000000000000..5d2e72cd0a96 --- /dev/null +++ b/www/seamonkey/files/patch-mozilla-ipc-chromium-Makefile.in @@ -0,0 +1,28 @@ +--- mozilla/ipc/chromium/Makefile.in~ ++++ mozilla/ipc/chromium/Makefile.in +@@ -43,6 +43,14 @@ include $(DEPTH)/config/autoconf.mk + + OS_CXXFLAGS := $(filter-out -fshort-wchar,$(OS_CXXFLAGS)) + ++# workaround IPC hang with libevent2 ++ifndef MOZ_DEBUG ++ifneq (,$(filter 4.2.%, $(CXX_VERSION))) ++MOZ_OPTIMIZE_FLAGS = -O1 ++OS_CXXFLAGS += $(MOZ_OPTIMIZE_FLAGS) ++endif ++endif ++ + LIBRARY_NAME = chromium_s + FORCE_STATIC_LIB = 1 + LIBXUL_LIBRARY = 1 +@@ -55,9 +60,7 @@ vpath %.c \ + $(srcdir)/src/third_party/libevent \ + $(NULL) + else # } else { +-# message_pump_libevent.cc includes third_party/libevent/event.h, +-# which we put in $(DIST), see export rule below +-LOCAL_INCLUDES += -I$(DIST) ++LOCAL_INCLUDES += $(filter %/compat, $(MOZ_LIBEVENT_INCLUDES)) + endif # } + + vpath %.cc \ diff --git a/www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h b/www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h deleted file mode 100644 index 5c4e5b79f3d1..000000000000 --- a/www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h +++ /dev/null @@ -1,45 +0,0 @@ ---- mozilla/ipc/chromium/src/base/dir_reader_linux.h.orig 2011-12-16 21:29:22.000000000 +0100 -+++ mozilla/ipc/chromium/src/base/dir_reader_linux.h 2011-12-19 21:00:27.000000000 +0100 -@@ -9,6 +9,7 @@ - #include <errno.h> - #include <fcntl.h> - #include <stdint.h> -+#include <sys/dirent.h> - #include <sys/syscall.h> - #include <unistd.h> - -@@ -19,6 +20,8 @@ - - namespace base { - -+#define linux_dirent struct dirent -+#if 0 - struct linux_dirent { - uint64_t d_ino; - int64_t d_off; -@@ -26,11 +29,16 @@ - unsigned char d_type; - char d_name[0]; - }; -+#endif - - class DirReaderLinux { - public: - explicit DirReaderLinux(const char* directory_path) -+#ifdef O_DIRECTORY - : fd_(open(directory_path, O_RDONLY | O_DIRECTORY)), -+#else -+ : fd_(open(directory_path, O_RDONLY)), -+#endif - offset_(0), - size_(0) { - memset(buf_, 0, sizeof(buf_)); -@@ -57,7 +65,7 @@ - if (offset_ != size_) - return true; - -- const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_)); -+ const int r = syscall(SYS_getdents, fd_, buf_, sizeof(buf_)); - if (r == 0) - return false; - if (r == -1) { diff --git a/www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc b/www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc new file mode 100644 index 000000000000..3fe4995aa0f8 --- /dev/null +++ b/www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc @@ -0,0 +1,11 @@ +--- mozilla/ipc/chromium/src/base/message_pump_libevent.cc~ ++++ mozilla/ipc/chromium/src/base/message_pump_libevent.cc +@@ -15,7 +15,7 @@ + #include "base/scoped_nsautorelease_pool.h" + #include "base/scoped_ptr.h" + #include "base/time.h" +-#include "third_party/libevent/event.h" ++#include "event.h" + + // Lifecycle of struct event + // Libevent uses two main data structures: diff --git a/www/seamonkey/files/patch-mozilla-js-src-Makefile.in b/www/seamonkey/files/patch-mozilla-js-src-Makefile.in index e62d7b8202a2..2aa54ce69c5e 100644 --- a/www/seamonkey/files/patch-mozilla-js-src-Makefile.in +++ b/www/seamonkey/files/patch-mozilla-js-src-Makefile.in @@ -1,24 +1,5 @@ --- mozilla/js/src/Makefile.in.orig 2012-03-15 20:40:13.000000000 +0100 +++ mozilla/js/src/Makefile.in 2012-03-16 10:03:18.000000000 +0100 -@@ -352,7 +352,7 @@ - # For architectures without YARR JIT, PCRE is faster than the YARR - # interpreter (bug 684559). - --ifeq (,$(filter arm% sparc %86 x86_64 mips%,$(TARGET_CPU))) -+ifeq (,$(filter arm% sparc %86 amd64 x86_64 mips%,$(TARGET_CPU))) - - VPATH += $(srcdir)/yarr/pcre \ - $(NULL) -@@ -418,6 +418,9 @@ - else - #CPPSRCS += only_on_x86.cpp - endif -+ifeq (amd64, $(TARGET_CPU)) -+#CPPSRCS += only_on_x86_64.cpp -+endif - endif - ifeq (arm, $(TARGET_CPU)) - #CPPSRCS += only_on_arm.cpp @@ -737,7 +740,7 @@ endif # WINNT diff --git a/www/seamonkey/files/patch-mozilla-js-src-build-autoconf-config.sub b/www/seamonkey/files/patch-mozilla-js-src-build-autoconf-config.sub deleted file mode 100644 index 2cb48a88c0e9..000000000000 --- a/www/seamonkey/files/patch-mozilla-js-src-build-autoconf-config.sub +++ /dev/null @@ -1,12 +0,0 @@ ---- mozilla/js/src/build/autoconf/config.sub.orig 2010-01-08 09:52:25.000000000 +0100 -+++ mozilla/js/src/build/autoconf/config.sub 2010-01-08 09:52:33.000000000 +0100 -@@ -403,9 +403,6 @@ - amd64) - basic_machine=x86_64-pc - ;; -- amd64-*) -- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` -- ;; - amdahl) - basic_machine=580-amdahl - os=-sysv diff --git a/www/seamonkey/files/patch-mozilla-js-src-config-mkdepend-Makefile.in b/www/seamonkey/files/patch-mozilla-js-src-config-mkdepend-Makefile.in index 2f5b09be6df7..0c1889122eeb 100644 --- a/www/seamonkey/files/patch-mozilla-js-src-config-mkdepend-Makefile.in +++ b/www/seamonkey/files/patch-mozilla-js-src-config-mkdepend-Makefile.in @@ -5,7 +5,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 ++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/seamonkey/files/patch-mozilla-js-src-configure.in b/www/seamonkey/files/patch-mozilla-js-src-configure.in index 326523f71618..3a2a1d3b6d0d 100644 --- a/www/seamonkey/files/patch-mozilla-js-src-configure.in +++ b/www/seamonkey/files/patch-mozilla-js-src-configure.in @@ -1,17 +1,10 @@ ---- mozilla/js/src/configure.in.orig 2012-03-12 10:27:55.000000000 +0100 -+++ mozilla/js/src/configure.in 2012-03-12 10:28:22.000000000 +0100 -@@ -2831,12 +2831,14 @@ - AC_DEFINE(JS_NUNBOX32) - ;; - sparc*-*) -+ if test ! "$HAVE_64BIT_OS" ; then - ENABLE_METHODJIT=1 - ENABLE_MONOIC=1 - ENABLE_POLYIC=1 - ENABLE_METHODJIT_TYPED_ARRAY=1 - AC_DEFINE(JS_CPU_SPARC) - AC_DEFINE(JS_NUNBOX32) -+ fi - ;; - esac +--- mozilla/js/src/configure.in.orig 2012-02-22 17:06:28.000000000 +0100 ++++ mozilla/js/src/configure.in 2012-03-07 21:03:11.000000000 +0100 +@@ -5946,6 +5946,7 @@ _EGREP_PATTERN="${_EGREP_PATTERN}dummy_n + * C++ implementations should define these macros only when __STDC_LIMIT_MACROS + * is defined before <stdint.h> is included. */ + #define __STDC_LIMIT_MACROS ++#define __STDC_CONSTANT_MACROS + + #endif /* _JS_CONFDEFS_H_ */ diff --git a/www/seamonkey/files/patch-mozilla-js-src-jsnum.cpp b/www/seamonkey/files/patch-mozilla-js-src-jsnum.cpp new file mode 100644 index 000000000000..fdf4840c1441 --- /dev/null +++ b/www/seamonkey/files/patch-mozilla-js-src-jsnum.cpp @@ -0,0 +1,31 @@ +--- mozilla/js/src/jsnum.cpp.orig 2010-01-05 22:35:17.000000000 -0500 ++++ mozilla/js/src/jsnum.cpp 2010-01-11 05:10:19.000000000 -0500 +@@ -49,6 +49,9 @@ + // Avoid warnings about ASSERT being defined by the assembler as well. + #undef ASSERT + ++#if defined(__FreeBSD__) ++#include <sys/param.h> ++#endif + #ifdef XP_OS2 + #define _PC_53 PC_53 + #define _MCW_EM MCW_EM +@@ -691,8 +694,18 @@ + + #else + ++#if defined(__FreeBSD__) ++#if __BSD_VISIBLE == 0 ++#error __BSD_VISIBLE is zero, so fedisableexcept is not defined ++#endif ++#include <fenv.h> ++#define FIX_FPU() ((void)fedisableexcept(FE_ALL_EXCEPT)) ++#else ++ + #define FIX_FPU() ((void)0) + ++#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */ ++ + #endif + + JSBool diff --git a/www/seamonkey/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp b/www/seamonkey/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp new file mode 100644 index 000000000000..009b469dcd7f --- /dev/null +++ b/www/seamonkey/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp @@ -0,0 +1,20 @@ +--- mozilla/js/src/methodjit/MethodJIT.cpp~ ++++ mozilla/js/src/methodjit/MethodJIT.cpp +@@ -171,7 +171,7 @@ + + JS_STATIC_ASSERT(offsetof(FrameRegs, sp) == 0); + +-#if defined(__linux__) && defined(JS_CPU_X64) ++#if defined(__ELF__) && defined(JS_CPU_X64) + # define SYMBOL_STRING_RELOC(name) #name "@plt" + #else + # define SYMBOL_STRING_RELOC(name) SYMBOL_STRING(name) +@@ -149,7 +149,7 @@ + + #if defined(XP_MACOSX) + # define HIDE_SYMBOL(name) ".private_extern _" #name +-#elif defined(__linux__) ++#elif defined(__ELF__) + # define HIDE_SYMBOL(name) ".hidden" #name + #else + # define HIDE_SYMBOL(name) diff --git a/www/seamonkey/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c b/www/seamonkey/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c new file mode 100644 index 000000000000..ddb42a92a1e3 --- /dev/null +++ b/www/seamonkey/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c @@ -0,0 +1,13 @@ +--- mozilla/media/libsydneyaudio/src/sydney_audio_oss.c~ ++++ mozilla/media/libsydneyaudio/src/sydney_audio_oss.c +@@ -446,6 +446,10 @@ static void audio_callback(void* data) + printf("!"); /* not enough audio data */ + #endif + bytes = bytes-bytes_to_copy; ++ struct timespec ts = {0, 1000000}; ++ pthread_mutex_unlock(&s->mutex); ++ nanosleep(&ts, NULL); ++ pthread_mutex_lock(&s->mutex); + break; + } + free(s->bl_head); diff --git a/www/seamonkey/files/patch-mozilla-memory-mozalloc-mozalloc.cpp b/www/seamonkey/files/patch-mozilla-memory-mozalloc-mozalloc.cpp new file mode 100644 index 000000000000..72eba848047d --- /dev/null +++ b/www/seamonkey/files/patch-mozilla-memory-mozalloc-mozalloc.cpp @@ -0,0 +1,21 @@ +--- mozilla/memory/mozalloc/mozalloc.cpp~ ++++ mozilla/memory/mozalloc/mozalloc.cpp +@@ -19,6 +19,9 @@ + #if defined(XP_UNIX) + # include <unistd.h> // for valloc on *BSD + #endif //if defined(XP_UNIX) ++#ifdef __FreeBSD__ ++# include <malloc_np.h> // for malloc_usable_size ++#endif + + #if defined(XP_WIN) || (defined(XP_OS2) && defined(__declspec)) + # define MOZALLOC_EXPORT __declspec(dllexport) +@@ -210,7 +213,7 @@ moz_malloc_usable_size(void *ptr) + + #if defined(XP_MACOSX) + return malloc_size(ptr); +-#elif defined(MOZ_MEMORY) || (defined(XP_LINUX) && !defined(ANDROID)) ++#elif defined(MOZ_MEMORY) || (defined(XP_LINUX) && !defined(ANDROID)) || defined(__FreeBSD__) + // Android bionic libc doesn't have malloc_usable_size. + return malloc_usable_size(ptr); + #elif defined(XP_WIN) diff --git a/www/seamonkey/files/patch-mozilla-security-coreconf-FreeBSD.mk b/www/seamonkey/files/patch-mozilla-security-coreconf-FreeBSD.mk index 3015445bfc08..6827aa77052a 100644 --- a/www/seamonkey/files/patch-mozilla-security-coreconf-FreeBSD.mk +++ b/www/seamonkey/files/patch-mozilla-security-coreconf-FreeBSD.mk @@ -1,6 +1,6 @@ --- mozilla/security/coreconf/FreeBSD.mk.orig 2010-03-16 09:57:06.000000000 +0000 +++ mozilla/security/coreconf/FreeBSD.mk 2010-03-20 17:40:12.000000000 +0000 -@@ -49,8 +49,20 @@ +@@ -49,8 +49,24 @@ ifeq ($(CPU_ARCH),pc98) CPU_ARCH = x86 endif @@ -9,12 +9,16 @@ +ifeq ($(OS_TEST),alpha) +CPU_ARCH = alpha +endif -+ifeq ($(OS_TEST),amd64) -+CPU_ARCH = amd64 ++ifeq ($(OS_TEST),x86_64) ++CPU_ARCH = x86_64 +endif +ifeq ($(OS_TEST),ia64) +CPU_ARCH = ia64 +endif ++ifeq ($(OS_TEST),powerpc64) ++CPU_ARCH = powerpc ++USE_64 = 1 ++endif +ifeq ($(OS_TEST),powerpc) +CPU_ARCH = powerpc +endif @@ -32,9 +36,11 @@ ifdef MAPFILE MKSHLIB += -Wl,--version-script,$(MAPFILE) endif -@@ -87,4 +99,4 @@ +@@ -87,4 +99,6 @@ G++INCLUDES = -I/usr/include/g++ -INCLUDES += -I/usr/X11R6/include -+#INCLUDES += -I/usr/local/include ++USE_SYSTEM_ZLIB = 1 ++ZLIB_LIBS = -lz ++INCLUDES += -I$(LOCALBASE)/include diff --git a/www/seamonkey/files/patch-mozilla-security-nss-lib-Makefile b/www/seamonkey/files/patch-mozilla-security-nss-lib-Makefile new file mode 100644 index 000000000000..195e44014456 --- /dev/null +++ b/www/seamonkey/files/patch-mozilla-security-nss-lib-Makefile @@ -0,0 +1,11 @@ +--- mozilla/security/nss/lib/Makefile~ ++++ mozilla/security/nss/lib/Makefile +@@ -63,7 +63,7 @@ ZLIB_SRCDIR = zlib # Add the zlib direc + endif + + ifndef MOZILLA_CLIENT +-ifndef NSS_USE_SYSTEM_SQLITE ++ifndef MOZ_NATIVE_SQLITE + SQLITE_SRCDIR = sqlite # Add the sqlite directory to DIRS. + endif + endif diff --git a/www/seamonkey/files/patch-mozilla-toolkit-library-Makefile.in b/www/seamonkey/files/patch-mozilla-toolkit-library-Makefile.in deleted file mode 100644 index f222b6dca9e9..000000000000 --- a/www/seamonkey/files/patch-mozilla-toolkit-library-Makefile.in +++ /dev/null @@ -1,12 +0,0 @@ ---- mozilla/toolkit/library/Makefile.in.orig 2010-01-11 12:13:08.000000000 -0500 -+++ mozilla/toolkit/library/Makefile.in 2010-01-11 12:15:05.000000000 -0500 -@@ -181,7 +181,7 @@ - export:: $(RDF_UTIL_SRC_CPPSRCS) $(INTL_UNICHARUTIL_UTIL_CPPSRCS) - $(INSTALL) $^ . - --EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -+EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -lexecinfo %%PTHREAD_LIBS%% - - ifdef MOZ_ENABLE_LIBXUL - include $(srcdir)/libxul-rules.mk - diff --git a/www/seamonkey/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp b/www/seamonkey/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp new file mode 100644 index 000000000000..78cb22fd4702 --- /dev/null +++ b/www/seamonkey/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp @@ -0,0 +1,11 @@ +--- mozilla/toolkit/xre/nsAppRunner.cpp~ ++++ mozilla/toolkit/xre/nsAppRunner.cpp +@@ -3819,7 +3819,7 @@ XREMain::XRE_main(int argc, char* argv[] + ScopedLogging log; + + #if defined(MOZ_WIDGET_GTK2) +-#ifdef MOZ_MEMORY ++#if defined(MOZ_MEMORY) || defined(__FreeBSD__) + // Disable the slice allocator, since jemalloc already uses similar layout + // algorithms, and using a sub-allocator tends to increase fragmentation. + // This must be done before g_thread_init() is called. diff --git a/www/seamonkey/files/patch-mozilla-widget-qt-nsNativeThemeQt.cpp b/www/seamonkey/files/patch-mozilla-widget-qt-nsNativeThemeQt.cpp new file mode 100644 index 000000000000..7305a04e1c33 --- /dev/null +++ b/www/seamonkey/files/patch-mozilla-widget-qt-nsNativeThemeQt.cpp @@ -0,0 +1,12 @@ +--- mozilla/widget/qt/nsNativeThemeQt.cpp~ ++++ mozilla/widget/qt/nsNativeThemeQt.cpp +@@ -25,7 +25,9 @@ + #include "nsThemeConstants.h" + #include "nsIServiceManager.h" + #include "nsIDOMHTMLInputElement.h" ++#ifdef __GLIBC__ + #include <malloc.h> ++#endif + + + #include "gfxASurface.h" diff --git a/www/seamonkey/files/patch-mozilla-widget-qt-nsSound.cpp b/www/seamonkey/files/patch-mozilla-widget-qt-nsSound.cpp new file mode 100644 index 000000000000..601b917a3347 --- /dev/null +++ b/www/seamonkey/files/patch-mozilla-widget-qt-nsSound.cpp @@ -0,0 +1,10 @@ +--- mozilla/widget/qt/nsSound.cpp~ ++++ mozilla/widget/qt/nsSound.cpp +@@ -40,6 +40,7 @@ + #include <QSound> + + #include <string.h> ++#include <unistd.h> + + #include "nscore.h" + #include "plstr.h" diff --git a/www/seamonkey/files/patch-mozilla-widget-qt-nsWindow.cpp b/www/seamonkey/files/patch-mozilla-widget-qt-nsWindow.cpp new file mode 100644 index 000000000000..30a42b431da5 --- /dev/null +++ b/www/seamonkey/files/patch-mozilla-widget-qt-nsWindow.cpp @@ -0,0 +1,10 @@ +--- mozilla/widget/qt/nsWindow.cpp~ ++++ mozilla/widget/qt/nsWindow.cpp +@@ -43,6 +43,7 @@ using namespace QtMobility; + + #ifdef MOZ_X11 + #include <X11/Xlib.h> ++#include "mozilla/X11Util.h" + #endif //MOZ_X11 + + #include "nsXULAppAPI.h" diff --git a/www/seamonkey/files/patch-mozilla-xpcom-base-nsStackWalk.cpp b/www/seamonkey/files/patch-mozilla-xpcom-base-nsStackWalk.cpp new file mode 100644 index 000000000000..f7331270ab8a --- /dev/null +++ b/www/seamonkey/files/patch-mozilla-xpcom-base-nsStackWalk.cpp @@ -0,0 +1,10 @@ +--- mozilla/xpcom/base/nsStackWalk.cpp~ ++++ mozilla/xpcom/base/nsStackWalk.cpp +@@ -1638,6 +1638,7 @@ NS_StackWalk(NS_WalkStackCallback aCallb + + #elif defined(HAVE__UNWIND_BACKTRACE) + ++#define _GNU_SOURCE + // libgcc_s.so symbols _Unwind_Backtrace@@GCC_3.3 and _Unwind_GetIP@@GCC_3.0 + #include <unwind.h> + diff --git a/www/seamonkey/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in b/www/seamonkey/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in index e896cec90613..252912459191 100644 --- a/www/seamonkey/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in +++ b/www/seamonkey/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in @@ -1,16 +1,6 @@ ---- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2011-05-28 15:26:21.000000000 +0200 -+++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2011-06-03 18:39:42.769434047 +0200 -@@ -74,6 +74,9 @@ - # NOTE: MODULE_OPTIMIZE_FLAGS must be set before including config.mk - MODULE_OPTIMIZE_FLAGS=-O3 - endif -+ifeq (x86_64,$(OS_TEST)) -+CPPSRCS := xptcinvoke_x86_64_linux.cpp xptcstubs_x86_64_linux.cpp -+endif - endif - endif - -@@ -117,7 +120,7 @@ +--- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2011-04-26 23:22:05.000000000 +0200 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2011-04-26 23:48:09.637442986 +0200 +@@ -70,7 +70,7 @@ endif endif # IA64 Linux @@ -19,36 +9,6 @@ ifneq (,$(findstring ia64,$(OS_TEST))) CPPSRCS := xptcinvoke_ipf64.cpp xptcstubs_ipf64.cpp ASFILES := xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s -@@ -129,6 +132,12 @@ - ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDx86_64) - CPPSRCS := xptcinvoke_amd64_openbsd.cpp xptcstubs_amd64_openbsd.cpp - endif -+# FreeBSD/amd64 -+# -+ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDamd64) -+CPPSRCS := xptcinvoke_amd64_openbsd.cpp xptcstubs_amd64_openbsd.cpp -+endif -+# - # - # Neutrino/Intel (uses the same unixish_x86 code) - # -@@ -184,9 +193,15 @@ - ASFILES := xptcinvoke_asm_osf1_alpha.s xptcstubs_asm_osf1_alpha.s - endif - # -+# FreeBSD/Alpha -+# -+ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDalpha) -+CPPSRCS := xptcinvoke_freebsd_alpha.cpp xptcstubs_freebsd_alpha.cpp -+endif -+# - # Linux/Alpha - # --ifneq (,$(filter Linuxalpha FreeBSDalpha NetBSDalpha,$(OS_ARCH)$(OS_TEST))) -+ifneq (,$(filter Linuxalpha NetBSDalpha,$(OS_ARCH)$(OS_TEST))) - CPPSRCS := xptcinvoke_linux_alpha.cpp xptcstubs_linux_alpha.cpp - endif - # @@ -341,7 +356,7 @@ # # Linux/PPC @@ -58,19 +18,21 @@ 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 -@@ -419,6 +434,15 @@ - ASFILES := xptcinvoke_asm_sparc_netbsd.s xptcstubs_asm_sparc_netbsd.s - endif +@@ -350,7 +365,7 @@ # -+# FreeBSD/SPARC64 -+# -+ifeq ($(OS_ARCH),FreeBSD) -+ifneq (,$(findstring sparc,$(OS_TEST))) -+CPPSRCS := xptcinvoke_sparc64_openbsd.cpp xptcstubs_sparc64_openbsd.cpp -+ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.s -+endif -+endif -+# - # OpenBSD/SPARC + # Linux/PPC64 # - ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDsparc) +-ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64) ++ifneq (,$(filter Linuxpowerpc64 FreeBSDpowerpc64,$(OS_ARCH)$(OS_TEST))) + CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp + ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s + AS := $(CC) -c -x assembler-with-cpp +@@ -350,7 +350,7 @@ + # + # OpenBSD/SPARC64 + # +-ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDsparc64) ++ifneq (,$(filter OpenBSDsparc64 FreeBSDsparc64,$(OS_ARCH)$(OS_TEST))) + CPPSRCS := xptcinvoke_sparc64_openbsd.cpp xptcstubs_sparc64_openbsd.cpp + ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.s + endif diff --git a/www/seamonkey/files/patch-suite-app-nsSuiteApp.cpp b/www/seamonkey/files/patch-suite-app-nsSuiteApp.cpp new file mode 100644 index 000000000000..b477bd2aa922 --- /dev/null +++ b/www/seamonkey/files/patch-suite-app-nsSuiteApp.cpp @@ -0,0 +1,11 @@ +--- suite/app/nsSuiteApp.cpp~ ++++ suite/app/nsSuiteApp.cpp +@@ -215,6 +215,8 @@ int main(int argc, char* argv[]) + #ifdef XP_MACOSX + TriggerQuirks(); + #endif ++ ++ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko19:%%LOCALBASE%%/lib/npapi/symlinks/seamonkey", 0); + + nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath); + if (NS_FAILED(rv)) { diff --git a/www/seamonkey/files/patch-suite-installer-Makefile.in b/www/seamonkey/files/patch-suite-installer-Makefile.in new file mode 100644 index 000000000000..048cb49db9ef --- /dev/null +++ b/www/seamonkey/files/patch-suite-installer-Makefile.in @@ -0,0 +1,11 @@ +--- suite/installer/Makefile.in.orig 2012-06-19 20:42:29.000000000 +0200 ++++ suite/installer/Makefile.in 2012-06-19 20:42:54.000000000 +0200 +@@ -49,7 +49,7 @@ + MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in + # Be fatal, except when building with XULRunner which already bundles some files. + ifndef SYSTEM_LIBXUL +-MOZ_PKG_FATAL_WARNINGS = 1 ++MOZ_PKG_FATAL_WARNINGS = 0 + endif + + MOZ_NONLOCALIZED_PKG_LIST = \ diff --git a/www/seamonkey/files/patch-xptcall-amd64 b/www/seamonkey/files/patch-xptcall-amd64 deleted file mode 100644 index feb3452a20bc..000000000000 --- a/www/seamonkey/files/patch-xptcall-amd64 +++ /dev/null @@ -1,386 +0,0 @@ ---- /dev/null Wed Dec 31 16:00:00 1969 -+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_amd64_freebsd.cpp Thu Oct 16 22:59:43 2003 -@@ -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 -+ -+#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; -+ } -+ } -+} -+ -+extern "C" -+XPTC_PUBLIC_API(nsresult) -+XPTC_InvokeByIndex(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; -+} ---- /dev/null Wed Dec 31 16:00:00 1969 -+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_freebsd.cpp Thu Oct 16 23:01:08 2003 -@@ -0,0 +1,206 @@ -+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -+ -+// Implement shared vtbl methods. -+ -+#include "xptcprivate.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, -+// r8, r9 and xmm0-xmm7), no stack space is allocated for these by the -+// caller. The rest of the parameters are passed in the callers stack -+// area. -+ -+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; -+ nsIInterfaceInfo* iface_info = NULL; -+ const nsXPTMethodInfo* info; -+ PRUint32 paramCount; -+ PRUint32 i; -+ nsresult result = NS_ERROR_FAILURE; -+ -+ 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); -+ 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->CallMethod((PRUint16) methodIndex, info, dispatchParams); -+ -+ NS_RELEASE(iface_info); -+ -+ if (dispatchParams != paramBuffer) -+ delete [] dispatchParams; -+ -+ return result; -+} -+ -+#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */ -+// Linux/x86-64 uses gcc >= 3.1 -+#define STUB_ENTRY(n) \ -+asm(".section \".text\"\n\t" \ -+ ".align 2\n\t" \ -+ ".if " #n " < 10\n\t" \ -+ ".globl _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" \ -+ ".type _ZN14nsXPTCStubBase6Stub" #n "Ev,@function\n" \ -+ "_ZN14nsXPTCStubBase6Stub" #n "Ev:\n\t" \ -+ ".elseif " #n " < 1000\n\t" \ -+ ".globl _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\n\t" -+ "leave\n\t" -+ "ret\n\t" -+ ".size SharedStub,.-SharedStub"); -+ -+#define SENTINEL_ENTRY(n) \ -+nsresult nsXPTCStubBase::Sentinel##n() \ -+{ \ -+ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ -+ return NS_ERROR_NOT_IMPLEMENTED; \ -+} -+ -+#include "xptcstubsdef.inc" -+ -+#else -+#error "can't find a compiler to use" -+#endif /* __GNUC__ */ diff --git a/www/seamonkey/files/patch-xptcall-ia64 b/www/seamonkey/files/patch-xptcall-ia64 deleted file mode 100644 index d9f4f15525de..000000000000 --- a/www/seamonkey/files/patch-xptcall-ia64 +++ /dev/null @@ -1,38 +0,0 @@ ---- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ipf64.s.orig 2009-08-26 18:47:07.000000000 +0200 -+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ipf64.s 2009-08-26 18:49:39.000000000 +0200 -@@ -8,6 +8,7 @@ - // Section has executable code - .section .text, "ax","progbits" - // procedure named 'NS_InvokeByIndex_P' -+ .global XPTC_InvokeByIndex - .proc NS_InvokeByIndex_P - // manual bundling - .explicit -@@ -24,7 +25,7 @@ - - // XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex, - // PRUint32 paramCount, nsXPTCVariant* params); --NS_InvokeByIndex_P:: -+NS_InvokeByIndex_P: - .prologue - .save ar.pfs, r37 - // allocate 4 input args, 6 local args, and 8 output args ---- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ipf64.s.orig 2009-08-26 18:47:07.000000000 +0200 -+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ipf64.s 2009-08-26 18:47:34.000000000 +0200 -@@ -6,6 +6,7 @@ - // Section has executable code - .section .text, "ax","progbits" - // procedure named 'SharedStub' -+ .global SharedStub - .proc SharedStub - // manual bundling - .explicit -@@ -14,7 +15,7 @@ - // .exclass PrepareAndDispatch, @fullyvisible - .type PrepareAndDispatch,@function - --SharedStub:: -+SharedStub: - // 10 arguments, first 8 are the input arguments of previous - // function call. The 9th one is methodIndex and the 10th is the - // pointer to the remaining input arguments. The last two arguments diff --git a/www/seamonkey/files/patch-xptcall-sparc64 b/www/seamonkey/files/patch-xptcall-sparc64 deleted file mode 100644 index bbf418dd3e2a..000000000000 --- a/www/seamonkey/files/patch-xptcall-sparc64 +++ /dev/null @@ -1,327 +0,0 @@ ---- /dev/null Mon May 26 13:22:00 2003 -+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_freebsd.cpp Mon May 26 04:12:55 2003 -@@ -0,0 +1,123 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- -+ * -+ * 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 Netscape are -+ * Copyright (C) 2001 Netscape Communications Corporation. All -+ * Rights Reserved. -+ * -+ * Contributor(s): -+ * Stuart Parmenter <pavlov@netscape.com> -+ */ -+ -+/* Implement shared vtbl methods. */ -+ -+#include "xptcprivate.h" -+ -+#if defined(sparc) || defined(__sparc__) -+ -+extern "C" nsresult -+PrepareAndDispatch(nsXPTCStubBase* self, PRUint64 methodIndex, PRUint64* args) -+{ -+ -+#define PARAM_BUFFER_COUNT 16 -+ -+ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; -+ nsXPTCMiniVariant* dispatchParams = NULL; -+ nsIInterfaceInfo* iface_info = NULL; -+ const nsXPTMethodInfo* info; -+ PRUint8 paramCount; -+ PRUint8 i; -+ nsresult result = NS_ERROR_FAILURE; -+ -+ NS_ASSERTION(self,"no self"); -+ -+ self->GetInterfaceInfo(&iface_info); -+ NS_ASSERTION(iface_info,"no interface info"); -+ -+ iface_info->GetMethodInfo(PRUint16(methodIndex), &info); -+ NS_ASSERTION(info,"no interface info"); -+ -+ 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"); -+ -+ PRUint64* ap = args; -+ for(i = 0; i < paramCount; i++, ap++) -+ { -+ const nsXPTParamInfo& param = info->GetParam(i); -+ const nsXPTType& type = param.GetType(); -+ nsXPTCMiniVariant* dp = &dispatchParams[i]; -+ -+ if(param.IsOut() || !type.IsArithmetic()) -+ { -+ dp->val.p = (void*) *ap; -+ continue; -+ } -+ // else -+ switch(type) -+ { -+ case nsXPTType::T_I8 : dp->val.i8 = *((PRInt64*) ap); break; -+ case nsXPTType::T_I16 : dp->val.i16 = *((PRInt64*) ap); break; -+ case nsXPTType::T_I32 : dp->val.i32 = *((PRInt64*) ap); break; -+ case nsXPTType::T_DOUBLE : dp->val.d = *((double*) ap); break; -+ case nsXPTType::T_U64 : dp->val.u64 = *((PRUint64*) ap); break; -+ case nsXPTType::T_I64 : dp->val.i64 = *((PRInt64*) ap); break; -+ case nsXPTType::T_U8 : dp->val.u8 = *((PRUint64*) ap); break; -+ case nsXPTType::T_U16 : dp->val.u16 = *((PRUint64*)ap); break; -+ case nsXPTType::T_U32 : dp->val.u32 = *((PRUint64*)ap); break; -+ case nsXPTType::T_FLOAT : dp->val.f = ((float*) ap)[1]; break; -+ case nsXPTType::T_BOOL : dp->val.b = *((PRInt64*) ap); break; -+ case nsXPTType::T_CHAR : dp->val.c = *((PRUint64*) ap); break; -+ case nsXPTType::T_WCHAR : dp->val.wc = *((PRInt64*) ap); break; -+ default: -+ NS_ASSERTION(0, "bad type"); -+ break; -+ } -+ } -+ -+ result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams); -+ -+ NS_RELEASE(iface_info); -+ -+ if(dispatchParams != paramBuffer) -+ delete [] dispatchParams; -+ -+ return result; -+} -+ -+extern "C" int SharedStub(int, int*); -+ -+#define STUB_ENTRY(n) \ -+nsresult nsXPTCStubBase::Stub##n() \ -+{ \ -+ int dummy; /* defeat tail-call optimization */ \ -+ return SharedStub(n, &dummy); \ -+} -+ -+#define SENTINEL_ENTRY(n) \ -+nsresult nsXPTCStubBase::Sentinel##n() \ -+{ \ -+ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ -+ return NS_ERROR_NOT_IMPLEMENTED; \ -+} -+ -+#include "xptcstubsdef.inc" -+ -+#endif /* sparc || __sparc__ */ ---- /dev/null Mon May 26 13:22:00 2003 -+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc64_freebsd.s Mon May 26 04:06:09 2003 -@@ -0,0 +1,104 @@ -+/* -*- Mode: asm; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- -+ * -+ * 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 Netscape are -+ * Copyright (C) 2001 Netscape Communications Corporation. All -+ * Rights Reserved. -+ * -+ * Contributor(s): -+ * Stuart Parmenter <pavlov@netscape.com> -+ * Chris Seawood <cls@seawood.org> -+ */ -+ -+/* -+ Platform specific code to invoke XPCOM methods on native objects -+ for sparcv9 Solaris. -+ -+ See the SPARC Compliance Definition (SCD) Chapter 3 -+ for more information about what is going on here, including -+ the use of BIAS (0x7ff). -+ The SCD is available from http://www.sparc.com/. -+*/ -+ -+ .global XPTC_InvokeByIndex -+ .type XPTC_InvokeByIndex, #function -+ -+/* -+ XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex, -+ PRUint32 paramCount, nsXPTCVariant* params); -+ -+*/ -+XPTC_InvokeByIndex: -+ save %sp,-(128 + 64),%sp ! room for the register window and -+ ! struct pointer, rounded up to 0 % 64 -+ sll %i2,4,%l0 ! assume the worst case -+ ! paramCount * 2 * 8 bytes -+ cmp %l0, 0 ! are there any args? If not, -+ be .invoke ! no need to copy args to stack -+ nop -+ -+ sub %sp,%l0,%sp ! create the additional stack space -+ add %sp,0x7ff+136,%o0 ! step past the register window, the -+ ! struct result pointer and the 'this' slot -+ mov %i2,%o1 ! paramCount -+ call invoke_copy_to_stack -+ mov %i3,%o2 ! params -+ -+! -+! load arguments from stack into the outgoing registers -+! BIAS is 0x7ff (2047) -+! -+ -+! load the %o1..5 64bit (extended word) output registers registers -+ ldx [%sp + 0x7ff + 136],%o1 ! %i1 -+ ldx [%sp + 0x7ff + 144],%o2 ! %i2 -+ ldx [%sp + 0x7ff + 152],%o3 ! %i3 -+ ldx [%sp + 0x7ff + 160],%o4 ! %i4 -+ ldx [%sp + 0x7ff + 168],%o5 ! %i5 -+ -+! load the even number double registers starting with %d2 -+ ldd [%sp + 0x7ff + 136],%f2 -+ ldd [%sp + 0x7ff + 144],%f4 -+ ldd [%sp + 0x7ff + 152],%f6 -+ ldd [%sp + 0x7ff + 160],%f8 -+ ldd [%sp + 0x7ff + 168],%f10 -+ ldd [%sp + 0x7ff + 176],%f12 -+ ldd [%sp + 0x7ff + 184],%f14 -+ ldd [%sp + 0x7ff + 192],%f16 -+ ldd [%sp + 0x7ff + 200],%f18 -+ ldd [%sp + 0x7ff + 208],%f20 -+ ldd [%sp + 0x7ff + 216],%f22 -+ ldd [%sp + 0x7ff + 224],%f24 -+ ldd [%sp + 0x7ff + 232],%f26 -+ ldd [%sp + 0x7ff + 240],%f28 -+ ldd [%sp + 0x7ff + 248],%f30 -+ -+! -+! calculate the target address from the vtable -+! -+.invoke: -+ sll %i1,3,%l0 ! index *= 8 -+! add %l0,16,%l0 ! there are 2 extra entries in the vTable (16bytes) -+ ldx [%i0],%l1 ! *that --> address of vtable -+ ldx [%l0 + %l1],%l0 ! that->vtable[index * 8 + 16] --> address -+ -+ jmpl %l0,%o7 ! call the routine -+ mov %i0,%o0 ! move 'this' pointer to out register -+ -+ mov %o0,%i0 ! propagate return value -+ ret -+ restore -+ -+ .size XPTC_InvokeByIndex, .-XPTC_InvokeByIndex ---- /dev/null Mon May 26 14:00:00 2003 -+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_sparc64_freebsd.cpp Mon May 26 14:00:49 2003 -@@ -0,0 +1,91 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- -+ * -+ * 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 Netscape are -+ * Copyright (C) 2001 Netscape Communications Corporation. All -+ * Rights Reserved. -+ * -+ * Contributor(s): -+ * Stuart Parmenter <pavlov@netscape.com> -+ * Chris Seawood <cls@seawood.org> -+ */ -+ -+ -+/* Platform specific code to invoke XPCOM methods on native objects */ -+ -+#include "xptcprivate.h" -+ -+#if !defined(__sparc) && !defined(__sparc__) -+#error "This code is for Sparc only" -+#endif -+ -+/* Prototype specifies unmangled function name */ -+extern "C" PRUint64 -+invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s); -+ -+extern "C" PRUint64 -+invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s) -+{ -+ /* -+ We need to copy the parameters for this function to locals and use them -+ from there since the parameters occupy the same stack space as the stack -+ we're trying to populate. -+ */ -+ PRUint64 *l_d = d; -+ nsXPTCVariant *l_s = s; -+ PRUint64 l_paramCount = paramCount; -+ PRUint64 regCount = 0; // return the number of registers to load from the stack -+ -+ for(PRUint64 i = 0; i < l_paramCount; i++, l_d++, l_s++) -+ { -+ if (regCount < 5) regCount++; -+ -+ if (l_s->IsPtrData()) -+ { -+ *l_d = (PRUint64)l_s->ptr; -+ continue; -+ } -+ switch (l_s->type) -+ { -+ case nsXPTType::T_I8 : *((PRInt64*)l_d) = l_s->val.i8; break; -+ case nsXPTType::T_I16 : *((PRInt64*)l_d) = l_s->val.i16; break; -+ case nsXPTType::T_I32 : *((PRInt64*)l_d) = l_s->val.i32; break; -+ case nsXPTType::T_I64 : *((PRInt64*)l_d) = l_s->val.i64; break; -+ -+ case nsXPTType::T_U8 : *((PRUint64*)l_d) = l_s->val.u8; break; -+ case nsXPTType::T_U16 : *((PRUint64*)l_d) = l_s->val.u16; break; -+ case nsXPTType::T_U32 : *((PRUint64*)l_d) = l_s->val.u32; break; -+ case nsXPTType::T_U64 : *((PRUint64*)l_d) = l_s->val.u64; break; -+ -+ /* in the case of floats, we want to put the bits in to the -+ 64bit space right justified... floats in the paramter array on -+ sparcv9 use odd numbered registers.. %f1, %f3, so we have to skip -+ the space that would be occupied by %f0, %f2, etc. -+ */ -+ case nsXPTType::T_FLOAT : *(((float*)l_d) + 1) = l_s->val.f; break; -+ case nsXPTType::T_DOUBLE: *((double*)l_d) = l_s->val.d; break; -+ case nsXPTType::T_BOOL : *((PRInt64*)l_d) = l_s->val.b; break; -+ case nsXPTType::T_CHAR : *((PRUint64*)l_d) = l_s->val.c; break; -+ case nsXPTType::T_WCHAR : *((PRInt64*)l_d) = l_s->val.wc; break; -+ -+ default: -+ // all the others are plain pointer types -+ *((void**)l_d) = l_s->val.p; -+ break; -+ } -+ } -+ -+ return regCount; -+} |