summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail/linux-thunderbird/Makefile4
-rw-r--r--mail/linux-thunderbird/distinfo4
-rw-r--r--mail/thunderbird-esr-i18n/Makefile2
-rw-r--r--mail/thunderbird-esr-i18n/distinfo168
-rw-r--r--mail/thunderbird-esr/Makefile76
-rw-r--r--mail/thunderbird-esr/distinfo4
-rw-r--r--mail/thunderbird-esr/files/patch-alsapulse119
-rw-r--r--mail/thunderbird-esr/files/patch-bug68525817
-rw-r--r--mail/thunderbird-esr/files/patch-bug74173790
-rw-r--r--mail/thunderbird-esr/files/patch-bug7530461267
-rw-r--r--mail/thunderbird-esr/files/patch-configure.in112
-rw-r--r--mail/thunderbird-esr/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc10
-rw-r--r--mail/thunderbird-esr/files/patch-ipc-chromium-src-base-file_util_linux.cc15
-rw-r--r--mail/thunderbird-esr/files/patch-ipc-chromium-src-base-file_util_posix.cc11
-rw-r--r--mail/thunderbird-esr/files/patch-ipc-chromium-src-base-platform_file_posix.cc10
-rw-r--r--mail/thunderbird-esr/files/patch-ipc-chromium-src-base-platform_thread_posix.cc12
-rw-r--r--mail/thunderbird-esr/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h11
-rw-r--r--mail/thunderbird-esr/files/patch-ipc-chromium-src-base-time_posix.cc10
-rw-r--r--mail/thunderbird-esr/files/patch-ipc-chromium-src-build-build_config.h11
-rw-r--r--mail/thunderbird-esr/files/patch-ldap-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in12
-rw-r--r--mail/thunderbird-esr/files/patch-mail-app-nsMailApp.cpp10
-rw-r--r--mail/thunderbird-esr/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp20
-rw-r--r--mail/thunderbird-esr/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp29
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-build-autoconf-config.sub12
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-configure.in50
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-db-sqlite3-src-Makefile.in11
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp11
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-gfx-qcms-Makefile.in14
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-gfx-ycbcr-Makefile.in21
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-Makefile.in28
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h45
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc19
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-js-src-Makefile.in19
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-js-src-config-mkdepend-Makefile.in2
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-js-src-config_config.mk2
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-js-src-configure.in54
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp20
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-media-libsydneyaudio-include-sydney_audio.h11
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c13
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-memory-mozalloc-mozalloc.cpp21
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-security-coreconf-FreeBSD.mk16
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-security-nss-lib-Makefile11
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-toolkit-library-Makefile.in12
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp11
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsNativeThemeQt.cpp12
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsSound.cpp10
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsWindow.cpp10
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-xpcom-base-nsStackWalk.cpp8
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in76
-rw-r--r--mail/thunderbird-i18n/Makefile4
-rw-r--r--mail/thunderbird-i18n/distinfo168
-rw-r--r--mail/thunderbird/Makefile76
-rw-r--r--mail/thunderbird/distinfo4
-rw-r--r--mail/thunderbird/files/patch-alsapulse118
-rw-r--r--mail/thunderbird/files/patch-bug68525817
-rw-r--r--mail/thunderbird/files/patch-bug7530461272
-rw-r--r--mail/thunderbird/files/patch-bugzilla-736961111
-rw-r--r--mail/thunderbird/files/patch-configure.in112
-rw-r--r--mail/thunderbird/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc10
-rw-r--r--mail/thunderbird/files/patch-ipc-chromium-src-base-file_util_linux.cc11
-rw-r--r--mail/thunderbird/files/patch-ipc-chromium-src-base-file_util_posix.cc11
-rw-r--r--mail/thunderbird/files/patch-ipc-chromium-src-base-platform_file_posix.cc10
-rw-r--r--mail/thunderbird/files/patch-ipc-chromium-src-base-platform_thread_posix.cc12
-rw-r--r--mail/thunderbird/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h11
-rw-r--r--mail/thunderbird/files/patch-ipc-chromium-src-build-build_config.h11
-rw-r--r--mail/thunderbird/files/patch-ldap-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in12
-rw-r--r--mail/thunderbird/files/patch-mail-app-Makefile.in254
-rw-r--r--mail/thunderbird/files/patch-mail-app-nsMailApp.cpp10
-rw-r--r--mail/thunderbird/files/patch-mail-components-Makefile.in11
-rw-r--r--mail/thunderbird/files/patch-mail-components-build-Makefile.in11
-rw-r--r--mail/thunderbird/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp20
-rw-r--r--mail/thunderbird/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp29
-rw-r--r--mail/thunderbird/files/patch-mozilla-build-autoconf-config.sub12
-rw-r--r--mail/thunderbird/files/patch-mozilla-configure.in50
-rw-r--r--mail/thunderbird/files/patch-mozilla-content-media-gstreamer-nsGStreamerReader.cpp76
-rw-r--r--mail/thunderbird/files/patch-mozilla-db-sqlite3-src-Makefile.in11
-rw-r--r--mail/thunderbird/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp11
-rw-r--r--mail/thunderbird/files/patch-mozilla-gfx-harfbuzz-src-hb-ot-layout.cc11
-rw-r--r--mail/thunderbird/files/patch-mozilla-gfx-qcms-Makefile.in14
-rw-r--r--mail/thunderbird/files/patch-mozilla-gfx-ycbcr-Makefile.in21
-rw-r--r--mail/thunderbird/files/patch-mozilla-ipc-chromium-Makefile.in28
-rw-r--r--mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h45
-rw-r--r--mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc11
-rw-r--r--mail/thunderbird/files/patch-mozilla-js-src-Makefile.in19
-rw-r--r--mail/thunderbird/files/patch-mozilla-js-src-config-mkdepend-Makefile.in2
-rw-r--r--mail/thunderbird/files/patch-mozilla-js-src-config_config.mk2
-rw-r--r--mail/thunderbird/files/patch-mozilla-js-src-configure.in39
-rw-r--r--mail/thunderbird/files/patch-mozilla-js-src-jsnum.cpp33
-rw-r--r--mail/thunderbird/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp20
-rw-r--r--mail/thunderbird/files/patch-mozilla-layout-generic-Makefile.in11
-rw-r--r--mail/thunderbird/files/patch-mozilla-media-libsydneyaudio-include-sydney_audio.h11
-rw-r--r--mail/thunderbird/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c13
-rw-r--r--mail/thunderbird/files/patch-mozilla-memory-mozalloc-mozalloc.cpp21
-rw-r--r--mail/thunderbird/files/patch-mozilla-security-coreconf-FreeBSD.mk16
-rw-r--r--mail/thunderbird/files/patch-mozilla-security-nss-lib-Makefile11
-rw-r--r--mail/thunderbird/files/patch-mozilla-toolkit-library-Makefile.in12
-rw-r--r--mail/thunderbird/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp11
-rw-r--r--mail/thunderbird/files/patch-mozilla-widget-qt-nsNativeThemeQt.cpp12
-rw-r--r--mail/thunderbird/files/patch-mozilla-widget-qt-nsSound.cpp10
-rw-r--r--mail/thunderbird/files/patch-mozilla-widget-qt-nsWindow.cpp10
-rw-r--r--mail/thunderbird/files/patch-mozilla-xpcom-base-nsStackWalk.cpp8
-rw-r--r--mail/thunderbird/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in76
-rw-r--r--security/nss/files/patch-..::coreconf::FreeBSD.mk3
-rw-r--r--security/nss/files/patch-lib-freebl-Makefile11
-rw-r--r--www/firefox-esr-i18n/Makefile2
-rw-r--r--www/firefox-esr-i18n/distinfo328
-rw-r--r--www/firefox-esr/Makefile88
-rw-r--r--www/firefox-esr/distinfo4
-rw-r--r--www/firefox-esr/files/mozconfig-profile_guided_optimization.in1
-rw-r--r--www/firefox-esr/files/patch-alsapulse119
-rw-r--r--www/firefox-esr/files/patch-browser-app-Makefile.in63
-rw-r--r--www/firefox-esr/files/patch-browser-app-nsBrowserApp.cpp225
-rw-r--r--www/firefox-esr/files/patch-bug68525817
-rw-r--r--www/firefox-esr/files/patch-bug74173790
-rw-r--r--www/firefox-esr/files/patch-bug7530461267
-rw-r--r--www/firefox-esr/files/patch-build_unix_run-mozilla.sh12
-rw-r--r--www/firefox-esr/files/patch-config_config.mk2
-rw-r--r--www/firefox-esr/files/patch-config_mkdepend_Makefile.in2
-rw-r--r--www/firefox-esr/files/patch-configure.in50
-rw-r--r--www/firefox-esr/files/patch-db_sqlite3_src_Makefile.in11
-rw-r--r--www/firefox-esr/files/patch-dom-plugins-ipc-PluginMessageUtils.cpp11
-rw-r--r--www/firefox-esr/files/patch-gfx-qcms-Makefile.in11
-rw-r--r--www/firefox-esr/files/patch-gfx-ycbcr-Makefile.in21
-rw-r--r--www/firefox-esr/files/patch-ipc-chromium-Makefile.in28
-rw-r--r--www/firefox-esr/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc10
-rw-r--r--www/firefox-esr/files/patch-ipc-chromium-src-base-dir_reader_linux.h45
-rw-r--r--www/firefox-esr/files/patch-ipc-chromium-src-base-file_util_linux.cc15
-rw-r--r--www/firefox-esr/files/patch-ipc-chromium-src-base-file_util_posix.cc11
-rw-r--r--www/firefox-esr/files/patch-ipc-chromium-src-base-message_pump_libevent.cc19
-rw-r--r--www/firefox-esr/files/patch-ipc-chromium-src-base-platform_file_posix.cc10
-rw-r--r--www/firefox-esr/files/patch-ipc-chromium-src-base-platform_thread_posix.cc25
-rw-r--r--www/firefox-esr/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h11
-rw-r--r--www/firefox-esr/files/patch-ipc-chromium-src-base-time_posix.cc10
-rw-r--r--www/firefox-esr/files/patch-ipc-chromium-src-build-build_config.h11
-rw-r--r--www/firefox-esr/files/patch-js-src-Makefile.in19
-rw-r--r--www/firefox-esr/files/patch-js-src-config-mkdepend_Makefile.in2
-rw-r--r--www/firefox-esr/files/patch-js-src-config_config.mk2
-rw-r--r--www/firefox-esr/files/patch-js-src-configure.in54
-rw-r--r--www/firefox-esr/files/patch-js-src-methodjit-MethodJIT.cpp20
-rw-r--r--www/firefox-esr/files/patch-media-libsydneyaudio-include-sydney_audio.h11
-rw-r--r--www/firefox-esr/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c13
-rw-r--r--www/firefox-esr/files/patch-memory-mozalloc-mozalloc.cpp21
-rw-r--r--www/firefox-esr/files/patch-security-coreconf-FreeBSD.mk16
-rw-r--r--www/firefox-esr/files/patch-security-nss-lib-Makefile11
-rw-r--r--www/firefox-esr/files/patch-security-nss-lib-freebl-mpi-mpcpucache.c45
-rw-r--r--www/firefox-esr/files/patch-toolkit-xre-nsAppRunner.cpp11
-rw-r--r--www/firefox-esr/files/patch-toolkit_library_Makefile.in11
-rw-r--r--www/firefox-esr/files/patch-widget-src-qt-nsNativeThemeQt.cpp12
-rw-r--r--www/firefox-esr/files/patch-widget-src-qt-nsSound.cpp10
-rw-r--r--www/firefox-esr/files/patch-widget-src-qt-nsWindow.cpp10
-rw-r--r--www/firefox-esr/files/patch-xpcom-io-nsAppFileLocationProvider.cpp11
-rw-r--r--www/firefox-esr/files/patch-xpcom_base_nsStackWalk.cpp8
-rw-r--r--www/firefox-esr/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in72
-rw-r--r--www/firefox-esr/pkg-message7
-rw-r--r--www/firefox-i18n/Makefile4
-rw-r--r--www/firefox-i18n/distinfo328
-rw-r--r--www/firefox/Makefile85
-rw-r--r--www/firefox/Makefile.options20
-rw-r--r--www/firefox/Makefile.webplugins2
-rw-r--r--www/firefox/distinfo4
-rw-r--r--www/firefox/files/mozconfig-profile_guided_optimization.in1
-rw-r--r--www/firefox/files/patch-alsapulse118
-rw-r--r--www/firefox/files/patch-browser-app-Makefile.in130
-rw-r--r--www/firefox/files/patch-browser-app-nsBrowserApp.cpp243
-rw-r--r--www/firefox/files/patch-bug68525817
-rw-r--r--www/firefox/files/patch-bug75289571
-rw-r--r--www/firefox/files/patch-bug7530461272
-rw-r--r--www/firefox/files/patch-bugzilla-736961111
-rw-r--r--www/firefox/files/patch-build_unix_run-mozilla.sh12
-rw-r--r--www/firefox/files/patch-config_config.mk2
-rw-r--r--www/firefox/files/patch-config_mkdepend_Makefile.in2
-rw-r--r--www/firefox/files/patch-configure.in50
-rw-r--r--www/firefox/files/patch-content-media-gstreamer-nsGStreamerReader.cpp76
-rw-r--r--www/firefox/files/patch-db_sqlite3_src_Makefile.in11
-rw-r--r--www/firefox/files/patch-dom-plugins-ipc-PluginMessageUtils.cpp11
-rw-r--r--www/firefox/files/patch-gfx-harfbuzz-src-hb-ot-layout.cc10
-rw-r--r--www/firefox/files/patch-gfx-qcms-Makefile.in11
-rw-r--r--www/firefox/files/patch-ipc-chromium-Makefile.in28
-rw-r--r--www/firefox/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc10
-rw-r--r--www/firefox/files/patch-ipc-chromium-src-base-dir_reader_linux.h45
-rw-r--r--www/firefox/files/patch-ipc-chromium-src-base-file_util_linux.cc11
-rw-r--r--www/firefox/files/patch-ipc-chromium-src-base-file_util_posix.cc11
-rw-r--r--www/firefox/files/patch-ipc-chromium-src-base-message_pump_libevent.cc11
-rw-r--r--www/firefox/files/patch-ipc-chromium-src-base-platform_file_posix.cc10
-rw-r--r--www/firefox/files/patch-ipc-chromium-src-base-platform_thread_posix.cc25
-rw-r--r--www/firefox/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h11
-rw-r--r--www/firefox/files/patch-ipc-chromium-src-build-build_config.h11
-rw-r--r--www/firefox/files/patch-js-src-Makefile.in19
-rw-r--r--www/firefox/files/patch-js-src-config-mkdepend_Makefile.in2
-rw-r--r--www/firefox/files/patch-js-src-config_config.mk2
-rw-r--r--www/firefox/files/patch-js-src-configure.in39
-rw-r--r--www/firefox/files/patch-js-src-methodjit-MethodJIT.cpp20
-rw-r--r--www/firefox/files/patch-js_src_jsnum.cpp8
-rw-r--r--www/firefox/files/patch-layout_generic_Makefile.in8
-rw-r--r--www/firefox/files/patch-media-libsydneyaudio-include-sydney_audio.h11
-rw-r--r--www/firefox/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c13
-rw-r--r--www/firefox/files/patch-memory-mozalloc-mozalloc.cpp21
-rw-r--r--www/firefox/files/patch-security-coreconf-FreeBSD.mk16
-rw-r--r--www/firefox/files/patch-security-nss-lib-Makefile11
-rw-r--r--www/firefox/files/patch-security-nss-lib-freebl-mpi-mpcpucache.c45
-rw-r--r--www/firefox/files/patch-toolkit-xre-nsAppRunner.cpp11
-rw-r--r--www/firefox/files/patch-toolkit_library_Makefile.in11
-rw-r--r--www/firefox/files/patch-widget-qt-nsNativeThemeQt.cpp12
-rw-r--r--www/firefox/files/patch-widget-qt-nsSound.cpp10
-rw-r--r--www/firefox/files/patch-widget-qt-nsWindow.cpp10
-rw-r--r--www/firefox/files/patch-xpcom-io-nsAppFileLocationProvider.cpp11
-rw-r--r--www/firefox/files/patch-xpcom_base_nsStackWalk.cpp8
-rw-r--r--www/firefox/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in72
-rw-r--r--www/firefox/pkg-message7
-rw-r--r--www/kompozer/Makefile25
-rw-r--r--www/kompozer/files/patch-storage_build_Makefile.in10
-rw-r--r--www/kompozer/files/patch-xpcom-reflect-xptcall-src-md-unix-Makefile.in75
-rw-r--r--www/kompozer/files/patch-xptcall-alpha459
-rw-r--r--www/kompozer/files/patch-xptcall-ia6438
-rw-r--r--www/kompozer/files/patch-xptcall-powerpc584
-rw-r--r--www/kompozer/files/patch-xptcall-sparc64327
-rw-r--r--www/libxul/Makefile60
-rw-r--r--www/libxul/files/patch-alsapulse122
-rw-r--r--www/libxul/files/patch-bug68525817
-rw-r--r--www/libxul/files/patch-configure.in22
-rw-r--r--www/libxul/files/patch-db_sqlite3_src_Makefile.in11
-rw-r--r--www/libxul/files/patch-js-src-config-mkdepend-Makefile.in2
-rw-r--r--www/libxul/files/patch-media-libsydneyaudio-src-Makefile.in (renamed from www/libxul/files/libsydney_oss)4
-rw-r--r--www/libxul/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c13
-rw-r--r--www/libxul/files/patch-modules-libpr0n-encoders-png-nsPNGDecoder.cpp74
-rw-r--r--www/libxul/files/patch-modules-libpr0n-encoders-png-nsPNGEncoder.cpp11
-rw-r--r--www/libxul/files/patch-security-nss-lib-Makefile11
-rw-r--r--www/libxul/files/patch-security_coreconf_FreeBSD.mk40
-rw-r--r--www/libxul/files/patch-storage_build_Makefile.in10
-rw-r--r--www/libxul/files/patch-toolkit-xre-nsAppRunner.cpp11
-rw-r--r--www/libxul/files/patch-xpcom_base_nsStackWalk.cpp8
-rw-r--r--www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in89
-rw-r--r--www/libxul/files/patch-xptcall-alpha459
-rw-r--r--www/libxul/files/patch-xptcall-amd64380
-rw-r--r--www/libxul/files/patch-xptcall-powerpc580
-rw-r--r--www/libxul/files/patch-xptcall-sparc64329
-rw-r--r--www/libxul/files/patch-xulrunner_installer_libxul-embedding.pc.in9
-rw-r--r--www/libxul/files/releng6_pulseaudio32
-rw-r--r--www/linux-firefox/Makefile4
-rw-r--r--www/linux-firefox/distinfo4
-rw-r--r--www/linux-seamonkey/Makefile4
-rw-r--r--www/linux-seamonkey/distinfo4
-rw-r--r--www/linux-seamonkey/pkg-plist12
-rw-r--r--www/seamonkey-i18n/Makefile4
-rw-r--r--www/seamonkey-i18n/distinfo88
-rw-r--r--www/seamonkey/Makefile114
-rw-r--r--www/seamonkey/distinfo4
-rw-r--r--www/seamonkey/files/patch-alsapulse118
-rw-r--r--www/seamonkey/files/patch-bug68525817
-rw-r--r--www/seamonkey/files/patch-bug7530461272
-rw-r--r--www/seamonkey/files/patch-configure.in112
-rw-r--r--www/seamonkey/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc10
-rw-r--r--www/seamonkey/files/patch-ipc-chromium-src-base-file_util_linux.cc11
-rw-r--r--www/seamonkey/files/patch-ipc-chromium-src-base-file_util_posix.cc11
-rw-r--r--www/seamonkey/files/patch-ipc-chromium-src-base-platform_file_posix.cc10
-rw-r--r--www/seamonkey/files/patch-ipc-chromium-src-base-platform_thread_posix.cc12
-rw-r--r--www/seamonkey/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h11
-rw-r--r--www/seamonkey/files/patch-ipc-chromium-src-build-build_config.h11
-rw-r--r--www/seamonkey/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp20
-rw-r--r--www/seamonkey/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp29
-rw-r--r--www/seamonkey/files/patch-mozilla-build-autoconf-config.sub12
-rw-r--r--www/seamonkey/files/patch-mozilla-build-unix-run-mozilla.sh21
-rw-r--r--www/seamonkey/files/patch-mozilla-config-gcc-stl-wrapper.template.h11
-rw-r--r--www/seamonkey/files/patch-mozilla-configure.in85
-rw-r--r--www/seamonkey/files/patch-mozilla-content-media-gstreamer-nsGStreamerReader.cpp76
-rw-r--r--www/seamonkey/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp11
-rw-r--r--www/seamonkey/files/patch-mozilla-gfx-harfbuzz-src-hb-ot-layout.cc11
-rw-r--r--www/seamonkey/files/patch-mozilla-gfx-qcms-Makefile.in11
-rw-r--r--www/seamonkey/files/patch-mozilla-gfx-ycbcr-Makefile.in21
-rw-r--r--www/seamonkey/files/patch-mozilla-ipc-chromium-Makefile.in28
-rw-r--r--www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h45
-rw-r--r--www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc11
-rw-r--r--www/seamonkey/files/patch-mozilla-js-src-Makefile.in19
-rw-r--r--www/seamonkey/files/patch-mozilla-js-src-build-autoconf-config.sub12
-rw-r--r--www/seamonkey/files/patch-mozilla-js-src-config-mkdepend-Makefile.in2
-rw-r--r--www/seamonkey/files/patch-mozilla-js-src-configure.in25
-rw-r--r--www/seamonkey/files/patch-mozilla-js-src-jsnum.cpp31
-rw-r--r--www/seamonkey/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp20
-rw-r--r--www/seamonkey/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c13
-rw-r--r--www/seamonkey/files/patch-mozilla-memory-mozalloc-mozalloc.cpp21
-rw-r--r--www/seamonkey/files/patch-mozilla-security-coreconf-FreeBSD.mk16
-rw-r--r--www/seamonkey/files/patch-mozilla-security-nss-lib-Makefile11
-rw-r--r--www/seamonkey/files/patch-mozilla-toolkit-library-Makefile.in12
-rw-r--r--www/seamonkey/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp11
-rw-r--r--www/seamonkey/files/patch-mozilla-widget-qt-nsNativeThemeQt.cpp12
-rw-r--r--www/seamonkey/files/patch-mozilla-widget-qt-nsSound.cpp10
-rw-r--r--www/seamonkey/files/patch-mozilla-widget-qt-nsWindow.cpp10
-rw-r--r--www/seamonkey/files/patch-mozilla-xpcom-base-nsStackWalk.cpp10
-rw-r--r--www/seamonkey/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in76
-rw-r--r--www/seamonkey/files/patch-suite-app-nsSuiteApp.cpp11
-rw-r--r--www/seamonkey/files/patch-suite-installer-Makefile.in11
-rw-r--r--www/seamonkey/files/patch-xptcall-amd64386
-rw-r--r--www/seamonkey/files/patch-xptcall-ia6438
-rw-r--r--www/seamonkey/files/patch-xptcall-sparc64327
294 files changed, 10396 insertions, 8230 deletions
diff --git a/mail/linux-thunderbird/Makefile b/mail/linux-thunderbird/Makefile
index eddcb22092d4..ff14eedb9af9 100644
--- a/mail/linux-thunderbird/Makefile
+++ b/mail/linux-thunderbird/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= thunderbird
-PORTVERSION= 10.0.5
+PORTVERSION= 10.0.6
CATEGORIES= mail
MASTER_SITE_SUBDIR?= ${PORTNAME}/releases/${PORTVERSION}esr/linux-i686/en-US
DISTNAME= ${PORTNAME}-${DISTVERSION}esr
@@ -16,7 +16,7 @@ COMMENT= Mozilla Thunderbird is standalone mail and news that stands above
USE_BZIP2= yes
-USE_LINUX_APPS= dbusglib dbuslibs alsalib
+USE_LINUX_APPS= dbusglib dbuslibs alsalib alsa-plugins-oss
.include "${.CURDIR}/../../www/linux-seamonkey/Makefile.common"
.include <bsd.port.mk>
diff --git a/mail/linux-thunderbird/distinfo b/mail/linux-thunderbird/distinfo
index ec21c53f7220..0d5506944265 100644
--- a/mail/linux-thunderbird/distinfo
+++ b/mail/linux-thunderbird/distinfo
@@ -1,2 +1,2 @@
-SHA256 (thunderbird-10.0.5esr.tar.bz2) = 38258c5357ff398bb8ebcd7eb4749269b81f44915994b72c781c3688a431e441
-SIZE (thunderbird-10.0.5esr.tar.bz2) = 18569797
+SHA256 (thunderbird-10.0.6esr.tar.bz2) = 7051b910825a2838ac9a1bcb23c520d82be5fed4871266f1cd8954a8e876776b
+SIZE (thunderbird-10.0.6esr.tar.bz2) = 18574190
diff --git a/mail/thunderbird-esr-i18n/Makefile b/mail/thunderbird-esr-i18n/Makefile
index de812d2bfa73..6d043771bc8d 100644
--- a/mail/thunderbird-esr-i18n/Makefile
+++ b/mail/thunderbird-esr-i18n/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= thunderbird-i18n
-PORTVERSION= 10.0.5
+PORTVERSION= 10.0.6
CATEGORIES= mail
MASTER_SITE_SUBDIR= thunderbird/releases/${PORTVERSION}esr/linux-i686/xpi
PKGNAMEPREFIX=
diff --git a/mail/thunderbird-esr-i18n/distinfo b/mail/thunderbird-esr-i18n/distinfo
index acf410efda91..ae2f424be6b1 100644
--- a/mail/thunderbird-esr-i18n/distinfo
+++ b/mail/thunderbird-esr-i18n/distinfo
@@ -1,84 +1,84 @@
-SHA256 (xpi/thunderbird-i18n-10.0.5/ar.xpi) = b69d852ba95ab5c14a8da84fb653d2163b2c37d808c9fae92d39ee9b8388a86e
-SIZE (xpi/thunderbird-i18n-10.0.5/ar.xpi) = 441466
-SHA256 (xpi/thunderbird-i18n-10.0.5/br.xpi) = e2d9d3049ad4036737e58aa018c63cdea9726d801b9fa319e94263cc4cbbf829
-SIZE (xpi/thunderbird-i18n-10.0.5/br.xpi) = 415527
-SHA256 (xpi/thunderbird-i18n-10.0.5/ca.xpi) = e65a1eb51c07a1a114db98e6b7a9b7473f35d86b9e82dbcabb60871a67feade6
-SIZE (xpi/thunderbird-i18n-10.0.5/ca.xpi) = 416069
-SHA256 (xpi/thunderbird-i18n-10.0.5/cs.xpi) = b4af7f2f9161412e40b9d54d51ca8351b8c353335a2b5e4ddb155a4c1699a7e1
-SIZE (xpi/thunderbird-i18n-10.0.5/cs.xpi) = 419418
-SHA256 (xpi/thunderbird-i18n-10.0.5/da.xpi) = 60477ce2c2f1cf98e341d810ef38a7352ce93af3d11a1687dd40c6b9a83fe69b
-SIZE (xpi/thunderbird-i18n-10.0.5/da.xpi) = 363376
-SHA256 (xpi/thunderbird-i18n-10.0.5/de.xpi) = 72bfe1498f4f21e19a53e3ad3875e55dd005f2dfe91a5b9f3d598433452d83d2
-SIZE (xpi/thunderbird-i18n-10.0.5/de.xpi) = 418266
-SHA256 (xpi/thunderbird-i18n-10.0.5/en-GB.xpi) = 50a52ed103c76542b60ebff6302c256e3404fbbdcae1ac8699fb5ef9bde630c0
-SIZE (xpi/thunderbird-i18n-10.0.5/en-GB.xpi) = 391743
-SHA256 (xpi/thunderbird-i18n-10.0.5/en-US.xpi) = bb5f56a0a97c7a0c7e060ff26fa5a4c55ae8fc36227abf052704b3fc1912ec21
-SIZE (xpi/thunderbird-i18n-10.0.5/en-US.xpi) = 391242
-SHA256 (xpi/thunderbird-i18n-10.0.5/es-AR.xpi) = 3d13e3b98a4f98ca28dd3f704cfd35b836588307ac9c1126a0b6ab3390dbfb78
-SIZE (xpi/thunderbird-i18n-10.0.5/es-AR.xpi) = 410726
-SHA256 (xpi/thunderbird-i18n-10.0.5/es-ES.xpi) = 447f96ded904518422519c48dc3fb6a031bed6202f3f3d2bdb6c35aa86a8d651
-SIZE (xpi/thunderbird-i18n-10.0.5/es-ES.xpi) = 355142
-SHA256 (xpi/thunderbird-i18n-10.0.5/et.xpi) = 2fa43e19032210a713203e6df3ad2ecd48bc5c4904f53bd7109cfa23741ac17a
-SIZE (xpi/thunderbird-i18n-10.0.5/et.xpi) = 410724
-SHA256 (xpi/thunderbird-i18n-10.0.5/eu.xpi) = 517cb9354440924029bace7447d4573d1e076258da452e6339d4ed3013cbdc4a
-SIZE (xpi/thunderbird-i18n-10.0.5/eu.xpi) = 406387
-SHA256 (xpi/thunderbird-i18n-10.0.5/fi.xpi) = 724861217296f7f4f9bbe8ded334ac028ba60ec10b6c4b59b47f62783317d8f9
-SIZE (xpi/thunderbird-i18n-10.0.5/fi.xpi) = 411928
-SHA256 (xpi/thunderbird-i18n-10.0.5/fr.xpi) = d4fbba44e7f37fde324d8dc8b296e2891051febd77526188816f1fd63b133b2d
-SIZE (xpi/thunderbird-i18n-10.0.5/fr.xpi) = 414749
-SHA256 (xpi/thunderbird-i18n-10.0.5/fy-NL.xpi) = 9505cde98c321854c4abec4b3f347adffbcd39089bdb22184f4c6f38f7a35fac
-SIZE (xpi/thunderbird-i18n-10.0.5/fy-NL.xpi) = 413985
-SHA256 (xpi/thunderbird-i18n-10.0.5/ga-IE.xpi) = 9b50f292645ab8b920cb293f559ab78e5270a034589635d796bc6032ff402c27
-SIZE (xpi/thunderbird-i18n-10.0.5/ga-IE.xpi) = 423260
-SHA256 (xpi/thunderbird-i18n-10.0.5/gd.xpi) = 0ff6ed5d17eb0126638b4e0d64be6fb923f9882a95676fec380b1e7ae8f68dc2
-SIZE (xpi/thunderbird-i18n-10.0.5/gd.xpi) = 425875
-SHA256 (xpi/thunderbird-i18n-10.0.5/gl.xpi) = 1e8c7b4dd21ef0bca2d550300b99feaafc18b7d585cc27124201d5cfe8e67b10
-SIZE (xpi/thunderbird-i18n-10.0.5/gl.xpi) = 409228
-SHA256 (xpi/thunderbird-i18n-10.0.5/he.xpi) = 00a4807bfcc0bbe5b9e7333ced32b1f94fecfdfd662069ecfc02976417e47aea
-SIZE (xpi/thunderbird-i18n-10.0.5/he.xpi) = 439206
-SHA256 (xpi/thunderbird-i18n-10.0.5/hu.xpi) = 2df737386b9cec55081b2795cd3a1c3920359878739aec5f3b8a4ec0ccf2b97d
-SIZE (xpi/thunderbird-i18n-10.0.5/hu.xpi) = 426356
-SHA256 (xpi/thunderbird-i18n-10.0.5/is.xpi) = 64257028a6b24cd33b5e54a8c06c99e6745eb03a1e8481eaee6e7d44dca0e4f7
-SIZE (xpi/thunderbird-i18n-10.0.5/is.xpi) = 412634
-SHA256 (xpi/thunderbird-i18n-10.0.5/it.xpi) = 3b230b10edaaca08b0de5a60e80fccf5e14b210e92c7caaa52f1b2c231ecb177
-SIZE (xpi/thunderbird-i18n-10.0.5/it.xpi) = 347633
-SHA256 (xpi/thunderbird-i18n-10.0.5/ja.xpi) = 4e910ae6b8db167b66d25981f86a337421d4b890aaa60aadf2298c2eae9bfb54
-SIZE (xpi/thunderbird-i18n-10.0.5/ja.xpi) = 459031
-SHA256 (xpi/thunderbird-i18n-10.0.5/ko.xpi) = 1f6f07a2c84902bad9a1f78eff13c94bd07757ff7117bec23d3371cde092158e
-SIZE (xpi/thunderbird-i18n-10.0.5/ko.xpi) = 372016
-SHA256 (xpi/thunderbird-i18n-10.0.5/lt.xpi) = 34832a1c54ba4874d67ae8af17554f275e15b7a2319b4cbe19503631ec1c4c27
-SIZE (xpi/thunderbird-i18n-10.0.5/lt.xpi) = 531022
-SHA256 (xpi/thunderbird-i18n-10.0.5/nb-NO.xpi) = fcbeb3ffb602a8253f8a07f0eb8cdb925b62a2ad81c8d26360656295da4dbecf
-SIZE (xpi/thunderbird-i18n-10.0.5/nb-NO.xpi) = 407729
-SHA256 (xpi/thunderbird-i18n-10.0.5/nl.xpi) = 6610a240a3991f5d848bb1304516cd1caac99a14978a2900949387384a0ca02f
-SIZE (xpi/thunderbird-i18n-10.0.5/nl.xpi) = 407985
-SHA256 (xpi/thunderbird-i18n-10.0.5/nn-NO.xpi) = fecdcd06715ad18b0425f429e8ccef5a168239979898aff8e81751b7ef0abf82
-SIZE (xpi/thunderbird-i18n-10.0.5/nn-NO.xpi) = 409458
-SHA256 (xpi/thunderbird-i18n-10.0.5/pl.xpi) = d1929ec5647a790c3079ced6d526e1ceb2c19c140e6569990d5a862d12048519
-SIZE (xpi/thunderbird-i18n-10.0.5/pl.xpi) = 393578
-SHA256 (xpi/thunderbird-i18n-10.0.5/pt-BR.xpi) = 60f0912f612c2ebf3ab4ab89cddd1b3a7222f5f18475a7a05cb5cbc5524e0e78
-SIZE (xpi/thunderbird-i18n-10.0.5/pt-BR.xpi) = 417229
-SHA256 (xpi/thunderbird-i18n-10.0.5/pt-PT.xpi) = b8ef82bf9e56914915023f787ce94ca62c6e390ccd0a2ffbf77716aa54bddc97
-SIZE (xpi/thunderbird-i18n-10.0.5/pt-PT.xpi) = 414265
-SHA256 (xpi/thunderbird-i18n-10.0.5/rm.xpi) = ae1cdccfe338e81039d8a50cbc77739e4e93e65f33701bc7a8d5ff5c89f9b080
-SIZE (xpi/thunderbird-i18n-10.0.5/rm.xpi) = 414709
-SHA256 (xpi/thunderbird-i18n-10.0.5/ru.xpi) = 72dd2420c89af9d056594bde8fea1764bbb504bf8399219cf6369d180b090ba3
-SIZE (xpi/thunderbird-i18n-10.0.5/ru.xpi) = 411634
-SHA256 (xpi/thunderbird-i18n-10.0.5/si.xpi) = a43f9eb2b7cb5b3ff150b7399a025233a379e7b9ec1ba6e18c91faeb484cc9a3
-SIZE (xpi/thunderbird-i18n-10.0.5/si.xpi) = 456607
-SHA256 (xpi/thunderbird-i18n-10.0.5/sk.xpi) = f3e69874812ab562ccaf5eb3ea3132261694fb0ab06794fa3789098414e07c37
-SIZE (xpi/thunderbird-i18n-10.0.5/sk.xpi) = 425029
-SHA256 (xpi/thunderbird-i18n-10.0.5/sl.xpi) = 08f3af3962eeb07fa6df745adfff8795eba53a372c149713d2af144a89dd8ec4
-SIZE (xpi/thunderbird-i18n-10.0.5/sl.xpi) = 410431
-SHA256 (xpi/thunderbird-i18n-10.0.5/sq.xpi) = 55f4a9d6bc65d5623b9570ebb861987e9229a9867d800bb2589e204906d220bc
-SIZE (xpi/thunderbird-i18n-10.0.5/sq.xpi) = 360480
-SHA256 (xpi/thunderbird-i18n-10.0.5/sv-SE.xpi) = 35b43033dec37f5de2026343e6b17d32878fce9f51eb3abd44d594aa418d6277
-SIZE (xpi/thunderbird-i18n-10.0.5/sv-SE.xpi) = 478280
-SHA256 (xpi/thunderbird-i18n-10.0.5/ta-LK.xpi) = cb7d78d90b7380f85c83093307934ff09471eb707be58a3d6c43914686eefc88
-SIZE (xpi/thunderbird-i18n-10.0.5/ta-LK.xpi) = 475718
-SHA256 (xpi/thunderbird-i18n-10.0.5/tr.xpi) = 748f9a5c2660f2da480eff9bf40373567d5a8ce59c0fe07192335a73541458d2
-SIZE (xpi/thunderbird-i18n-10.0.5/tr.xpi) = 418209
-SHA256 (xpi/thunderbird-i18n-10.0.5/uk.xpi) = 7bb99378a48c12da258dc21c511267251b864ed26a31a653ca8c0188765ca78a
-SIZE (xpi/thunderbird-i18n-10.0.5/uk.xpi) = 463925
-SHA256 (xpi/thunderbird-i18n-10.0.5/zh-TW.xpi) = a6acbc39e441f148a68776de671a3a365bda2a8b388b2ed0d235ca082e174faf
-SIZE (xpi/thunderbird-i18n-10.0.5/zh-TW.xpi) = 431827
+SHA256 (xpi/thunderbird-i18n-10.0.6/ar.xpi) = 0223cc4a79d98945a20cd5b686a90d996b90211c5b6d704fd2b0e1493f9adb32
+SIZE (xpi/thunderbird-i18n-10.0.6/ar.xpi) = 441466
+SHA256 (xpi/thunderbird-i18n-10.0.6/br.xpi) = b796d258b77b4d8374956456e98977e7d29e759e1e598e4d800fb5ba84cca28b
+SIZE (xpi/thunderbird-i18n-10.0.6/br.xpi) = 415527
+SHA256 (xpi/thunderbird-i18n-10.0.6/ca.xpi) = 1c050afcb257d664c0c4aaf5488e9d27081d0987757e5c0e6238abef64cd68fc
+SIZE (xpi/thunderbird-i18n-10.0.6/ca.xpi) = 416069
+SHA256 (xpi/thunderbird-i18n-10.0.6/cs.xpi) = 3c27c5b2b08c108cf2411dd00294950b56249b145ed356b422c7b240d3b16412
+SIZE (xpi/thunderbird-i18n-10.0.6/cs.xpi) = 419419
+SHA256 (xpi/thunderbird-i18n-10.0.6/da.xpi) = 505540bde73c21243ba088b04a08e8a6bf2578a1b1b44daae080b8806f191377
+SIZE (xpi/thunderbird-i18n-10.0.6/da.xpi) = 363376
+SHA256 (xpi/thunderbird-i18n-10.0.6/de.xpi) = 174841c6b26c1a35b97eb234df220223f6391be0155e05ae547acd3509eb63e6
+SIZE (xpi/thunderbird-i18n-10.0.6/de.xpi) = 418266
+SHA256 (xpi/thunderbird-i18n-10.0.6/en-GB.xpi) = 5ace1c398328d5c2e00c046edab1543faf5fcda1f13647ee50778d72c6107596
+SIZE (xpi/thunderbird-i18n-10.0.6/en-GB.xpi) = 391743
+SHA256 (xpi/thunderbird-i18n-10.0.6/en-US.xpi) = 71ab52853aaa8f55c22392937c3b3bb700d2ea2443cf4b1275269f7fa5811a70
+SIZE (xpi/thunderbird-i18n-10.0.6/en-US.xpi) = 391242
+SHA256 (xpi/thunderbird-i18n-10.0.6/es-AR.xpi) = 53d467243b613ce076add339959175d98b688e70cf22191116f97309f1fbf2ae
+SIZE (xpi/thunderbird-i18n-10.0.6/es-AR.xpi) = 410726
+SHA256 (xpi/thunderbird-i18n-10.0.6/es-ES.xpi) = 27ea8ee4d12811805612009c0d0be3246d5af8f2b509d27cc1aef47527d51565
+SIZE (xpi/thunderbird-i18n-10.0.6/es-ES.xpi) = 355143
+SHA256 (xpi/thunderbird-i18n-10.0.6/et.xpi) = 82bc9cd8e9a2a4eb4dadff80706a31fdb762fc7baee3c0310da68c22de71b175
+SIZE (xpi/thunderbird-i18n-10.0.6/et.xpi) = 410724
+SHA256 (xpi/thunderbird-i18n-10.0.6/eu.xpi) = 46c4a9ef3ae80053157393fe767afaf1dc130268fe4a650ca41d72e0ce790487
+SIZE (xpi/thunderbird-i18n-10.0.6/eu.xpi) = 406387
+SHA256 (xpi/thunderbird-i18n-10.0.6/fi.xpi) = c2bea42568a928a293844a5ed172ac7dc289f56988bf8a29a047b0e2efa2074e
+SIZE (xpi/thunderbird-i18n-10.0.6/fi.xpi) = 411928
+SHA256 (xpi/thunderbird-i18n-10.0.6/fr.xpi) = 909ccf3f85e488a686766e3a1c54868fb8c91a305ffd42031a1a747c7ecb7f9e
+SIZE (xpi/thunderbird-i18n-10.0.6/fr.xpi) = 414749
+SHA256 (xpi/thunderbird-i18n-10.0.6/fy-NL.xpi) = 000d97b67290869298ce4550b8c5dacf81d36eddaefb116a504dddd8bafd0a9a
+SIZE (xpi/thunderbird-i18n-10.0.6/fy-NL.xpi) = 413985
+SHA256 (xpi/thunderbird-i18n-10.0.6/ga-IE.xpi) = 17aa3b5092df7411f6a2039f245ce255a128938dee34e6977224cdfa1d6ec765
+SIZE (xpi/thunderbird-i18n-10.0.6/ga-IE.xpi) = 423261
+SHA256 (xpi/thunderbird-i18n-10.0.6/gd.xpi) = 2bb47d383359cd860155b1e71efa085a8d8b2a5a0b2ab41559468c48229b94af
+SIZE (xpi/thunderbird-i18n-10.0.6/gd.xpi) = 425876
+SHA256 (xpi/thunderbird-i18n-10.0.6/gl.xpi) = c6aad0c59e6e8917c00373d6dd9b12ae8a5dae51fbd63d84937aee632af3410a
+SIZE (xpi/thunderbird-i18n-10.0.6/gl.xpi) = 409229
+SHA256 (xpi/thunderbird-i18n-10.0.6/he.xpi) = f9b681d750defe2bd03c5f3129ee7d855b3e84733d680b94f433b6acce172f08
+SIZE (xpi/thunderbird-i18n-10.0.6/he.xpi) = 439206
+SHA256 (xpi/thunderbird-i18n-10.0.6/hu.xpi) = c88c902234b5878bae444c4133d17d58464ff401cccd7196d86279f26ba9c0b2
+SIZE (xpi/thunderbird-i18n-10.0.6/hu.xpi) = 426356
+SHA256 (xpi/thunderbird-i18n-10.0.6/is.xpi) = 351ff4311732a4b8127ed2642841bf3b92b5bcb1336666fa460352ec9afb09db
+SIZE (xpi/thunderbird-i18n-10.0.6/is.xpi) = 412634
+SHA256 (xpi/thunderbird-i18n-10.0.6/it.xpi) = f2a225ad1b5d7e5292b5589cf03e880477d572a597c849c62a57584237f30335
+SIZE (xpi/thunderbird-i18n-10.0.6/it.xpi) = 347634
+SHA256 (xpi/thunderbird-i18n-10.0.6/ja.xpi) = a8e350421416229b93e7e825e072adb34d50dde91c81864be7463ce8470d8d67
+SIZE (xpi/thunderbird-i18n-10.0.6/ja.xpi) = 459031
+SHA256 (xpi/thunderbird-i18n-10.0.6/ko.xpi) = c13e33783f8d1bea548be5095716e84c36df00c610707612d80ca01a9ec5c814
+SIZE (xpi/thunderbird-i18n-10.0.6/ko.xpi) = 372016
+SHA256 (xpi/thunderbird-i18n-10.0.6/lt.xpi) = a00be860b6c1a7844a08ca0c0b4803e076817788c3049caa4c4343bdd394f6a4
+SIZE (xpi/thunderbird-i18n-10.0.6/lt.xpi) = 531022
+SHA256 (xpi/thunderbird-i18n-10.0.6/nb-NO.xpi) = 1a309be14b4b04722c91c10dbe490de9c64e8f185abde0489662b659f1fcd8d7
+SIZE (xpi/thunderbird-i18n-10.0.6/nb-NO.xpi) = 407729
+SHA256 (xpi/thunderbird-i18n-10.0.6/nl.xpi) = 472b2e8b6271e7be5beccd644563f043b89b38db3ff26778912fc2af476cf765
+SIZE (xpi/thunderbird-i18n-10.0.6/nl.xpi) = 407985
+SHA256 (xpi/thunderbird-i18n-10.0.6/nn-NO.xpi) = bc575d2c7c48c760aa5703326cc6a4b2bd387a7d364b9b77d5f32444315c015f
+SIZE (xpi/thunderbird-i18n-10.0.6/nn-NO.xpi) = 409459
+SHA256 (xpi/thunderbird-i18n-10.0.6/pl.xpi) = 606585843ba8407f407d130a4522b42a5b60b7b64c4dc0a60078f16fac862bdf
+SIZE (xpi/thunderbird-i18n-10.0.6/pl.xpi) = 393578
+SHA256 (xpi/thunderbird-i18n-10.0.6/pt-BR.xpi) = 0833f32f278ce2d1f74c884007d4731b21eab0075bbf27f0307d7ea238bcbfb4
+SIZE (xpi/thunderbird-i18n-10.0.6/pt-BR.xpi) = 417229
+SHA256 (xpi/thunderbird-i18n-10.0.6/pt-PT.xpi) = 25e1dca1ff07a60938867905147cea68bd724e5f40e5950e1fc7e3e5e8f2dc82
+SIZE (xpi/thunderbird-i18n-10.0.6/pt-PT.xpi) = 414266
+SHA256 (xpi/thunderbird-i18n-10.0.6/rm.xpi) = a5b541a4d3048c5396ffc35336354b71f2cef500a60ed2f9c65b0dab125dc49a
+SIZE (xpi/thunderbird-i18n-10.0.6/rm.xpi) = 414709
+SHA256 (xpi/thunderbird-i18n-10.0.6/ru.xpi) = 38012fb38ea4fefcb1ebd7e7a57151ae7e8fbfa20fa463c34bf3ee7e4c2cad83
+SIZE (xpi/thunderbird-i18n-10.0.6/ru.xpi) = 411634
+SHA256 (xpi/thunderbird-i18n-10.0.6/si.xpi) = 4602f33aed0ce5af558482a2a4098edf4f24a6b2726ae6ebc0fbee77dfaf6931
+SIZE (xpi/thunderbird-i18n-10.0.6/si.xpi) = 456607
+SHA256 (xpi/thunderbird-i18n-10.0.6/sk.xpi) = e6c7104d138922fee7941929361331246ac2e9df655b8e7025d7dc066ef1c880
+SIZE (xpi/thunderbird-i18n-10.0.6/sk.xpi) = 425029
+SHA256 (xpi/thunderbird-i18n-10.0.6/sl.xpi) = 2ce183f0cb08f241c8aa12c07932e69ac418af66a43a4886890cb1f649f81f57
+SIZE (xpi/thunderbird-i18n-10.0.6/sl.xpi) = 410432
+SHA256 (xpi/thunderbird-i18n-10.0.6/sq.xpi) = 84361c6f6c9d9516fc405b24eb23cef2ef3ff03f633fdd87da1fe0d6dde499a8
+SIZE (xpi/thunderbird-i18n-10.0.6/sq.xpi) = 360480
+SHA256 (xpi/thunderbird-i18n-10.0.6/sv-SE.xpi) = 07d22a2988abb9618004e9ef19255389db08e86758f520000de5fa9f82b204f3
+SIZE (xpi/thunderbird-i18n-10.0.6/sv-SE.xpi) = 478281
+SHA256 (xpi/thunderbird-i18n-10.0.6/ta-LK.xpi) = a8214f2fd01af7fd8aa13462bee23dbaef8e08a4990aaf7b00df17f303514d04
+SIZE (xpi/thunderbird-i18n-10.0.6/ta-LK.xpi) = 475718
+SHA256 (xpi/thunderbird-i18n-10.0.6/tr.xpi) = 6911cc3ab94d64c62dd63481435ed675bc39bab109b3b1aa8ce1bc7a309e830e
+SIZE (xpi/thunderbird-i18n-10.0.6/tr.xpi) = 418210
+SHA256 (xpi/thunderbird-i18n-10.0.6/uk.xpi) = 81774654be422fb766f54f18e1856ddcdd5a46c78ff95ff0c16d7e33f29f7589
+SIZE (xpi/thunderbird-i18n-10.0.6/uk.xpi) = 463925
+SHA256 (xpi/thunderbird-i18n-10.0.6/zh-TW.xpi) = 16f1f0e110da8f2c3cb27a202e60ff38b66de97973fee92e7b0192e57f972ea8
+SIZE (xpi/thunderbird-i18n-10.0.6/zh-TW.xpi) = 431827
diff --git a/mail/thunderbird-esr/Makefile b/mail/thunderbird-esr/Makefile
index 8829354123ce..44618e494fc9 100644
--- a/mail/thunderbird-esr/Makefile
+++ b/mail/thunderbird-esr/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= thunderbird
-DISTVERSION= 10.0.5
+DISTVERSION= 10.0.6
CATEGORIES= mail ipv6
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${DISTVERSION}esr/source
@@ -15,39 +15,34 @@ DISTNAME= ${PORTNAME}-${DISTVERSION}esr.source
MAINTAINER= gecko@FreeBSD.org
COMMENT= Mozilla Thunderbird is standalone mail and news that stands above
-BUILD_DEPENDS= nspr>=4.8.7:${PORTSDIR}/devel/nspr \
+BUILD_DEPENDS= nspr>=4.8.8:${PORTSDIR}/devel/nspr \
+ nss>=3.13.1:${PORTSDIR}/security/nss \
+ sqlite3>=3.7.7.1:${PORTSDIR}/databases/sqlite3 \
cairo>=1.10.2_1,1:${PORTSDIR}/graphics/cairo \
unzip:${PORTSDIR}/archivers/unzip
-LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo \
- event-1.4:${PORTSDIR}/devel/libevent
CONFLICTS_BUILD= spidermonkey-*
-USE_AUTOTOOLS= autoconf213
+USE_AUTOTOOLS= autoconf213:env
LATEST_LINK= thunderbird-esr
USE_GECKO= gecko
CONFLICTS= thunderbird-1[1-9].*
-USE_MOZILLA= -png -nss -dbm -jpeg -xft
-MOZ_TOOLKIT= cairo-gtk2
+USE_MOZILLA= # empty
MAKE_JOBS_SAFE= yes
WANT_GNOME= yes
+USE_QT4= # empty
+QT_NONSTANDARD= yes
ALL_TARGET= default
-CONFIGURE_ENV= LOCALBASE=${LOCALBASE}
-MAKE_ENV= PTHREAD_LDFLAGS="${PTHREAD_LIBS}"
-HAS_CONFIGURE= yes
+GNU_CONFIGURE= yes
USE_BZIP2= yes
USE_GMAKE= yes
USE_GL= gl
MOZ_PROTOCOLS= http,ftp,file,viewsource,res,data,wyciwyg,websocket
-MOZ_GRAPHICS= default,-xbm
MOZ_OPTIONS= --program-transform-name='s/thunderbird/${MOZILLA}/' \
- --with-default-mozilla-five-home=${PREFIX}/lib/${MOZILLA} \
--enable-single-profile --disable-profilesharing \
- --enable-application=mail --enable-official-branding \
- --disable-updater --disable-necko-wifi \
- --with-system-libevent=${LOCALBASE}
+ --enable-application=mail --enable-official-branding
MOZ_MK_OPTIONS= MOZ_MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1
MOZ_EXPORT= MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1
MOZ_PKGCONFIG_FILES=
@@ -58,45 +53,38 @@ PORTNAME_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default48.png
SYSTEM_PREFS= ${FAKEDIR}/lib/${PORTNAME}/defaults/pref/${PORTNAME}.js
MOZ_PIS_SCRIPTS=moz_pis_S50cleanhome
-OPTIONS= LIGHTNING "Enable calendar extension" off
+OPTIONS_DEFINE= LIGHTNING
+.include "${.CURDIR}/../../www/firefox/Makefile.options"
.include <bsd.port.pre.mk>
WRKSRC= ${WRKDIR}/comm-esr10
MOZSRC:= ${WRKSRC}/mozilla
-.if ${ARCH} == powerpc64
+.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
-CONFIGURE_ENV+= UNAME_m="powerpc64"
+MOZ_EXPORT+= UNAME_m="powerpc64"
CFLAGS+= -mminimal-toc
.endif
.endif
-.if ${HAVE_GNOME:Mlibgnomeui}!=""
-USE_GNOME+= libgnomeui
-MOZ_OPTIONS+= --enable-gnomeui
-.else
-MOZ_OPTIONS+= --disable-gnomeui
-.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@thunderbird.mozilla.org
@@ -109,22 +97,8 @@ post-extract:
<${FILESDIR}/thunderbird.desktop.in >${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop
post-patch:
- @${GREP} -Flr \"/proc ${MOZSRC}/ipc/chromium/src/base | ${XARGS} ${REINPLACE_CMD} \
- -e 's|/proc/self/fd|/dev/fd|' \
- -e 's|/proc["/]|/compat/linux&|'
- @${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}|' \
- ${MOZSRC}/security/manager/ssl/src/Makefile.in \
- ${MOZSRC}/js/src/config/mkdepend/Makefile.in \
- ${MOZSRC}/js/src/config/config.mk
- @${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' \
- ${MOZSRC}/js/src/configure
+ @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ ${WRKSRC}/mail/app/nsMailApp.cpp
pre-configure:
(cd ${WRKSRC} && ${AUTOCONF})
@@ -143,7 +117,7 @@ post-install:
${MKDIR} ${PREFIX}/share/applications
${INSTALL_DATA} ${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop ${PREFIX}/share/applications
${LN} -sf ${PORTNAME_ICON_SRC} ${PREFIX}/share/pixmaps/${PORTNAME_ICON}
-.if defined(WITH_LIGHTNING)
+.if ${PORT_OPTIONS:MLIGHTNING}
@${MKDIR} ${XPI_LIBDIR}/${XPI_ID} ${XPI_LIBDIR}/symlinks/thunderbird
@(cd ${XPI_LIBDIR}/${XPI_ID}; ${TAR} -xf ${XPI_FILE})
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${XPI_LIBDIR}/${XPI_ID}
diff --git a/mail/thunderbird-esr/distinfo b/mail/thunderbird-esr/distinfo
index 6333e4c500a5..7dccd06e81a7 100644
--- a/mail/thunderbird-esr/distinfo
+++ b/mail/thunderbird-esr/distinfo
@@ -1,2 +1,2 @@
-SHA256 (thunderbird-10.0.5esr.source.tar.bz2) = d9e94cf730b6ce8974a63cbc240f27671a74c662942c26a6f4264ed24af4281f
-SIZE (thunderbird-10.0.5esr.source.tar.bz2) = 97617123
+SHA256 (thunderbird-10.0.6esr.source.tar.bz2) = 0962399e13ea4b97816730ea81260ec304a6da49c9562840c776f4d1a536c1e8
+SIZE (thunderbird-10.0.6esr.source.tar.bz2) = 97779445
diff --git a/mail/thunderbird-esr/files/patch-alsapulse b/mail/thunderbird-esr/files/patch-alsapulse
new file mode 100644
index 000000000000..47580cd562b3
--- /dev/null
+++ b/mail/thunderbird-esr/files/patch-alsapulse
@@ -0,0 +1,119 @@
+--- mozilla/config/autoconf.mk.in~
++++ mozilla/config/autoconf.mk.in
+@@ -568,7 +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,48 @@ 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_CFLAGS)
++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/libxul-config.mk~
++++ mozilla/toolkit/library/libxul-config.mk
+@@ -348,10 +348,12 @@ ifdef MOZ_NATIVE_LIBVPX
+ EXTRA_DSO_LDOPTS += $(MOZ_LIBVPX_LIBS)
+ endif
+
+-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/mail/thunderbird-esr/files/patch-bug685258 b/mail/thunderbird-esr/files/patch-bug685258
new file mode 100644
index 000000000000..cac425d6adba
--- /dev/null
+++ b/mail/thunderbird-esr/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/mail/thunderbird-esr/files/patch-bug741737 b/mail/thunderbird-esr/files/patch-bug741737
new file mode 100644
index 000000000000..d4ceffbe8cef
--- /dev/null
+++ b/mail/thunderbird-esr/files/patch-bug741737
@@ -0,0 +1,90 @@
+changeset: 91900:eee73897136b
+user: Martin Stransky <stransky@redhat.com>
+date: Tue Apr 17 19:57:40 2012 -0400
+summary: Bug 741737 - Configure libvpx with pkgconfig. r=khuey, a=npotb
+
+diff --git a/configure.in b/configure.in
+--- mozilla/configure.in
++++ mozilla/configure.in
+@@ -5588,12 +5588,10 @@ MOZ_ARG_DISABLE_BOOL(webm,
+
+ dnl system libvpx Support
+ dnl ========================================================
+-MOZ_ARG_WITH_STRING(system-libvpx,
+-[ --with-system-libvpx=[PFX]
+- Use system libvpx [installed at prefix PFX]],
+- LIBVPX_DIR=$withval)
++MOZ_ARG_WITH_BOOL(system-libvpx,
++[ --with-system-libvpx Use system libvpx (located with pkgconfig)],
++ MOZ_NATIVE_LIBVPX=1)
+
+-MOZ_NATIVE_LIBVPX=
+ MOZ_LIBVPX_INCLUDES=
+ MOZ_LIBVPX_LIBS=
+
+@@ -5606,53 +5604,18 @@ if test -n "$MOZ_WEBM"; then
+ AC_DEFINE(MOZ_VP8_ENCODER)
+ fi
+
+- if test -n "$LIBVPX_DIR" -a "$LIBVPX_DIR" != no; then
+- _SAVE_CFLAGS=$CFLAGS
+- _SAVE_LDFLAGS=$LDFLAGS
+- _SAVE_LIBS=$LIBS
+- if test "${LIBVPX_DIR}" = "yes"; then
+- LIBVPX_DIR=/usr
+- fi
+- CFLAGS="-I${LIBVPX_DIR}/include $CFLAGS"
+- LDFLAGS="-L${LIBVPX_DIR}/lib $LDFLAGS"
+- MOZ_NATIVE_LIBVPX_DEC_TEST=
+- MOZ_CHECK_HEADER(vpx/vpx_decoder.h,
+- [if test ! -f "${LIBVPX_DIR}/include/vpx/vpx_decoder.h"; then
+- AC_MSG_ERROR([vpx/vpx_decoder.h found, but is not in ${LIBVPX_DIR}/include])
+- fi],
+- AC_MSG_ERROR([--with-system-libvpx requested but vpx/vpx_decoder.h not found]))
+- AC_CHECK_LIB(vpx, vpx_codec_dec_init_ver,
+- [MOZ_NATIVE_LIBVPX_DEC_TEST=1],
+- ([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found]))
+- if test -n "$MOZ_NATIVE_LIBVPX_DEC_TEST" ; then
+- AC_MSG_CHECKING([for libvpx version >= v0.9.7])
+- dnl We need at least v0.9.7 to fix several crash bugs (for which we
+- dnl had local patches prior to v0.9.7).
+- dnl
+- dnl This is a terrible test for the library version, but we don't
+- dnl have a good one. There is no version number in a public header,
+- dnl and testing the headers still doesn't guarantee we link against
+- dnl the right version. While we could call vpx_codec_version() at
+- dnl run-time, that would break cross-compiling. There are no
+- dnl additional exported symbols between the v0.9.7 release and the
+- dnl v0.9.6 one to check for.
+- AC_TRY_COMPILE([
+- #include <vpx/vpx_decoder.h>
+- #if !defined(VPX_CODEC_USE_INPUT_PARTITION)
+- #error "test failed."
+- #endif
+- ],
+- [return 0;],
+- [AC_MSG_RESULT([yes])
+- MOZ_NATIVE_LIBVPX=1
+- MOZ_LIBVPX_INCLUDES="-I${LIBVPX_DIR}/include"
+- MOZ_LIBVPX_LIBS="-L${LIBVPX_DIR}/lib -lvpx"],
+- [AC_MSG_RESULT([no])
+- AC_MSG_ERROR([--with-system-libvpx requested but it is not v0.9.7 or later])])
+- fi
+- CFLAGS=$_SAVE_CFLAGS
+- LDFLAGS=$_SAVE_LDFLAGS
+- LIBS=$_SAVE_LIBS
++ if test -n "$MOZ_NATIVE_LIBVPX"; then
++ dnl ============================
++ dnl === libvpx Version check ===
++ dnl ============================
++ dnl Check to see if we have a system libvpx package.
++ PKG_CHECK_MODULES(LIBVPX, vpx >= 0.9.7)
++
++ MOZ_CHECK_HEADER([vpx/vpx_decoder.h], [],
++ [AC_MSG_ERROR([Couldn't find vpx/vpx_decoder.h which is required for build with system libvpx. Use --without-system-libvpx to build with in-tree libvpx.])])
++
++ AC_CHECK_LIB(vpx, vpx_codec_dec_init_ver, [],
++ [AC_MSG_ERROR([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found])])
+ fi
+ fi
+
diff --git a/mail/thunderbird-esr/files/patch-bug753046 b/mail/thunderbird-esr/files/patch-bug753046
new file mode 100644
index 000000000000..ba42ffbde6c4
--- /dev/null
+++ b/mail/thunderbird-esr/files/patch-bug753046
@@ -0,0 +1,1267 @@
+# 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,6 +18,8 @@
+
+ #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
+@@ -26,6 +28,8 @@
+
+ #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 ANDROID
++# if defined(OS_LINUX) || defined(OS_BSD)
++# if defined(ANDROID) || defined(OS_BSD)
+ path += "/lib";
+ # endif // 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/mail/thunderbird-esr/files/patch-configure.in b/mail/thunderbird-esr/files/patch-configure.in
deleted file mode 100644
index 4e91d33a273a..000000000000
--- a/mail/thunderbird-esr/files/patch-configure.in
+++ /dev/null
@@ -1,112 +0,0 @@
---- configure.in.orig 2011-12-19 14:48:06.000000000 +0100
-+++ configure.in 2011-12-19 15:51:19.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/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc b/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc
deleted file mode 100644
index ffb56ac25100..000000000000
--- a/mail/thunderbird-esr/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/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-file_util_linux.cc b/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-file_util_linux.cc
index d0cc3b14e68b..e146174b2e2e 100644
--- a/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-file_util_linux.cc
+++ b/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-file_util_linux.cc
@@ -1,11 +1,8 @@
--- 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
- }
+@@ -5,6 +5,7 @@
+ #include "base/file_util.h"
+
+ #include <fcntl.h>
++#include <unistd.h>
+
diff --git a/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-file_util_posix.cc b/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-file_util_posix.cc
deleted file mode 100644
index 3c722016e77b..000000000000
--- a/mail/thunderbird-esr/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/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-platform_file_posix.cc b/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-platform_file_posix.cc
deleted file mode 100644
index 14e333ca339b..000000000000
--- a/mail/thunderbird-esr/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/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-platform_thread_posix.cc b/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-platform_thread_posix.cc
deleted file mode 100644
index 3445b281bc48..000000000000
--- a/mail/thunderbird-esr/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/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h b/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h
deleted file mode 100644
index ca7b24fa4860..000000000000
--- a/mail/thunderbird-esr/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/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-time_posix.cc b/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-time_posix.cc
new file mode 100644
index 000000000000..27461ccd3fb6
--- /dev/null
+++ b/mail/thunderbird-esr/files/patch-ipc-chromium-src-base-time_posix.cc
@@ -0,0 +1,10 @@
+--- mozilla/ipc/chromium/src/base/time_posix.cc~
++++ mozilla/ipc/chromium/src/base/time_posix.cc
+@@ -8,6 +9,7 @@
+ #include <mach/mach_time.h>
+ #endif
+ #include <sys/time.h>
++#include <unistd.h>
+ #ifdef ANDROID
+ #include <time64.h>
+ #else
diff --git a/mail/thunderbird-esr/files/patch-ipc-chromium-src-build-build_config.h b/mail/thunderbird-esr/files/patch-ipc-chromium-src-build-build_config.h
deleted file mode 100644
index e7540d38eceb..000000000000
--- a/mail/thunderbird-esr/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/mail/thunderbird-esr/files/patch-ldap-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in b/mail/thunderbird-esr/files/patch-ldap-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in
new file mode 100644
index 000000000000..4ec8205074ee
--- /dev/null
+++ b/mail/thunderbird-esr/files/patch-ldap-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in
@@ -0,0 +1,12 @@
+--- ldap/sdks/c-sdk/ldap/libraries/libssldap/Makefile.in~
++++ ldap/sdks/c-sdk/ldap/libraries/libssldap/Makefile.in
+@@ -188,6 +188,9 @@ endif
+
+ OBJDEST = $(OBJDIR_NAME)
+
++# accept -pthread with MOZ_NATIVE_NSS
++LINK_DLL = $(CC_FOR_LINK) -shared -o $@ $(OBJS) $(EXTRA_DLL_LIBS)
++
+ ###########################################################################
+
+ ifeq ($(USE_DLL_EXPORTS_FILE), 1)
diff --git a/mail/thunderbird-esr/files/patch-mail-app-nsMailApp.cpp b/mail/thunderbird-esr/files/patch-mail-app-nsMailApp.cpp
new file mode 100644
index 000000000000..0d17050c939c
--- /dev/null
+++ b/mail/thunderbird-esr/files/patch-mail-app-nsMailApp.cpp
@@ -0,0 +1,10 @@
+--- mail/app/nsMailApp.cpp~
++++ mail/app/nsMailApp.cpp
+@@ -154,6 +154,7 @@ int main(int argc, char* argv[])
+ TriggerQuirks();
+ #endif
+
++ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko19:%%LOCALBASE%%/lib/npapi/symlinks/thunderbird", 0);
+ nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath);
+ if (NS_FAILED(rv)) {
+ Output("Couldn't calculate the application directory.\n");
diff --git a/mail/thunderbird-esr/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp b/mail/thunderbird-esr/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp
new file mode 100644
index 000000000000..9bae143f2e26
--- /dev/null
+++ b/mail/thunderbird-esr/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/mail/thunderbird-esr/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp b/mail/thunderbird-esr/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp
new file mode 100644
index 000000000000..b3a6df4d2c90
--- /dev/null
+++ b/mail/thunderbird-esr/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/mail/thunderbird-esr/files/patch-mozilla-build-autoconf-config.sub b/mail/thunderbird-esr/files/patch-mozilla-build-autoconf-config.sub
deleted file mode 100644
index 12a704ade44b..000000000000
--- a/mail/thunderbird-esr/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/mail/thunderbird-esr/files/patch-mozilla-configure.in b/mail/thunderbird-esr/files/patch-mozilla-configure.in
index 4ccc7bfe5017..832f967abc9a 100644
--- a/mail/thunderbird-esr/files/patch-mozilla-configure.in
+++ b/mail/thunderbird-esr/files/patch-mozilla-configure.in
@@ -1,23 +1,5 @@
--- 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)
@@ -45,15 +27,29 @@
AC_DEFINE(HAVE_CLOCK_MONOTONIC)
AC_SUBST(HAVE_CLOCK_MONOTONIC)
AC_SUBST(REALTIME_LIBS)
-@@ -4808,7 +4810,7 @@ CFLAGS=$_SAVE_CFLAGS
+@@ -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 @@
VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC"
VPX_X86_ASM=1
@@ -62,7 +58,7 @@
+ 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
+ ;;
@@ -77,7 +73,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/mail/thunderbird-esr/files/patch-mozilla-db-sqlite3-src-Makefile.in b/mail/thunderbird-esr/files/patch-mozilla-db-sqlite3-src-Makefile.in
deleted file mode 100644
index 24a7d6206604..000000000000
--- a/mail/thunderbird-esr/files/patch-mozilla-db-sqlite3-src-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- mozilla/db/sqlite3/src/Makefile.in.orig 2008-06-19 11:03:17.000000000 -0500
-+++ mozilla/db/sqlite3/src/Makefile.in 2008-06-19 11:04:15.000000000 -0500
-@@ -45,6 +45,8 @@
-
- include $(DEPTH)/config/autoconf.mk
-
-+OS_CFLAGS = -I../../../dist/include/sqlite3
-+OS_LIBS = %%PTHREAD_LIBS%%
- MODULE = sqlite3
- LIBRARY_NAME = sqlite3
- FORCE_SHARED_LIB = 1
diff --git a/mail/thunderbird-esr/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp b/mail/thunderbird-esr/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp
new file mode 100644
index 000000000000..f088ed439b95
--- /dev/null
+++ b/mail/thunderbird-esr/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/mail/thunderbird-esr/files/patch-mozilla-gfx-qcms-Makefile.in b/mail/thunderbird-esr/files/patch-mozilla-gfx-qcms-Makefile.in
deleted file mode 100644
index bad2cf563256..000000000000
--- a/mail/thunderbird-esr/files/patch-mozilla-gfx-qcms-Makefile.in
+++ /dev/null
@@ -1,14 +0,0 @@
---- mozilla/gfx/qcms/Makefile.in.orig 2010-11-25 20:10:32.000000000 +0100
-+++ mozilla/gfx/qcms/Makefile.in 2010-11-25 20:10:06.000000000 +0100
-@@ -44,6 +44,11 @@
- endif
- endif
- endif
-+ifeq ($(OS_TEST),amd64)
-+ CSRCS += transform-sse2.c transform-sse1.c
-+ SSE1_FLAGS=-msse
-+ SSE2_FLAGS=-msse2
-+endif
-
- FORCE_STATIC_LIB = 1
- # This library is used by other shared libs
diff --git a/mail/thunderbird-esr/files/patch-mozilla-gfx-ycbcr-Makefile.in b/mail/thunderbird-esr/files/patch-mozilla-gfx-ycbcr-Makefile.in
new file mode 100644
index 000000000000..041689a51995
--- /dev/null
+++ b/mail/thunderbird-esr/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/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-Makefile.in b/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-Makefile.in
new file mode 100644
index 000000000000..5d2e72cd0a96
--- /dev/null
+++ b/mail/thunderbird-esr/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/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h b/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h
deleted file mode 100644
index 5c4e5b79f3d1..000000000000
--- a/mail/thunderbird-esr/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/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc b/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc
new file mode 100644
index 000000000000..4532ca933738
--- /dev/null
+++ b/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc
@@ -0,0 +1,19 @@
+--- mozilla/ipc/chromium/src/base/message_pump_libevent.cc~
++++ mozilla/ipc/chromium/src/base/message_pump_libevent.cc
+@@ -6,6 +6,7 @@
+
+ #include <errno.h>
+ #include <fcntl.h>
++#include <unistd.h>
+
+ #include "eintr_wrapper.h"
+ #include "base/logging.h"
+@@ -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/mail/thunderbird-esr/files/patch-mozilla-js-src-Makefile.in b/mail/thunderbird-esr/files/patch-mozilla-js-src-Makefile.in
index f203d1dce232..e4ffc32e619c 100644
--- a/mail/thunderbird-esr/files/patch-mozilla-js-src-Makefile.in
+++ b/mail/thunderbird-esr/files/patch-mozilla-js-src-Makefile.in
@@ -1,24 +1,5 @@
--- mozilla/js/src/Makefile.in.orig 2011-07-06 05:09:22.000000000 +0200
+++ mozilla/js/src/Makefile.in 2011-07-06 22:23:46.363233778 +0200
-@@ -416,7 +416,7 @@
- # END enclude sources for V8 dtoa
- #############################################
-
--ifeq (,$(filter arm% sparc %86 x86_64,$(TARGET_CPU)))
-+ifeq (,$(filter arm% sparc %86 amd64 x86_64,$(TARGET_CPU)))
-
- VPATH += $(srcdir)/assembler \
- $(srcdir)/assembler/wtf \
-@@ -469,6 +469,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
@@ -793,7 +796,7 @@
endif # WINNT
diff --git a/mail/thunderbird-esr/files/patch-mozilla-js-src-config-mkdepend-Makefile.in b/mail/thunderbird-esr/files/patch-mozilla-js-src-config-mkdepend-Makefile.in
index 6129066e1afd..37f9d4c61f3e 100644
--- a/mail/thunderbird-esr/files/patch-mozilla-js-src-config-mkdepend-Makefile.in
+++ b/mail/thunderbird-esr/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/mail/thunderbird-esr/files/patch-mozilla-js-src-config_config.mk b/mail/thunderbird-esr/files/patch-mozilla-js-src-config_config.mk
index c5b42ad3457c..0bacb7ee6f1a 100644
--- a/mail/thunderbird-esr/files/patch-mozilla-js-src-config_config.mk
+++ b/mail/thunderbird-esr/files/patch-mozilla-js-src-config_config.mk
@@ -4,7 +4,7 @@
-I$(srcdir) \
-I. \
-I$(DIST)/include -I$(DIST)/include/nsprpub \
-+ -I%%LOCALBASE%%/include \
++ -I$(LOCALBASE)/include \
$(if $(LIBXUL_SDK),-I$(LIBXUL_SDK)/include -I$(LIBXUL_SDK)/include/nsprpub) \
$(OS_INCLUDES) \
$(NULL)
diff --git a/mail/thunderbird-esr/files/patch-mozilla-js-src-configure.in b/mail/thunderbird-esr/files/patch-mozilla-js-src-configure.in
index 32d7d18a0aa0..4cbf768d1180 100644
--- a/mail/thunderbird-esr/files/patch-mozilla-js-src-configure.in
+++ b/mail/thunderbird-esr/files/patch-mozilla-js-src-configure.in
@@ -1,40 +1,5 @@
--- mozilla/js/src/configure.in.orig 2012-01-29 15:44:24.000000000 +0100
+++ mozilla/js/src/configure.in 2012-01-30 23:37:46.541060008 +0100
-@@ -1410,7 +1410,7 @@
- CPU_ARCH=sparc
- ;;
-
--x86_64 | ia64)
-+amd64 | x86_64 | ia64)
- CPU_ARCH="$OS_TEST"
- ;;
-
-@@ -1432,7 +1432,7 @@
- dnl ===============================================================
- INTEL_ARCHITECTURE=
- case "$OS_TEST" in
-- x86_64|i?86)
-+ amd64|x86_64|i?86)
- INTEL_ARCHITECTURE=1
- esac
-
-@@ -2713,6 +2713,16 @@
- AC_DEFINE(JS_CPU_X86)
- AC_DEFINE(JS_NUNBOX32)
- ;;
-+amd64*-*)
-+ ENABLE_TRACEJIT=1
-+ NANOJIT_ARCH=X64
-+ ENABLE_METHODJIT=1
-+ ENABLE_MONOIC=1
-+ ENABLE_POLYIC=1
-+ ENABLE_POLYIC_TYPED_ARRAY=1
-+ AC_DEFINE(JS_CPU_X64)
-+ AC_DEFINE(JS_PUNBOX64)
-+ ;;
- x86_64*-*)
- NANOJIT_ARCH=X64
- ENABLE_METHODJIT=1
@@ -2732,6 +2742,7 @@
AC_DEFINE(JS_NUNBOX32)
;;
@@ -51,14 +16,11 @@
;;
esac
-@@ -2795,6 +2807,10 @@
- i?86-*)
- AC_DEFINE(AVMPLUS_IA32)
- ;;
-+amd64*-*)
-+ AC_DEFINE(AVMPLUS_AMD64)
-+ AC_DEFINE(AVMPLUS_64BIT)
-+ ;;
- x86_64*-*)
- AC_DEFINE(AVMPLUS_AMD64)
- AC_DEFINE(AVMPLUS_64BIT)
+@@ -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/mail/thunderbird-esr/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp b/mail/thunderbird-esr/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp
new file mode 100644
index 000000000000..009b469dcd7f
--- /dev/null
+++ b/mail/thunderbird-esr/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/mail/thunderbird-esr/files/patch-mozilla-media-libsydneyaudio-include-sydney_audio.h b/mail/thunderbird-esr/files/patch-mozilla-media-libsydneyaudio-include-sydney_audio.h
deleted file mode 100644
index e2c52f080518..000000000000
--- a/mail/thunderbird-esr/files/patch-mozilla-media-libsydneyaudio-include-sydney_audio.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- mozilla/media/libsydneyaudio/include/sydney_audio.h.orgi 2009-04-10 12:24:01.000000000 +0200
-+++ mozilla/media/libsydneyaudio/include/sydney_audio.h 2009-04-10 12:24:30.000000000 +0200
-@@ -73,7 +73,7 @@
- # endif
- #elif defined(WIN32)
- # define SA_LITTLE_ENDIAN 1
--#elif defined(__APPLE__)
-+#elif defined(__APPLE__) || defined(__FreeBSD__)
- # if defined(__BIG_ENDIAN__)
- # define SA_BIG_ENDIAN 1
- # else
diff --git a/mail/thunderbird-esr/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c b/mail/thunderbird-esr/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c
new file mode 100644
index 000000000000..ddb42a92a1e3
--- /dev/null
+++ b/mail/thunderbird-esr/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/mail/thunderbird-esr/files/patch-mozilla-memory-mozalloc-mozalloc.cpp b/mail/thunderbird-esr/files/patch-mozilla-memory-mozalloc-mozalloc.cpp
new file mode 100644
index 000000000000..2a792aba9aa0
--- /dev/null
+++ b/mail/thunderbird-esr/files/patch-mozilla-memory-mozalloc-mozalloc.cpp
@@ -0,0 +1,21 @@
+--- mozilla/memory/mozalloc/mozalloc.cpp~
++++ mozilla/memory/mozalloc/mozalloc.cpp
+@@ -52,6 +52,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(MOZ_MEMORY)
+ // jemalloc.h doesn't redeclare symbols if they're provided by the OS
+@@ -259,7 +262,7 @@ moz_malloc_usable_size(void *ptr)
+
+ #if defined(XP_MACOSX)
+ return malloc_size(ptr);
+-#elif defined(MOZ_MEMORY)
++#elif defined(MOZ_MEMORY) || defined(__FreeBSD__)
+ return malloc_usable_size(ptr);
+ #elif defined(XP_WIN)
+ return _msize(ptr);
diff --git a/mail/thunderbird-esr/files/patch-mozilla-security-coreconf-FreeBSD.mk b/mail/thunderbird-esr/files/patch-mozilla-security-coreconf-FreeBSD.mk
index dc4e96c7c439..f5a47988bcc5 100644
--- a/mail/thunderbird-esr/files/patch-mozilla-security-coreconf-FreeBSD.mk
+++ b/mail/thunderbird-esr/files/patch-mozilla-security-coreconf-FreeBSD.mk
@@ -1,6 +1,6 @@
--- mozilla/security/coreconf/FreeBSD.mk.orig 2010-02-28 23:30:04.000000000 +0000
+++ mozilla/security/coreconf/FreeBSD.mk 2010-03-03 02:05:22.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/mail/thunderbird-esr/files/patch-mozilla-security-nss-lib-Makefile b/mail/thunderbird-esr/files/patch-mozilla-security-nss-lib-Makefile
new file mode 100644
index 000000000000..195e44014456
--- /dev/null
+++ b/mail/thunderbird-esr/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/mail/thunderbird-esr/files/patch-mozilla-toolkit-library-Makefile.in b/mail/thunderbird-esr/files/patch-mozilla-toolkit-library-Makefile.in
deleted file mode 100644
index f222b6dca9e9..000000000000
--- a/mail/thunderbird-esr/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/mail/thunderbird-esr/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp b/mail/thunderbird-esr/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp
new file mode 100644
index 000000000000..64e61b4ccfa7
--- /dev/null
+++ b/mail/thunderbird-esr/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp
@@ -0,0 +1,11 @@
+--- mozilla/toolkit/xre/nsAppRunner.cpp~
++++ mozilla/toolkit/xre/nsAppRunner.cpp
+@@ -2998,7 +2998,7 @@ XRE_main(int argc, char* argv[], const n
+ gQtOnlyArgv[gQtOnlyArgc] = nsnull;
+ #endif
+ #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/mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsNativeThemeQt.cpp b/mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsNativeThemeQt.cpp
new file mode 100644
index 000000000000..bbd5fb825595
--- /dev/null
+++ b/mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsNativeThemeQt.cpp
@@ -0,0 +1,12 @@
+--- mozilla/widget/src/qt/nsNativeThemeQt.cpp~
++++ mozilla/widget/src/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/mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsSound.cpp b/mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsSound.cpp
new file mode 100644
index 000000000000..d8b82936a718
--- /dev/null
+++ b/mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsSound.cpp
@@ -0,0 +1,10 @@
+--- mozilla/widget/src/qt/nsSound.cpp~
++++ mozilla/widget/src/qt/nsSound.cpp
+@@ -40,6 +40,7 @@
+ #include <QSound>
+
+ #include <string.h>
++#include <unistd.h>
+
+ #include "nscore.h"
+ #include "plstr.h"
diff --git a/mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsWindow.cpp b/mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsWindow.cpp
new file mode 100644
index 000000000000..aa6817839692
--- /dev/null
+++ b/mail/thunderbird-esr/files/patch-mozilla-widget-src-qt-nsWindow.cpp
@@ -0,0 +1,10 @@
+--- mozilla/widget/src/qt/nsWindow.cpp~
++++ mozilla/widget/src/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/mail/thunderbird-esr/files/patch-mozilla-xpcom-base-nsStackWalk.cpp b/mail/thunderbird-esr/files/patch-mozilla-xpcom-base-nsStackWalk.cpp
index 4d2bca2ca692..817014333627 100644
--- a/mail/thunderbird-esr/files/patch-mozilla-xpcom-base-nsStackWalk.cpp
+++ b/mail/thunderbird-esr/files/patch-mozilla-xpcom-base-nsStackWalk.cpp
@@ -8,3 +8,11 @@
#if defined(_WIN32) && (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64)) && !defined(WINCE) // WIN32 x86 stack walking code
+@@ -1123,6 +1123,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/mail/thunderbird-esr/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in b/mail/thunderbird-esr/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in
index e896cec90613..252912459191 100644
--- a/mail/thunderbird-esr/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in
+++ b/mail/thunderbird-esr/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/mail/thunderbird-i18n/Makefile b/mail/thunderbird-i18n/Makefile
index ebcc4fe45b44..5361479271d5 100644
--- a/mail/thunderbird-i18n/Makefile
+++ b/mail/thunderbird-i18n/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= thunderbird-i18n
-PORTVERSION= 13.0.1
+PORTVERSION= 14.0
CATEGORIES= mail
MASTER_SITE_SUBDIR= thunderbird/releases/${PORTVERSION}/linux-i686/xpi
PKGNAMEPREFIX=
@@ -27,7 +27,7 @@ RUN_DEPENDS+= xpi-quick-locale-switcher>=0:${PORTSDIR}/www/xpi-quick-locale-swit
.endif
NO_BUILD= yes
-USE_THUNDERBIRD= 13
+USE_THUNDERBIRD= 14
USE_XPI= thunderbird linux-thunderbird
THUNDERBIRD_I18N_ALL= ar br ca cs da de en-GB en-US es-AR es-ES et eu fi fr \
diff --git a/mail/thunderbird-i18n/distinfo b/mail/thunderbird-i18n/distinfo
index 6db95af221e0..9a0025196bcd 100644
--- a/mail/thunderbird-i18n/distinfo
+++ b/mail/thunderbird-i18n/distinfo
@@ -1,84 +1,84 @@
-SHA256 (xpi/thunderbird-i18n-13.0.1/ar.xpi) = 49b03ea3ae216b8d13f2e062f06ac38d3ce2d6cf196b5b19c06732c8167bed1a
-SIZE (xpi/thunderbird-i18n-13.0.1/ar.xpi) = 464600
-SHA256 (xpi/thunderbird-i18n-13.0.1/br.xpi) = 520e025ab04d6a4bce1240aea85b09b52ab7da8f6677ca10b2b05bdf797363fb
-SIZE (xpi/thunderbird-i18n-13.0.1/br.xpi) = 438441
-SHA256 (xpi/thunderbird-i18n-13.0.1/ca.xpi) = 4d907f21cef8f123c58d667784459dc0fcdcafca75f00ef56aa86843eabc2694
-SIZE (xpi/thunderbird-i18n-13.0.1/ca.xpi) = 438907
-SHA256 (xpi/thunderbird-i18n-13.0.1/cs.xpi) = 94b577286492dcbc90360d43231d996c78253a2b1f3bcf1323df2ff4823f6acd
-SIZE (xpi/thunderbird-i18n-13.0.1/cs.xpi) = 442218
-SHA256 (xpi/thunderbird-i18n-13.0.1/da.xpi) = 0cc862d2d380483dcc0070b054625754198c2b7e47bcbf6b08b1e43ba4e06ef2
-SIZE (xpi/thunderbird-i18n-13.0.1/da.xpi) = 386029
-SHA256 (xpi/thunderbird-i18n-13.0.1/de.xpi) = 98950e7a3a316be8780d5aefe02ddcdf4456540f76c087d3b692f3706acf3b33
-SIZE (xpi/thunderbird-i18n-13.0.1/de.xpi) = 441537
-SHA256 (xpi/thunderbird-i18n-13.0.1/en-GB.xpi) = f555ae053c8861aa96d6b1e39d22322a6f17f6b4aae18062caef57362f3468c0
-SIZE (xpi/thunderbird-i18n-13.0.1/en-GB.xpi) = 413052
-SHA256 (xpi/thunderbird-i18n-13.0.1/en-US.xpi) = 18c09a514dbc07737d6db55d387420b009319af2deff4c3c236820737dfc9f76
-SIZE (xpi/thunderbird-i18n-13.0.1/en-US.xpi) = 412556
-SHA256 (xpi/thunderbird-i18n-13.0.1/es-AR.xpi) = 5bfc35b36a8472d107939ad7c688b9f1a35546e7cd4de197f6be0f2dc024314a
-SIZE (xpi/thunderbird-i18n-13.0.1/es-AR.xpi) = 433356
-SHA256 (xpi/thunderbird-i18n-13.0.1/es-ES.xpi) = e643404531bd49c137027efa3e630d20756c125c42360b8aff58b62a9ff781f2
-SIZE (xpi/thunderbird-i18n-13.0.1/es-ES.xpi) = 372017
-SHA256 (xpi/thunderbird-i18n-13.0.1/et.xpi) = 8316b645906a06dead18f9e9b50407cba06fda0563a3d02847ba80244db93f8b
-SIZE (xpi/thunderbird-i18n-13.0.1/et.xpi) = 433404
-SHA256 (xpi/thunderbird-i18n-13.0.1/eu.xpi) = da7b9c996beb74a63bc8f144858f25df39ce576fc923398c7b3c22154bab6314
-SIZE (xpi/thunderbird-i18n-13.0.1/eu.xpi) = 428885
-SHA256 (xpi/thunderbird-i18n-13.0.1/fi.xpi) = 3f054cebae8de427a88196bced05fd6f3fc94f0a3f639de4ffd2c18f9eaa3c4c
-SIZE (xpi/thunderbird-i18n-13.0.1/fi.xpi) = 434513
-SHA256 (xpi/thunderbird-i18n-13.0.1/fr.xpi) = 765e197921e191ce0708facd29b3d7953554c21ef71a7d3a3a31dc3acac418c8
-SIZE (xpi/thunderbird-i18n-13.0.1/fr.xpi) = 437825
-SHA256 (xpi/thunderbird-i18n-13.0.1/fy-NL.xpi) = 35049723d6c1ab696987c8d2a5726a1c2607489c9658b3c61a37a78bebd14e3f
-SIZE (xpi/thunderbird-i18n-13.0.1/fy-NL.xpi) = 436856
-SHA256 (xpi/thunderbird-i18n-13.0.1/ga-IE.xpi) = 218f0cba1023082c35ebfd982eb7aaaeb21c17cbd11125375cdd488211760b74
-SIZE (xpi/thunderbird-i18n-13.0.1/ga-IE.xpi) = 445906
-SHA256 (xpi/thunderbird-i18n-13.0.1/gd.xpi) = 36591ce169662057e692256b42849d51693c6ef473d69256f7030f1202e91b2f
-SIZE (xpi/thunderbird-i18n-13.0.1/gd.xpi) = 449540
-SHA256 (xpi/thunderbird-i18n-13.0.1/gl.xpi) = b16482165194c46ae89bb112e1d8912db1f07a21943154845b6e95268adb8a6c
-SIZE (xpi/thunderbird-i18n-13.0.1/gl.xpi) = 431836
-SHA256 (xpi/thunderbird-i18n-13.0.1/he.xpi) = 56d0ee32829c0e4eec4bbf979e40311e26a6c3358ea5f84b3eb4bb8d34041e92
-SIZE (xpi/thunderbird-i18n-13.0.1/he.xpi) = 462891
-SHA256 (xpi/thunderbird-i18n-13.0.1/hu.xpi) = df0bb7abe1d9b5b6f5bfbf03037d61f082801d92e820bd7acb1e67ee71e107e4
-SIZE (xpi/thunderbird-i18n-13.0.1/hu.xpi) = 448913
-SHA256 (xpi/thunderbird-i18n-13.0.1/is.xpi) = 61d36431358a0f691508c89b0e38fd17f0ff767489b7ea735d3795c7528cebe3
-SIZE (xpi/thunderbird-i18n-13.0.1/is.xpi) = 435541
-SHA256 (xpi/thunderbird-i18n-13.0.1/it.xpi) = c61b6760fd967029c408c97946959cff325950e9594a1ff13a7953decc369844
-SIZE (xpi/thunderbird-i18n-13.0.1/it.xpi) = 363044
-SHA256 (xpi/thunderbird-i18n-13.0.1/ja.xpi) = 3dda3cdff458abf74edd467dae3e14625a31b2802acda3f079e704928feeac4a
-SIZE (xpi/thunderbird-i18n-13.0.1/ja.xpi) = 485921
-SHA256 (xpi/thunderbird-i18n-13.0.1/ko.xpi) = 68747390f71725ea2fcffd188f9d762d2f9a32044bbc4ee2dab45f77bd4d848e
-SIZE (xpi/thunderbird-i18n-13.0.1/ko.xpi) = 396780
-SHA256 (xpi/thunderbird-i18n-13.0.1/lt.xpi) = e519b6d6ce6a893e33fbe12efee827c08ab0dcb6e603412aae90d3d1eec9890c
-SIZE (xpi/thunderbird-i18n-13.0.1/lt.xpi) = 528697
-SHA256 (xpi/thunderbird-i18n-13.0.1/nb-NO.xpi) = 1cc38ba351d14c19eae3bccf43514b0c378eafe999a00e2ad193fc964bcbf2c5
-SIZE (xpi/thunderbird-i18n-13.0.1/nb-NO.xpi) = 430103
-SHA256 (xpi/thunderbird-i18n-13.0.1/nl.xpi) = a660539714585c26765f107c1fab212a6958eee6625889bb4262d08adba1d117
-SIZE (xpi/thunderbird-i18n-13.0.1/nl.xpi) = 430442
-SHA256 (xpi/thunderbird-i18n-13.0.1/nn-NO.xpi) = 41bfe84c379ebfb848d609c768c127de4c41a4994d4207466d637f475a198c68
-SIZE (xpi/thunderbird-i18n-13.0.1/nn-NO.xpi) = 432244
-SHA256 (xpi/thunderbird-i18n-13.0.1/pl.xpi) = 1e0d2be8b80e0a48c8cc759aef6affad7455e3abbfb4ef9f41902d815722a023
-SIZE (xpi/thunderbird-i18n-13.0.1/pl.xpi) = 411543
-SHA256 (xpi/thunderbird-i18n-13.0.1/pt-BR.xpi) = 7724489eaba56aaa6b1fc95561f5c028e679813c918a39d4e9ddbc773e21f7ed
-SIZE (xpi/thunderbird-i18n-13.0.1/pt-BR.xpi) = 440128
-SHA256 (xpi/thunderbird-i18n-13.0.1/pt-PT.xpi) = 666db898090397fbcecd737dc272b099114f54105102929b2e8a28289fd6ad85
-SIZE (xpi/thunderbird-i18n-13.0.1/pt-PT.xpi) = 437092
-SHA256 (xpi/thunderbird-i18n-13.0.1/rm.xpi) = dd6b8461a0d55dd3a9eaa85e65a5a97bfdfc7b48640d2570e90b933ec8e2beea
-SIZE (xpi/thunderbird-i18n-13.0.1/rm.xpi) = 437475
-SHA256 (xpi/thunderbird-i18n-13.0.1/ru.xpi) = 93f05f86752702a18003dab2cc54ac73361a7d8671d5e0c9efde068ad840deb4
-SIZE (xpi/thunderbird-i18n-13.0.1/ru.xpi) = 430597
-SHA256 (xpi/thunderbird-i18n-13.0.1/si.xpi) = f1faa45d947133cfcb324e429ece68be3a5c5fb698fd2c9cbda775f6f1e3e3f6
-SIZE (xpi/thunderbird-i18n-13.0.1/si.xpi) = 480817
-SHA256 (xpi/thunderbird-i18n-13.0.1/sk.xpi) = 4d9729ee737251949f65aa66142f9bb475d5c3388e810f5000df7d36f83bfcf4
-SIZE (xpi/thunderbird-i18n-13.0.1/sk.xpi) = 449078
-SHA256 (xpi/thunderbird-i18n-13.0.1/sl.xpi) = b39f695a34984c8d45962fb52567663c95af18f4488139aa56866b73d0c5c69c
-SIZE (xpi/thunderbird-i18n-13.0.1/sl.xpi) = 433152
-SHA256 (xpi/thunderbird-i18n-13.0.1/sq.xpi) = 199bac5070f170803959096313504e26e545d8f40b51d998895f8e3173a9244e
-SIZE (xpi/thunderbird-i18n-13.0.1/sq.xpi) = 384120
-SHA256 (xpi/thunderbird-i18n-13.0.1/sv-SE.xpi) = ba1d1f9bc1dc0ff32a725fcce1ee8277b56c871f2adf6514b93176a57efc20b1
-SIZE (xpi/thunderbird-i18n-13.0.1/sv-SE.xpi) = 501341
-SHA256 (xpi/thunderbird-i18n-13.0.1/ta-LK.xpi) = 447c27407c55307958fbc6f732a3841bcca64b69f79545807b5c55050dd363dd
-SIZE (xpi/thunderbird-i18n-13.0.1/ta-LK.xpi) = 499173
-SHA256 (xpi/thunderbird-i18n-13.0.1/tr.xpi) = 5d8db2a902b8cfe7671128985400b255b722a03d5e3d7179172a750eb8fbc041
-SIZE (xpi/thunderbird-i18n-13.0.1/tr.xpi) = 440499
-SHA256 (xpi/thunderbird-i18n-13.0.1/uk.xpi) = d754b7daf2c6c2f0b5932b477eeef746bc323b935f43c7216beb630303177714
-SIZE (xpi/thunderbird-i18n-13.0.1/uk.xpi) = 487737
-SHA256 (xpi/thunderbird-i18n-13.0.1/zh-TW.xpi) = dabb72384cb9f83cf448901f5cde7e425ff6102e422a08298cd5d680816c05d1
-SIZE (xpi/thunderbird-i18n-13.0.1/zh-TW.xpi) = 456145
+SHA256 (xpi/thunderbird-i18n-14.0/ar.xpi) = 97ca912e205e6096c4ae6955e805be2c237a3537e2d4118184cb8452bcbd6c19
+SIZE (xpi/thunderbird-i18n-14.0/ar.xpi) = 468471
+SHA256 (xpi/thunderbird-i18n-14.0/br.xpi) = f82b5b8ba3505eae9d92a627a5c9f4fed4c694e1a9ea35a43e2821f88deb67c2
+SIZE (xpi/thunderbird-i18n-14.0/br.xpi) = 441402
+SHA256 (xpi/thunderbird-i18n-14.0/ca.xpi) = c18fba9e0bf9248a7ef174b2954215623bc8157a8f6c33694dd6565b0a24d54d
+SIZE (xpi/thunderbird-i18n-14.0/ca.xpi) = 441959
+SHA256 (xpi/thunderbird-i18n-14.0/cs.xpi) = 57645fdec1175a807f6ea5bd8faf3f019b50baddb42c69ab59202ab37ba28b5e
+SIZE (xpi/thunderbird-i18n-14.0/cs.xpi) = 445223
+SHA256 (xpi/thunderbird-i18n-14.0/da.xpi) = 675e54e1b89d8b791a2a0723eaab370679da18048167d6fc7a46311843974d02
+SIZE (xpi/thunderbird-i18n-14.0/da.xpi) = 388981
+SHA256 (xpi/thunderbird-i18n-14.0/de.xpi) = e4bbcd8316e4a0578f2417747c3e058e064a34c681ae0444756daf0b2abd1e5e
+SIZE (xpi/thunderbird-i18n-14.0/de.xpi) = 444537
+SHA256 (xpi/thunderbird-i18n-14.0/en-GB.xpi) = a05380eeb102402acea8eea83e0e248e9735fe3296b8a78ac57c42e3acc5eb7d
+SIZE (xpi/thunderbird-i18n-14.0/en-GB.xpi) = 415845
+SHA256 (xpi/thunderbird-i18n-14.0/en-US.xpi) = be0cf753b15f519d9b2f27706c9efd67c8e8365e82ee4d97a9782107fa2930ee
+SIZE (xpi/thunderbird-i18n-14.0/en-US.xpi) = 415339
+SHA256 (xpi/thunderbird-i18n-14.0/es-AR.xpi) = 4cd51236f68d9f779a8a7d6fd3c00e8396a8c0c3347b8b5f75e5ffea485b3020
+SIZE (xpi/thunderbird-i18n-14.0/es-AR.xpi) = 435596
+SHA256 (xpi/thunderbird-i18n-14.0/es-ES.xpi) = ea8d686cf8defd60f40c328e19631e5389ee44244c1f6e9016ab9768ee30b214
+SIZE (xpi/thunderbird-i18n-14.0/es-ES.xpi) = 374376
+SHA256 (xpi/thunderbird-i18n-14.0/et.xpi) = 14d0613bb7c92b90d9d9c52681695de143bfd056e0a93f037393122fe12680bb
+SIZE (xpi/thunderbird-i18n-14.0/et.xpi) = 436427
+SHA256 (xpi/thunderbird-i18n-14.0/eu.xpi) = 3adf7b7ef6223c4849bf243cc1a4a65e2a526a37df2221971f692394abc0302e
+SIZE (xpi/thunderbird-i18n-14.0/eu.xpi) = 431890
+SHA256 (xpi/thunderbird-i18n-14.0/fi.xpi) = 78d1950534ce69ba4006f500ba67ca308383223209210e5c0ad4280ce47ccdbe
+SIZE (xpi/thunderbird-i18n-14.0/fi.xpi) = 437544
+SHA256 (xpi/thunderbird-i18n-14.0/fr.xpi) = c7b0badc57954f834582024c5c8b8af56de8c40ec80e6f3fecadd842a3d62dae
+SIZE (xpi/thunderbird-i18n-14.0/fr.xpi) = 440943
+SHA256 (xpi/thunderbird-i18n-14.0/fy-NL.xpi) = 5df1411b90c95ade19ba3c2da4263fe21d80ba510e264a356ac01a7210c444fd
+SIZE (xpi/thunderbird-i18n-14.0/fy-NL.xpi) = 440194
+SHA256 (xpi/thunderbird-i18n-14.0/ga-IE.xpi) = 8cd0945fc4aa3ac24d795afdda51776bdf9cfdd4fc5431ebcf1a66e1a90e6ef4
+SIZE (xpi/thunderbird-i18n-14.0/ga-IE.xpi) = 449246
+SHA256 (xpi/thunderbird-i18n-14.0/gd.xpi) = a1f3597796e005485d09bb38d86855b4fb84c9e54b7f04daffba59c8aec1f408
+SIZE (xpi/thunderbird-i18n-14.0/gd.xpi) = 452703
+SHA256 (xpi/thunderbird-i18n-14.0/gl.xpi) = a223d853fc33f9d630d6d3b602b1c7dc7ff3775b9bcb3ac5a6975a0a3951c76b
+SIZE (xpi/thunderbird-i18n-14.0/gl.xpi) = 434802
+SHA256 (xpi/thunderbird-i18n-14.0/he.xpi) = aa7b6af605712a6199e0651ed9bfb34c1c6d96a96fbab9527592b8ca9125efa4
+SIZE (xpi/thunderbird-i18n-14.0/he.xpi) = 466181
+SHA256 (xpi/thunderbird-i18n-14.0/hu.xpi) = 827896aa8d3452974858dad400aa61d7edcdb88ca26411ccfa293b59f1e04be4
+SIZE (xpi/thunderbird-i18n-14.0/hu.xpi) = 453028
+SHA256 (xpi/thunderbird-i18n-14.0/is.xpi) = e3101d02e79122a7573ea5da1a0af51e306f6996e3e12a4f6da1c590d6ac3826
+SIZE (xpi/thunderbird-i18n-14.0/is.xpi) = 438431
+SHA256 (xpi/thunderbird-i18n-14.0/it.xpi) = ebea4142a48a7ca1dbc178ff91d6172c4af1be25c2279a41636dfb32d64ea76a
+SIZE (xpi/thunderbird-i18n-14.0/it.xpi) = 365345
+SHA256 (xpi/thunderbird-i18n-14.0/ja.xpi) = 2a74ee1670634290b648ebe897bc2f27a29c024ea35500125283d4a068d0437f
+SIZE (xpi/thunderbird-i18n-14.0/ja.xpi) = 490107
+SHA256 (xpi/thunderbird-i18n-14.0/ko.xpi) = 817db00cc9870885a5d0ca1f7bb6a2739cd5ac3ee3b00b39a6100d479b327d37
+SIZE (xpi/thunderbird-i18n-14.0/ko.xpi) = 399787
+SHA256 (xpi/thunderbird-i18n-14.0/lt.xpi) = b0c3fbc2b30b54ebea79e53d170a5b01870512a1d21b8b3ad8beb2240c8b7cda
+SIZE (xpi/thunderbird-i18n-14.0/lt.xpi) = 528818
+SHA256 (xpi/thunderbird-i18n-14.0/nb-NO.xpi) = e0663f24db9cc6eafb2a1dec93e8ac376bdf0ad35e75eea19bc0eb6062d58e43
+SIZE (xpi/thunderbird-i18n-14.0/nb-NO.xpi) = 433122
+SHA256 (xpi/thunderbird-i18n-14.0/nl.xpi) = ac0bf170175530b1f6c8bd3c5f4dcaef76e82a17fbef31821c66b203b0caf52c
+SIZE (xpi/thunderbird-i18n-14.0/nl.xpi) = 433399
+SHA256 (xpi/thunderbird-i18n-14.0/nn-NO.xpi) = 1f8b59432035722493b5bcaa5169dc50a4f83cd451522ab8d9f57982b54aee67
+SIZE (xpi/thunderbird-i18n-14.0/nn-NO.xpi) = 434946
+SHA256 (xpi/thunderbird-i18n-14.0/pl.xpi) = a0851e2cecdb4d7c80e04e6456c2f8798bd48aee981fa31371298612513aef74
+SIZE (xpi/thunderbird-i18n-14.0/pl.xpi) = 414643
+SHA256 (xpi/thunderbird-i18n-14.0/pt-BR.xpi) = 0c2c0cc99e46d7422f1fe8890112274493fd06c39c714fc942bda9d78fb0b9fd
+SIZE (xpi/thunderbird-i18n-14.0/pt-BR.xpi) = 439531
+SHA256 (xpi/thunderbird-i18n-14.0/pt-PT.xpi) = d36ebd12aa11287f263bab13559ad0312f495b5fca176a5dcac3665045b9c662
+SIZE (xpi/thunderbird-i18n-14.0/pt-PT.xpi) = 440166
+SHA256 (xpi/thunderbird-i18n-14.0/rm.xpi) = 31d62ad2f849e86c02f6b976a7fc0505818478d93a25a5bdc06077a8053269cb
+SIZE (xpi/thunderbird-i18n-14.0/rm.xpi) = 440423
+SHA256 (xpi/thunderbird-i18n-14.0/ru.xpi) = 2dd885e994802347c64df1c2680ada45a97190adb3e0be2b5a1b0fe52d54d3d1
+SIZE (xpi/thunderbird-i18n-14.0/ru.xpi) = 432767
+SHA256 (xpi/thunderbird-i18n-14.0/si.xpi) = cb2ca9f90bbee71e55d1465a39923c01d7672d036f4c6b8ee9089316cfcb6967
+SIZE (xpi/thunderbird-i18n-14.0/si.xpi) = 484240
+SHA256 (xpi/thunderbird-i18n-14.0/sk.xpi) = 135874a448ed464845641b778e6ee54cc8239dd8de49d58277bbc15c30dc23c6
+SIZE (xpi/thunderbird-i18n-14.0/sk.xpi) = 452407
+SHA256 (xpi/thunderbird-i18n-14.0/sl.xpi) = ecf0baaabbe15bd88b54bd067b8275fdbb8b75936cf4eaa33b2a4603faec3014
+SIZE (xpi/thunderbird-i18n-14.0/sl.xpi) = 436385
+SHA256 (xpi/thunderbird-i18n-14.0/sq.xpi) = d58f9943763ab94c59f2a866d02902124e44612f0e3adfeab3e301b4137d4e1a
+SIZE (xpi/thunderbird-i18n-14.0/sq.xpi) = 387214
+SHA256 (xpi/thunderbird-i18n-14.0/sv-SE.xpi) = 46e606ea9d031cdcfcda9c1f88b0ba48931077e1d45e5aac512ea531076c1c3b
+SIZE (xpi/thunderbird-i18n-14.0/sv-SE.xpi) = 504695
+SHA256 (xpi/thunderbird-i18n-14.0/ta-LK.xpi) = b5c72866cfcc11de14a56c7a5a1148d18a5a91a43ad7f5202480feffdf21f41a
+SIZE (xpi/thunderbird-i18n-14.0/ta-LK.xpi) = 502497
+SHA256 (xpi/thunderbird-i18n-14.0/tr.xpi) = f91888dfa88b762e759af39d7a6c6fff6ea655d826d90d1db67ba30a77b09ea8
+SIZE (xpi/thunderbird-i18n-14.0/tr.xpi) = 443834
+SHA256 (xpi/thunderbird-i18n-14.0/uk.xpi) = 97c8a688974674358a05c35ed7ed2f8b5d8697a900258880b8900b81444792fd
+SIZE (xpi/thunderbird-i18n-14.0/uk.xpi) = 489571
+SHA256 (xpi/thunderbird-i18n-14.0/zh-TW.xpi) = 5be294dee80052dfec68eb31cdc93a256452a3d8a6694de6276966706fecdb41
+SIZE (xpi/thunderbird-i18n-14.0/zh-TW.xpi) = 459396
diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile
index 4fd24fd227f5..9695b317d753 100644
--- a/mail/thunderbird/Makefile
+++ b/mail/thunderbird/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= thunderbird
-DISTVERSION= 13.0.1
+DISTVERSION= 14.0
CATEGORIES= mail ipv6
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${DISTVERSION}/source
@@ -16,38 +16,33 @@ MAINTAINER= gecko@FreeBSD.org
COMMENT= Mozilla Thunderbird is standalone mail and news that stands above
BUILD_DEPENDS= nspr>=4.9:${PORTSDIR}/devel/nspr \
+ nss>=3.13.2:${PORTSDIR}/security/nss \
+ sqlite3>=3.7.11:${PORTSDIR}/databases/sqlite3 \
cairo>=1.10.2_1,1:${PORTSDIR}/graphics/cairo \
unzip:${PORTSDIR}/archivers/unzip
-LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo \
- event-1.4:${PORTSDIR}/devel/libevent
CONFLICTS_BUILD= spidermonkey-*
-USE_AUTOTOOLS= autoconf213
+USE_AUTOTOOLS= autoconf213:env
USE_GECKO= gecko
CONFLICTS= thunderbird-10.*
-USE_MOZILLA= -png -nss -dbm -jpeg -xft
-MOZ_TOOLKIT= cairo-gtk2
+USE_MOZILLA= # empty
MAKE_JOBS_SAFE= yes
WANT_GNOME= yes
+USE_QT4= # empty
+QT_NONSTANDARD= yes
ALL_TARGET= default
-CONFIGURE_ENV= LOCALBASE=${LOCALBASE}
-MAKE_ENV= PTHREAD_LDFLAGS="${PTHREAD_LIBS}"
-EXTRA_CFLAGS= -O0
-HAS_CONFIGURE= yes
+GNU_CONFIGURE= yes
+OBJDIR_BUILD= yes
USE_BZIP2= yes
USE_GMAKE= yes
USE_GL= gl
MOZ_PROTOCOLS= http,ftp,file,viewsource,res,data,wyciwyg,websocket
-MOZ_GRAPHICS= default,-xbm
MOZ_OPTIONS= --program-transform-name='s/thunderbird/${MOZILLA}/' \
- --with-default-mozilla-five-home=${PREFIX}/lib/${MOZILLA} \
--enable-single-profile --disable-profilesharing \
- --enable-application=mail --enable-official-branding \
- --disable-updater --disable-necko-wifi \
- --with-system-libevent=${LOCALBASE}
+ --enable-application=mail --enable-official-branding
MOZ_MK_OPTIONS= MOZ_MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1
MOZ_EXPORT= MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1
MOZ_PKGCONFIG_FILES=
@@ -58,45 +53,38 @@ PORTNAME_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default48.png
SYSTEM_PREFS= ${FAKEDIR}/lib/${PORTNAME}/defaults/pref/${PORTNAME}.js
MOZ_PIS_SCRIPTS=moz_pis_S50cleanhome
-OPTIONS= LIGHTNING "Enable calendar extension" off
+OPTIONS_DEFINE= GSTREAMER LIGHTNING
+.include "${.CURDIR}/../../www/firefox/Makefile.options"
.include <bsd.port.pre.mk>
WRKSRC= ${WRKDIR}/comm-release
MOZSRC:= ${WRKSRC}/mozilla
-.if ${ARCH} == powerpc64
+.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
-CONFIGURE_ENV+= UNAME_m="powerpc64"
+MOZ_EXPORT+= UNAME_m="powerpc64"
CFLAGS+= -mminimal-toc
.endif
.endif
-.if ${HAVE_GNOME:Mlibgnomeui}!=""
-USE_GNOME+= libgnomeui
-MOZ_OPTIONS+= --enable-gnomeui
-.else
-MOZ_OPTIONS+= --disable-gnomeui
-.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@thunderbird.mozilla.org
@@ -109,22 +97,8 @@ post-extract:
<${FILESDIR}/thunderbird.desktop.in >${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop
post-patch:
- @${GREP} -Flr \"/proc ${MOZSRC}/ipc/chromium/src/base | ${XARGS} ${REINPLACE_CMD} \
- -e 's|/proc/self/fd|/dev/fd|' \
- -e 's|/proc["/]|/compat/linux&|'
- @${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}|' \
- ${MOZSRC}/security/manager/ssl/src/Makefile.in \
- ${MOZSRC}/js/src/config/mkdepend/Makefile.in \
- ${MOZSRC}/js/src/config/config.mk
- @${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' \
- ${MOZSRC}/js/src/configure
+ @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ ${WRKSRC}/mail/app/nsMailApp.cpp
pre-configure:
(cd ${WRKSRC} && ${AUTOCONF})
@@ -143,7 +117,7 @@ post-install:
${MKDIR} ${PREFIX}/share/applications
${INSTALL_DATA} ${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop ${PREFIX}/share/applications
${LN} -sf ${PORTNAME_ICON_SRC} ${PREFIX}/share/pixmaps/${PORTNAME_ICON}
-.if defined(WITH_LIGHTNING)
+.if ${PORT_OPTIONS:MLIGHTNING}
@${MKDIR} ${XPI_LIBDIR}/${XPI_ID} ${XPI_LIBDIR}/symlinks/thunderbird
@(cd ${XPI_LIBDIR}/${XPI_ID}; ${TAR} -xf ${XPI_FILE})
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${XPI_LIBDIR}/${XPI_ID}
diff --git a/mail/thunderbird/distinfo b/mail/thunderbird/distinfo
index 934b6c455acc..603e0620591c 100644
--- a/mail/thunderbird/distinfo
+++ b/mail/thunderbird/distinfo
@@ -1,2 +1,2 @@
-SHA256 (thunderbird-13.0.1.source.tar.bz2) = 5696620746cf440c327aeedea428d24d513603a651a4edda02ae0072036ac434
-SIZE (thunderbird-13.0.1.source.tar.bz2) = 102705807
+SHA256 (thunderbird-14.0.source.tar.bz2) = 29225e82c1dce9d44d1b81cf0441749ef8fc4168291cc75bcbcfe9b930f10c3a
+SIZE (thunderbird-14.0.source.tar.bz2) = 105235591
diff --git a/mail/thunderbird/files/patch-alsapulse b/mail/thunderbird/files/patch-alsapulse
new file mode 100644
index 000000000000..7851f7348511
--- /dev/null
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-bug685258 b/mail/thunderbird/files/patch-bug685258
new file mode 100644
index 000000000000..cac425d6adba
--- /dev/null
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-bug753046 b/mail/thunderbird/files/patch-bug753046
new file mode 100644
index 000000000000..16b3d832490c
--- /dev/null
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-bugzilla-736961 b/mail/thunderbird/files/patch-bugzilla-736961
deleted file mode 100644
index 2b5a8cc9ae29..000000000000
--- a/mail/thunderbird/files/patch-bugzilla-736961
+++ /dev/null
@@ -1,111 +0,0 @@
---- mozilla/config/rules.mk.orig Wed May 2 05:16:35 2012
-+++ mozilla/config/rules.mk Fri May 11 08:42:50 2012
-@@ -1479,7 +1487,7 @@ $(XPIDL_GEN_DIR)/%.h: %.idl $(XPIDL_DEPS) $(XPIDL_GEN_
- $(PYTHON_PATH) \
- -I$(topsrcdir)/other-licenses/ply \
- -I$(topsrcdir)/xpcom/idl-parser \
-- $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
-+ $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
- @if test -n "$(findstring $*.h, $(EXPORTS))"; \
- then echo "*** WARNING: file $*.h generated from $*.idl overrides $(srcdir)/$*.h"; else true; fi
-
-@@ -1492,7 +1500,7 @@ $(XPIDL_GEN_DIR)/%.xpt: %.idl $(XPIDL_DEPS) $(XPIDL_GE
- -I$(topsrcdir)/other-licenses/ply \
- -I$(topsrcdir)/xpcom/idl-parser \
- -I$(topsrcdir)/xpcom/typelib/xpt/tools \
-- $(topsrcdir)/xpcom/idl-parser/typelib.py --cachedir=$(DEPTH)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
-+ $(topsrcdir)/xpcom/idl-parser/typelib.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
-
- # no need to link together if XPIDLSRCS contains only XPIDL_MODULE
- ifneq ($(XPIDL_MODULE).idl,$(strip $(XPIDLSRCS)))
---- mozilla/js/src/config/rules.mk.orig Fri May 11 08:42:57 2012
-+++ mozilla/js/src/config/rules.mk Fri May 11 08:43:15 2012
-@@ -1479,7 +1479,7 @@ $(XPIDL_GEN_DIR)/%.h: %.idl $(XPIDL_DEPS) $(XPIDL_GEN_
- $(PYTHON_PATH) \
- -I$(topsrcdir)/other-licenses/ply \
- -I$(topsrcdir)/xpcom/idl-parser \
-- $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
-+ $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
- @if test -n "$(findstring $*.h, $(EXPORTS))"; \
- then echo "*** WARNING: file $*.h generated from $*.idl overrides $(srcdir)/$*.h"; else true; fi
-
-@@ -1492,7 +1492,7 @@ $(XPIDL_GEN_DIR)/%.xpt: %.idl $(XPIDL_DEPS) $(XPIDL_GE
- -I$(topsrcdir)/other-licenses/ply \
- -I$(topsrcdir)/xpcom/idl-parser \
- -I$(topsrcdir)/xpcom/typelib/xpt/tools \
-- $(topsrcdir)/xpcom/idl-parser/typelib.py --cachedir=$(DEPTH)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
-+ $(topsrcdir)/xpcom/idl-parser/typelib.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
-
- # no need to link together if XPIDLSRCS contains only XPIDL_MODULE
- ifneq ($(XPIDL_MODULE).idl,$(strip $(XPIDLSRCS)))
---- mozilla/js/xpconnect/src/Makefile.in.orig Fri May 11 08:43:27 2012
-+++ mozilla/js/xpconnect/src/Makefile.in Fri May 11 08:44:03 2012
-@@ -151,7 +151,7 @@ dom_quickstubs.cpp: $(srcdir)/dom_quickstubs.qsconf \
- -I$(topsrcdir)/xpcom/idl-parser \
- $(srcdir)/qsgen.py \
- --idlpath=$(DEPTH)/dist/idl \
-- --cachedir=$(DEPTH)/xpcom/idl-parser \
-+ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \
- --header-output dom_quickstubs.h \
- --stub-output dom_quickstubs.cpp \
- --makedepend-output $(MDDEPDIR)/dom_qsgen.pp \
-@@ -172,7 +172,7 @@ dombindings_gen.h: $(srcdir)/dombindings.conf \
- -I$(topsrcdir)/xpcom/idl-parser \
- $(srcdir)/dombindingsgen.py \
- --idlpath=$(DEPTH)/dist/idl \
-- --cachedir=$(DEPTH)/xpcom/idl-parser \
-+ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \
- --header-output dombindings_gen.h \
- $(srcdir)/dombindings.conf
-
-@@ -189,7 +189,7 @@ dombindings_gen.cpp: $(srcdir)/dombindings.conf \
- -I$(topsrcdir)/xpcom/idl-parser \
- $(srcdir)/dombindingsgen.py \
- --idlpath=$(DEPTH)/dist/idl \
-- --cachedir=$(DEPTH)/xpcom/idl-parser \
-+ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \
- --stub-output dombindings_gen.cpp \
- --makedepend-output $(MDDEPDIR)/dombindingsgen.pp \
- $(srcdir)/dombindings.conf
-@@ -208,7 +208,7 @@ DictionaryHelpers.h: $(srcdir)/dictionary_helper_gen.c
- -I$(topsrcdir)/xpcom/idl-parser \
- $(srcdir)/dictionary_helper_gen.py \
- -I $(DEPTH)/dist/idl \
-- --cachedir=$(DEPTH)/xpcom/idl-parser \
-+ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \
- --header-output DictionaryHelpers.h \
- $(srcdir)/dictionary_helper_gen.conf
-
-@@ -223,7 +223,7 @@ DictionaryHelpers.cpp: $(srcdir)/dictionary_helper_gen
- -I$(topsrcdir)/xpcom/idl-parser \
- $(srcdir)/dictionary_helper_gen.py \
- -I $(DEPTH)/dist/idl \
-- --cachedir=$(DEPTH)/xpcom/idl-parser \
-+ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \
- --header-output DictionaryHelpers.h \
- --stub-output DictionaryHelpers.cpp \
- --makedepend-output $(MDDEPDIR)/dictionary_helper_gen.pp \
---- mozilla/xpcom/idl-parser/Makefile.in.orig Fri May 11 08:44:10 2012
-+++ mozilla/xpcom/idl-parser/Makefile.in Fri May 11 08:44:29 2012
-@@ -61,7 +61,7 @@ export:: $(PARSER_SRCS) $(PLY_PROGS)
- $(PYTHON_PATH) \
- -I$(topsrcdir)/other-licenses/ply \
- -I$(topsrcdir)/xpcom/idl-parser \
-- $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=. --regen
-+ $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache --regen
-
- check::
- $(PYTHON_PATH) \
---- mozilla/xpcom/typelib/xpidl/Makefile.in.orig Fri May 11 08:44:51 2012
-+++ mozilla/xpcom/typelib/xpidl/Makefile.in Fri May 11 08:45:09 2012
-@@ -48,8 +48,8 @@ SDK_BINARY = \
- $(topsrcdir)/xpcom/idl-parser/xpidl.py \
- $(topsrcdir)/xpcom/idl-parser/header.py \
- $(topsrcdir)/xpcom/idl-parser/typelib.py \
-- $(DEPTH)/xpcom/idl-parser/xpidllex.py \
-- $(DEPTH)/xpcom/idl-parser/xpidlyacc.py \
-+ $(DEPTH)/xpcom/idl-parser/cache/xpidllex.py \
-+ $(DEPTH)/xpcom/idl-parser/cache/xpidlyacc.py \
- $(NULL)
-
- ifndef MOZ_SYSTEM_PLY
diff --git a/mail/thunderbird/files/patch-configure.in b/mail/thunderbird/files/patch-configure.in
deleted file mode 100644
index 4e91d33a273a..000000000000
--- a/mail/thunderbird/files/patch-configure.in
+++ /dev/null
@@ -1,112 +0,0 @@
---- configure.in.orig 2011-12-19 14:48:06.000000000 +0100
-+++ configure.in 2011-12-19 15:51:19.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/mail/thunderbird/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc b/mail/thunderbird/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc
deleted file mode 100644
index ffb56ac25100..000000000000
--- a/mail/thunderbird/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/mail/thunderbird/files/patch-ipc-chromium-src-base-file_util_linux.cc b/mail/thunderbird/files/patch-ipc-chromium-src-base-file_util_linux.cc
deleted file mode 100644
index d0cc3b14e68b..000000000000
--- a/mail/thunderbird/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/mail/thunderbird/files/patch-ipc-chromium-src-base-file_util_posix.cc b/mail/thunderbird/files/patch-ipc-chromium-src-base-file_util_posix.cc
deleted file mode 100644
index 3c722016e77b..000000000000
--- a/mail/thunderbird/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/mail/thunderbird/files/patch-ipc-chromium-src-base-platform_file_posix.cc b/mail/thunderbird/files/patch-ipc-chromium-src-base-platform_file_posix.cc
deleted file mode 100644
index 14e333ca339b..000000000000
--- a/mail/thunderbird/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/mail/thunderbird/files/patch-ipc-chromium-src-base-platform_thread_posix.cc b/mail/thunderbird/files/patch-ipc-chromium-src-base-platform_thread_posix.cc
deleted file mode 100644
index 3445b281bc48..000000000000
--- a/mail/thunderbird/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/mail/thunderbird/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h b/mail/thunderbird/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h
deleted file mode 100644
index ca7b24fa4860..000000000000
--- a/mail/thunderbird/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/mail/thunderbird/files/patch-ipc-chromium-src-build-build_config.h b/mail/thunderbird/files/patch-ipc-chromium-src-build-build_config.h
deleted file mode 100644
index e7540d38eceb..000000000000
--- a/mail/thunderbird/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/mail/thunderbird/files/patch-ldap-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in b/mail/thunderbird/files/patch-ldap-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in
new file mode 100644
index 000000000000..4ec8205074ee
--- /dev/null
+++ b/mail/thunderbird/files/patch-ldap-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in
@@ -0,0 +1,12 @@
+--- ldap/sdks/c-sdk/ldap/libraries/libssldap/Makefile.in~
++++ ldap/sdks/c-sdk/ldap/libraries/libssldap/Makefile.in
+@@ -188,6 +188,9 @@ endif
+
+ OBJDEST = $(OBJDIR_NAME)
+
++# accept -pthread with MOZ_NATIVE_NSS
++LINK_DLL = $(CC_FOR_LINK) -shared -o $@ $(OBJS) $(EXTRA_DLL_LIBS)
++
+ ###########################################################################
+
+ ifeq ($(USE_DLL_EXPORTS_FILE), 1)
diff --git a/mail/thunderbird/files/patch-mail-app-Makefile.in b/mail/thunderbird/files/patch-mail-app-Makefile.in
deleted file mode 100644
index 237c8147bd27..000000000000
--- a/mail/thunderbird/files/patch-mail-app-Makefile.in
+++ /dev/null
@@ -1,254 +0,0 @@
---- mail/app/Makefile.in 2012-06-01 19:11:49.000000000 +0200
-+++ /usr/ports/mail/thunderbird/work/comm-release/mail/app/Makefile.in 2012-04-28 21:31:30.000000000 +0200
-@@ -47,6 +47,13 @@
- GRE_MILESTONE = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
- GRE_BUILDID = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
-
-+DEFINES += \
-+ -DTHUNDERBIRD_ICO=\"$(DIST)/branding/thunderbird.ico\" \
-+ -DAB_CD=$(AB_CD) \
-+ -DGRE_MILESTONE=$(GRE_MILESTONE) \
-+ -DGRE_BUILDID=$(GRE_BUILDID) \
-+ $(NULL)
-+
- MOZ_SOURCE_STAMP = $(firstword $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null))
- ifdef MOZ_SOURCE_STAMP
- DEFINES += -DMOZ_SOURCE_STAMP="$(MOZ_SOURCE_STAMP)"
-@@ -58,30 +65,26 @@
- endif
-
- ifdef MOZILLA_OFFICIAL
--DEFINES += -DMOZILLA_OFFICIAL
-+DEFINES += -DOFFICIAL_BUILD=1
- endif
-
- DIRS = profile
-
-+GARBAGE += \
-+ $(FINAL_TARGET)/license.html \
-+ $(NULL)
-+
- PREF_JS_EXPORTS = \
- $(srcdir)/profile/all-thunderbird.js \
- $(srcdir)/profile/channel-prefs.js \
- $(NULL)
-
--DEFINES += \
-- -DAB_CD=$(AB_CD) \
-- -DAPP_VERSION="$(MOZ_APP_VERSION)" \
-- -DTHUNDERBIRD_ICO=\"$(DIST)/branding/thunderbird.ico\" \
-- -DGRE_MILESTONE=$(GRE_MILESTONE) \
-- -DGRE_BUILDID=$(GRE_BUILDID) \
-- $(NULL)
--
--ifdef LIBXUL_SDK
--include $(topsrcdir)/config/rules.mk
-+ifneq (,$(filter OS2 Darwin WINNT,$(OS_ARCH)))
-+PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX)
- else
--# Build a binary bootstrapping with XRE_main
-+PROGRAM = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
-+endif
-
--PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX)
-
- CPPSRCS = nsMailApp.cpp
-
-@@ -96,13 +99,21 @@
- DEFINES += -DXPCOM_GLUE
- STL_FLAGS=
-
-+ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
-+TK_LIBS := -framework Cocoa $(TK_LIBS)
-+endif
-+
- LIBS += \
- $(EXTRA_DSO_LIBS) \
- $(XPCOM_STANDALONE_GLUE_LDOPTS) \
- $(NULL)
-
--ifdef MOZ_LINKER
--LIBS += $(ZLIB_LIBS)
-+ifdef MOZ_JPROF
-+LIBS += -ljprof
-+endif
-+
-+ifdef MOZ_ENABLE_DBUS
-+LIBS += $(MOZ_DBUS_GLIB_LIBS)
- endif
-
- ifndef MOZ_WINCONSOLE
-@@ -136,6 +147,8 @@
-
- GARBAGE += write-message.ico address-book.ico
-
-+OS_LIBS += $(call EXPAND_LIBNAME,comctl32 comdlg32 uuid shell32 ole32 oleaut32 version winspool)
-+OS_LIBS += $(call EXPAND_LIBNAME,usp10 msimg32)
- RCINCLUDE = splash.rc
- ifndef GNU_CC
- RCFLAGS += -DMOZ_THUNDERBIRD -I$(srcdir)
-@@ -147,11 +160,25 @@
- ifeq ($(OS_ARCH),OS2)
- RESFILE=splashos2.res
- RCFLAGS += -DMOZ_THUNDERBIRD
-+ifdef DEBUG
-+RCFLAGS += -DDEBUG
-+endif
- RCFLAGS += -DTHUNDERBIRD_ICO=\"$(DIST)/branding/thunderbird.ico\"
- endif
-
- include $(topsrcdir)/config/rules.mk
-
-+ifdef MOZILLA_OFFICIAL
-+DEFINES += -DMOZILLA_OFFICIAL
-+endif
-+
-+APP_UA_NAME = $(shell echo $(MOZ_APP_DISPLAYNAME) | sed -e's/[^A-Za-z]//g')
-+DEFINES += -DAPP_VERSION="$(MOZ_APP_VERSION)" -DAPP_UA_NAME="$(APP_UA_NAME)"
-+
-+ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
-+LIBS += -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon
-+endif
-+
- ifeq ($(OS_ARCH),WINNT)
- #
- # Control the default heap size.
-@@ -165,22 +192,9 @@
- #
- ifndef GNU_CC
- LDFLAGS += /HEAP:0x40000
--ifeq ($(OS_TEST),x86_64)
--# set stack to 2MB on x64 build. See bug 582910
--LDFLAGS += -STACK:2097152
--endif
- endif
- endif
-
--ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
--libs::
-- cp -p $(MOZ_APP_NAME)$(BIN_SUFFIX) $(DIST)/bin/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
--
--GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/, all.js all-thunderbird.js channel-prefs.js mailnews.js)
--endif # ! OS 2 or WinNT
--
--endif # LIBXUL_SDK
--
- ifneq (,$(filter windows os2,$(MOZ_WIDGET_TOOLKIT)))
- ICON_SUFFIX=.ico
-
-@@ -219,10 +233,36 @@
- $(SYSINSTALL) $(IFLAGS1) $(DIST)/branding/default* $(DESTDIR)$(mozappdir)/chrome/icons/default
- endif
-
-+ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
-+ifneq (,$(filter-out Darwin,$(OS_ARCH)))
-+$(MOZ_APP_NAME):: $(MOZILLA_DIR)/build/unix/mozilla.in $(GLOBAL_DEPS) $(DEPTH)/config/autoconf.mk
-+ cat $< | sed -e "s|%MOZAPPDIR%|$(installdir)|" \
-+ -e "s|%MOZ_APP_DISPLAYNAME%|$(MOZ_APP_DISPLAYNAME)|" > $@
-+ chmod +x $@
-+
-+libs:: $(MOZ_APP_NAME)
-+ $(INSTALL) $< $(DIST)/bin
-+
-+install:: $(MOZ_APP_NAME)
-+ $(SYSINSTALL) $< $(DESTDIR)$(bindir)
-+
-+GARBAGE += $(MOZ_APP_NAME)
-+else
-+libs::
-+ cp -p $(MOZ_APP_NAME)$(BIN_SUFFIX) $(DIST)/bin/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
-+
-+endif # ! Mac
-+GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/, all.js all-thunderbird.js channel-prefs.js mailnews.js)
-+endif # ! OS 2 or WinNT
-+
-+ifeq ($(MOZ_WIDGET_TOOLKIT),photon)
-+LIBS += -lphexlib
-+endif
-+
- libs:: $(srcdir)/profile/prefs.js
- $(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/defaults/profile
-
--libs:: $(srcdir)/blocklist.xml
-+libs:: blocklist.xml
- $(INSTALL) $(IFLAGS1) $^ $(DIST)/bin
-
- ifdef ENABLE_TESTS
-@@ -239,6 +279,8 @@
-
- ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
-
-+AB := $(firstword $(subst -, ,$(AB_CD)))
-+
- MAC_APP_NAME = $(MOZ_APP_DISPLAYNAME)
-
- ifdef MOZ_DEBUG
-@@ -247,55 +289,26 @@
-
- LOWER_MAC_APP_NAME = $(shell echo $(MAC_APP_NAME) | tr '[A-Z]' '[a-z]')
-
--AB_CD = $(MOZ_UI_LOCALE)
--
--AB := $(firstword $(subst -, ,$(AB_CD)))
--
--clean clobber repackage::
-- $(RM) -r $(DIST)/$(MOZ_MACBUNDLE_NAME)
--
--ifdef LIBXUL_SDK
--APPFILES = Resources
--else
--APPFILES = MacOS
--endif
--
--libs repackage:: $(PROGRAM)
-- $(MKDIR) -p $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS
-- rsync -a --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(MOZ_MACBUNDLE_NAME) --exclude English.lproj
-- $(MKDIR) -p $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/$(AB).lproj
-- rsync -a --exclude "*.in" $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/$(AB).lproj
-+libs:: $(PROGRAM)
-+ mkdir -p $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS
-+ rsync -a --exclude CVS --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(MOZ_MACBUNDLE_NAME) --exclude English.lproj
-+ mkdir -p $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/$(AB).lproj
-+ rsync -a --exclude CVS --exclude "*.in" $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/$(AB).lproj
- sed -e "s/%APP_VERSION%/$(MOZ_APP_VERSION)/" -e "s/%MAC_APP_NAME%/$(MAC_APP_NAME)/" -e "s/%LOWER_MAC_APP_NAME%/$(LOWER_MAC_APP_NAME)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Info.plist
- sed -e "s/%MAC_APP_NAME%/$(MAC_APP_NAME)/" $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/$(AB).lproj/InfoPlist.strings
-- rsync -a $(DIST)/bin/ $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/$(APPFILES)
--ifdef LIBXUL_SDK
-- cp $(LIBXUL_DIST)/bin/$(XR_STUB_NAME) $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/thunderbird
--else
-- $(RM) $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/$(PROGRAM)
-+ rsync -a $(DIST)/bin/ $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS
-+ rm -f $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/$(PROGRAM)
- rsync -aL $(PROGRAM) $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS
--endif
-- $(MKDIR) -p $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Library/Spotlight
-+ mkdir -p $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Library/Spotlight
- rsync -a --copy-unsafe-links $(DIST)/package/Thunderbird.mdimporter $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Library/Spotlight
- cp -RL $(DIST)/branding/thunderbird.icns $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/thunderbird.icns
- printf APPLMOZM > $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/PkgInfo
--else
--ifdef LIBXUL_SDK
--libs::
-- cp $(LIBXUL_DIST)/bin/$(XULRUNNER_STUB_NAME)$(BIN_SUFFIX) $(DIST)/bin/thunderbird$(BIN_SUFFIX)
--endif
--endif
-+# remove CVS dirs from packaged app
-+ find $(DIST)/$(MOZ_MACBUNDLE_NAME) -type d -name "CVS" -prune -exec rm -rf {} \;
-
--ifdef LIBXUL_SDK
--ifndef SKIP_COPY_XULRUNNER
--libs::
--ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
-- rsync -a --copy-unsafe-links $(LIBXUL_DIST)/XUL.framework $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Frameworks
--else
-- $(NSINSTALL) -D $(DIST)/bin/xulrunner
-- (cd $(LIBXUL_SDK)/bin && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DIST)/bin/xulrunner && tar -xf -)
--endif # cocoa
--endif # SKIP_COPY_XULRUNNER
--endif # LIBXUL_SDK
-+clean clobber::
-+ rm -rf $(DIST)/$(MOZ_MACBUNDLE_NAME)
-+endif
-
- # Note that anything you do to dist/ down here isn't going to make it into the
- # Mac build, since it's already been copied over to the .app, above.
diff --git a/mail/thunderbird/files/patch-mail-app-nsMailApp.cpp b/mail/thunderbird/files/patch-mail-app-nsMailApp.cpp
new file mode 100644
index 000000000000..0d17050c939c
--- /dev/null
+++ b/mail/thunderbird/files/patch-mail-app-nsMailApp.cpp
@@ -0,0 +1,10 @@
+--- mail/app/nsMailApp.cpp~
++++ mail/app/nsMailApp.cpp
+@@ -154,6 +154,7 @@ int main(int argc, char* argv[])
+ TriggerQuirks();
+ #endif
+
++ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko19:%%LOCALBASE%%/lib/npapi/symlinks/thunderbird", 0);
+ nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath);
+ if (NS_FAILED(rv)) {
+ Output("Couldn't calculate the application directory.\n");
diff --git a/mail/thunderbird/files/patch-mail-components-Makefile.in b/mail/thunderbird/files/patch-mail-components-Makefile.in
new file mode 100644
index 000000000000..d3e2e8ff4433
--- /dev/null
+++ b/mail/thunderbird/files/patch-mail-components-Makefile.in
@@ -0,0 +1,11 @@
+--- mail/components/Makefile.in~
++++ mail/components/Makefile.in
+@@ -46,7 +46,7 @@ include $(DEPTH)/config/autoconf.mk
+ # least one module from search/ on all platforms
+ DIRS = compose cloudfile preferences addrbook migration activity search about-support wintaskbar newmailaccount im
+
+-ifneq (,$(filter windows gtk2 cocoa, $(MOZ_WIDGET_TOOLKIT)))
++ifneq (,$(filter windows gtk2 cocoa qt, $(MOZ_WIDGET_TOOLKIT)))
+ DIRS += shell
+ endif
+
diff --git a/mail/thunderbird/files/patch-mail-components-build-Makefile.in b/mail/thunderbird/files/patch-mail-components-build-Makefile.in
new file mode 100644
index 000000000000..af94e2c0bba3
--- /dev/null
+++ b/mail/thunderbird/files/patch-mail-components-build-Makefile.in
@@ -0,0 +1,11 @@
+--- mail/components/build/Makefile.in~
++++ mail/components/build/Makefile.in
+@@ -78,7 +78,7 @@ SHARED_LIBRARY_LIBS = \
+ ../migration/src/$(LIB_PREFIX)profilemigration_s.$(LIB_SUFFIX) \
+ $(NULL)
+
+-ifneq (,$(filter windows cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
++ifneq (,$(filter windows cocoa gtk2 qt, $(MOZ_WIDGET_TOOLKIT)))
+ SHARED_LIBRARY_LIBS += ../shell/$(LIB_PREFIX)shellservice_s.$(LIB_SUFFIX)
+ endif
+
diff --git a/mail/thunderbird/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp b/mail/thunderbird/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp
new file mode 100644
index 000000000000..9bae143f2e26
--- /dev/null
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp b/mail/thunderbird/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp
new file mode 100644
index 000000000000..b3a6df4d2c90
--- /dev/null
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-build-autoconf-config.sub b/mail/thunderbird/files/patch-mozilla-build-autoconf-config.sub
deleted file mode 100644
index 12a704ade44b..000000000000
--- a/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-configure.in b/mail/thunderbird/files/patch-mozilla-configure.in
index 7e61ff7867c7..ce91593e1ed6 100644
--- a/mail/thunderbird/files/patch-mozilla-configure.in
+++ b/mail/thunderbird/files/patch-mozilla-configure.in
@@ -1,32 +1,28 @@
--- mozilla/configure.in.orig 2012-05-23 20:56:34.000000000 +0200
+++ mozilla/configure.in 2012-05-27 18:18:25.000000000 +0200
-@@ -1517,7 +1517,7 @@
- CPU_ARCH=sparc
- ;;
-
--x86_64 | ia64)
-+amd64 | x86_64 | ia64)
- CPU_ARCH="$OS_TEST"
- ;;
-
-@@ -1539,7 +1539,7 @@
- dnl ===============================================================
- INTEL_ARCHITECTURE=
- case "$OS_TEST" in
-- x86_64|i?86)
-+ amd64|x86_64|i?86)
- INTEL_ARCHITECTURE=1
- esac
-
-@@ -4580,7 +4580,7 @@
+@@ -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
@@ -5903,6 +5903,14 @@
VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC"
VPX_X86_ASM=1
@@ -35,7 +31,7 @@
+ 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
+ ;;
@@ -50,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/mail/thunderbird/files/patch-mozilla-content-media-gstreamer-nsGStreamerReader.cpp b/mail/thunderbird/files/patch-mozilla-content-media-gstreamer-nsGStreamerReader.cpp
new file mode 100644
index 000000000000..fe7e4c54e1e7
--- /dev/null
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-db-sqlite3-src-Makefile.in b/mail/thunderbird/files/patch-mozilla-db-sqlite3-src-Makefile.in
deleted file mode 100644
index 24a7d6206604..000000000000
--- a/mail/thunderbird/files/patch-mozilla-db-sqlite3-src-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- mozilla/db/sqlite3/src/Makefile.in.orig 2008-06-19 11:03:17.000000000 -0500
-+++ mozilla/db/sqlite3/src/Makefile.in 2008-06-19 11:04:15.000000000 -0500
-@@ -45,6 +45,8 @@
-
- include $(DEPTH)/config/autoconf.mk
-
-+OS_CFLAGS = -I../../../dist/include/sqlite3
-+OS_LIBS = %%PTHREAD_LIBS%%
- MODULE = sqlite3
- LIBRARY_NAME = sqlite3
- FORCE_SHARED_LIB = 1
diff --git a/mail/thunderbird/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp b/mail/thunderbird/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp
new file mode 100644
index 000000000000..f088ed439b95
--- /dev/null
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-gfx-harfbuzz-src-hb-ot-layout.cc b/mail/thunderbird/files/patch-mozilla-gfx-harfbuzz-src-hb-ot-layout.cc
new file mode 100644
index 000000000000..c8e84ca6768a
--- /dev/null
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-gfx-qcms-Makefile.in b/mail/thunderbird/files/patch-mozilla-gfx-qcms-Makefile.in
deleted file mode 100644
index bad2cf563256..000000000000
--- a/mail/thunderbird/files/patch-mozilla-gfx-qcms-Makefile.in
+++ /dev/null
@@ -1,14 +0,0 @@
---- mozilla/gfx/qcms/Makefile.in.orig 2010-11-25 20:10:32.000000000 +0100
-+++ mozilla/gfx/qcms/Makefile.in 2010-11-25 20:10:06.000000000 +0100
-@@ -44,6 +44,11 @@
- endif
- endif
- endif
-+ifeq ($(OS_TEST),amd64)
-+ CSRCS += transform-sse2.c transform-sse1.c
-+ SSE1_FLAGS=-msse
-+ SSE2_FLAGS=-msse2
-+endif
-
- FORCE_STATIC_LIB = 1
- # This library is used by other shared libs
diff --git a/mail/thunderbird/files/patch-mozilla-gfx-ycbcr-Makefile.in b/mail/thunderbird/files/patch-mozilla-gfx-ycbcr-Makefile.in
new file mode 100644
index 000000000000..041689a51995
--- /dev/null
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-ipc-chromium-Makefile.in b/mail/thunderbird/files/patch-mozilla-ipc-chromium-Makefile.in
new file mode 100644
index 000000000000..5d2e72cd0a96
--- /dev/null
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h b/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h
deleted file mode 100644
index 5c4e5b79f3d1..000000000000
--- a/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc b/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc
new file mode 100644
index 000000000000..3fe4995aa0f8
--- /dev/null
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-js-src-Makefile.in b/mail/thunderbird/files/patch-mozilla-js-src-Makefile.in
index e62d7b8202a2..2aa54ce69c5e 100644
--- a/mail/thunderbird/files/patch-mozilla-js-src-Makefile.in
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-js-src-config-mkdepend-Makefile.in b/mail/thunderbird/files/patch-mozilla-js-src-config-mkdepend-Makefile.in
index 6129066e1afd..37f9d4c61f3e 100644
--- a/mail/thunderbird/files/patch-mozilla-js-src-config-mkdepend-Makefile.in
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-js-src-config_config.mk b/mail/thunderbird/files/patch-mozilla-js-src-config_config.mk
index c5b42ad3457c..0bacb7ee6f1a 100644
--- a/mail/thunderbird/files/patch-mozilla-js-src-config_config.mk
+++ b/mail/thunderbird/files/patch-mozilla-js-src-config_config.mk
@@ -4,7 +4,7 @@
-I$(srcdir) \
-I. \
-I$(DIST)/include -I$(DIST)/include/nsprpub \
-+ -I%%LOCALBASE%%/include \
++ -I$(LOCALBASE)/include \
$(if $(LIBXUL_SDK),-I$(LIBXUL_SDK)/include -I$(LIBXUL_SDK)/include/nsprpub) \
$(OS_INCLUDES) \
$(NULL)
diff --git a/mail/thunderbird/files/patch-mozilla-js-src-configure.in b/mail/thunderbird/files/patch-mozilla-js-src-configure.in
index 75344541bb15..3a2a1d3b6d0d 100644
--- a/mail/thunderbird/files/patch-mozilla-js-src-configure.in
+++ b/mail/thunderbird/files/patch-mozilla-js-src-configure.in
@@ -1,37 +1,10 @@
--- 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
-@@ -1470,7 +1470,7 @@
- CPU_ARCH=sparc
- ;;
+@@ -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
--x86_64 | ia64)
-+amd64 | x86_64 | ia64)
- CPU_ARCH="$OS_TEST"
- ;;
+ #endif /* _JS_CONFDEFS_H_ */
-@@ -1492,7 +1492,7 @@
- dnl ===============================================================
- INTEL_ARCHITECTURE=
- case "$OS_TEST" in
-- x86_64|i?86)
-+ amd64|x86_64|i?86)
- INTEL_ARCHITECTURE=1
- esac
-
-@@ -2814,6 +2814,16 @@
- AC_DEFINE(JS_CPU_X86)
- AC_DEFINE(JS_NUNBOX32)
- ;;
-+amd64*-*)
-+ ENABLE_TRACEJIT=1
-+ NANOJIT_ARCH=X64
-+ ENABLE_METHODJIT=1
-+ ENABLE_MONOIC=1
-+ ENABLE_POLYIC=1
-+ ENABLE_POLYIC_TYPED_ARRAY=1
-+ AC_DEFINE(JS_CPU_X64)
-+ AC_DEFINE(JS_PUNBOX64)
-+ ;;
- x86_64*-*)
- ENABLE_METHODJIT=1
- ENABLE_MONOIC=1
diff --git a/mail/thunderbird/files/patch-mozilla-js-src-jsnum.cpp b/mail/thunderbird/files/patch-mozilla-js-src-jsnum.cpp
index c52535eaca09..fdf4840c1441 100644
--- a/mail/thunderbird/files/patch-mozilla-js-src-jsnum.cpp
+++ b/mail/thunderbird/files/patch-mozilla-js-src-jsnum.cpp
@@ -1,28 +1,31 @@
---- mozilla/js/src/jsnum.cpp.orig Sun Nov 5 18:37:07 2006
-+++ mozilla/js/src/jsnum.cpp Sun Nov 5 18:42:31 2006
-@@ -45,6 +45,9 @@
- #if defined(XP_WIN) || defined(XP_OS2)
- #include <float.h>
- #endif
+--- 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
- #include <locale.h>
- #include <limits.h>
- #include <math.h>
-@@ -532,7 +535,15 @@ static jsdouble NaN;
+ #ifdef XP_OS2
+ #define _PC_53 PC_53
+ #define _MCW_EM MCW_EM
+@@ -691,8 +694,18 @@
#else
-+#if defined(__FreeBSD__) && __FreeBSD_version >= 601000
++#if defined(__FreeBSD__)
++#if __BSD_VISIBLE == 0
++#error __BSD_VISIBLE is zero, so fedisableexcept is not defined
++#endif
+#include <fenv.h>
-+#define FIX_FPU() (fedisableexcept(FE_ALL_EXCEPT))
-+
++#define FIX_FPU() ((void)fedisableexcept(FE_ALL_EXCEPT))
+#else
+
#define FIX_FPU() ((void)0)
-+
-+#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */
++#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */
++
#endif
+ JSBool
diff --git a/mail/thunderbird/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp b/mail/thunderbird/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp
new file mode 100644
index 000000000000..009b469dcd7f
--- /dev/null
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-layout-generic-Makefile.in b/mail/thunderbird/files/patch-mozilla-layout-generic-Makefile.in
index 6356b9f6e9d7..9742d56bde44 100644
--- a/mail/thunderbird/files/patch-mozilla-layout-generic-Makefile.in
+++ b/mail/thunderbird/files/patch-mozilla-layout-generic-Makefile.in
@@ -1,15 +1,14 @@
---- mozilla/layout/generic/Makefile.in.orig 2011-07-06 05:09:28.000000000 +0200
-+++ mozilla/layout/generic/Makefile.in 2011-07-06 21:49:25.105659269 +0200
-@@ -159,9 +159,10 @@
- -I$(srcdir)/../../content/html/content/src \
+--- mozilla/layout/generic/Makefile.in~
++++ mozilla/layout/generic/Makefile.in
+@@ -154,9 +154,10 @@ LOCAL_INCLUDES += \
-I$(srcdir)/../../dom/base \
-I$(srcdir)/../../dom/plugins/base \
+ -I$(srcdir)/../svg/base/src \
- $(MOZ_CAIRO_CFLAGS) \
$(NULL)
-+ CXXFLAGS += $(MOZ_CAIRO_CFLAGS)
++CXXFLAGS += $(MOZ_CAIRO_CFLAGS)
+
ifdef MOZ_ENABLE_GTK2
CXXFLAGS += $(MOZ_GTK2_CFLAGS)
endif
-
diff --git a/mail/thunderbird/files/patch-mozilla-media-libsydneyaudio-include-sydney_audio.h b/mail/thunderbird/files/patch-mozilla-media-libsydneyaudio-include-sydney_audio.h
deleted file mode 100644
index e2c52f080518..000000000000
--- a/mail/thunderbird/files/patch-mozilla-media-libsydneyaudio-include-sydney_audio.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- mozilla/media/libsydneyaudio/include/sydney_audio.h.orgi 2009-04-10 12:24:01.000000000 +0200
-+++ mozilla/media/libsydneyaudio/include/sydney_audio.h 2009-04-10 12:24:30.000000000 +0200
-@@ -73,7 +73,7 @@
- # endif
- #elif defined(WIN32)
- # define SA_LITTLE_ENDIAN 1
--#elif defined(__APPLE__)
-+#elif defined(__APPLE__) || defined(__FreeBSD__)
- # if defined(__BIG_ENDIAN__)
- # define SA_BIG_ENDIAN 1
- # else
diff --git a/mail/thunderbird/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c b/mail/thunderbird/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c
new file mode 100644
index 000000000000..ddb42a92a1e3
--- /dev/null
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-memory-mozalloc-mozalloc.cpp b/mail/thunderbird/files/patch-mozilla-memory-mozalloc-mozalloc.cpp
new file mode 100644
index 000000000000..72eba848047d
--- /dev/null
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-security-coreconf-FreeBSD.mk b/mail/thunderbird/files/patch-mozilla-security-coreconf-FreeBSD.mk
index dc4e96c7c439..f5a47988bcc5 100644
--- a/mail/thunderbird/files/patch-mozilla-security-coreconf-FreeBSD.mk
+++ b/mail/thunderbird/files/patch-mozilla-security-coreconf-FreeBSD.mk
@@ -1,6 +1,6 @@
--- mozilla/security/coreconf/FreeBSD.mk.orig 2010-02-28 23:30:04.000000000 +0000
+++ mozilla/security/coreconf/FreeBSD.mk 2010-03-03 02:05:22.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/mail/thunderbird/files/patch-mozilla-security-nss-lib-Makefile b/mail/thunderbird/files/patch-mozilla-security-nss-lib-Makefile
new file mode 100644
index 000000000000..195e44014456
--- /dev/null
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-toolkit-library-Makefile.in b/mail/thunderbird/files/patch-mozilla-toolkit-library-Makefile.in
deleted file mode 100644
index f222b6dca9e9..000000000000
--- a/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp b/mail/thunderbird/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp
new file mode 100644
index 000000000000..78cb22fd4702
--- /dev/null
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-widget-qt-nsNativeThemeQt.cpp b/mail/thunderbird/files/patch-mozilla-widget-qt-nsNativeThemeQt.cpp
new file mode 100644
index 000000000000..7305a04e1c33
--- /dev/null
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-widget-qt-nsSound.cpp b/mail/thunderbird/files/patch-mozilla-widget-qt-nsSound.cpp
new file mode 100644
index 000000000000..601b917a3347
--- /dev/null
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-widget-qt-nsWindow.cpp b/mail/thunderbird/files/patch-mozilla-widget-qt-nsWindow.cpp
new file mode 100644
index 000000000000..30a42b431da5
--- /dev/null
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-xpcom-base-nsStackWalk.cpp b/mail/thunderbird/files/patch-mozilla-xpcom-base-nsStackWalk.cpp
index 4d2bca2ca692..817014333627 100644
--- a/mail/thunderbird/files/patch-mozilla-xpcom-base-nsStackWalk.cpp
+++ b/mail/thunderbird/files/patch-mozilla-xpcom-base-nsStackWalk.cpp
@@ -8,3 +8,11 @@
#if defined(_WIN32) && (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64)) && !defined(WINCE) // WIN32 x86 stack walking code
+@@ -1123,6 +1123,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/mail/thunderbird/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in b/mail/thunderbird/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in
index e896cec90613..252912459191 100644
--- a/mail/thunderbird/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in
+++ b/mail/thunderbird/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/security/nss/files/patch-..::coreconf::FreeBSD.mk b/security/nss/files/patch-..::coreconf::FreeBSD.mk
index 46e0c7147317..089dac36d915 100644
--- a/security/nss/files/patch-..::coreconf::FreeBSD.mk
+++ b/security/nss/files/patch-..::coreconf::FreeBSD.mk
@@ -17,8 +17,7 @@
CPU_ARCH = x86
endif
ifeq ($(CPU_ARCH),amd64)
--CPU_ARCH = x86_64
-+CPU_ARCH = amd64
+ CPU_ARCH = x86_64
+USE_64 = 1
+endif
+ifeq ($(OS_TEST),alpha)
diff --git a/security/nss/files/patch-lib-freebl-Makefile b/security/nss/files/patch-lib-freebl-Makefile
new file mode 100644
index 000000000000..ff51b6c41df7
--- /dev/null
+++ b/security/nss/files/patch-lib-freebl-Makefile
@@ -0,0 +1,11 @@
+--- lib/freebl/Makefile~
++++ lib/freebl/Makefile
+@@ -201,7 +201,7 @@ ifeq ($(USE_N32),1)
+ endif
+ endif
+
+-ifeq ($(OS_TARGET),Linux)
++ifeq (,$(filter-out Linux FreeBSD, $(OS_TARGET)))
+ ifeq ($(CPU_ARCH),x86_64)
+ ASFILES = arcfour-amd64-gas.s mpi_amd64_gas.s
+ ASFLAGS += -march=opteron -m64 -fPIC -Wa,--noexecstack
diff --git a/www/firefox-esr-i18n/Makefile b/www/firefox-esr-i18n/Makefile
index 21088d718194..17dedf11a711 100644
--- a/www/firefox-esr-i18n/Makefile
+++ b/www/firefox-esr-i18n/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= firefox-i18n
-PORTVERSION= 10.0.5
+PORTVERSION= 10.0.6
CATEGORIES= www
MASTER_SITE_SUBDIR= firefox/releases/${PORTVERSION}esr/linux-i686/xpi
PKGNAMEPREFIX=
diff --git a/www/firefox-esr-i18n/distinfo b/www/firefox-esr-i18n/distinfo
index c5b35d7477f4..876c72c09d77 100644
--- a/www/firefox-esr-i18n/distinfo
+++ b/www/firefox-esr-i18n/distinfo
@@ -1,164 +1,164 @@
-SHA256 (xpi/firefox-i18n-10.0.5/af.xpi) = 3af9a9e44ff8ce6091ec36a2258c2be75d1bda7864db9acf7bff854495f334c9
-SIZE (xpi/firefox-i18n-10.0.5/af.xpi) = 238745
-SHA256 (xpi/firefox-i18n-10.0.5/ak.xpi) = 9ad2a71cc2cf95377cc3296dee711627f53411bd10d661ffcd8709aa6a04c5d4
-SIZE (xpi/firefox-i18n-10.0.5/ak.xpi) = 240573
-SHA256 (xpi/firefox-i18n-10.0.5/ar.xpi) = 2a130cd8168e1b6740db7451ddfcafc44f78aeda09ed81c56e78da0f0ddd2a0f
-SIZE (xpi/firefox-i18n-10.0.5/ar.xpi) = 263703
-SHA256 (xpi/firefox-i18n-10.0.5/ast.xpi) = a7d66600833a5e0900b410729f28c9827dd8aa5c338a273f9b1ba6a50c99dd82
-SIZE (xpi/firefox-i18n-10.0.5/ast.xpi) = 237975
-SHA256 (xpi/firefox-i18n-10.0.5/be.xpi) = 3ef97b72687cd839a7e579ea134ab5f0d337dba7f2801ebf83b8fa48a5ec928e
-SIZE (xpi/firefox-i18n-10.0.5/be.xpi) = 245758
-SHA256 (xpi/firefox-i18n-10.0.5/bg.xpi) = 99b9b1064b1e35aa95b2e3b8ff9e4e17a8372bfa11ce89018f6da67f99c22b6c
-SIZE (xpi/firefox-i18n-10.0.5/bg.xpi) = 276757
-SHA256 (xpi/firefox-i18n-10.0.5/bn-BD.xpi) = 20cce468b7295faecd491067859c6e6905216465beb98fc500ce9847b0579c32
-SIZE (xpi/firefox-i18n-10.0.5/bn-BD.xpi) = 288294
-SHA256 (xpi/firefox-i18n-10.0.5/bn-IN.xpi) = 8f16b797a7d70684a1e92be2f3c8ba5e95827c51f451761274923699619c4f0c
-SIZE (xpi/firefox-i18n-10.0.5/bn-IN.xpi) = 319305
-SHA256 (xpi/firefox-i18n-10.0.5/br.xpi) = 7d1f8ca529d639f20633d3d6e04fa9913fe388e8ffa338b88880bba3927f02dd
-SIZE (xpi/firefox-i18n-10.0.5/br.xpi) = 247652
-SHA256 (xpi/firefox-i18n-10.0.5/bs.xpi) = ae01f94e0a7b8b71b5c528b76dce846e506829103a0b84b575c349be4aba197c
-SIZE (xpi/firefox-i18n-10.0.5/bs.xpi) = 245309
-SHA256 (xpi/firefox-i18n-10.0.5/ca.xpi) = a7cfffe9b2c684bea7668c84f30f352485a79b297e355e9e3d97c76396d4d981
-SIZE (xpi/firefox-i18n-10.0.5/ca.xpi) = 248222
-SHA256 (xpi/firefox-i18n-10.0.5/cs.xpi) = c2908c2edb3cecf21e20e0ab0e02ac7fdc10b617c31d9d9a363bb9275ee0ebf8
-SIZE (xpi/firefox-i18n-10.0.5/cs.xpi) = 248770
-SHA256 (xpi/firefox-i18n-10.0.5/cy.xpi) = a664fd62544e0f288c5d77be9d7eb0d2a31db162ded8eef63df7ee23aa59bfb0
-SIZE (xpi/firefox-i18n-10.0.5/cy.xpi) = 244198
-SHA256 (xpi/firefox-i18n-10.0.5/da.xpi) = b099e89d50750574f19c0883805b34caa859cc97c1c0fa6ec880973c798e857c
-SIZE (xpi/firefox-i18n-10.0.5/da.xpi) = 240329
-SHA256 (xpi/firefox-i18n-10.0.5/de.xpi) = d7321203dec67ccda8960c2181d38b45789b135320a2d2a0f1d2f2fe6da38854
-SIZE (xpi/firefox-i18n-10.0.5/de.xpi) = 249298
-SHA256 (xpi/firefox-i18n-10.0.5/el.xpi) = fc1d499005ceaf410286ea861638bf0ebd6994f21edc8573aa3a0f75a3b90d4d
-SIZE (xpi/firefox-i18n-10.0.5/el.xpi) = 264380
-SHA256 (xpi/firefox-i18n-10.0.5/en-GB.xpi) = 8ba41f3bdd2a978b90a4de726de5e4f6afa6b3bb0753dd04e783ddaeda151c83
-SIZE (xpi/firefox-i18n-10.0.5/en-GB.xpi) = 231194
-SHA256 (xpi/firefox-i18n-10.0.5/en-US.xpi) = 35aa501175258b16004f7845a3bcc5d8d403e81f4af43c2a5f842bbdbdbe3353
-SIZE (xpi/firefox-i18n-10.0.5/en-US.xpi) = 230681
-SHA256 (xpi/firefox-i18n-10.0.5/en-ZA.xpi) = e1181de582375b0ac23a7d0ef4ec8355227cf70455028daa32f3f601f93b5f6f
-SIZE (xpi/firefox-i18n-10.0.5/en-ZA.xpi) = 233920
-SHA256 (xpi/firefox-i18n-10.0.5/eo.xpi) = 79e772dc399764771880fd55760ec53b617b41c3fee9038f280d13a77814e3d5
-SIZE (xpi/firefox-i18n-10.0.5/eo.xpi) = 240903
-SHA256 (xpi/firefox-i18n-10.0.5/es-AR.xpi) = c144255ded63e0d1d85d9fd92022152c3459ecfea6ef0facad6bdd8a5b2d2372
-SIZE (xpi/firefox-i18n-10.0.5/es-AR.xpi) = 245347
-SHA256 (xpi/firefox-i18n-10.0.5/es-CL.xpi) = 676a8f505354d1af597f092907f168600e5eb6da851c3edfd6202b3966ef0357
-SIZE (xpi/firefox-i18n-10.0.5/es-CL.xpi) = 250206
-SHA256 (xpi/firefox-i18n-10.0.5/es-ES.xpi) = 858aebdf8903dc4bafafd86161b00587018ffe26b4f355a0a93b2cf56e54987a
-SIZE (xpi/firefox-i18n-10.0.5/es-ES.xpi) = 215379
-SHA256 (xpi/firefox-i18n-10.0.5/es-MX.xpi) = d1f1a3ed898c617f94ef3d991d1b54dbad65dc8a91a74b5b82f0d02edca54dad
-SIZE (xpi/firefox-i18n-10.0.5/es-MX.xpi) = 224152
-SHA256 (xpi/firefox-i18n-10.0.5/et.xpi) = 28b06d2e0c06313a70d3730c7e860d44fdb48c49d5f75c838b4057660426f66d
-SIZE (xpi/firefox-i18n-10.0.5/et.xpi) = 242632
-SHA256 (xpi/firefox-i18n-10.0.5/eu.xpi) = 6d73239bcce73d4619b255923956cf699387ad38c83d50f69a7b2d1539a7edaf
-SIZE (xpi/firefox-i18n-10.0.5/eu.xpi) = 240252
-SHA256 (xpi/firefox-i18n-10.0.5/fa.xpi) = 0014103ec5848e9ca0c71ec71350e45d0dcb862fc3a52d1673dcd73541895525
-SIZE (xpi/firefox-i18n-10.0.5/fa.xpi) = 272854
-SHA256 (xpi/firefox-i18n-10.0.5/fi.xpi) = dc5d4adb96e1f845ae9d207bf06b548a5247850a7309b68d616170d280b77359
-SIZE (xpi/firefox-i18n-10.0.5/fi.xpi) = 243630
-SHA256 (xpi/firefox-i18n-10.0.5/fr.xpi) = 6e7d6134ab0ff5da9b1acaa081eb6a97cba80968f8b6ab5424687a60ad44a014
-SIZE (xpi/firefox-i18n-10.0.5/fr.xpi) = 249569
-SHA256 (xpi/firefox-i18n-10.0.5/fy-NL.xpi) = 342538096c69021880b6f20467ab874258586e5029dbd6f490a560ca56e92bc6
-SIZE (xpi/firefox-i18n-10.0.5/fy-NL.xpi) = 249345
-SHA256 (xpi/firefox-i18n-10.0.5/ga-IE.xpi) = 6f280cda017aff49a0b8dac13484799d606cbaa7e3950f8b7fad85ea5cba5df4
-SIZE (xpi/firefox-i18n-10.0.5/ga-IE.xpi) = 252023
-SHA256 (xpi/firefox-i18n-10.0.5/gl.xpi) = 56497cea09d3d20ed7c5bc2413d930b150b37ec5d028bffab96672b89f3d6df1
-SIZE (xpi/firefox-i18n-10.0.5/gl.xpi) = 243250
-SHA256 (xpi/firefox-i18n-10.0.5/gu-IN.xpi) = 2c95e3dd74194567a0ce686b3f84380be4df5f331bb22b62fb00872277cbd808
-SIZE (xpi/firefox-i18n-10.0.5/gu-IN.xpi) = 275223
-SHA256 (xpi/firefox-i18n-10.0.5/he.xpi) = 7c68d6420569336e2613c1f1c8ed44c2194e679d5a857bddbb451f34b01723bd
-SIZE (xpi/firefox-i18n-10.0.5/he.xpi) = 264936
-SHA256 (xpi/firefox-i18n-10.0.5/hi-IN.xpi) = 7d4d0aa0fcfeae384dbc5f720a5a4d7f3eac62a15cc6780bf0aa0e503bd6c453
-SIZE (xpi/firefox-i18n-10.0.5/hi-IN.xpi) = 280002
-SHA256 (xpi/firefox-i18n-10.0.5/hr.xpi) = c2e6feeb1d60be47b8aa3fd00edd163cec5538a32eb3e418bdcc827b81ec7e23
-SIZE (xpi/firefox-i18n-10.0.5/hr.xpi) = 249334
-SHA256 (xpi/firefox-i18n-10.0.5/hu.xpi) = 1cca1121ce2062b78490b2c7801301e7f3dcb2ccc7b1866465e5198ce109d89d
-SIZE (xpi/firefox-i18n-10.0.5/hu.xpi) = 253775
-SHA256 (xpi/firefox-i18n-10.0.5/hy-AM.xpi) = cf068f3d4e8e5401664f231b2349990dbb1561ef7a53830f9856c908ea2a2540
-SIZE (xpi/firefox-i18n-10.0.5/hy-AM.xpi) = 445453
-SHA256 (xpi/firefox-i18n-10.0.5/id.xpi) = 713be4252044513df7d16cbf42ac017aae46023a32b2335632bb2e1cc2e8b168
-SIZE (xpi/firefox-i18n-10.0.5/id.xpi) = 236825
-SHA256 (xpi/firefox-i18n-10.0.5/is.xpi) = 74ffdfe66af8b58a6f6b857a9bbf576eab5cbfef6df7e80a70c1ac700a5a08cd
-SIZE (xpi/firefox-i18n-10.0.5/is.xpi) = 243068
-SHA256 (xpi/firefox-i18n-10.0.5/it.xpi) = 4d51e867b06b529e2f39f95cb590ca1bf4698e7753e9bc006bb9bfd3f2f3b131
-SIZE (xpi/firefox-i18n-10.0.5/it.xpi) = 212717
-SHA256 (xpi/firefox-i18n-10.0.5/ja.xpi) = 03d4294467b36c75d6bc5b10d532b76d32a3da3941bc736c68f4d5cd5de24ac1
-SIZE (xpi/firefox-i18n-10.0.5/ja.xpi) = 273116
-SHA256 (xpi/firefox-i18n-10.0.5/kk.xpi) = cabf4f3b45fac11c0803b4191a5165c39aea9fc304bbce9fbe5d62f348425303
-SIZE (xpi/firefox-i18n-10.0.5/kk.xpi) = 279779
-SHA256 (xpi/firefox-i18n-10.0.5/kn.xpi) = b746ddcfd8194af57f6b9c625f51ca68fb74c08d6b77e6aabea00e2f5c32984a
-SIZE (xpi/firefox-i18n-10.0.5/kn.xpi) = 299831
-SHA256 (xpi/firefox-i18n-10.0.5/ko.xpi) = f143e5a8b5cfc9ea3f87f389d67ec267d2bf162ee7e9b5bf385fb31634a9f0f4
-SIZE (xpi/firefox-i18n-10.0.5/ko.xpi) = 227947
-SHA256 (xpi/firefox-i18n-10.0.5/ku.xpi) = 3a7cbe4b1c236ef6a35eea8f57cb200042a9963c3b1417688e5cc17d75380d09
-SIZE (xpi/firefox-i18n-10.0.5/ku.xpi) = 254711
-SHA256 (xpi/firefox-i18n-10.0.5/lg.xpi) = 45ee07afb3ffb2923f4ee04c248530c59ac9e7b54408fb88e14208cef2590923
-SIZE (xpi/firefox-i18n-10.0.5/lg.xpi) = 247675
-SHA256 (xpi/firefox-i18n-10.0.5/lt.xpi) = 5bacf78c4a6094030787948d471205c9ace095eacda8c1363212e5dae28b55ea
-SIZE (xpi/firefox-i18n-10.0.5/lt.xpi) = 330632
-SHA256 (xpi/firefox-i18n-10.0.5/lv.xpi) = df01b75a2fc03f39bf1ad4896c904474681b31a26d242fd6ce0a12909ec7c81b
-SIZE (xpi/firefox-i18n-10.0.5/lv.xpi) = 244353
-SHA256 (xpi/firefox-i18n-10.0.5/mai.xpi) = 98c3f2bca57ace5406166a2c9e0d6ca7627c526d7d9b214f317dcc4864e53ce3
-SIZE (xpi/firefox-i18n-10.0.5/mai.xpi) = 279254
-SHA256 (xpi/firefox-i18n-10.0.5/mk.xpi) = 92cba20cd620a18b054f561e8dfb22cbfd9afa643b7c58e53aa20a5f583d872b
-SIZE (xpi/firefox-i18n-10.0.5/mk.xpi) = 272940
-SHA256 (xpi/firefox-i18n-10.0.5/ml.xpi) = 229d2f37a991c60a9695d871a3e5e42f2b20c578d4c893d0c0213df2a4234e7e
-SIZE (xpi/firefox-i18n-10.0.5/ml.xpi) = 306677
-SHA256 (xpi/firefox-i18n-10.0.5/mr.xpi) = 923b07e6a5bad8e9888201ee98653d4a271d56fe4a4f8ed062027fc583062df7
-SIZE (xpi/firefox-i18n-10.0.5/mr.xpi) = 281459
-SHA256 (xpi/firefox-i18n-10.0.5/nb-NO.xpi) = 5a8cb95afbeadba73bbfd2744b81a778e43a7fb3e96e4945f162be3aae992260
-SIZE (xpi/firefox-i18n-10.0.5/nb-NO.xpi) = 241211
-SHA256 (xpi/firefox-i18n-10.0.5/nl.xpi) = cea9693c535be842ebc15f56cc0713de63e5314e902f40244f218e5016c0e66d
-SIZE (xpi/firefox-i18n-10.0.5/nl.xpi) = 242401
-SHA256 (xpi/firefox-i18n-10.0.5/nn-NO.xpi) = 9a565655b65004fd911d59ca4705827f5e93eff6894b686c920425731d962471
-SIZE (xpi/firefox-i18n-10.0.5/nn-NO.xpi) = 242454
-SHA256 (xpi/firefox-i18n-10.0.5/nso.xpi) = 4df6d210dcdc6bbace5318f4a2855298631c2837d206215918e7fc93e52f4fab
-SIZE (xpi/firefox-i18n-10.0.5/nso.xpi) = 245696
-SHA256 (xpi/firefox-i18n-10.0.5/or.xpi) = 5a11bb5fdb10ad529cff165172603e141dfdfb23db02375319930bc21499ac01
-SIZE (xpi/firefox-i18n-10.0.5/or.xpi) = 281686
-SHA256 (xpi/firefox-i18n-10.0.5/pa-IN.xpi) = 660e7f0d76737e53efb29922fe7957ea44d363ef590f519087cbc9ae9116a1c9
-SIZE (xpi/firefox-i18n-10.0.5/pa-IN.xpi) = 282146
-SHA256 (xpi/firefox-i18n-10.0.5/pl.xpi) = 40f062f21d7d6addda450a186e6acd0a4b54b0aa79e4f8410c4dfd133af1f379
-SIZE (xpi/firefox-i18n-10.0.5/pl.xpi) = 252048
-SHA256 (xpi/firefox-i18n-10.0.5/pt-BR.xpi) = bd1df43f2456d22d2499870db579d712ef89c1df219d26eba9f747d12a1ff2bb
-SIZE (xpi/firefox-i18n-10.0.5/pt-BR.xpi) = 246849
-SHA256 (xpi/firefox-i18n-10.0.5/pt-PT.xpi) = 0980042e46b32bf329ca0defdb67696b254ce880f72cbf8179d55b2c1632759c
-SIZE (xpi/firefox-i18n-10.0.5/pt-PT.xpi) = 246477
-SHA256 (xpi/firefox-i18n-10.0.5/rm.xpi) = f33dd039150fdc50a9212d9e7ecaa4651d81fbf81641ffdf16469edcf1acbafd
-SIZE (xpi/firefox-i18n-10.0.5/rm.xpi) = 245773
-SHA256 (xpi/firefox-i18n-10.0.5/ro.xpi) = f83b18e2a89e7d99fb13d4c7002c576ca5b54f73364471f078cc4cc38b562665
-SIZE (xpi/firefox-i18n-10.0.5/ro.xpi) = 263252
-SHA256 (xpi/firefox-i18n-10.0.5/ru.xpi) = 5353e18450ff8c2225fdf1db548bce03c8fd7e7119199c2646a5d7f0fd28b63f
-SIZE (xpi/firefox-i18n-10.0.5/ru.xpi) = 254985
-SHA256 (xpi/firefox-i18n-10.0.5/si.xpi) = 9067d71510bd552e4f36e49bb9caec77d36465f301d1d9c618f36f94c453798e
-SIZE (xpi/firefox-i18n-10.0.5/si.xpi) = 271991
-SHA256 (xpi/firefox-i18n-10.0.5/sk.xpi) = 7f9bfce27a66b59726cf6425fa9717e0eac48fb57097c99c5ffcb04ef7f88431
-SIZE (xpi/firefox-i18n-10.0.5/sk.xpi) = 254290
-SHA256 (xpi/firefox-i18n-10.0.5/sl.xpi) = b6c15b670009c960623bf37cc71980a53bcf519786b77732c398aca89f42bfcd
-SIZE (xpi/firefox-i18n-10.0.5/sl.xpi) = 241036
-SHA256 (xpi/firefox-i18n-10.0.5/son.xpi) = 8199e50bebcf1b63a20e63269b80481fb44fcc73da55cca03f116d38e5ab3f47
-SIZE (xpi/firefox-i18n-10.0.5/son.xpi) = 239061
-SHA256 (xpi/firefox-i18n-10.0.5/sq.xpi) = d8ff16265e78b440e2b90eea2b7faa61a5a9b85e048c47e003e8111377a073d6
-SIZE (xpi/firefox-i18n-10.0.5/sq.xpi) = 227698
-SHA256 (xpi/firefox-i18n-10.0.5/sr.xpi) = 10960870ab7ef0322abc5ea47d48fe5e1c10d2f37b859a49352846dee4a968d9
-SIZE (xpi/firefox-i18n-10.0.5/sr.xpi) = 277746
-SHA256 (xpi/firefox-i18n-10.0.5/sv-SE.xpi) = de6b1189dc81f11e88bcb7c3db6a59e63cf120762e96b78ad0f0de6d37f32bb4
-SIZE (xpi/firefox-i18n-10.0.5/sv-SE.xpi) = 278881
-SHA256 (xpi/firefox-i18n-10.0.5/ta-LK.xpi) = e30b425f338b08ed0e0c29f74d48fc6e2c9a052945511de2df0750b09fd2849a
-SIZE (xpi/firefox-i18n-10.0.5/ta-LK.xpi) = 290619
-SHA256 (xpi/firefox-i18n-10.0.5/ta.xpi) = c0da467c72143f5ec3d87c94ab1398ce2b35691426b3ac6436b8b80105299248
-SIZE (xpi/firefox-i18n-10.0.5/ta.xpi) = 274057
-SHA256 (xpi/firefox-i18n-10.0.5/te.xpi) = 348c0c06c132dcf65ce65b69e4138a6e6c7c8e4d4d8e8b915d1c189b45db6e23
-SIZE (xpi/firefox-i18n-10.0.5/te.xpi) = 289046
-SHA256 (xpi/firefox-i18n-10.0.5/th.xpi) = aa4ab7b1bf763e026e5786be9d81387c710d894e432e4669fd5c21453be43b11
-SIZE (xpi/firefox-i18n-10.0.5/th.xpi) = 272423
-SHA256 (xpi/firefox-i18n-10.0.5/tr.xpi) = eec9a9fd574bc6b229d91c34f2ac02a2882ff58627fa0619c75f2fc85a3dc72e
-SIZE (xpi/firefox-i18n-10.0.5/tr.xpi) = 249918
-SHA256 (xpi/firefox-i18n-10.0.5/uk.xpi) = 2ac149587946e117377de00d9826b5bfe2a0e64ffe1e7cfc3e9d656b0dc84d1f
-SIZE (xpi/firefox-i18n-10.0.5/uk.xpi) = 279133
-SHA256 (xpi/firefox-i18n-10.0.5/vi.xpi) = 1fed8c0c60abd723deb2c7d52f508cfb8e673512230bc9c7b796779618be90bc
-SIZE (xpi/firefox-i18n-10.0.5/vi.xpi) = 262787
-SHA256 (xpi/firefox-i18n-10.0.5/zh-CN.xpi) = b2161e41b9e82473a06e5ff8e0ed3ee50b479448786826702c08eea1cee2907b
-SIZE (xpi/firefox-i18n-10.0.5/zh-CN.xpi) = 256548
-SHA256 (xpi/firefox-i18n-10.0.5/zh-TW.xpi) = 1b7e7b717a40376cc46d71fdf84d5b945d8e68d58e0cccca1ac69fb47f5397f7
-SIZE (xpi/firefox-i18n-10.0.5/zh-TW.xpi) = 257493
-SHA256 (xpi/firefox-i18n-10.0.5/zu.xpi) = be8e314881d4b099b456bea5fede78a08139a91a5703fb24476abbaab3c063f6
-SIZE (xpi/firefox-i18n-10.0.5/zu.xpi) = 246396
+SHA256 (xpi/firefox-i18n-10.0.6/af.xpi) = 10c6017909b20de980d106a12d987616da899a7c0272b1e3d798dff3fcc6c920
+SIZE (xpi/firefox-i18n-10.0.6/af.xpi) = 238745
+SHA256 (xpi/firefox-i18n-10.0.6/ak.xpi) = 2399ba4cb1762b110d9851df73a097e07db6219addd5fcd752c632f9e79d061b
+SIZE (xpi/firefox-i18n-10.0.6/ak.xpi) = 240572
+SHA256 (xpi/firefox-i18n-10.0.6/ar.xpi) = 2646d869de8f25dc3ddfc5e5cbe1fbbccb2be2ef2d1ed2e5eb546b7b644f172b
+SIZE (xpi/firefox-i18n-10.0.6/ar.xpi) = 263703
+SHA256 (xpi/firefox-i18n-10.0.6/ast.xpi) = 693dcf5ca51445fb819f06576f4dbf88f009888548c08fdb220016064bf79adc
+SIZE (xpi/firefox-i18n-10.0.6/ast.xpi) = 237975
+SHA256 (xpi/firefox-i18n-10.0.6/be.xpi) = 0b919085607f82d292b9ec1dd209425753e003c862d60b4ac9a6fe654906eeb2
+SIZE (xpi/firefox-i18n-10.0.6/be.xpi) = 245758
+SHA256 (xpi/firefox-i18n-10.0.6/bg.xpi) = 8971cc2266fa8792d50dd3d2056ffd2a1f8660b8eba9eb33ee5fc35bf8788431
+SIZE (xpi/firefox-i18n-10.0.6/bg.xpi) = 276757
+SHA256 (xpi/firefox-i18n-10.0.6/bn-BD.xpi) = e347b8ab7dbbbe82c5307f86e54124d51621e7659e87f05309e452b23feec59f
+SIZE (xpi/firefox-i18n-10.0.6/bn-BD.xpi) = 288294
+SHA256 (xpi/firefox-i18n-10.0.6/bn-IN.xpi) = 7efe3f87ec6361adc2ea3d4c8a2dfd65f153df0fc7518c4c5ccc02c587576fef
+SIZE (xpi/firefox-i18n-10.0.6/bn-IN.xpi) = 319305
+SHA256 (xpi/firefox-i18n-10.0.6/br.xpi) = 711e340366af7f37c93ce4810aaa5fd3bd20fb40748e0f32048cfed59a18c9ed
+SIZE (xpi/firefox-i18n-10.0.6/br.xpi) = 247652
+SHA256 (xpi/firefox-i18n-10.0.6/bs.xpi) = 3e26878d409e9fcdf5fb37e79dfa34728c9d6a0295697d03da17ff1c722ef8c0
+SIZE (xpi/firefox-i18n-10.0.6/bs.xpi) = 245309
+SHA256 (xpi/firefox-i18n-10.0.6/ca.xpi) = c11cc996602b84401d104f0cb8bfaa554e690631d4d5ddcdee96b968d3533440
+SIZE (xpi/firefox-i18n-10.0.6/ca.xpi) = 248222
+SHA256 (xpi/firefox-i18n-10.0.6/cs.xpi) = 92167d82e7147d37491f4d1d82459eeb119cc08237b458af63131df0da85538a
+SIZE (xpi/firefox-i18n-10.0.6/cs.xpi) = 248770
+SHA256 (xpi/firefox-i18n-10.0.6/cy.xpi) = 53d3f45d0f100104bbda99f8a1089edd7fa57b2f5088886441b148a0f35186b7
+SIZE (xpi/firefox-i18n-10.0.6/cy.xpi) = 244198
+SHA256 (xpi/firefox-i18n-10.0.6/da.xpi) = 8f4a2747f812f88f6112fec3703435c9fd3ae8def414cb85e136fd99b43a48a8
+SIZE (xpi/firefox-i18n-10.0.6/da.xpi) = 240329
+SHA256 (xpi/firefox-i18n-10.0.6/de.xpi) = 8d0a6464ee98177971d7ec20e1df4af517c7e48403b9026d0776ecdfe925b8d5
+SIZE (xpi/firefox-i18n-10.0.6/de.xpi) = 249298
+SHA256 (xpi/firefox-i18n-10.0.6/el.xpi) = 73c6eae12969b8b7e5b20bc96ae6b870317faa3fff754e3ea9cfcfac64a7ba03
+SIZE (xpi/firefox-i18n-10.0.6/el.xpi) = 264380
+SHA256 (xpi/firefox-i18n-10.0.6/en-GB.xpi) = dbdb2adc7e324b5eac7d31516785e063856574d35079dad19afc2e595d9e8d44
+SIZE (xpi/firefox-i18n-10.0.6/en-GB.xpi) = 231194
+SHA256 (xpi/firefox-i18n-10.0.6/en-US.xpi) = b2217f011802848b0927cc3a2d4ea704d900980abfc82c8b9249637a5af72a38
+SIZE (xpi/firefox-i18n-10.0.6/en-US.xpi) = 230682
+SHA256 (xpi/firefox-i18n-10.0.6/en-ZA.xpi) = e7eed628b1697df9aed2f4f9cad48bca599329731f9ca1b4c8f9cd17f7ec7bee
+SIZE (xpi/firefox-i18n-10.0.6/en-ZA.xpi) = 233920
+SHA256 (xpi/firefox-i18n-10.0.6/eo.xpi) = d39877ff8175bd6818ab511efcffcfecb3bee6487d664d693664c350dd744a6b
+SIZE (xpi/firefox-i18n-10.0.6/eo.xpi) = 240903
+SHA256 (xpi/firefox-i18n-10.0.6/es-AR.xpi) = 4aa9273a193b6c2df90fd2a489dee796dcb2de5d4fd2f914406701b2c43d2a3c
+SIZE (xpi/firefox-i18n-10.0.6/es-AR.xpi) = 245347
+SHA256 (xpi/firefox-i18n-10.0.6/es-CL.xpi) = 478dd9e5e32da2f50765c3b75b7e8d9eda1980f1580600837da058bfbbb16d26
+SIZE (xpi/firefox-i18n-10.0.6/es-CL.xpi) = 250206
+SHA256 (xpi/firefox-i18n-10.0.6/es-ES.xpi) = cb398f47eb32eb167f5fdd07ac5f6f0de3dcfe068b92abee5cc37fa883c3587e
+SIZE (xpi/firefox-i18n-10.0.6/es-ES.xpi) = 215379
+SHA256 (xpi/firefox-i18n-10.0.6/es-MX.xpi) = 912041a15b11c2b91ee77061e6c4dadcef03eb78c0db32aa45747763e3eaa39c
+SIZE (xpi/firefox-i18n-10.0.6/es-MX.xpi) = 224152
+SHA256 (xpi/firefox-i18n-10.0.6/et.xpi) = 97ad3fa377128ea18642e296dcd8ac69a11ee9c30e5ee2013a2100e01ccc6a80
+SIZE (xpi/firefox-i18n-10.0.6/et.xpi) = 242631
+SHA256 (xpi/firefox-i18n-10.0.6/eu.xpi) = ae67b5c40d5cb1906b628a76f29fdd29ce5277aeb0bd99f6cb00eee245550f2f
+SIZE (xpi/firefox-i18n-10.0.6/eu.xpi) = 240252
+SHA256 (xpi/firefox-i18n-10.0.6/fa.xpi) = 070319a33fa625ffc7f746c8caeaa30de2203a6ae220507e147977b28dd18584
+SIZE (xpi/firefox-i18n-10.0.6/fa.xpi) = 272853
+SHA256 (xpi/firefox-i18n-10.0.6/fi.xpi) = c7060dfe81a684ea2e44edf1fd26c1ab85ad660866f090c47109c436fc48c57d
+SIZE (xpi/firefox-i18n-10.0.6/fi.xpi) = 243630
+SHA256 (xpi/firefox-i18n-10.0.6/fr.xpi) = d344e7047d5e1f2c9c6bcd5801803be54425c4258d32fc3622372a4c7e4685c7
+SIZE (xpi/firefox-i18n-10.0.6/fr.xpi) = 249569
+SHA256 (xpi/firefox-i18n-10.0.6/fy-NL.xpi) = 38c50af58aa4d59cddf263aae32dcd7fb37f448793dd9a932fc92ce143083d3c
+SIZE (xpi/firefox-i18n-10.0.6/fy-NL.xpi) = 249344
+SHA256 (xpi/firefox-i18n-10.0.6/ga-IE.xpi) = c7a818db2eb1d0c7ecf2547c6056f074252ff8d4cd2192707d78a428f8aacbde
+SIZE (xpi/firefox-i18n-10.0.6/ga-IE.xpi) = 252022
+SHA256 (xpi/firefox-i18n-10.0.6/gl.xpi) = 711483ba680433000f99ebf504a24b157b46c5961553f65b4fcdd28c55bd6aa5
+SIZE (xpi/firefox-i18n-10.0.6/gl.xpi) = 243250
+SHA256 (xpi/firefox-i18n-10.0.6/gu-IN.xpi) = 6459ed353bf0afe0c95f811bb4ab98d683c301f440b931db50f3d87b6fb98e7e
+SIZE (xpi/firefox-i18n-10.0.6/gu-IN.xpi) = 275222
+SHA256 (xpi/firefox-i18n-10.0.6/he.xpi) = 072102774068cff442cac177c6bc365cdce7fef8db41863ee9ed585d4c155bc2
+SIZE (xpi/firefox-i18n-10.0.6/he.xpi) = 264936
+SHA256 (xpi/firefox-i18n-10.0.6/hi-IN.xpi) = 4876f9028b759e95ba5ef387d2bd9b437a9fc35c8b03d91e7d6537c1ef6effe6
+SIZE (xpi/firefox-i18n-10.0.6/hi-IN.xpi) = 280001
+SHA256 (xpi/firefox-i18n-10.0.6/hr.xpi) = 3e70e99c8a6f8876e2b3a4614cb77ebf2593a30d4b2c348025a138ea0b238276
+SIZE (xpi/firefox-i18n-10.0.6/hr.xpi) = 249334
+SHA256 (xpi/firefox-i18n-10.0.6/hu.xpi) = bde22b4888ae6731a9cf57124786f3a0983841b2ff940d783525a98667e8fd1e
+SIZE (xpi/firefox-i18n-10.0.6/hu.xpi) = 253774
+SHA256 (xpi/firefox-i18n-10.0.6/hy-AM.xpi) = 007e555ca1c630fc9e70097084072b114080dbf5ab30d34de702dcaf8ff08036
+SIZE (xpi/firefox-i18n-10.0.6/hy-AM.xpi) = 445453
+SHA256 (xpi/firefox-i18n-10.0.6/id.xpi) = 9c63b92492b28044053632bb5ffc1b3d4d3621a48600e9d358f3dec37b728142
+SIZE (xpi/firefox-i18n-10.0.6/id.xpi) = 236825
+SHA256 (xpi/firefox-i18n-10.0.6/is.xpi) = 0e709be9d9e59ab4ac3ad7318fcfd6e04e60451f8f23d93f37d7688f97e6404e
+SIZE (xpi/firefox-i18n-10.0.6/is.xpi) = 243068
+SHA256 (xpi/firefox-i18n-10.0.6/it.xpi) = 854a0a014b3d43c8d48a642ce4db0576170607d3f0934b10463754e716404f09
+SIZE (xpi/firefox-i18n-10.0.6/it.xpi) = 212717
+SHA256 (xpi/firefox-i18n-10.0.6/ja.xpi) = 6e4e5382b86939f111d48d48874181fba7992a1dc4f144b1fa89a475aabd3627
+SIZE (xpi/firefox-i18n-10.0.6/ja.xpi) = 273116
+SHA256 (xpi/firefox-i18n-10.0.6/kk.xpi) = 1543dfae6d57791c1f7cd1450fef6156d7b25af679f9e095aa8bda3423ed0132
+SIZE (xpi/firefox-i18n-10.0.6/kk.xpi) = 279778
+SHA256 (xpi/firefox-i18n-10.0.6/kn.xpi) = e518d094d7de424cd471f248916b0e12a9c91b44ea7ef30d61be4e515b6d5f8a
+SIZE (xpi/firefox-i18n-10.0.6/kn.xpi) = 299831
+SHA256 (xpi/firefox-i18n-10.0.6/ko.xpi) = da302d37e3b379c88f36fed33572297fa53aa1f4aa351cdc74006ed0a6efdb8a
+SIZE (xpi/firefox-i18n-10.0.6/ko.xpi) = 227946
+SHA256 (xpi/firefox-i18n-10.0.6/ku.xpi) = e223385556e2a2b01a67e846c3779140b0cd0683bbc1129f150eda85fdf439f3
+SIZE (xpi/firefox-i18n-10.0.6/ku.xpi) = 254710
+SHA256 (xpi/firefox-i18n-10.0.6/lg.xpi) = 47bd7f943d0299f8e45363ce90432a7f8db73556a177b2e89542c1415a87c213
+SIZE (xpi/firefox-i18n-10.0.6/lg.xpi) = 247675
+SHA256 (xpi/firefox-i18n-10.0.6/lt.xpi) = 29153ea93d598db938aaface4bc9d434929d626eab262257db22ac567f1fd451
+SIZE (xpi/firefox-i18n-10.0.6/lt.xpi) = 330632
+SHA256 (xpi/firefox-i18n-10.0.6/lv.xpi) = d4396d3383523a10fea0e8c21fed6c6718d033adaf3dadf36de772f6478d1fc1
+SIZE (xpi/firefox-i18n-10.0.6/lv.xpi) = 244353
+SHA256 (xpi/firefox-i18n-10.0.6/mai.xpi) = adc09beb1c7d225286b8c80c3cd025b77d1a062b4572bf68947744f820ba793a
+SIZE (xpi/firefox-i18n-10.0.6/mai.xpi) = 279254
+SHA256 (xpi/firefox-i18n-10.0.6/mk.xpi) = 90926bd25619c52852a95169fe1a1e8e43345252ab77235b6a780a43e9f27383
+SIZE (xpi/firefox-i18n-10.0.6/mk.xpi) = 272940
+SHA256 (xpi/firefox-i18n-10.0.6/ml.xpi) = a8a732904dfad27625ace4a9d30b60efad5e68dca5562c589b3e6f74ab80d7bc
+SIZE (xpi/firefox-i18n-10.0.6/ml.xpi) = 306677
+SHA256 (xpi/firefox-i18n-10.0.6/mr.xpi) = ee899bcb18f75349af02781c1622a64c79afe11875a347e83959214198cbc4de
+SIZE (xpi/firefox-i18n-10.0.6/mr.xpi) = 281458
+SHA256 (xpi/firefox-i18n-10.0.6/nb-NO.xpi) = 22ab0722eb3ca0e09c38135740b2f28ea46b35bfdcfde546727780aa20fa9efd
+SIZE (xpi/firefox-i18n-10.0.6/nb-NO.xpi) = 241211
+SHA256 (xpi/firefox-i18n-10.0.6/nl.xpi) = 0010196c9155c131fa0b714859b725c1175b258b9c5b370adf82bafb40d3fd59
+SIZE (xpi/firefox-i18n-10.0.6/nl.xpi) = 242401
+SHA256 (xpi/firefox-i18n-10.0.6/nn-NO.xpi) = a839839df074e65e5f9cf8dea73222839c399456dc31e22369955cef8d9927e1
+SIZE (xpi/firefox-i18n-10.0.6/nn-NO.xpi) = 242454
+SHA256 (xpi/firefox-i18n-10.0.6/nso.xpi) = 2ddaa475bd94205c8879d7ebade9e335e0d095450967e795aa1c2fca6b51071c
+SIZE (xpi/firefox-i18n-10.0.6/nso.xpi) = 245696
+SHA256 (xpi/firefox-i18n-10.0.6/or.xpi) = 24ba406736cd813e308e243f8740254719ca712632eab44161964423c94153e0
+SIZE (xpi/firefox-i18n-10.0.6/or.xpi) = 281686
+SHA256 (xpi/firefox-i18n-10.0.6/pa-IN.xpi) = fdda80c487d8d41b99801e2667d5a550b5bbfbae8b531e77d1bb108f5d0ee1e4
+SIZE (xpi/firefox-i18n-10.0.6/pa-IN.xpi) = 282146
+SHA256 (xpi/firefox-i18n-10.0.6/pl.xpi) = 9b088358c6142a1f9dea8095aa1d76632d0b4a4e7b6507030f20e799b34f519d
+SIZE (xpi/firefox-i18n-10.0.6/pl.xpi) = 252047
+SHA256 (xpi/firefox-i18n-10.0.6/pt-BR.xpi) = 800b17a268cb1c9bc01dfd02f75a57901e168d1a365124be7d545261f23362eb
+SIZE (xpi/firefox-i18n-10.0.6/pt-BR.xpi) = 246850
+SHA256 (xpi/firefox-i18n-10.0.6/pt-PT.xpi) = bee12dbd880df017857fce00ca96e2971b042c636a47a8006d4ac5fb8af907c9
+SIZE (xpi/firefox-i18n-10.0.6/pt-PT.xpi) = 246477
+SHA256 (xpi/firefox-i18n-10.0.6/rm.xpi) = 986cbc3b656a44ef299507677cf3aa2fb7285ff8cdbb9a8dfcd32284d9759fdd
+SIZE (xpi/firefox-i18n-10.0.6/rm.xpi) = 245772
+SHA256 (xpi/firefox-i18n-10.0.6/ro.xpi) = 08f554cca27cc747941c8c16f79f48d59ef79fcfa16e91e52a6fa78407af8d3d
+SIZE (xpi/firefox-i18n-10.0.6/ro.xpi) = 263252
+SHA256 (xpi/firefox-i18n-10.0.6/ru.xpi) = 2ccc52e9782d07dfd48e37befadfc2a988a9dffa78181a67735e048c8ae55b59
+SIZE (xpi/firefox-i18n-10.0.6/ru.xpi) = 254985
+SHA256 (xpi/firefox-i18n-10.0.6/si.xpi) = 303e3effa6882a75033851866162e143438daa3294baf9da449b67e465e6ad24
+SIZE (xpi/firefox-i18n-10.0.6/si.xpi) = 271990
+SHA256 (xpi/firefox-i18n-10.0.6/sk.xpi) = f06bdc827385e392bf1d7beacd6d1a27f8142e62f725e124d56dfe1911730d8f
+SIZE (xpi/firefox-i18n-10.0.6/sk.xpi) = 254290
+SHA256 (xpi/firefox-i18n-10.0.6/sl.xpi) = 6f3d840c7eb96aff3d8cc85ae811442b479c5df4ba11ad05e8f2461b45268130
+SIZE (xpi/firefox-i18n-10.0.6/sl.xpi) = 241036
+SHA256 (xpi/firefox-i18n-10.0.6/son.xpi) = b46ac6193addbc2bdc927d3132786fc280f954a1e6565b15343f2cb8db13f285
+SIZE (xpi/firefox-i18n-10.0.6/son.xpi) = 239061
+SHA256 (xpi/firefox-i18n-10.0.6/sq.xpi) = e441e6c6275cb4812a2cfcae1204ed749b7137c4a3b1e204840583a600ab8f80
+SIZE (xpi/firefox-i18n-10.0.6/sq.xpi) = 227697
+SHA256 (xpi/firefox-i18n-10.0.6/sr.xpi) = 76c08f49cd5a93c6a6941c9c1b0c428aef745364da66635c4828e70d0c7b7cee
+SIZE (xpi/firefox-i18n-10.0.6/sr.xpi) = 277746
+SHA256 (xpi/firefox-i18n-10.0.6/sv-SE.xpi) = c2f9b3b8573a0a0846af49d83f22927f0a96570e2eba8fc2515d72b2c445974d
+SIZE (xpi/firefox-i18n-10.0.6/sv-SE.xpi) = 278881
+SHA256 (xpi/firefox-i18n-10.0.6/ta-LK.xpi) = f5023259018b3c6ab82cbb5bdf4805e1c5b29c89b7f2e7918827efc64ad9e8f3
+SIZE (xpi/firefox-i18n-10.0.6/ta-LK.xpi) = 290619
+SHA256 (xpi/firefox-i18n-10.0.6/ta.xpi) = ce5678df5858058551380c610c881ff4cd0427996ec6668a92463a03dc1dfad7
+SIZE (xpi/firefox-i18n-10.0.6/ta.xpi) = 274057
+SHA256 (xpi/firefox-i18n-10.0.6/te.xpi) = b1039acba0357763748d9ebacecf549e87c460fb428f16007c41bb0a06df2d04
+SIZE (xpi/firefox-i18n-10.0.6/te.xpi) = 289046
+SHA256 (xpi/firefox-i18n-10.0.6/th.xpi) = 7de6fae68724137d911c96f5edb7bdb0c3a458e3c7afe9e210ddbbdd4bfe442f
+SIZE (xpi/firefox-i18n-10.0.6/th.xpi) = 272423
+SHA256 (xpi/firefox-i18n-10.0.6/tr.xpi) = 9678556c04f63dde415c8725769ddd4283c263ea231f758e957f2dfb2fe3ce0b
+SIZE (xpi/firefox-i18n-10.0.6/tr.xpi) = 249918
+SHA256 (xpi/firefox-i18n-10.0.6/uk.xpi) = 445e60cbbe3564db1a23d281544f396c59bb2229be774bb5cc75e7d83b515a5b
+SIZE (xpi/firefox-i18n-10.0.6/uk.xpi) = 279133
+SHA256 (xpi/firefox-i18n-10.0.6/vi.xpi) = d1022e161a0373603506b83a7a9ccfbc7f70e49f085f666f26ef530f3d500a6a
+SIZE (xpi/firefox-i18n-10.0.6/vi.xpi) = 262787
+SHA256 (xpi/firefox-i18n-10.0.6/zh-CN.xpi) = 1c4d65bf07004888d5d51c2618580ca776bd809a298cb9c8dde5067a5bae6c61
+SIZE (xpi/firefox-i18n-10.0.6/zh-CN.xpi) = 256547
+SHA256 (xpi/firefox-i18n-10.0.6/zh-TW.xpi) = e20b85a2932da0d92860a153a0ad79fc5b7d0102fc988952e0520be6b5e2e407
+SIZE (xpi/firefox-i18n-10.0.6/zh-TW.xpi) = 257493
+SHA256 (xpi/firefox-i18n-10.0.6/zu.xpi) = d29b68ca21afa2c07b2d5789a205d30fd5c1b01294f5759933790c2e08b30330
+SIZE (xpi/firefox-i18n-10.0.6/zu.xpi) = 246396
diff --git a/www/firefox-esr/Makefile b/www/firefox-esr/Makefile
index 80f5af0cc432..813f223ab1da 100644
--- a/www/firefox-esr/Makefile
+++ b/www/firefox-esr/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= firefox
-DISTVERSION= 10.0.5
+DISTVERSION= 10.0.6
PORTEPOCH= 1
CATEGORIES= www ipv6
MASTER_SITES= ${MASTER_SITE_MOZILLA}
@@ -17,28 +17,27 @@ MAINTAINER= gecko@FreeBSD.org
COMMENT= Web browser based on the browser portion of Mozilla
BUILD_DEPENDS= nspr>=4.8.8:${PORTSDIR}/devel/nspr \
+ nss>=3.13.1:${PORTSDIR}/security/nss \
+ sqlite3>=3.7.7.1:${PORTSDIR}/databases/sqlite3 \
cairo>=1.10.2_1,1:${PORTSDIR}/graphics/cairo \
unzip:${PORTSDIR}/archivers/unzip
-LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo \
- event-1.4:${PORTSDIR}/devel/libevent
CONFLICTS_BUILD= spidermonkey-*
-USE_AUTOTOOLS= autoconf213
+USE_AUTOTOOLS= autoconf213:env
LATEST_LINK= firefox-esr
USE_GECKO= gecko
CONFLICTS= firefox-1[1-9].*
MOZ_PKGCONFIG_FILES= # empty
-USE_MOZILLA= -png -nss -dbm -jpeg -xft
+USE_MOZILLA= # empty
MOZILLA_NAME= Firefox
-MOZ_TOOLKIT= cairo-gtk2
MAKE_JOBS_SAFE= yes
WANT_GNOME= yes
+USE_QT4= # empty
+QT_NONSTANDARD= yes
ALL_TARGET= default
-CONFIGURE_ENV= LOCALBASE=${LOCALBASE}
-EXTRA_CFLAGS= -O2
-HAS_CONFIGURE= yes
+GNU_CONFIGURE= yes
USE_BZIP2= yes
USE_GMAKE= yes
USE_GL= gl
@@ -47,51 +46,51 @@ NO_MOZPKGINSTALL=yes
FIREFOX_ICON= ${MOZILLA}.png
FIREFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default48.png
MOZ_OPTIONS= --program-transform-name='s/firefox/${MOZILLA}/' \
- --with-default-mozilla-five-home=${PREFIX}/lib/${MOZILLA} \
- --enable-svg --enable-svg-renderer=cairo \
--enable-application=browser \
- --enable-official-branding --disable-updater \
- --enable-canvas --enable-libxul --disable-necko-wifi \
- --with-system-libevent=${LOCALBASE}
+ --enable-official-branding
-OPTIONS= DBUS "Enable D-BUS support" on \
- PGO "Enable Profile-Guided Optimization" off
+OPTIONS_DEFINE= PGO
+.include "${.CURDIR}/../../www/firefox/Makefile.options"
.include <bsd.port.pre.mk>
WRKSRC:= ${WRKDIR}/mozilla-esr10
-.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 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 defined(WITH_PGO)
-BROKEN= does not build with PGO option enabled
+.if ${PORT_OPTIONS:MPGO}
BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3
USE_PYTHON_BUILD= yes
USE_DISPLAY= yes
.include "${PORTSDIR}/Mk/bsd.python.mk"
-MAKEFILE= client.mk
+.undef GNU_CONFIGURE
+MOZ_OPTIONS+= ${CONFIGURE_TARGET}
+MAKEFILE= ${WRKSRC}/client.mk
ALL_TARGET= profiledbuild
+MOZ_MK_OPTIONS+=PROFILE_GEN_SCRIPT='"${PYTHON_CMD} \
+ @MOZ_OBJDIR@/_profile/pgo/profileserver.py"'
.endif
.if ${ARCH} == amd64 || ${ARCH} == i386
BUILD_DEPENDS+= yasm:${PORTSDIR}/devel/yasm
.endif
+.if !empty(CXX:M*clang++*)
+CXXFLAGS+= -Wno-return-type-c-linkage
+.endif
+
pre-extract:
-.if defined(WITH_PGO)
+.if ${PORT_OPTIONS:MPGO}
@${ECHO} "*****************************************************************"
@${ECHO} "**************************** attention **************************"
@${ECHO} "*****************************************************************"
@@ -110,38 +109,13 @@ post-extract:
<${FILESDIR}/firefox.desktop.in >${WRKDIR}/${MOZILLA}.desktop
post-patch:
- @${GREP} -Flr \"/proc ${WRKSRC}/ipc/chromium/src/base | ${XARGS} ${REINPLACE_CMD} \
- -e 's|/proc/self/fd|/dev/fd|' \
- -e 's|/proc["/]|/compat/linux&|'
- ${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \
- ${WRKSRC}/storage/build/Makefile.in \
- ${WRKSRC}/toolkit/library/Makefile.in \
- ${WRKSRC}/db/sqlite3/src/Makefile.in
- @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
- ${WRKSRC}/security/manager/ssl/src/Makefile.in \
- ${WRKSRC}/js/src/config/mkdepend/Makefile.in \
- ${WRKSRC}/js/src/config/config.mk \
- ${WRKSRC}/config/mkdepend/Makefile.in \
- ${WRKSRC}/config/config.mk \
- ${WRKSRC}/xpcom/io/nsAppFileLocationProvider.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}/js/src/configure.in
+ @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ ${WRKSRC}/browser/app/nsBrowserApp.cpp
pre-configure:
(cd ${WRKSRC} && ${AUTOCONF})
(cd ${WRKSRC}/js/src/ && ${AUTOCONF})
-post-configure:
-.if defined(WITH_PGO)
- @${SED} -e 's|@PYTHON@|${PYTHON_CMD}|' \
- <${FILESDIR}/mozconfig-profile_guided_optimization.in \
- >> ${BUILD_WRKSRC}/.mozconfig
- (cd ${WRKSRC} && ${GMAKE} distclean)
-.endif
-
port-pre-install:
${ECHO_CMD} 'share/applications/${MOZILLA}.desktop' >> ${PLISTF}
${ECHO_CMD} "@exec mkdir -p %D/include/firefox/nss" >> ${PLISTD}
diff --git a/www/firefox-esr/distinfo b/www/firefox-esr/distinfo
index 7960dcbe894b..17bb1850703c 100644
--- a/www/firefox-esr/distinfo
+++ b/www/firefox-esr/distinfo
@@ -1,2 +1,2 @@
-SHA256 (firefox-10.0.5esr.source.tar.bz2) = c91c0418ad199ea6950a31ad9097ba306970115887b51bbc2a5672edb462179c
-SIZE (firefox-10.0.5esr.source.tar.bz2) = 75448904
+SHA256 (firefox-10.0.6esr.source.tar.bz2) = 03e5766cdc866bfb065fb1d0ecba9bb3530bdbe2041c52cdad5126e38f7184b5
+SIZE (firefox-10.0.6esr.source.tar.bz2) = 75450691
diff --git a/www/firefox-esr/files/mozconfig-profile_guided_optimization.in b/www/firefox-esr/files/mozconfig-profile_guided_optimization.in
deleted file mode 100644
index 5caba0f4196d..000000000000
--- a/www/firefox-esr/files/mozconfig-profile_guided_optimization.in
+++ /dev/null
@@ -1 +0,0 @@
-mk_add_options PROFILE_GEN_SCRIPT='@PYTHON@ $(OBJDIR)/_profile/pgo/profileserver.py'
diff --git a/www/firefox-esr/files/patch-alsapulse b/www/firefox-esr/files/patch-alsapulse
new file mode 100644
index 000000000000..175b41680977
--- /dev/null
+++ b/www/firefox-esr/files/patch-alsapulse
@@ -0,0 +1,119 @@
+--- config/autoconf.mk.in~
++++ config/autoconf.mk.in
+@@ -568,7 +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@
+--- configure.in~
++++ configure.in
+@@ -5758,17 +5775,48 @@ 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_CFLAGS)
++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 ========================================================
+--- media/libsydneyaudio/src/Makefile.in~
++++ 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
+--- toolkit/library/libxul-config.mk~
++++ toolkit/library/libxul-config.mk
+@@ -348,10 +348,12 @@ ifdef MOZ_NATIVE_LIBVPX
+ EXTRA_DSO_LDOPTS += $(MOZ_LIBVPX_LIBS)
+ endif
+
+-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/firefox-esr/files/patch-browser-app-Makefile.in b/www/firefox-esr/files/patch-browser-app-Makefile.in
deleted file mode 100644
index 12c3f0bf8392..000000000000
--- a/www/firefox-esr/files/patch-browser-app-Makefile.in
+++ /dev/null
@@ -1,63 +0,0 @@
---- browser/app/Makefile.in 2011-09-28 22:24:36.000000000 +0200
-+++ ../../ff6/mozilla-release/browser/app/Makefile.in 2011-09-02 22:15:19.000000000 +0200
-@@ -92,22 +91,35 @@
- else
- # Build a binary bootstrapping with XRE_main
-
-+ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
- PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX)
-+else
-+PROGRAM = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
-+endif
-
- CPPSRCS = nsBrowserApp.cpp
-
- LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
- LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
--LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/build
-
--DEFINES += -DXPCOM_GLUE
--STL_FLAGS=
-+ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
-+LIBS += $(DIST)/bin/XUL
-+TK_LIBS := $(TK_LIBS)
-+else
-+EXTRA_DSO_LIBS += xul
-+endif
-
- LIBS += \
-+ $(STATIC_COMPONENTS_LINKER_PATH) \
- $(EXTRA_DSO_LIBS) \
-- $(XPCOM_STANDALONE_GLUE_LDOPTS) \
-+ $(XPCOM_GLUE_LDOPTS) \
-+ $(NSPR_LIBS) \
- $(NULL)
-
-+ifdef MOZ_JPROF
-+LIBS += -ljprof
-+endif
-+
- ifndef MOZ_WINCONSOLE
- ifdef MOZ_DEBUG
- MOZ_WINCONSOLE = 1
-@@ -182,9 +194,18 @@
-
- ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
-
--libs::
-- cp -p $(MOZ_APP_NAME)$(BIN_SUFFIX) $(DIST)/bin/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
-+$(MOZ_APP_NAME):: $(topsrcdir)/build/unix/mozilla.in $(GLOBAL_DEPS)
-+ cat $< | sed -e "s|%MOZAPPDIR%|$(installdir)|" \
-+ -e "s|%MOZ_APP_DISPLAYNAME%|$(MOZ_APP_DISPLAYNAME)|" > $@
-+ chmod +x $@
-+
-+libs:: $(MOZ_APP_NAME)
-+ $(INSTALL) $< $(DIST)/bin
-+
-+install:: $(MOZ_APP_NAME)
-+ $(SYSINSTALL) $< $(DESTDIR)$(bindir)
-
-+GARBAGE += $(MOZ_APP_NAME)
- GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/, firefox.js)
-
- endif
diff --git a/www/firefox-esr/files/patch-browser-app-nsBrowserApp.cpp b/www/firefox-esr/files/patch-browser-app-nsBrowserApp.cpp
index 8737fd9a2fa5..2d5190639b79 100644
--- a/www/firefox-esr/files/patch-browser-app-nsBrowserApp.cpp
+++ b/www/firefox-esr/files/patch-browser-app-nsBrowserApp.cpp
@@ -1,221 +1,10 @@
---- browser/app/nsBrowserApp.cpp 2011-09-28 22:24:36.000000000 +0200
-+++ ../../ff6/mozilla-release/browser/app/nsBrowserApp.cpp 2011-09-02 22:15:19.000000000 +0200
-@@ -36,19 +36,14 @@
- *
- * ***** END LICENSE BLOCK ***** */
-
--#include "nsXPCOMGlue.h"
- #include "nsXULAppAPI.h"
--#if defined(XP_WIN)
-+#ifdef XP_WIN
- #include <windows.h>
- #include <stdlib.h>
--#elif defined(XP_UNIX)
--#include <sys/time.h>
--#include <sys/resource.h>
- #endif
-
- #include <stdio.h>
- #include <stdarg.h>
--#include <string.h>
-
- #include "plstr.h"
- #include "prprf.h"
-@@ -59,16 +54,11 @@
- #include "nsStringGlue.h"
-
- #ifdef XP_WIN
-+// we want to use the DLL blocklist if possible
-+#define XRE_WANT_DLL_BLOCKLIST
- // we want a wmain entry point
- #include "nsWindowsWMain.cpp"
--#define snprintf _snprintf
--#define strcasecmp _stricmp
- #endif
--#include "BinaryPath.h"
--
--#include "nsXPCOMPrivate.h" // for MAXPATHLEN and XPCOM_DLL
--
--#include "mozilla/Telemetry.h"
-
- static void Output(const char *fmt, ... )
- {
-@@ -95,12 +85,12 @@
- {
- if (*++arg == '-')
- ++arg;
-- return !strcasecmp(arg, s);
-+ return !PL_strcasecmp(arg, s);
- }
-
- #if defined(XP_WIN) || defined(XP_OS2)
- if (*arg == '/')
-- return !strcasecmp(++arg, s);
-+ return !PL_strcasecmp(++arg, s);
+--- browser/app/nsBrowserApp.cpp~
++++ browser/app/nsBrowserApp.cpp
+@@ -197,6 +197,7 @@ int main(int argc, char* argv[])
+ TriggerQuirks();
#endif
- return PR_FALSE;
-@@ -116,48 +106,22 @@
- ~ScopedLogging() { NS_LogTerm(); }
- };
-
--XRE_GetFileFromPathType XRE_GetFileFromPath;
--XRE_CreateAppDataType XRE_CreateAppData;
--XRE_FreeAppDataType XRE_FreeAppData;
--#ifdef XRE_HAS_DLL_BLOCKLIST
--XRE_SetupDllBlocklistType XRE_SetupDllBlocklist;
--#endif
--XRE_TelemetryAccumulateType XRE_TelemetryAccumulate;
--XRE_mainType XRE_main;
--
--static const nsDynamicFunctionLoad kXULFuncs[] = {
-- { "XRE_GetFileFromPath", (NSFuncPtr*) &XRE_GetFileFromPath },
-- { "XRE_CreateAppData", (NSFuncPtr*) &XRE_CreateAppData },
-- { "XRE_FreeAppData", (NSFuncPtr*) &XRE_FreeAppData },
--#ifdef XRE_HAS_DLL_BLOCKLIST
-- { "XRE_SetupDllBlocklist", (NSFuncPtr*) &XRE_SetupDllBlocklist },
--#endif
-- { "XRE_TelemetryAccumulate", (NSFuncPtr*) &XRE_TelemetryAccumulate },
-- { "XRE_main", (NSFuncPtr*) &XRE_main },
-- { nsnull, nsnull }
--};
--
--static int do_main(const char *exePath, int argc, char* argv[])
-+int main(int argc, char* argv[])
- {
-+ ScopedLogging log;
-+
- nsCOMPtr<nsILocalFile> appini;
--#ifdef XP_WIN
-- // exePath comes from mozilla::BinaryPath::Get, which returns a UTF-8
-- // encoded path, so it is safe to convert it
-- nsresult rv = NS_NewLocalFile(NS_ConvertUTF8toUTF16(exePath), false,
-- getter_AddRefs(appini));
--#else
-- nsresult rv = NS_NewNativeLocalFile(nsDependentCString(exePath), false,
-- getter_AddRefs(appini));
--#endif
-+ nsresult rv = XRE_GetBinaryPath(argv[0], getter_AddRefs(appini));
++ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko19:%%LOCALBASE%%/lib/npapi/symlinks/firefox", 0);
+ nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath);
if (NS_FAILED(rv)) {
-+ Output("Couldn't calculate the application directory.");
- return 255;
- }
--
- appini->SetNativeLeafName(NS_LITERAL_CSTRING("application.ini"));
-
- // Allow firefox.exe to launch XULRunner apps via -app <application.ini>
- // Note that -app must be the *first* argument.
-- const char *appDataFile = getenv("XUL_APP_FILE");
-+ char *appEnv = nsnull;
-+ const char *appDataFile = PR_GetEnv("XUL_APP_FILE");
- if (appDataFile && *appDataFile) {
- rv = XRE_GetFileFromPath(appDataFile, getter_AddRefs(appini));
- if (NS_FAILED(rv)) {
-@@ -177,12 +141,8 @@
- return 255;
- }
-
-- char appEnv[MAXPATHLEN];
-- snprintf(appEnv, MAXPATHLEN, "XUL_APP_FILE=%s", argv[2]);
-- if (putenv(appEnv)) {
-- Output("Couldn't set %s.\n", appEnv);
-- return 255;
-- }
-+ appEnv = PR_smprintf("XUL_APP_FILE=%s", argv[2]);
-+ PR_SetEnv(appEnv);
- argv[2] = argv[0];
- argv += 2;
- argc -= 2;
-@@ -197,90 +157,7 @@
-
- int result = XRE_main(argc, argv, appData);
- XRE_FreeAppData(appData);
-- return result;
--}
--
--int main(int argc, char* argv[])
--{
-- char exePath[MAXPATHLEN];
--
-- nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath);
-- if (NS_FAILED(rv)) {
-- Output("Couldn't calculate the application directory.\n");
-- return 255;
-- }
--
-- char *lastSlash = strrchr(exePath, XPCOM_FILE_PATH_SEPARATOR[0]);
-- if (!lastSlash || (lastSlash - exePath > MAXPATHLEN - sizeof(XPCOM_DLL) - 1))
-- return 255;
--
-- strcpy(++lastSlash, XPCOM_DLL);
--
-- int gotCounters;
--#if defined(XP_UNIX)
-- struct rusage initialRUsage;
-- gotCounters = !getrusage(RUSAGE_SELF, &initialRUsage);
--#elif defined(XP_WIN)
-- // GetProcessIoCounters().ReadOperationCount seems to have little to
-- // do with actual read operations. It reports 0 or 1 at this stage
-- // in the program. Luckily 1 coincides with when prefetch is
-- // enabled. If Windows prefetch didn't happen we can do our own
-- // faster dll preloading.
-- IO_COUNTERS ioCounters;
-- gotCounters = GetProcessIoCounters(GetCurrentProcess(), &ioCounters);
-- if (gotCounters && !ioCounters.ReadOperationCount)
--#endif
-- {
-- XPCOMGlueEnablePreload();
-- }
--
--
-- rv = XPCOMGlueStartup(exePath);
-- if (NS_FAILED(rv)) {
-- Output("Couldn't load XPCOM.\n");
-- return 255;
-- }
--
-- rv = XPCOMGlueLoadXULFunctions(kXULFuncs);
-- if (NS_FAILED(rv)) {
-- Output("Couldn't load XRE functions.\n");
-- return 255;
-- }
--
--#ifdef XRE_HAS_DLL_BLOCKLIST
-- XRE_SetupDllBlocklist();
--#endif
--
-- if (gotCounters) {
--#if defined(XP_WIN)
-- XRE_TelemetryAccumulate(mozilla::Telemetry::EARLY_GLUESTARTUP_READ_OPS,
-- int(ioCounters.ReadOperationCount));
-- XRE_TelemetryAccumulate(mozilla::Telemetry::EARLY_GLUESTARTUP_READ_TRANSFER,
-- int(ioCounters.ReadTransferCount / 1024));
-- IO_COUNTERS newIoCounters;
-- if (GetProcessIoCounters(GetCurrentProcess(), &newIoCounters)) {
-- XRE_TelemetryAccumulate(mozilla::Telemetry::GLUESTARTUP_READ_OPS,
-- int(newIoCounters.ReadOperationCount - ioCounters.ReadOperationCount));
-- XRE_TelemetryAccumulate(mozilla::Telemetry::GLUESTARTUP_READ_TRANSFER,
-- int((newIoCounters.ReadTransferCount - ioCounters.ReadTransferCount) / 1024));
-- }
--#elif defined(XP_UNIX)
-- XRE_TelemetryAccumulate(mozilla::Telemetry::EARLY_GLUESTARTUP_HARD_FAULTS,
-- int(initialRUsage.ru_majflt));
-- struct rusage newRUsage;
-- if (!getrusage(RUSAGE_SELF, &newRUsage)) {
-- XRE_TelemetryAccumulate(mozilla::Telemetry::GLUESTARTUP_HARD_FAULTS,
-- int(newRUsage.ru_majflt - initialRUsage.ru_majflt));
-- }
--#endif
-- }
--
-- int result;
-- {
-- ScopedLogging log;
-- result = do_main(exePath, argc, argv);
-- }
--
-- XPCOMGlueShutdown();
-+ if (appEnv)
-+ PR_smprintf_free(appEnv);
- return result;
- }
+ Output("Couldn't calculate the application directory.\n");
diff --git a/www/firefox-esr/files/patch-bug685258 b/www/firefox-esr/files/patch-bug685258
new file mode 100644
index 000000000000..ead2d3858209
--- /dev/null
+++ b/www/firefox-esr/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
+--- content/media/nsAudioStream.cpp
++++ 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/firefox-esr/files/patch-bug741737 b/www/firefox-esr/files/patch-bug741737
new file mode 100644
index 000000000000..b00aef3d1382
--- /dev/null
+++ b/www/firefox-esr/files/patch-bug741737
@@ -0,0 +1,90 @@
+changeset: 91900:eee73897136b
+user: Martin Stransky <stransky@redhat.com>
+date: Tue Apr 17 19:57:40 2012 -0400
+summary: Bug 741737 - Configure libvpx with pkgconfig. r=khuey, a=npotb
+
+diff --git a/configure.in b/configure.in
+--- configure.in
++++ configure.in
+@@ -5588,12 +5588,10 @@ MOZ_ARG_DISABLE_BOOL(webm,
+
+ dnl system libvpx Support
+ dnl ========================================================
+-MOZ_ARG_WITH_STRING(system-libvpx,
+-[ --with-system-libvpx=[PFX]
+- Use system libvpx [installed at prefix PFX]],
+- LIBVPX_DIR=$withval)
++MOZ_ARG_WITH_BOOL(system-libvpx,
++[ --with-system-libvpx Use system libvpx (located with pkgconfig)],
++ MOZ_NATIVE_LIBVPX=1)
+
+-MOZ_NATIVE_LIBVPX=
+ MOZ_LIBVPX_INCLUDES=
+ MOZ_LIBVPX_LIBS=
+
+@@ -5606,53 +5604,18 @@ if test -n "$MOZ_WEBM"; then
+ AC_DEFINE(MOZ_VP8_ENCODER)
+ fi
+
+- if test -n "$LIBVPX_DIR" -a "$LIBVPX_DIR" != no; then
+- _SAVE_CFLAGS=$CFLAGS
+- _SAVE_LDFLAGS=$LDFLAGS
+- _SAVE_LIBS=$LIBS
+- if test "${LIBVPX_DIR}" = "yes"; then
+- LIBVPX_DIR=/usr
+- fi
+- CFLAGS="-I${LIBVPX_DIR}/include $CFLAGS"
+- LDFLAGS="-L${LIBVPX_DIR}/lib $LDFLAGS"
+- MOZ_NATIVE_LIBVPX_DEC_TEST=
+- MOZ_CHECK_HEADER(vpx/vpx_decoder.h,
+- [if test ! -f "${LIBVPX_DIR}/include/vpx/vpx_decoder.h"; then
+- AC_MSG_ERROR([vpx/vpx_decoder.h found, but is not in ${LIBVPX_DIR}/include])
+- fi],
+- AC_MSG_ERROR([--with-system-libvpx requested but vpx/vpx_decoder.h not found]))
+- AC_CHECK_LIB(vpx, vpx_codec_dec_init_ver,
+- [MOZ_NATIVE_LIBVPX_DEC_TEST=1],
+- ([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found]))
+- if test -n "$MOZ_NATIVE_LIBVPX_DEC_TEST" ; then
+- AC_MSG_CHECKING([for libvpx version >= v0.9.7])
+- dnl We need at least v0.9.7 to fix several crash bugs (for which we
+- dnl had local patches prior to v0.9.7).
+- dnl
+- dnl This is a terrible test for the library version, but we don't
+- dnl have a good one. There is no version number in a public header,
+- dnl and testing the headers still doesn't guarantee we link against
+- dnl the right version. While we could call vpx_codec_version() at
+- dnl run-time, that would break cross-compiling. There are no
+- dnl additional exported symbols between the v0.9.7 release and the
+- dnl v0.9.6 one to check for.
+- AC_TRY_COMPILE([
+- #include <vpx/vpx_decoder.h>
+- #if !defined(VPX_CODEC_USE_INPUT_PARTITION)
+- #error "test failed."
+- #endif
+- ],
+- [return 0;],
+- [AC_MSG_RESULT([yes])
+- MOZ_NATIVE_LIBVPX=1
+- MOZ_LIBVPX_INCLUDES="-I${LIBVPX_DIR}/include"
+- MOZ_LIBVPX_LIBS="-L${LIBVPX_DIR}/lib -lvpx"],
+- [AC_MSG_RESULT([no])
+- AC_MSG_ERROR([--with-system-libvpx requested but it is not v0.9.7 or later])])
+- fi
+- CFLAGS=$_SAVE_CFLAGS
+- LDFLAGS=$_SAVE_LDFLAGS
+- LIBS=$_SAVE_LIBS
++ if test -n "$MOZ_NATIVE_LIBVPX"; then
++ dnl ============================
++ dnl === libvpx Version check ===
++ dnl ============================
++ dnl Check to see if we have a system libvpx package.
++ PKG_CHECK_MODULES(LIBVPX, vpx >= 0.9.7)
++
++ MOZ_CHECK_HEADER([vpx/vpx_decoder.h], [],
++ [AC_MSG_ERROR([Couldn't find vpx/vpx_decoder.h which is required for build with system libvpx. Use --without-system-libvpx to build with in-tree libvpx.])])
++
++ AC_CHECK_LIB(vpx, vpx_codec_dec_init_ver, [],
++ [AC_MSG_ERROR([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found])])
+ fi
+ fi
+
diff --git a/www/firefox-esr/files/patch-bug753046 b/www/firefox-esr/files/patch-bug753046
new file mode 100644
index 000000000000..4500d44bd9f3
--- /dev/null
+++ b/www/firefox-esr/files/patch-bug753046
@@ -0,0 +1,1267 @@
+# 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 $
+
+--- dom/plugins/ipc/PluginModuleChild.cpp.orig 2011-12-20 23:28:14.000000000 +0000
++++ 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 $
+
+--- dom/plugins/ipc/PluginModuleChild.h.orig 2011-12-20 23:28:14.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/Makefile.in.orig 2012-02-16 06:40:33.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/chromium-config.mk.orig 2012-02-16 07:40:33.000000000 +0100
++++ 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 $
+
+--- ipc/chromium/src/base/base_paths.h.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/debug_util_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000
++++ 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
++++ 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
+--- ipc/chromium/src/base/dir_reader_posix.h
++++ ipc/chromium/src/base/dir_reader_posix.h
+@@ -18,6 +18,8 @@
+
+ #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
+@@ -26,6 +28,8 @@
+
+ #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 $
+
+--- ipc/chromium/src/base/file_util.h.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/file_util_bsd.cc.orig 2012-01-07 18:21:18.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/file_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/message_loop.cc.orig 2012-02-16 07:40:33.000000000 +0100
++++ 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 $
+
+--- ipc/chromium/src/base/platform_file_posix.cc.orig 2011-06-15 21:57:27.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/platform_thread.h.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/process_util.h.orig 2011-12-21 00:28:19.000000000 +0100
++++ 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 $
+
+--- ipc/chromium/src/base/process_util_bsd.cc.orig 2012-04-01 00:04:28.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/process_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/sys_info_posix.cc.orig 2011-11-04 21:34:00.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/third_party/nspr/prcpucfg.h.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/third_party/nspr/prtime.cc.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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
+--- ipc/chromium/src/base/time_posix.cc
++++ 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 $
+
+--- ipc/chromium/src/build/build_config.h.orig 2012-03-13 01:36:53.000000000 +0000
++++ 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
+--- ipc/chromium/src/chrome/common/ipc_channel_posix.cc
++++ 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 $
+
+--- ipc/chromium/src/chrome/common/ipc_channel_posix.h.orig 2011-06-15 21:57:27.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/chrome/common/ipc_message_utils.h.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/chrome/common/transport_dib.h.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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 $
+
+--- ipc/glue/GeckoChildProcessHost.cpp.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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 ANDROID
++# if defined(OS_LINUX) || defined(OS_BSD)
++# if defined(ANDROID) || defined(OS_BSD)
+ path += "/lib";
+ # endif // 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 $
+
+--- toolkit/library/Makefile.in.orig 2012-05-23 18:57:09.000000000 +0000
++++ 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/firefox-esr/files/patch-build_unix_run-mozilla.sh b/www/firefox-esr/files/patch-build_unix_run-mozilla.sh
deleted file mode 100644
index aae079e55456..000000000000
--- a/www/firefox-esr/files/patch-build_unix_run-mozilla.sh
+++ /dev/null
@@ -1,12 +0,0 @@
---- build/unix/run-mozilla.sh.orig Tue Feb 14 19:56:54 2006
-+++ build/unix/run-mozilla.sh Fri Dec 8 15:49:48 2006
-@@ -443,6 +443,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/gecko19:%%LOCALBASE%%/lib/npapi/symlinks/firefox
-+export MOZ_PLUGIN_PATH
-+
- if [ $moz_debug -eq 1 ]
- then
- moz_debug_program ${1+"$@"}
diff --git a/www/firefox-esr/files/patch-config_config.mk b/www/firefox-esr/files/patch-config_config.mk
index bea88f7f78e4..c01a1463e5d4 100644
--- a/www/firefox-esr/files/patch-config_config.mk
+++ b/www/firefox-esr/files/patch-config_config.mk
@@ -4,7 +4,7 @@
-I$(srcdir) \
-I. \
-I$(DIST)/include -I$(DIST)/include/nsprpub \
-+ -I%%LOCALBASE%%/include \
++ -I$(LOCALBASE)/include \
$(if $(LIBXUL_SDK),-I$(LIBXUL_SDK)/include -I$(LIBXUL_SDK)/include/nsprpub) \
$(OS_INCLUDES) \
$(NULL)
diff --git a/www/firefox-esr/files/patch-config_mkdepend_Makefile.in b/www/firefox-esr/files/patch-config_mkdepend_Makefile.in
index 65687c7c5feb..59df0d99a4df 100644
--- a/www/firefox-esr/files/patch-config_mkdepend_Makefile.in
+++ b/www/firefox-esr/files/patch-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%%LOCALBASE%%/include
++HOST_CFLAGS += -DINCLUDEDIR=\"$(LOCALBASE)/include\" -DOBJSUFFIX=\".$(OBJ_SUFFIX)\" -I$(LOCALBASE)/include
+HOST_CFLAGS += $(XCFLAGS)
ifdef GNU_CC
diff --git a/www/firefox-esr/files/patch-configure.in b/www/firefox-esr/files/patch-configure.in
index 103defe63c68..5218c6a5a986 100644
--- a/www/firefox-esr/files/patch-configure.in
+++ b/www/firefox-esr/files/patch-configure.in
@@ -1,23 +1,5 @@
--- configure.in.orig 2010-11-04 21:05:18.000000000 +0100
+++ 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)
@@ -45,15 +27,29 @@
AC_DEFINE(HAVE_CLOCK_MONOTONIC)
AC_SUBST(HAVE_CLOCK_MONOTONIC)
AC_SUBST(REALTIME_LIBS)
-@@ -4808,7 +4810,7 @@ CFLAGS=$_SAVE_CFLAGS
+@@ -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 @@
VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC"
VPX_X86_ASM=1
@@ -62,7 +58,7 @@
+ 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
+ ;;
@@ -77,7 +73,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/firefox-esr/files/patch-db_sqlite3_src_Makefile.in b/www/firefox-esr/files/patch-db_sqlite3_src_Makefile.in
deleted file mode 100644
index e52ba517e14a..000000000000
--- a/www/firefox-esr/files/patch-db_sqlite3_src_Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- db/sqlite3/src/Makefile.in.orig 2009-04-28 11:12:00.829684825 +0000
-+++ db/sqlite3/src/Makefile.in 2009-04-28 11:12:20.628076799 +0000
-@@ -45,6 +45,8 @@
-
- include $(DEPTH)/config/autoconf.mk
-
-+OS_CFLAGS = -I../../../dist/include/sqlite3
-+OS_LIBS = %%PTHREAD_LIBS%% -lc
- MODULE = sqlite3
- LIBRARY_NAME = sqlite3
- FORCE_SHARED_LIB = 1
diff --git a/www/firefox-esr/files/patch-dom-plugins-ipc-PluginMessageUtils.cpp b/www/firefox-esr/files/patch-dom-plugins-ipc-PluginMessageUtils.cpp
new file mode 100644
index 000000000000..1dfabdbe21bd
--- /dev/null
+++ b/www/firefox-esr/files/patch-dom-plugins-ipc-PluginMessageUtils.cpp
@@ -0,0 +1,11 @@
+--- dom/plugins/ipc/PluginMessageUtils.cpp~
++++ 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/firefox-esr/files/patch-gfx-qcms-Makefile.in b/www/firefox-esr/files/patch-gfx-qcms-Makefile.in
deleted file mode 100644
index cc7414a33fe7..000000000000
--- a/www/firefox-esr/files/patch-gfx-qcms-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- gfx/qcms/Makefile.in.orig 2011-01-22 01:25:38.000000000 +0100
-+++ 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/firefox-esr/files/patch-gfx-ycbcr-Makefile.in b/www/firefox-esr/files/patch-gfx-ycbcr-Makefile.in
new file mode 100644
index 000000000000..bf6c28297222
--- /dev/null
+++ b/www/firefox-esr/files/patch-gfx-ycbcr-Makefile.in
@@ -0,0 +1,21 @@
+--- gfx/ycbcr/Makefile.in~
++++ 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/firefox-esr/files/patch-ipc-chromium-Makefile.in b/www/firefox-esr/files/patch-ipc-chromium-Makefile.in
new file mode 100644
index 000000000000..bba9d0124037
--- /dev/null
+++ b/www/firefox-esr/files/patch-ipc-chromium-Makefile.in
@@ -0,0 +1,28 @@
+--- ipc/chromium/Makefile.in~
++++ 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/firefox-esr/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc b/www/firefox-esr/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc
deleted file mode 100644
index 1c8dde492901..000000000000
--- a/www/firefox-esr/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc
+++ /dev/null
@@ -1,10 +0,0 @@
---- ipc/chromium/src/base/atomicops_internals_mutex.cc~
-+++ 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/firefox-esr/files/patch-ipc-chromium-src-base-dir_reader_linux.h b/www/firefox-esr/files/patch-ipc-chromium-src-base-dir_reader_linux.h
deleted file mode 100644
index 36749ba8abc4..000000000000
--- a/www/firefox-esr/files/patch-ipc-chromium-src-base-dir_reader_linux.h
+++ /dev/null
@@ -1,45 +0,0 @@
---- ipc/chromium/src/base/dir_reader_linux.h.orig 2011-12-16 21:29:22.000000000 +0100
-+++ 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/firefox-esr/files/patch-ipc-chromium-src-base-file_util_linux.cc b/www/firefox-esr/files/patch-ipc-chromium-src-base-file_util_linux.cc
index c6e4df63d444..2d4606bfc9cf 100644
--- a/www/firefox-esr/files/patch-ipc-chromium-src-base-file_util_linux.cc
+++ b/www/firefox-esr/files/patch-ipc-chromium-src-base-file_util_linux.cc
@@ -1,11 +1,8 @@
--- ipc/chromium/src/base/file_util_linux.cc~
+++ 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
- }
+@@ -5,6 +5,7 @@
+ #include "base/file_util.h"
+
+ #include <fcntl.h>
++#include <unistd.h>
+
diff --git a/www/firefox-esr/files/patch-ipc-chromium-src-base-file_util_posix.cc b/www/firefox-esr/files/patch-ipc-chromium-src-base-file_util_posix.cc
deleted file mode 100644
index b43b33f44510..000000000000
--- a/www/firefox-esr/files/patch-ipc-chromium-src-base-file_util_posix.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- ipc/chromium/src/base/file_util_posix.cc~
-+++ 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/firefox-esr/files/patch-ipc-chromium-src-base-message_pump_libevent.cc b/www/firefox-esr/files/patch-ipc-chromium-src-base-message_pump_libevent.cc
new file mode 100644
index 000000000000..dbabc6c5680c
--- /dev/null
+++ b/www/firefox-esr/files/patch-ipc-chromium-src-base-message_pump_libevent.cc
@@ -0,0 +1,19 @@
+--- ipc/chromium/src/base/message_pump_libevent.cc~
++++ ipc/chromium/src/base/message_pump_libevent.cc
+@@ -6,6 +6,7 @@
+
+ #include <errno.h>
+ #include <fcntl.h>
++#include <unistd.h>
+
+ #include "eintr_wrapper.h"
+ #include "base/logging.h"
+@@ -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/firefox-esr/files/patch-ipc-chromium-src-base-platform_file_posix.cc b/www/firefox-esr/files/patch-ipc-chromium-src-base-platform_file_posix.cc
deleted file mode 100644
index 01111459c4bb..000000000000
--- a/www/firefox-esr/files/patch-ipc-chromium-src-base-platform_file_posix.cc
+++ /dev/null
@@ -1,10 +0,0 @@
---- ipc/chromium/src/base/platform_file_posix.cc~
-+++ 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/firefox-esr/files/patch-ipc-chromium-src-base-platform_thread_posix.cc b/www/firefox-esr/files/patch-ipc-chromium-src-base-platform_thread_posix.cc
deleted file mode 100644
index 0b527d38d4f6..000000000000
--- a/www/firefox-esr/files/patch-ipc-chromium-src-base-platform_thread_posix.cc
+++ /dev/null
@@ -1,25 +0,0 @@
---- ipc/chromium/src/base/platform_thread_posix.cc~
-+++ ipc/chromium/src/base/platform_thread_posix.cc
-@@ -11,6 +11,7 @@
- #include <mach/mach.h>
- #elif defined(OS_LINUX)
- #include <sys/syscall.h>
-+#include <pthread_np.h>
- #include <unistd.h>
- #endif
-
-@@ -34,7 +35,13 @@ PlatformThreadId PlatformThread::Current
- #if defined(OS_MACOSX)
- return mach_thread_self();
- #elif defined(OS_LINUX)
-- return syscall(__NR_gettid);
-+#if __FreeBSD_version > 900030
-+ return pthread_getthreadid_np();
-+#else
-+ long tid;
-+ syscall(SYS_thr_self, &tid);
-+ return tid;
-+#endif
- #endif
- }
-
diff --git a/www/firefox-esr/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h b/www/firefox-esr/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h
deleted file mode 100644
index 75bf9d8a0269..000000000000
--- a/www/firefox-esr/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ipc/chromium/src/base/third_party/nspr/prcpucfg.h~
-+++ 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/firefox-esr/files/patch-ipc-chromium-src-base-time_posix.cc b/www/firefox-esr/files/patch-ipc-chromium-src-base-time_posix.cc
new file mode 100644
index 000000000000..61c059866013
--- /dev/null
+++ b/www/firefox-esr/files/patch-ipc-chromium-src-base-time_posix.cc
@@ -0,0 +1,10 @@
+--- ipc/chromium/src/base/time_posix.cc~
++++ ipc/chromium/src/base/time_posix.cc
+@@ -8,6 +9,7 @@
+ #include <mach/mach_time.h>
+ #endif
+ #include <sys/time.h>
++#include <unistd.h>
+ #ifdef ANDROID
+ #include <time64.h>
+ #else
diff --git a/www/firefox-esr/files/patch-ipc-chromium-src-build-build_config.h b/www/firefox-esr/files/patch-ipc-chromium-src-build-build_config.h
deleted file mode 100644
index 076370d85a80..000000000000
--- a/www/firefox-esr/files/patch-ipc-chromium-src-build-build_config.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ipc/chromium/src/build/build_config.h~
-+++ 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/firefox-esr/files/patch-js-src-Makefile.in b/www/firefox-esr/files/patch-js-src-Makefile.in
index b9f4996d371f..ece0ecdf76f2 100644
--- a/www/firefox-esr/files/patch-js-src-Makefile.in
+++ b/www/firefox-esr/files/patch-js-src-Makefile.in
@@ -1,24 +1,5 @@
--- js/src/Makefile.in.orig 2011-07-06 05:09:22.000000000 +0200
+++ js/src/Makefile.in 2011-07-06 22:23:46.363233778 +0200
-@@ -416,7 +416,7 @@
- # END enclude sources for V8 dtoa
- #############################################
-
--ifeq (,$(filter arm% sparc %86 x86_64,$(TARGET_CPU)))
-+ifeq (,$(filter arm% sparc %86 amd64 x86_64,$(TARGET_CPU)))
-
- VPATH += $(srcdir)/assembler \
- $(srcdir)/assembler/wtf \
-@@ -469,6 +469,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
@@ -793,7 +796,7 @@
endif # WINNT
diff --git a/www/firefox-esr/files/patch-js-src-config-mkdepend_Makefile.in b/www/firefox-esr/files/patch-js-src-config-mkdepend_Makefile.in
index fa2cc6012a3a..460b5d7850b0 100644
--- a/www/firefox-esr/files/patch-js-src-config-mkdepend_Makefile.in
+++ b/www/firefox-esr/files/patch-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%%LOCALBASE%%/include
++HOST_CFLAGS += -DINCLUDEDIR=\"$(LOCALBASE)/include\" -DOBJSUFFIX=\".$(OBJ_SUFFIX)\" -I$(LOCALBASE)/include
+HOST_CFLAGS += $(XCFLAGS)
ifdef GNU_CC
diff --git a/www/firefox-esr/files/patch-js-src-config_config.mk b/www/firefox-esr/files/patch-js-src-config_config.mk
index 13bf2e58a794..58873f3b1e9c 100644
--- a/www/firefox-esr/files/patch-js-src-config_config.mk
+++ b/www/firefox-esr/files/patch-js-src-config_config.mk
@@ -4,7 +4,7 @@
-I$(srcdir) \
-I. \
-I$(DIST)/include -I$(DIST)/include/nsprpub \
-+ -I%%LOCALBASE%%/include \
++ -I$(LOCALBASE)/include \
$(if $(LIBXUL_SDK),-I$(LIBXUL_SDK)/include -I$(LIBXUL_SDK)/include/nsprpub) \
$(OS_INCLUDES) \
$(NULL)
diff --git a/www/firefox-esr/files/patch-js-src-configure.in b/www/firefox-esr/files/patch-js-src-configure.in
index 27c02de1c14c..ac49f4fef3d9 100644
--- a/www/firefox-esr/files/patch-js-src-configure.in
+++ b/www/firefox-esr/files/patch-js-src-configure.in
@@ -1,40 +1,5 @@
--- js/src/configure.in.orig 2012-01-29 11:24:33.000000000 +0100
+++ js/src/configure.in 2012-01-30 23:30:02.051087215 +0100
-@@ -1410,7 +1410,7 @@
- CPU_ARCH=sparc
- ;;
-
--x86_64 | ia64)
-+amd64 | x86_64 | ia64)
- CPU_ARCH="$OS_TEST"
- ;;
-
-@@ -1432,7 +1432,7 @@
- dnl ===============================================================
- INTEL_ARCHITECTURE=
- case "$OS_TEST" in
-- x86_64|i?86)
-+ amd64|x86_64|i?86)
- INTEL_ARCHITECTURE=1
- esac
-
-@@ -2713,6 +2713,16 @@
- AC_DEFINE(JS_CPU_X86)
- AC_DEFINE(JS_NUNBOX32)
- ;;
-+amd64*-*)
-+ ENABLE_TRACEJIT=1
-+ NANOJIT_ARCH=X64
-+ ENABLE_METHODJIT=1
-+ ENABLE_MONOIC=1
-+ ENABLE_POLYIC=1
-+ ENABLE_POLYIC_TYPED_ARRAY=1
-+ AC_DEFINE(JS_CPU_X64)
-+ AC_DEFINE(JS_PUNBOX64)
-+ ;;
- x86_64*-*)
- NANOJIT_ARCH=X64
- ENABLE_METHODJIT=1
@@ -2732,6 +2742,7 @@
AC_DEFINE(JS_NUNBOX32)
;;
@@ -51,14 +16,11 @@
;;
esac
-@@ -2795,6 +2807,10 @@
- i?86-*)
- AC_DEFINE(AVMPLUS_IA32)
- ;;
-+amd64*-*)
-+ AC_DEFINE(AVMPLUS_AMD64)
-+ AC_DEFINE(AVMPLUS_64BIT)
-+ ;;
- x86_64*-*)
- AC_DEFINE(AVMPLUS_AMD64)
- AC_DEFINE(AVMPLUS_64BIT)
+@@ -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/firefox-esr/files/patch-js-src-methodjit-MethodJIT.cpp b/www/firefox-esr/files/patch-js-src-methodjit-MethodJIT.cpp
new file mode 100644
index 000000000000..d29c15ccc05a
--- /dev/null
+++ b/www/firefox-esr/files/patch-js-src-methodjit-MethodJIT.cpp
@@ -0,0 +1,20 @@
+--- js/src/methodjit/MethodJIT.cpp~
++++ 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/firefox-esr/files/patch-media-libsydneyaudio-include-sydney_audio.h b/www/firefox-esr/files/patch-media-libsydneyaudio-include-sydney_audio.h
deleted file mode 100644
index d8e318e9bcb2..000000000000
--- a/www/firefox-esr/files/patch-media-libsydneyaudio-include-sydney_audio.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- media/libsydneyaudio/include/sydney_audio.h.orgi 2009-04-10 12:24:01.000000000 +0200
-+++ media/libsydneyaudio/include/sydney_audio.h 2009-04-10 12:24:30.000000000 +0200
-@@ -73,7 +73,7 @@
- # endif
- #elif defined(WIN32)
- # define SA_LITTLE_ENDIAN 1
--#elif defined(__APPLE__)
-+#elif defined(__APPLE__) || defined(__FreeBSD__)
- # if defined(__BIG_ENDIAN__)
- # define SA_BIG_ENDIAN 1
- # else
diff --git a/www/firefox-esr/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c b/www/firefox-esr/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c
new file mode 100644
index 000000000000..a7fd5f1ffd09
--- /dev/null
+++ b/www/firefox-esr/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c
@@ -0,0 +1,13 @@
+--- media/libsydneyaudio/src/sydney_audio_oss.c~
++++ 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/firefox-esr/files/patch-memory-mozalloc-mozalloc.cpp b/www/firefox-esr/files/patch-memory-mozalloc-mozalloc.cpp
new file mode 100644
index 000000000000..2730ffbfc594
--- /dev/null
+++ b/www/firefox-esr/files/patch-memory-mozalloc-mozalloc.cpp
@@ -0,0 +1,21 @@
+--- memory/mozalloc/mozalloc.cpp~
++++ memory/mozalloc/mozalloc.cpp
+@@ -52,6 +52,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(MOZ_MEMORY)
+ // jemalloc.h doesn't redeclare symbols if they're provided by the OS
+@@ -259,7 +262,7 @@ moz_malloc_usable_size(void *ptr)
+
+ #if defined(XP_MACOSX)
+ return malloc_size(ptr);
+-#elif defined(MOZ_MEMORY)
++#elif defined(MOZ_MEMORY) || defined(__FreeBSD__)
+ return malloc_usable_size(ptr);
+ #elif defined(XP_WIN)
+ return _msize(ptr);
diff --git a/www/firefox-esr/files/patch-security-coreconf-FreeBSD.mk b/www/firefox-esr/files/patch-security-coreconf-FreeBSD.mk
index 279110fa0321..b1ea1eb209c0 100644
--- a/www/firefox-esr/files/patch-security-coreconf-FreeBSD.mk
+++ b/www/firefox-esr/files/patch-security-coreconf-FreeBSD.mk
@@ -1,6 +1,6 @@
--- security/coreconf/FreeBSD.mk.orig 2010-02-28 23:30:04.000000000 +0000
+++ security/coreconf/FreeBSD.mk 2010-03-03 02:05:22.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/firefox-esr/files/patch-security-nss-lib-Makefile b/www/firefox-esr/files/patch-security-nss-lib-Makefile
new file mode 100644
index 000000000000..51304f730c92
--- /dev/null
+++ b/www/firefox-esr/files/patch-security-nss-lib-Makefile
@@ -0,0 +1,11 @@
+--- security/nss/lib/Makefile~
++++ 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/firefox-esr/files/patch-security-nss-lib-freebl-mpi-mpcpucache.c b/www/firefox-esr/files/patch-security-nss-lib-freebl-mpi-mpcpucache.c
new file mode 100644
index 000000000000..eb54e8414e99
--- /dev/null
+++ b/www/firefox-esr/files/patch-security-nss-lib-freebl-mpi-mpcpucache.c
@@ -0,0 +1,45 @@
+--- security/nss/lib/freebl/mpi/mpcpucache.c.orig 2011-02-27 20:08:16.000000000 +0100
++++ security/nss/lib/freebl/mpi/mpcpucache.c 2011-02-27 20:09:24.000000000 +0100
+@@ -733,6 +733,34 @@
+ #endif
+
+ #if defined(__ppc64__)
++#if defined(__FreeBSD__)
++#include <sys/stddef.h>
++#include <sys/sysctl.h>
++
++#include <machine/cpu.h>
++#include <machine/md_var.h>
++
++unsigned long
++s_mpi_getProcessorLineSize()
++{
++ static int cacheline_size = 0;
++ static int cachemib[] = { CTL_MACHDEP, CPU_CACHELINE };
++ int clen;
++
++ if (cacheline_size > 0)
++ return cacheline_size;
++
++ clen = sizeof(cacheline_size);
++ if (sysctl(cachemib, sizeof(cachemib) / sizeof(cachemib[0]),
++ &cacheline_size, &clen, NULL, 0) < 0 || !cacheline_size)
++ return 128; /* guess */
++
++ return cacheline_size;
++}
++#else /* __FreeBSD__ */
++
++
++
+ /*
+ * Sigh, The PPC has some really nice features to help us determine cache
+ * size, since it had lots of direct control functions to do so. The POWER
+@@ -786,6 +814,7 @@
+ return 0;
+ }
+
++#endif /* __FreeBSD__ */
+ #define MPI_GET_PROCESSOR_LINE_SIZE_DEFINED 1
+ #endif
+
diff --git a/www/firefox-esr/files/patch-toolkit-xre-nsAppRunner.cpp b/www/firefox-esr/files/patch-toolkit-xre-nsAppRunner.cpp
new file mode 100644
index 000000000000..48220793cb59
--- /dev/null
+++ b/www/firefox-esr/files/patch-toolkit-xre-nsAppRunner.cpp
@@ -0,0 +1,11 @@
+--- toolkit/xre/nsAppRunner.cpp~
++++ toolkit/xre/nsAppRunner.cpp
+@@ -3133,7 +3133,7 @@ XRE_main(int argc, char* argv[], const n
+ gQtOnlyArgv[gQtOnlyArgc] = nsnull;
+ #endif
+ #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/firefox-esr/files/patch-toolkit_library_Makefile.in b/www/firefox-esr/files/patch-toolkit_library_Makefile.in
deleted file mode 100644
index 64b0c47e4b64..000000000000
--- a/www/firefox-esr/files/patch-toolkit_library_Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- toolkit/library/Makefile.in.orig 2010-01-11 12:13:08.000000000 -0500
-+++ 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/firefox-esr/files/patch-widget-src-qt-nsNativeThemeQt.cpp b/www/firefox-esr/files/patch-widget-src-qt-nsNativeThemeQt.cpp
new file mode 100644
index 000000000000..ff6c86b0d482
--- /dev/null
+++ b/www/firefox-esr/files/patch-widget-src-qt-nsNativeThemeQt.cpp
@@ -0,0 +1,12 @@
+--- widget/src/qt/nsNativeThemeQt.cpp~
++++ widget/src/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/firefox-esr/files/patch-widget-src-qt-nsSound.cpp b/www/firefox-esr/files/patch-widget-src-qt-nsSound.cpp
new file mode 100644
index 000000000000..603e9c53c76a
--- /dev/null
+++ b/www/firefox-esr/files/patch-widget-src-qt-nsSound.cpp
@@ -0,0 +1,10 @@
+--- widget/src/qt/nsSound.cpp~
++++ widget/src/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/firefox-esr/files/patch-widget-src-qt-nsWindow.cpp b/www/firefox-esr/files/patch-widget-src-qt-nsWindow.cpp
new file mode 100644
index 000000000000..7cf6a06ac0e6
--- /dev/null
+++ b/www/firefox-esr/files/patch-widget-src-qt-nsWindow.cpp
@@ -0,0 +1,10 @@
+--- widget/src/qt/nsWindow.cpp~
++++ widget/src/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/firefox-esr/files/patch-xpcom-io-nsAppFileLocationProvider.cpp b/www/firefox-esr/files/patch-xpcom-io-nsAppFileLocationProvider.cpp
deleted file mode 100644
index c16124abefa0..000000000000
--- a/www/firefox-esr/files/patch-xpcom-io-nsAppFileLocationProvider.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- xpcom/io/nsAppFileLocationProvider.cpp.orig 2011-09-30 15:52:07.000000000 +0200
-+++ xpcom/io/nsAppFileLocationProvider.cpp 2011-09-30 15:52:40.000000000 +0200
-@@ -238,7 +238,7 @@
- #if defined(HAVE_USR_LIB64_DIR) && defined(__LP64__)
- "/usr/lib64/mozilla/plugins";
- #else
-- "/usr/lib/mozilla/plugins";
-+ "%%LOCALBASE%%/lib/npapi/symlinks/firefox";
- #endif
- rv = NS_NewNativeLocalFile(nsDependentCString(sysLPlgDir),
- PR_FALSE, getter_AddRefs(localFile));
diff --git a/www/firefox-esr/files/patch-xpcom_base_nsStackWalk.cpp b/www/firefox-esr/files/patch-xpcom_base_nsStackWalk.cpp
index d9956b6852c3..32c3073071ff 100644
--- a/www/firefox-esr/files/patch-xpcom_base_nsStackWalk.cpp
+++ b/www/firefox-esr/files/patch-xpcom_base_nsStackWalk.cpp
@@ -9,3 +9,11 @@
#include <dlfcn.h>
#endif
+@@ -1123,6 +1123,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/firefox-esr/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in b/www/firefox-esr/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in
index 169fa43553d7..1934cc3aaa47 100644
--- a/www/firefox-esr/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in
+++ b/www/firefox-esr/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in
@@ -1,16 +1,6 @@
--- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2011-04-26 23:22:05.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in 2011-04-26 23:48:09.637442986 +0200
-@@ -94,6 +94,9 @@
- DEFINES += -DKEEP_STACK_16_BYTE_ALIGNED
- CPPSRCS := xptcinvoke_unixish_x86.cpp xptcstubs_unixish_x86.cpp
- endif
-+ifeq (x86_64,$(OS_TEST))
-+CPPSRCS := xptcinvoke_x86_64_linux.cpp xptcstubs_x86_64_linux.cpp
-+endif
- endif
- endif
-
-@@ -117,7 +120,7 @@
+@@ -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
-@@ -130,6 +133,12 @@
- 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)
- #
- ifeq ($(OS_TARGET),NTO)
-@@ -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/firefox-esr/pkg-message b/www/firefox-esr/pkg-message
index c685efa51197..541e7771f224 100644
--- a/www/firefox-esr/pkg-message
+++ b/www/firefox-esr/pkg-message
@@ -1,9 +1,9 @@
======================================================================
-SMB issues:
+smb:// issues (GNOMEVFS2 option):
Network group, machine, and share browsing does not work correctly.
-SFTP:
+sftp:// (GNOMEVFS2 option):
Only sftp access using public key authentication works. To easily
setup public key authentication to "remote_host":
@@ -16,7 +16,8 @@ The SSH server on remote_host must allow pub key authentication.
Firefox and HTML5
-Certain functions used to display HTML5 elements need the sem module.
+Certain functions used to display HTML5 elements need the sem module
+on 7.x and 8.x releases.
If your Firefox crashes with the following message while viewing a
HTML5 page:
diff --git a/www/firefox-i18n/Makefile b/www/firefox-i18n/Makefile
index 9d0eaa8fc079..a827d1f61d08 100644
--- a/www/firefox-i18n/Makefile
+++ b/www/firefox-i18n/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= firefox-i18n
-PORTVERSION= 13.0.1
+PORTVERSION= 14.0.1
CATEGORIES= www
MASTER_SITE_SUBDIR= firefox/releases/${PORTVERSION}/linux-i686/xpi
PKGNAMEPREFIX=
@@ -18,7 +18,7 @@ COMMENT= Localized interface for Firefox
EXTRACT_DEPENDS= zip:${PORTSDIR}/archivers/zip
-USE_FIREFOX= 13
+USE_FIREFOX= 14
USE_XPI= firefox linux-firefox
USE_SUBMAKE= yes
diff --git a/www/firefox-i18n/distinfo b/www/firefox-i18n/distinfo
index 40ecb750c5ba..24a9fab8de29 100644
--- a/www/firefox-i18n/distinfo
+++ b/www/firefox-i18n/distinfo
@@ -1,164 +1,164 @@
-SHA256 (xpi/firefox-i18n-13.0.1/af.xpi) = 573398208e394d2c3fba9713370bfb1740dcd3cfb1003bdf8c92c7fd81581ec4
-SIZE (xpi/firefox-i18n-13.0.1/af.xpi) = 253677
-SHA256 (xpi/firefox-i18n-13.0.1/ak.xpi) = 5a79414e59edfd8c2e800cb4336c2dfba4eb2385abf7d215fd86a5a23651179b
-SIZE (xpi/firefox-i18n-13.0.1/ak.xpi) = 255636
-SHA256 (xpi/firefox-i18n-13.0.1/ar.xpi) = 7ba52f246dc3bc1e7a3f0e323fd0a66887b1fe138b7dda07731a92d9628d582e
-SIZE (xpi/firefox-i18n-13.0.1/ar.xpi) = 279449
-SHA256 (xpi/firefox-i18n-13.0.1/ast.xpi) = c1ec9f5a108c99b3ab0f05626101c30b2fca3df2b7b5533eb9f861952cecdfe8
-SIZE (xpi/firefox-i18n-13.0.1/ast.xpi) = 243590
-SHA256 (xpi/firefox-i18n-13.0.1/be.xpi) = 45d029687377546d2ec4fd1abedacd8808ba66baeb55b693260f0ca622440be9
-SIZE (xpi/firefox-i18n-13.0.1/be.xpi) = 254129
-SHA256 (xpi/firefox-i18n-13.0.1/bg.xpi) = 3f8ae88dbca581759721ec87bd82fbd9945061588b509d922fb37e33e907f240
-SIZE (xpi/firefox-i18n-13.0.1/bg.xpi) = 293780
-SHA256 (xpi/firefox-i18n-13.0.1/bn-BD.xpi) = bc6da9119a5b2368225e2ab5038bcb0879bf005182a9209dcb6e16a1c6112dee
-SIZE (xpi/firefox-i18n-13.0.1/bn-BD.xpi) = 304099
-SHA256 (xpi/firefox-i18n-13.0.1/bn-IN.xpi) = 6f699ba65b21da1ca167cc035a7d7a069a1d8686fa5a365d04503a9b37c6b4fa
-SIZE (xpi/firefox-i18n-13.0.1/bn-IN.xpi) = 334512
-SHA256 (xpi/firefox-i18n-13.0.1/br.xpi) = ded6dc9c339860f0e3720bce78a84eb77356036457ce900c6d3c62fd188d92f0
-SIZE (xpi/firefox-i18n-13.0.1/br.xpi) = 262696
-SHA256 (xpi/firefox-i18n-13.0.1/bs.xpi) = 74124431289769d6a15359ef691150c5b2ea693cb1c57d4511eed82b2bd09227
-SIZE (xpi/firefox-i18n-13.0.1/bs.xpi) = 259822
-SHA256 (xpi/firefox-i18n-13.0.1/ca.xpi) = 9d26d6eeaebe42800bc80a1fa4a4d2f490ee194edcb0bcb28106c32b12f1d27f
-SIZE (xpi/firefox-i18n-13.0.1/ca.xpi) = 264021
-SHA256 (xpi/firefox-i18n-13.0.1/cs.xpi) = 444bbe96a0b3944814c0f5518fc36c970eb4a893823eea2d06b26d4d53819466
-SIZE (xpi/firefox-i18n-13.0.1/cs.xpi) = 265091
-SHA256 (xpi/firefox-i18n-13.0.1/cy.xpi) = 860520af3be2d7a4d800953b828992bbec3251248115bf7b631ec919495fbfe0
-SIZE (xpi/firefox-i18n-13.0.1/cy.xpi) = 256946
-SHA256 (xpi/firefox-i18n-13.0.1/da.xpi) = a48bd40c28fa07f87153d08e91aebdaab3df3705becd6def3246f4bfcb371ee7
-SIZE (xpi/firefox-i18n-13.0.1/da.xpi) = 254520
-SHA256 (xpi/firefox-i18n-13.0.1/de.xpi) = 013c351b0cefec695652a885469b9f543034f880712ba6c23586e460f0d1ac81
-SIZE (xpi/firefox-i18n-13.0.1/de.xpi) = 263951
-SHA256 (xpi/firefox-i18n-13.0.1/el.xpi) = 2cc7e1fad796f853877d22f603738418ea9e8338a3139803b7a41551cbf3f675
-SIZE (xpi/firefox-i18n-13.0.1/el.xpi) = 279000
-SHA256 (xpi/firefox-i18n-13.0.1/en-GB.xpi) = a0be4d2c8ea6cd10387a6229bf65b368e3aa3a56ee5ffd4ae867c09eab350357
-SIZE (xpi/firefox-i18n-13.0.1/en-GB.xpi) = 245758
-SHA256 (xpi/firefox-i18n-13.0.1/en-US.xpi) = 2ccb42dd7217317c09a97c603c1a7046e4acf4913a4135364e5486c1d795c7a4
-SIZE (xpi/firefox-i18n-13.0.1/en-US.xpi) = 245571
-SHA256 (xpi/firefox-i18n-13.0.1/en-ZA.xpi) = 2eb1c680b541ebe4d0f410952a71402a428f0b43e4990f96266f37a8fca49747
-SIZE (xpi/firefox-i18n-13.0.1/en-ZA.xpi) = 245509
-SHA256 (xpi/firefox-i18n-13.0.1/eo.xpi) = d7ac5ce18ca7ff7b75c46ed5260e73758e40bbf0b7fa41a698591b2dea22f3b9
-SIZE (xpi/firefox-i18n-13.0.1/eo.xpi) = 255732
-SHA256 (xpi/firefox-i18n-13.0.1/es-AR.xpi) = d2383c082fa2586583dfee7babd084ae3de5ea66f0cdfdfb3b55337994ad0580
-SIZE (xpi/firefox-i18n-13.0.1/es-AR.xpi) = 260607
-SHA256 (xpi/firefox-i18n-13.0.1/es-CL.xpi) = 46264ce08445c2018a9f87ffca08e8be400d58fc77ccff7af15a631a243f30d8
-SIZE (xpi/firefox-i18n-13.0.1/es-CL.xpi) = 262564
-SHA256 (xpi/firefox-i18n-13.0.1/es-ES.xpi) = 34cee92d7e7453f74bb565ca462f140eb1ad5195cd0f1b17593b0f944153c56c
-SIZE (xpi/firefox-i18n-13.0.1/es-ES.xpi) = 222888
-SHA256 (xpi/firefox-i18n-13.0.1/es-MX.xpi) = c53678df51b9b0c13c9c0ca2889a5bf043a7e5481ddc28a50e5b46bcb94d2c51
-SIZE (xpi/firefox-i18n-13.0.1/es-MX.xpi) = 224344
-SHA256 (xpi/firefox-i18n-13.0.1/et.xpi) = 507a4d24685f9b42842d7b0d1ba55130e471b2cf30ecf4a5e3ccaa3dbc3abd3c
-SIZE (xpi/firefox-i18n-13.0.1/et.xpi) = 257287
-SHA256 (xpi/firefox-i18n-13.0.1/eu.xpi) = f63a7c20ce3ff30721a3beed814527a9539f2ecd01565e3790e2876a7dde8ae8
-SIZE (xpi/firefox-i18n-13.0.1/eu.xpi) = 255959
-SHA256 (xpi/firefox-i18n-13.0.1/fa.xpi) = 233b00a6c30d0c0cc9e0d6fb14cd8ad6410d9d076ef9b9de47066b2b538bd8ec
-SIZE (xpi/firefox-i18n-13.0.1/fa.xpi) = 288638
-SHA256 (xpi/firefox-i18n-13.0.1/fi.xpi) = 6fe28d86dc3672a72bb3f537f21246c08eacc1560658bab3eb25fb4c36790f8a
-SIZE (xpi/firefox-i18n-13.0.1/fi.xpi) = 259347
-SHA256 (xpi/firefox-i18n-13.0.1/fr.xpi) = 171fc907ed13e2d4ace9120438801233cf31840f7807f1bc8dce9abcd95b4518
-SIZE (xpi/firefox-i18n-13.0.1/fr.xpi) = 265516
-SHA256 (xpi/firefox-i18n-13.0.1/fy-NL.xpi) = 6069a405f0a13596e762633c969d5491d0d4ce29386a19958ff9cae521c90637
-SIZE (xpi/firefox-i18n-13.0.1/fy-NL.xpi) = 261430
-SHA256 (xpi/firefox-i18n-13.0.1/ga-IE.xpi) = d74eb196fb9c8290d125318da34522b4c7addceba66b08f8565950a3d8fbe33b
-SIZE (xpi/firefox-i18n-13.0.1/ga-IE.xpi) = 267946
-SHA256 (xpi/firefox-i18n-13.0.1/gl.xpi) = 5ddfa76dd532bf0194e8ec26ef2926b0d7a7ca8ee6d55aa11b8479e5db047f78
-SIZE (xpi/firefox-i18n-13.0.1/gl.xpi) = 258722
-SHA256 (xpi/firefox-i18n-13.0.1/gu-IN.xpi) = 11cf8de0e743d1775e2a305542c06249e18e409a4627de23d4d03665bb71861b
-SIZE (xpi/firefox-i18n-13.0.1/gu-IN.xpi) = 288768
-SHA256 (xpi/firefox-i18n-13.0.1/he.xpi) = 4892c065530389042200dee6aaf459fae1bd2dac1b64996781583368c866ad65
-SIZE (xpi/firefox-i18n-13.0.1/he.xpi) = 282012
-SHA256 (xpi/firefox-i18n-13.0.1/hi-IN.xpi) = 112ed8ad028632a32a0478f0afef784eae8def91b068a15cf6811f9f479c9249
-SIZE (xpi/firefox-i18n-13.0.1/hi-IN.xpi) = 292937
-SHA256 (xpi/firefox-i18n-13.0.1/hr.xpi) = 3003a31da97fb08586a67eb663ba00305b18cfe7e89c5ac1897d0e18161ace48
-SIZE (xpi/firefox-i18n-13.0.1/hr.xpi) = 259464
-SHA256 (xpi/firefox-i18n-13.0.1/hu.xpi) = 9b49927b94fa9b83f40403116a8712bf5072e5054974c2400ffd35d58454ba43
-SIZE (xpi/firefox-i18n-13.0.1/hu.xpi) = 270034
-SHA256 (xpi/firefox-i18n-13.0.1/hy-AM.xpi) = e3f573db9d05e2601c8a7f8d03ad6f937103043569374bab056c485b654f0241
-SIZE (xpi/firefox-i18n-13.0.1/hy-AM.xpi) = 471219
-SHA256 (xpi/firefox-i18n-13.0.1/id.xpi) = ec514955691d46f474dec9b118dc96f96f7e30cb1f5b014d46533f06066ec63d
-SIZE (xpi/firefox-i18n-13.0.1/id.xpi) = 251503
-SHA256 (xpi/firefox-i18n-13.0.1/is.xpi) = 54f5b4f118b2d5912ef879d412b7f9df3c224850f65e260d6c7164c6ab33775f
-SIZE (xpi/firefox-i18n-13.0.1/is.xpi) = 258750
-SHA256 (xpi/firefox-i18n-13.0.1/it.xpi) = 4dc7d5608cd81a058595f128780d7012b95bbe49d419dcf3dc5ba2c0a3166212
-SIZE (xpi/firefox-i18n-13.0.1/it.xpi) = 220060
-SHA256 (xpi/firefox-i18n-13.0.1/ja.xpi) = 887cd3f7cc3ff063fa1b5bf96c673b9f893c5d3af0c4f2c9047a95fa60979871
-SIZE (xpi/firefox-i18n-13.0.1/ja.xpi) = 290577
-SHA256 (xpi/firefox-i18n-13.0.1/kk.xpi) = 7c0bc4a05559c6818a8c5edf6ade1bc52c44b64508be2d44352ed659d88172b9
-SIZE (xpi/firefox-i18n-13.0.1/kk.xpi) = 296993
-SHA256 (xpi/firefox-i18n-13.0.1/kn.xpi) = 6f2fcebac1b27a7811926475f5a56e142a8ea674e90cf125a2a566d116965b6e
-SIZE (xpi/firefox-i18n-13.0.1/kn.xpi) = 316678
-SHA256 (xpi/firefox-i18n-13.0.1/ko.xpi) = f7409dd8ca5fe6a60ddc0c2d18bf753be2b2c6f004e23986dcc6e1ae6ace2825
-SIZE (xpi/firefox-i18n-13.0.1/ko.xpi) = 242337
-SHA256 (xpi/firefox-i18n-13.0.1/ku.xpi) = 4cdafb447bedf816ef22ca449a6a3b4c4c8c6bf044b6b8c9b109d90b4e0fd204
-SIZE (xpi/firefox-i18n-13.0.1/ku.xpi) = 270090
-SHA256 (xpi/firefox-i18n-13.0.1/lg.xpi) = 4ac12b91073ff6f49eae56975cd38d266ac5a5a8728e398be5338dde34950c31
-SIZE (xpi/firefox-i18n-13.0.1/lg.xpi) = 263028
-SHA256 (xpi/firefox-i18n-13.0.1/lt.xpi) = 69391e3c560d3b1b12c7df9dffa62ea77b3970ee226ffc0c0b97421ee25cba95
-SIZE (xpi/firefox-i18n-13.0.1/lt.xpi) = 329583
-SHA256 (xpi/firefox-i18n-13.0.1/lv.xpi) = 78e94ebc1789618e6a7e2b9e59274381dce49a53ab40eb2d2546dce0cfda19b4
-SIZE (xpi/firefox-i18n-13.0.1/lv.xpi) = 258501
-SHA256 (xpi/firefox-i18n-13.0.1/mai.xpi) = bd613a65ab8a399277ee57e18ac0c5d19cf33129bc4e68e5b36949c7823a0050
-SIZE (xpi/firefox-i18n-13.0.1/mai.xpi) = 292745
-SHA256 (xpi/firefox-i18n-13.0.1/mk.xpi) = 2c6dd1ee676c40de4d65ef4fde4e20828ce581a7527d86e371914c2234af5220
-SIZE (xpi/firefox-i18n-13.0.1/mk.xpi) = 288812
-SHA256 (xpi/firefox-i18n-13.0.1/ml.xpi) = 33fb239eae126d8a6dbd598ca28fae9436aba169b26a396686591973785e069a
-SIZE (xpi/firefox-i18n-13.0.1/ml.xpi) = 322304
-SHA256 (xpi/firefox-i18n-13.0.1/mr.xpi) = 0008a1d7f89f56f03abb060fa1f9432eece885108f48640fa4d1be1bd61f966a
-SIZE (xpi/firefox-i18n-13.0.1/mr.xpi) = 298588
-SHA256 (xpi/firefox-i18n-13.0.1/nb-NO.xpi) = 9094db460f97a7c2339a482ddc3179784861de7329f87af123e7076e0486e483
-SIZE (xpi/firefox-i18n-13.0.1/nb-NO.xpi) = 256932
-SHA256 (xpi/firefox-i18n-13.0.1/nl.xpi) = b518e4ad453e0753c15a5fa324a4bde5ca20532b1eac357a3131775a275c886e
-SIZE (xpi/firefox-i18n-13.0.1/nl.xpi) = 258093
-SHA256 (xpi/firefox-i18n-13.0.1/nn-NO.xpi) = 004f99dd25ff1620526a400af93a9d4adda3f0fa4cba29d17364cb26818b43ac
-SIZE (xpi/firefox-i18n-13.0.1/nn-NO.xpi) = 258052
-SHA256 (xpi/firefox-i18n-13.0.1/nso.xpi) = ea7909bc6673743072256d82ab3d603d9dd423bc1593e19d702bcc01237a73ca
-SIZE (xpi/firefox-i18n-13.0.1/nso.xpi) = 261460
-SHA256 (xpi/firefox-i18n-13.0.1/or.xpi) = 8bae10e427fc96997586d1ce0e9da6da8c02466705424cb8744d575e3faf3af0
-SIZE (xpi/firefox-i18n-13.0.1/or.xpi) = 297594
-SHA256 (xpi/firefox-i18n-13.0.1/pa-IN.xpi) = 36ed9a15404dc434a01f92360113b463295b1d1f3641db6ce6795dac769f4713
-SIZE (xpi/firefox-i18n-13.0.1/pa-IN.xpi) = 297591
-SHA256 (xpi/firefox-i18n-13.0.1/pl.xpi) = 4ff6441ad9c4b30c68ac2629c80cc883dd85622ece3dfb396357defa5d037b06
-SIZE (xpi/firefox-i18n-13.0.1/pl.xpi) = 267109
-SHA256 (xpi/firefox-i18n-13.0.1/pt-BR.xpi) = c1cf8e064c46c304ea9fb8341dc438b3554bc99c2e439ad4c3578d0e3d067095
-SIZE (xpi/firefox-i18n-13.0.1/pt-BR.xpi) = 262553
-SHA256 (xpi/firefox-i18n-13.0.1/pt-PT.xpi) = f8d069588eb76d35a6d2b1546221de576a07952a5df136124cb3999eda421c97
-SIZE (xpi/firefox-i18n-13.0.1/pt-PT.xpi) = 262148
-SHA256 (xpi/firefox-i18n-13.0.1/rm.xpi) = 2e9dc837ec1dc7b5e7d1b515b086d55e054d9e950ac1af076a1fbfe02c1209ec
-SIZE (xpi/firefox-i18n-13.0.1/rm.xpi) = 260196
-SHA256 (xpi/firefox-i18n-13.0.1/ro.xpi) = d8e550aeadb1560ae1636e956890cbfeb0623b586cc3b9b0a3a0f6dd6bb1f4b0
-SIZE (xpi/firefox-i18n-13.0.1/ro.xpi) = 280599
-SHA256 (xpi/firefox-i18n-13.0.1/ru.xpi) = d50fefe1935538e6742e9cecc5dc9a8627164d426e9c46c1a6f669d6bca3e328
-SIZE (xpi/firefox-i18n-13.0.1/ru.xpi) = 263853
-SHA256 (xpi/firefox-i18n-13.0.1/si.xpi) = 9fda07b586493b6bbe896db3c64cbb0abae16d944b3ceebfec27dcd2a7dea6af
-SIZE (xpi/firefox-i18n-13.0.1/si.xpi) = 288272
-SHA256 (xpi/firefox-i18n-13.0.1/sk.xpi) = 192373a3ca517e9caff0b46baefb8be9482aaea69b2c69cf0819dcfbf643f8ec
-SIZE (xpi/firefox-i18n-13.0.1/sk.xpi) = 270688
-SHA256 (xpi/firefox-i18n-13.0.1/sl.xpi) = 16140ed0170c3ee6efec992690b39fe28f02757b5a11076c08c9e3494a6cb74b
-SIZE (xpi/firefox-i18n-13.0.1/sl.xpi) = 256285
-SHA256 (xpi/firefox-i18n-13.0.1/son.xpi) = 17c8bce2675a81eee39a7383fbe571b1e3abf92a5472f9e67f21c9fa93d271e4
-SIZE (xpi/firefox-i18n-13.0.1/son.xpi) = 255120
-SHA256 (xpi/firefox-i18n-13.0.1/sq.xpi) = b6818e40d50da2226fb45ce2632a3be7f37fb9e4d9407b0470783d4c1f949ad6
-SIZE (xpi/firefox-i18n-13.0.1/sq.xpi) = 242591
-SHA256 (xpi/firefox-i18n-13.0.1/sr.xpi) = 880ce4375d4e85bd6d3346d722e1c46b55d09aaff03d8bf5dc2d26cc940fa6e5
-SIZE (xpi/firefox-i18n-13.0.1/sr.xpi) = 293379
-SHA256 (xpi/firefox-i18n-13.0.1/sv-SE.xpi) = 1a073e01354972fa53ecae6e834d796d364bf6556cdd01646716add8da8001b0
-SIZE (xpi/firefox-i18n-13.0.1/sv-SE.xpi) = 294426
-SHA256 (xpi/firefox-i18n-13.0.1/ta-LK.xpi) = 22a90e9d2fb574a567bfb9b8d250b81ec6eb9260d21f20c044afb8ba5a1cbc30
-SIZE (xpi/firefox-i18n-13.0.1/ta-LK.xpi) = 306535
-SHA256 (xpi/firefox-i18n-13.0.1/ta.xpi) = 084ffb4be499348bf8dd22d4f6d8a0463c44add4bb0937753b5894b47b6192a3
-SIZE (xpi/firefox-i18n-13.0.1/ta.xpi) = 289742
-SHA256 (xpi/firefox-i18n-13.0.1/te.xpi) = 4a6a75bbe30365d0f6c73ed502b5c05ba78b0af0113304f22adf170860e2d07d
-SIZE (xpi/firefox-i18n-13.0.1/te.xpi) = 305062
-SHA256 (xpi/firefox-i18n-13.0.1/th.xpi) = 6a3e76526b21d665cba41c260a0092a1b7ddca120a39bff842cc51436aea41a6
-SIZE (xpi/firefox-i18n-13.0.1/th.xpi) = 288773
-SHA256 (xpi/firefox-i18n-13.0.1/tr.xpi) = 15c0e12c6c4099f572b2127d1893aa927eda10380ea527cf163f502601758f44
-SIZE (xpi/firefox-i18n-13.0.1/tr.xpi) = 266220
-SHA256 (xpi/firefox-i18n-13.0.1/uk.xpi) = 1133c9640d5946bcb9bc85cc19149da34d0c03078e524f07584dd701d14b9e22
-SIZE (xpi/firefox-i18n-13.0.1/uk.xpi) = 295516
-SHA256 (xpi/firefox-i18n-13.0.1/vi.xpi) = e056fb6aecfc7b4123fe2a201b2ae9a172e3d3b70de01bc90e28082e2a88c8f8
-SIZE (xpi/firefox-i18n-13.0.1/vi.xpi) = 278638
-SHA256 (xpi/firefox-i18n-13.0.1/zh-CN.xpi) = 3eb168e34b45601015eee4e240bbd4d0086f4be9e3d3195cc573410fe221a5e9
-SIZE (xpi/firefox-i18n-13.0.1/zh-CN.xpi) = 273175
-SHA256 (xpi/firefox-i18n-13.0.1/zh-TW.xpi) = 921b5a3778893956e0cd71a449dc71083e043bf570cf7a108a09f7b1c152aefd
-SIZE (xpi/firefox-i18n-13.0.1/zh-TW.xpi) = 274099
-SHA256 (xpi/firefox-i18n-13.0.1/zu.xpi) = 49ed335f439d1eb7ea5145bd43780edf0e131fb4a623c1e974552fbc4c286741
-SIZE (xpi/firefox-i18n-13.0.1/zu.xpi) = 261912
+SHA256 (xpi/firefox-i18n-14.0.1/af.xpi) = 39757a66b63d65fc514504864a7790bcda29a1a8a7f715deaabe7afa109fe084
+SIZE (xpi/firefox-i18n-14.0.1/af.xpi) = 259413
+SHA256 (xpi/firefox-i18n-14.0.1/ak.xpi) = 8197f32bf4ab22a3615bdca921b10b5bffd92470aa8de5ffce3265c421978acd
+SIZE (xpi/firefox-i18n-14.0.1/ak.xpi) = 261503
+SHA256 (xpi/firefox-i18n-14.0.1/ar.xpi) = e1ec2c58874c47dc37bc481632e34bbdee65bf55697d04c290ec46a260f2aeb4
+SIZE (xpi/firefox-i18n-14.0.1/ar.xpi) = 287334
+SHA256 (xpi/firefox-i18n-14.0.1/ast.xpi) = 24af08c2dadce38d3f0c9d2f6f50ac7bf7c44934d9907025cad80f82578a9a7d
+SIZE (xpi/firefox-i18n-14.0.1/ast.xpi) = 243464
+SHA256 (xpi/firefox-i18n-14.0.1/be.xpi) = ced3dfbedd95c856ea880128b9727c9b8e2afdee1ebebe1269ebc11fdb9d32a0
+SIZE (xpi/firefox-i18n-14.0.1/be.xpi) = 261313
+SHA256 (xpi/firefox-i18n-14.0.1/bg.xpi) = 490d8ca2d27ef7a66169cd590be8802c18fe4f3ccdf2ec8c87a501addd6bba64
+SIZE (xpi/firefox-i18n-14.0.1/bg.xpi) = 300087
+SHA256 (xpi/firefox-i18n-14.0.1/bn-BD.xpi) = 0bd4cbab374b7f2ecdb8d15bacf77198bffb602acf617810aa93f925235db044
+SIZE (xpi/firefox-i18n-14.0.1/bn-BD.xpi) = 310085
+SHA256 (xpi/firefox-i18n-14.0.1/bn-IN.xpi) = 6b0a0d8f81ece0b9bcdc8e65eb2ee1d6d2569b4f5aa34900d323ebcda8939200
+SIZE (xpi/firefox-i18n-14.0.1/bn-IN.xpi) = 340501
+SHA256 (xpi/firefox-i18n-14.0.1/br.xpi) = a02ac264265b1c3b0bae6c4e8936de224c6286841bdb99e5ff346c59c97b9c90
+SIZE (xpi/firefox-i18n-14.0.1/br.xpi) = 269020
+SHA256 (xpi/firefox-i18n-14.0.1/bs.xpi) = 1c2a70f56db9ae927fd61d5cc22dae74a56eaac37224a3c09e0b64449099d4a1
+SIZE (xpi/firefox-i18n-14.0.1/bs.xpi) = 266194
+SHA256 (xpi/firefox-i18n-14.0.1/ca.xpi) = 8b173e56128aec56c5cd426d785f750c69bb74d2f35975754bc8653519013f22
+SIZE (xpi/firefox-i18n-14.0.1/ca.xpi) = 270258
+SHA256 (xpi/firefox-i18n-14.0.1/cs.xpi) = 53fca43dc68d000ed5647a1c4fc9de6b42bd984fd5ad941e75b5ae350469ecfb
+SIZE (xpi/firefox-i18n-14.0.1/cs.xpi) = 270877
+SHA256 (xpi/firefox-i18n-14.0.1/cy.xpi) = 4646aeffd436c54e276bc13d742f425c2663baa90f9419b5db5acc7772e57274
+SIZE (xpi/firefox-i18n-14.0.1/cy.xpi) = 263051
+SHA256 (xpi/firefox-i18n-14.0.1/da.xpi) = 792cacd75426c5b262a8dfe741abd8949251d1abe4ba10f47a47b5c1f5922c5e
+SIZE (xpi/firefox-i18n-14.0.1/da.xpi) = 260705
+SHA256 (xpi/firefox-i18n-14.0.1/de.xpi) = 57687914da67322473b2f25044b2354fb9efdc3d18c05621860745502a83fd45
+SIZE (xpi/firefox-i18n-14.0.1/de.xpi) = 270402
+SHA256 (xpi/firefox-i18n-14.0.1/el.xpi) = 5aba4b20078b971c6b70fe690ce126cc4720774e47aa1520e33854a0d75a0f0c
+SIZE (xpi/firefox-i18n-14.0.1/el.xpi) = 285353
+SHA256 (xpi/firefox-i18n-14.0.1/en-GB.xpi) = 00cc3ffaf79019bffd84edf0904224c13eee0e603883d2d89d9ed223fb022da5
+SIZE (xpi/firefox-i18n-14.0.1/en-GB.xpi) = 251669
+SHA256 (xpi/firefox-i18n-14.0.1/en-US.xpi) = 7e0b62323a0ce970e7d72ac02ce509cc9c4ed17e4f7b412f40ff7c3bd65c559a
+SIZE (xpi/firefox-i18n-14.0.1/en-US.xpi) = 251413
+SHA256 (xpi/firefox-i18n-14.0.1/en-ZA.xpi) = 442ea35bca8b8947c608906ce929855114adb09dfd2f9543493db720cf27781d
+SIZE (xpi/firefox-i18n-14.0.1/en-ZA.xpi) = 251350
+SHA256 (xpi/firefox-i18n-14.0.1/eo.xpi) = fe248abe7a0772ac1528b50bc8299659310180de9b7b9b2c5f7dc60785579e8c
+SIZE (xpi/firefox-i18n-14.0.1/eo.xpi) = 261867
+SHA256 (xpi/firefox-i18n-14.0.1/es-AR.xpi) = 071400a9313ab09c0dacccb519639f69f11fa0eacc1de9d47564ca84738251db
+SIZE (xpi/firefox-i18n-14.0.1/es-AR.xpi) = 265959
+SHA256 (xpi/firefox-i18n-14.0.1/es-CL.xpi) = efe982c0159a4acebadefa4f66ae6417a6e872d5f360eb15af5d59a57ff5b34a
+SIZE (xpi/firefox-i18n-14.0.1/es-CL.xpi) = 268868
+SHA256 (xpi/firefox-i18n-14.0.1/es-ES.xpi) = 24b65d1ca314b0d9b6ebdb5f68716df2cf461a872fd3756f5649d7fb5aab1fb1
+SIZE (xpi/firefox-i18n-14.0.1/es-ES.xpi) = 226575
+SHA256 (xpi/firefox-i18n-14.0.1/es-MX.xpi) = fe65d83fd7f7f97295f5167b7cfff61970eb83274a680d2a57bdeac2ab2f4d55
+SIZE (xpi/firefox-i18n-14.0.1/es-MX.xpi) = 227528
+SHA256 (xpi/firefox-i18n-14.0.1/et.xpi) = c4442cab7762800a80d1f85a3c0506e29643cb98dce0029a875d7902bb1b437a
+SIZE (xpi/firefox-i18n-14.0.1/et.xpi) = 263591
+SHA256 (xpi/firefox-i18n-14.0.1/eu.xpi) = 9ab2c79210b5cad0609cde23b98165f7c85ad4aea36c08489185c0146b033c61
+SIZE (xpi/firefox-i18n-14.0.1/eu.xpi) = 262215
+SHA256 (xpi/firefox-i18n-14.0.1/fa.xpi) = 6f2844368bcbd3c0add255de9afde1346a38227924e74e5065db72aa2ff58678
+SIZE (xpi/firefox-i18n-14.0.1/fa.xpi) = 294603
+SHA256 (xpi/firefox-i18n-14.0.1/fi.xpi) = b276b074da20eea7bb9479d4e671360d7f4bbac6d005a0a547761cb620f538b4
+SIZE (xpi/firefox-i18n-14.0.1/fi.xpi) = 265435
+SHA256 (xpi/firefox-i18n-14.0.1/fr.xpi) = b4de02130d9955a7e323783f710d2b805f4ca8b26b30c04e65bb92c540fc72a2
+SIZE (xpi/firefox-i18n-14.0.1/fr.xpi) = 271891
+SHA256 (xpi/firefox-i18n-14.0.1/fy-NL.xpi) = be3a6b126906a6be5356fee3b9107c0af8898b444545994a3478bd0367b6082e
+SIZE (xpi/firefox-i18n-14.0.1/fy-NL.xpi) = 268069
+SHA256 (xpi/firefox-i18n-14.0.1/ga-IE.xpi) = ab649e639849e1b1864d0c93208ce5ef2113edc1cc7285a4b287e44d03936ca4
+SIZE (xpi/firefox-i18n-14.0.1/ga-IE.xpi) = 274043
+SHA256 (xpi/firefox-i18n-14.0.1/gl.xpi) = 83f82fe04471961afd6f5987653d5ad2abf2141c9860deef17823dc535b7cadd
+SIZE (xpi/firefox-i18n-14.0.1/gl.xpi) = 264817
+SHA256 (xpi/firefox-i18n-14.0.1/gu-IN.xpi) = e01d4ae5b9061818340df795a203634486d189e2cee18e4c2e1806dee5cd1b96
+SIZE (xpi/firefox-i18n-14.0.1/gu-IN.xpi) = 295498
+SHA256 (xpi/firefox-i18n-14.0.1/he.xpi) = aa27a3c301be484538722934548bee7823da54aed03d432bb61f75980fa8cf0c
+SIZE (xpi/firefox-i18n-14.0.1/he.xpi) = 288043
+SHA256 (xpi/firefox-i18n-14.0.1/hi-IN.xpi) = 77bb6a54d429cd240c2f61548080afdcaf932c882a593fca3c7d6a6cc24e68e1
+SIZE (xpi/firefox-i18n-14.0.1/hi-IN.xpi) = 299426
+SHA256 (xpi/firefox-i18n-14.0.1/hr.xpi) = 52468d99f8389ae70e50891882b8b5aee4b9ce7814e710f5efa7b6d02b8654b3
+SIZE (xpi/firefox-i18n-14.0.1/hr.xpi) = 265784
+SHA256 (xpi/firefox-i18n-14.0.1/hu.xpi) = b0d7d4ec5fc4995beeb76ea6c26187be8c19c91b69fce54b4e1e92eb526a8fe7
+SIZE (xpi/firefox-i18n-14.0.1/hu.xpi) = 276309
+SHA256 (xpi/firefox-i18n-14.0.1/hy-AM.xpi) = a3b264308ee26653ca2954261dde79de2d583281592a9b97ff2535742c296912
+SIZE (xpi/firefox-i18n-14.0.1/hy-AM.xpi) = 480919
+SHA256 (xpi/firefox-i18n-14.0.1/id.xpi) = b63484568eea38df55b117102f5d1381cc4d4d96fee3c1eae8efda32c3396070
+SIZE (xpi/firefox-i18n-14.0.1/id.xpi) = 256819
+SHA256 (xpi/firefox-i18n-14.0.1/is.xpi) = 34275a703286bd8ac88701545866f1694a54f6d42c125653b0454f26d2b7c15f
+SIZE (xpi/firefox-i18n-14.0.1/is.xpi) = 264898
+SHA256 (xpi/firefox-i18n-14.0.1/it.xpi) = 069525d9faec1e4a7f2de11aa778b43da9ba03f8c2297df9a4c05e9af152777c
+SIZE (xpi/firefox-i18n-14.0.1/it.xpi) = 223702
+SHA256 (xpi/firefox-i18n-14.0.1/ja.xpi) = ca92ea45be9acbea17f36f1ef592f3ced5833fcf51aaac9e6ff1b2c3e5806348
+SIZE (xpi/firefox-i18n-14.0.1/ja.xpi) = 298353
+SHA256 (xpi/firefox-i18n-14.0.1/kk.xpi) = 42ba7f28202855fb04f205ca195667a2c98ac82f57974c040eeb65481e71f927
+SIZE (xpi/firefox-i18n-14.0.1/kk.xpi) = 304324
+SHA256 (xpi/firefox-i18n-14.0.1/kn.xpi) = bf131e45dd35accf733c55137ce9427c4df26625bf083fad3170c98530d80639
+SIZE (xpi/firefox-i18n-14.0.1/kn.xpi) = 324259
+SHA256 (xpi/firefox-i18n-14.0.1/ko.xpi) = 4ee3057c599c7abd7e834b738bafd47fe596bebbc9d4ab971256e82c9505fac0
+SIZE (xpi/firefox-i18n-14.0.1/ko.xpi) = 248839
+SHA256 (xpi/firefox-i18n-14.0.1/ku.xpi) = a4f7a5dbd70d0582adf34b3b6526c46b8f278d4075eb9f38ae403d7c4fff463d
+SIZE (xpi/firefox-i18n-14.0.1/ku.xpi) = 276032
+SHA256 (xpi/firefox-i18n-14.0.1/lg.xpi) = 65b9483c3ffc8e120b7abd5692afffeeb90c0816589928765791cea59ca5c9bb
+SIZE (xpi/firefox-i18n-14.0.1/lg.xpi) = 268852
+SHA256 (xpi/firefox-i18n-14.0.1/lt.xpi) = 589301e3179cdbf0d4c22740b3331fbbcf6fe8d739fde1d2e6af2d00374cc676
+SIZE (xpi/firefox-i18n-14.0.1/lt.xpi) = 334663
+SHA256 (xpi/firefox-i18n-14.0.1/lv.xpi) = bd5fe411916e36b8ca64f60f48f9a70d924d4801847e58edd028e14619bde0cd
+SIZE (xpi/firefox-i18n-14.0.1/lv.xpi) = 264507
+SHA256 (xpi/firefox-i18n-14.0.1/mai.xpi) = 5b77dc00606aec08d9c3196872240c4c623bbe07da79d4f26123db6297d7f5df
+SIZE (xpi/firefox-i18n-14.0.1/mai.xpi) = 299208
+SHA256 (xpi/firefox-i18n-14.0.1/mk.xpi) = 11cee652dd65d2689b2e1e688a878a2433cf7d8dac77e0d7ce8a980aa9d01aa8
+SIZE (xpi/firefox-i18n-14.0.1/mk.xpi) = 294779
+SHA256 (xpi/firefox-i18n-14.0.1/ml.xpi) = 6de125f40b89b92ee3b79a4ab98869726257c300dd2d333b6e4119b6d4cf753c
+SIZE (xpi/firefox-i18n-14.0.1/ml.xpi) = 328299
+SHA256 (xpi/firefox-i18n-14.0.1/mr.xpi) = 285fa087b4b78bfe1c6204a45cea4f0716e13f4c80c8d2ecbaee54c1cdb2469a
+SIZE (xpi/firefox-i18n-14.0.1/mr.xpi) = 305733
+SHA256 (xpi/firefox-i18n-14.0.1/nb-NO.xpi) = f19b4642a7a3d8fbc4e76c5b2c7942b95d69579f96e0999f17aad44c2e53050d
+SIZE (xpi/firefox-i18n-14.0.1/nb-NO.xpi) = 263019
+SHA256 (xpi/firefox-i18n-14.0.1/nl.xpi) = 2227133e1d80fdc0ee2b8251d457d270e6fe27ad10d42a5be6aec3aa46b81f87
+SIZE (xpi/firefox-i18n-14.0.1/nl.xpi) = 264262
+SHA256 (xpi/firefox-i18n-14.0.1/nn-NO.xpi) = 7c384a2bbb238059890e57a6619821994b6ef6e1dff469ab77fb2ea28fa862fb
+SIZE (xpi/firefox-i18n-14.0.1/nn-NO.xpi) = 263895
+SHA256 (xpi/firefox-i18n-14.0.1/nso.xpi) = 85c20d678eec03e054b1de5c436c8e43027001fdbe8d1a898842f44d6146183f
+SIZE (xpi/firefox-i18n-14.0.1/nso.xpi) = 267693
+SHA256 (xpi/firefox-i18n-14.0.1/or.xpi) = b7bcd9537c13e8b7eae5d2d0f48e9a51c2e11934e5853ebbc5aec4babd9a7fce
+SIZE (xpi/firefox-i18n-14.0.1/or.xpi) = 304397
+SHA256 (xpi/firefox-i18n-14.0.1/pa-IN.xpi) = 049096a59531307453bca995e931f5e4730eee85eb41d7b81ec6f4ce94bf60af
+SIZE (xpi/firefox-i18n-14.0.1/pa-IN.xpi) = 300304
+SHA256 (xpi/firefox-i18n-14.0.1/pl.xpi) = 56d011893a07ad8547b6a629f961f390540a13c5e6e951a3b30e25eaf5b2828a
+SIZE (xpi/firefox-i18n-14.0.1/pl.xpi) = 273932
+SHA256 (xpi/firefox-i18n-14.0.1/pt-BR.xpi) = d8b655ac608e414f247f1c92754b2ae35d0301de173a1f4a68d12c47dea793c6
+SIZE (xpi/firefox-i18n-14.0.1/pt-BR.xpi) = 268743
+SHA256 (xpi/firefox-i18n-14.0.1/pt-PT.xpi) = eacffbdb6dd182e9c1e054fd00c79f34501d59a18636d7d7bd36721e06b763e5
+SIZE (xpi/firefox-i18n-14.0.1/pt-PT.xpi) = 268211
+SHA256 (xpi/firefox-i18n-14.0.1/rm.xpi) = 7e1de9bd8670196af292f6bd226ff386f3606a75d194b0a43b139ab78da0a216
+SIZE (xpi/firefox-i18n-14.0.1/rm.xpi) = 266424
+SHA256 (xpi/firefox-i18n-14.0.1/ro.xpi) = 570c9da5f1d6164160981739983c6191f43974706398e102dfa29437e84cd253
+SIZE (xpi/firefox-i18n-14.0.1/ro.xpi) = 286802
+SHA256 (xpi/firefox-i18n-14.0.1/ru.xpi) = 5acbabc95c047b4586599fe9eb35e7eeb141290e617d233f4fcf45aa0b2be0e5
+SIZE (xpi/firefox-i18n-14.0.1/ru.xpi) = 267746
+SHA256 (xpi/firefox-i18n-14.0.1/si.xpi) = b1a0f75c549a5ec4339bdf70eb6bcb279c3213c0883fc231c9f2b273634c4e2f
+SIZE (xpi/firefox-i18n-14.0.1/si.xpi) = 295362
+SHA256 (xpi/firefox-i18n-14.0.1/sk.xpi) = bd042442cf549ca10518339a2a725ed09302fd3fd79ea22806247ad170d5013f
+SIZE (xpi/firefox-i18n-14.0.1/sk.xpi) = 277244
+SHA256 (xpi/firefox-i18n-14.0.1/sl.xpi) = 57ed25bbf7961caa0d3629b4cbe740769d0a337223bb1af1070f4b00e99bd9a5
+SIZE (xpi/firefox-i18n-14.0.1/sl.xpi) = 262677
+SHA256 (xpi/firefox-i18n-14.0.1/son.xpi) = e4c94ab3bb6f1a97f52b4425b368e9a9274824c5848a50ad717126ed68e1fd38
+SIZE (xpi/firefox-i18n-14.0.1/son.xpi) = 261296
+SHA256 (xpi/firefox-i18n-14.0.1/sq.xpi) = 7cab74153790518d7ef58935e4dba0394375a54996003331aa2b2acfda468704
+SIZE (xpi/firefox-i18n-14.0.1/sq.xpi) = 248980
+SHA256 (xpi/firefox-i18n-14.0.1/sr.xpi) = fcb65105e6b8e874806d415413238cbb2dd5d2712c94a379e7967d908891b9a5
+SIZE (xpi/firefox-i18n-14.0.1/sr.xpi) = 306504
+SHA256 (xpi/firefox-i18n-14.0.1/sv-SE.xpi) = 15ee86bea584fcd6db47e17614aba49dcf0b223c4a425dac4fccd5fd85650566
+SIZE (xpi/firefox-i18n-14.0.1/sv-SE.xpi) = 300674
+SHA256 (xpi/firefox-i18n-14.0.1/ta-LK.xpi) = a9aaa55e4490d3168617777472ddd49393dd25eed53cf617dd38ef496e78620d
+SIZE (xpi/firefox-i18n-14.0.1/ta-LK.xpi) = 312531
+SHA256 (xpi/firefox-i18n-14.0.1/ta.xpi) = 3a28b3b8ac44e5cf0e205f7e59bd589fd02ac36a36d37dcbb5de297ac47a8748
+SIZE (xpi/firefox-i18n-14.0.1/ta.xpi) = 295689
+SHA256 (xpi/firefox-i18n-14.0.1/te.xpi) = a3225ea584a1f9c634ffeca20da518016e2fc2ce76c8672280e598ec768987e9
+SIZE (xpi/firefox-i18n-14.0.1/te.xpi) = 312341
+SHA256 (xpi/firefox-i18n-14.0.1/th.xpi) = d4e1df9b118f9fc1a4dfbc16929314f3206f517eba4ba6179d270aa74a2516cc
+SIZE (xpi/firefox-i18n-14.0.1/th.xpi) = 295253
+SHA256 (xpi/firefox-i18n-14.0.1/tr.xpi) = 121a6413e2209b6b5efb6adfcd2160b050bd131e87656d11097ddb177fc9d5d2
+SIZE (xpi/firefox-i18n-14.0.1/tr.xpi) = 272367
+SHA256 (xpi/firefox-i18n-14.0.1/uk.xpi) = f68eb75409300892f2d311929702ef9d23e7e203feb08aeb23d6c0d84d9ca4af
+SIZE (xpi/firefox-i18n-14.0.1/uk.xpi) = 300791
+SHA256 (xpi/firefox-i18n-14.0.1/vi.xpi) = b65ac68e4712af7f75852b79e37204b577d8ca3128592f0862ae2c9b8fb22ea3
+SIZE (xpi/firefox-i18n-14.0.1/vi.xpi) = 284581
+SHA256 (xpi/firefox-i18n-14.0.1/zh-CN.xpi) = 4d924b9efe324c58b65ed301faaabeb5a223cc58c24292e04395288be2a7f5a1
+SIZE (xpi/firefox-i18n-14.0.1/zh-CN.xpi) = 279886
+SHA256 (xpi/firefox-i18n-14.0.1/zh-TW.xpi) = b518709a1fa973bdccf643e24d76e32b7db6a1f492e4c583ff3ce51f3dc235b2
+SIZE (xpi/firefox-i18n-14.0.1/zh-TW.xpi) = 280804
+SHA256 (xpi/firefox-i18n-14.0.1/zu.xpi) = 4fa27fe75f4e2c8e15f670d21af6d24778a0fa8deda1e96ad132abb5a816ede5
+SIZE (xpi/firefox-i18n-14.0.1/zu.xpi) = 268032
diff --git a/www/firefox/Makefile b/www/firefox/Makefile
index ffb06e6d5445..66ff43315387 100644
--- a/www/firefox/Makefile
+++ b/www/firefox/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= firefox
-DISTVERSION= 13.0.1
+DISTVERSION= 14.0.1
PORTEPOCH= 1
CATEGORIES= www ipv6
MASTER_SITES= ${MASTER_SITE_MOZILLA}
@@ -17,27 +17,27 @@ MAINTAINER= gecko@FreeBSD.org
COMMENT= Web browser based on the browser portion of Mozilla
BUILD_DEPENDS= nspr>=4.9:${PORTSDIR}/devel/nspr \
+ nss>=3.13.2:${PORTSDIR}/security/nss \
+ sqlite3>=3.7.11:${PORTSDIR}/databases/sqlite3 \
cairo>=1.10.2_1,1:${PORTSDIR}/graphics/cairo \
unzip:${PORTSDIR}/archivers/unzip
-LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo \
- event-1.4:${PORTSDIR}/devel/libevent
CONFLICTS_BUILD= spidermonkey-*
-USE_AUTOTOOLS= autoconf213
+USE_AUTOTOOLS= autoconf213:env
USE_GECKO= gecko
CONFLICTS= firefox-10.*
MOZ_PKGCONFIG_FILES= # empty
-USE_MOZILLA= -png -nss -dbm -jpeg -xft
+USE_MOZILLA= # empty
MOZILLA_NAME= Firefox
-MOZ_TOOLKIT= cairo-gtk2
MAKE_JOBS_SAFE= yes
WANT_GNOME= yes
+USE_QT4= # empty
+QT_NONSTANDARD= yes
ALL_TARGET= default
-CONFIGURE_ENV= LOCALBASE=${LOCALBASE}
-EXTRA_CFLAGS= -O0
-HAS_CONFIGURE= yes
+GNU_CONFIGURE= yes
+OBJDIR_BUILD= yes
USE_BZIP2= yes
USE_GMAKE= yes
USE_GL= gl
@@ -46,43 +46,39 @@ NO_MOZPKGINSTALL=yes
FIREFOX_ICON= ${MOZILLA}.png
FIREFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default48.png
MOZ_OPTIONS= --program-transform-name='s/firefox/${MOZILLA}/' \
- --with-default-mozilla-five-home=${PREFIX}/lib/${MOZILLA} \
- --enable-svg --enable-svg-renderer=cairo \
--enable-application=browser \
- --enable-official-branding --disable-updater \
- --enable-canvas --enable-libxul --disable-necko-wifi \
- --with-system-libevent=${LOCALBASE}
+ --enable-official-branding
-OPTIONS= DBUS "Enable D-BUS support" on \
- PGO "Enable Profile-Guided Optimization" off
+OPTIONS_DEFINE= GSTREAMER PGO
+.include "${.CURDIR}/../../www/firefox/Makefile.options"
.include <bsd.port.pre.mk>
WRKSRC:= ${WRKDIR}/mozilla-release
-.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 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 defined(WITH_PGO)
-BROKEN= does not build with PGO option enabled
+.if ${PORT_OPTIONS:MPGO}
BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3
USE_PYTHON_BUILD= yes
USE_DISPLAY= yes
.include "${PORTSDIR}/Mk/bsd.python.mk"
-MAKEFILE= client.mk
+.undef GNU_CONFIGURE
+MOZ_OPTIONS+= ${CONFIGURE_TARGET}
+MAKEFILE= ${WRKSRC}/client.mk
ALL_TARGET= profiledbuild
+MOZ_MK_OPTIONS+=PROFILE_GEN_SCRIPT='"${PYTHON_CMD} \
+ @MOZ_OBJDIR@/_profile/pgo/profileserver.py"'
.endif
.if ${ARCH} == amd64 || ${ARCH} == i386
@@ -90,7 +86,7 @@ BUILD_DEPENDS+= yasm:${PORTSDIR}/devel/yasm
.endif
pre-extract:
-.if defined(WITH_PGO)
+.if ${PORT_OPTIONS:MPGO}
@${ECHO} "*****************************************************************"
@${ECHO} "**************************** attention **************************"
@${ECHO} "*****************************************************************"
@@ -109,38 +105,13 @@ post-extract:
<${FILESDIR}/firefox.desktop.in >${WRKDIR}/${MOZILLA}.desktop
post-patch:
- @${GREP} -Flr \"/proc ${WRKSRC}/ipc/chromium/src/base | ${XARGS} ${REINPLACE_CMD} \
- -e 's|/proc/self/fd|/dev/fd|' \
- -e 's|/proc["/]|/compat/linux&|'
- ${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \
- ${WRKSRC}/storage/build/Makefile.in \
- ${WRKSRC}/toolkit/library/Makefile.in \
- ${WRKSRC}/db/sqlite3/src/Makefile.in
- @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
- ${WRKSRC}/security/manager/ssl/src/Makefile.in \
- ${WRKSRC}/js/src/config/mkdepend/Makefile.in \
- ${WRKSRC}/js/src/config/config.mk \
- ${WRKSRC}/config/mkdepend/Makefile.in \
- ${WRKSRC}/config/config.mk \
- ${WRKSRC}/xpcom/io/nsAppFileLocationProvider.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}/js/src/configure.in
+ @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ ${WRKSRC}/browser/app/nsBrowserApp.cpp
pre-configure:
(cd ${WRKSRC} && ${AUTOCONF})
(cd ${WRKSRC}/js/src/ && ${AUTOCONF})
-post-configure:
-.if defined(WITH_PGO)
- @${SED} -e 's|@PYTHON@|${PYTHON_CMD}|' \
- <${FILESDIR}/mozconfig-profile_guided_optimization.in \
- >> ${BUILD_WRKSRC}/.mozconfig
- (cd ${WRKSRC} && ${GMAKE} distclean)
-.endif
-
port-pre-install:
${ECHO_CMD} 'share/applications/${MOZILLA}.desktop' >> ${PLISTF}
${ECHO_CMD} "@exec mkdir -p %D/include/firefox/nss" >> ${PLISTD}
diff --git a/www/firefox/Makefile.options b/www/firefox/Makefile.options
new file mode 100644
index 000000000000..93b811fc1ffd
--- /dev/null
+++ b/www/firefox/Makefile.options
@@ -0,0 +1,20 @@
+# -*- makefile-bsdmake -*-
+
+OPTIONS_DEFINE+= DBUS DEBUG GNOME LIBPROXY LOGGING OPTIMIZED_CFLAGS
+OPTIONS_DEFAULT+= DBUS GTK2 LOGGING OSS
+
+OPTIONS_SINGLE+= AUDIO
+OPTIONS_SINGLE_AUDIO= ALSA OSS PULSEAUDIO
+
+OPTIONS_SINGLE+= TOOLKIT
+OPTIONS_SINGLE_TOOLKIT= GTK2 QT4
+
+OPTIONS_MULTI+= GNOME
+OPTIONS_MULTI_GNOME= GCONF GIO GNOMEUI GNOMEVFS2
+
+GIO_DESC?= GIO for file I/O # move to bsd.options.desc.mk
+GNOMEUI_DESC?= libgnomeui support module
+LIGHTNING_DESC?= Calendar extension
+LOGGING_DESC?= Additional log messages
+PGO_DESC?= Profile-Guided Optimization # move to bsd.options.desc.mk
+LIBPROXY_DESC?= Proxy support via libproxy
diff --git a/www/firefox/Makefile.webplugins b/www/firefox/Makefile.webplugins
index dd5db96f0cfc..25e748fc1e66 100644
--- a/www/firefox/Makefile.webplugins
+++ b/www/firefox/Makefile.webplugins
@@ -1,4 +1,4 @@
-#-*- mode: makefile; tab-width: 4; -*
+# -*- mode: makefile-bsdmake; tab-width: 4; -*-
# ex:ts=4
#
# New ports collection makefile for: npapi infrastructure
diff --git a/www/firefox/distinfo b/www/firefox/distinfo
index ec07707d8d0b..9e1f7e5fd62a 100644
--- a/www/firefox/distinfo
+++ b/www/firefox/distinfo
@@ -1,2 +1,2 @@
-SHA256 (firefox-13.0.1.source.tar.bz2) = c196d07db249735cbe61949ecafe20b9df262b817b44b8a595d3e6daf2d09be3
-SIZE (firefox-13.0.1.source.tar.bz2) = 79561773
+SHA256 (firefox-14.0.1.source.tar.bz2) = c21988f0207b678376c3d96f647aadf6d694e836f0b5c933ec15d93b75ea89aa
+SIZE (firefox-14.0.1.source.tar.bz2) = 82478218
diff --git a/www/firefox/files/mozconfig-profile_guided_optimization.in b/www/firefox/files/mozconfig-profile_guided_optimization.in
deleted file mode 100644
index 5caba0f4196d..000000000000
--- a/www/firefox/files/mozconfig-profile_guided_optimization.in
+++ /dev/null
@@ -1 +0,0 @@
-mk_add_options PROFILE_GEN_SCRIPT='@PYTHON@ $(OBJDIR)/_profile/pgo/profileserver.py'
diff --git a/www/firefox/files/patch-alsapulse b/www/firefox/files/patch-alsapulse
new file mode 100644
index 000000000000..263d11a61d36
--- /dev/null
+++ b/www/firefox/files/patch-alsapulse
@@ -0,0 +1,118 @@
+--- config/autoconf.mk.in~
++++ 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@
+--- configure.in~
++++ 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 ========================================================
+--- media/libsydneyaudio/src/Makefile.in~
++++ 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
+--- toolkit/library/Makefile.in~
++++ 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/firefox/files/patch-browser-app-Makefile.in b/www/firefox/files/patch-browser-app-Makefile.in
deleted file mode 100644
index 3a3a449c2fca..000000000000
--- a/www/firefox/files/patch-browser-app-Makefile.in
+++ /dev/null
@@ -1,130 +0,0 @@
---- browser/app/Makefile.in.orig 2012-05-23 20:56:32.000000000 +0200
-+++ browser/app/Makefile.in 2012-05-27 18:12:41.000000000 +0200
-@@ -56,37 +56,46 @@
- # hardcode en-US for the moment
- AB_CD = en-US
-
--DEFINES += \
-- -DAB_CD=$(AB_CD) \
-- -DAPP_VERSION="$(MOZ_APP_VERSION)" \
-- -DFIREFOX_ICO=\"$(DIST)/branding/firefox.ico\" \
-- -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\" \
-- $(NULL)
-+DEFINES += -DAB_CD=$(AB_CD)
-+
-+APP_VERSION = $(shell cat $(srcdir)/../config/version.txt)
-+DEFINES += -DAPP_VERSION="$(APP_VERSION)"
-
- ifdef LIBXUL_SDK
- include $(topsrcdir)/config/rules.mk
- else
- # Build a binary bootstrapping with XRE_main
-
-+ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
- PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX)
-+else
-+PROGRAM = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
-+endif
-
- CPPSRCS = nsBrowserApp.cpp
-
--LOCAL_INCLUDES += \
-- -I$(topsrcdir)/toolkit/xre \
-- -I$(topsrcdir)/xpcom/base \
-- -I$(topsrcdir)/xpcom/build \
-- -I$(DEPTH)/build \
-- $(NULL)
-+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
-+LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
-+LOCAL_INCLUDES += -I$(DEPTH)/build
-
--DEFINES += -DXPCOM_GLUE
--STL_FLAGS=
-+ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
-+LIBS += $(DIST)/bin/XUL
-+TK_LIBS := $(TK_LIBS)
-+else
-+EXTRA_DSO_LIBS += xul
-+endif
-
- LIBS += \
-+ $(STATIC_COMPONENTS_LINKER_PATH) \
- $(EXTRA_DSO_LIBS) \
-- $(XPCOM_STANDALONE_GLUE_LDOPTS) \
-+ $(XPCOM_GLUE_LDOPTS) \
-+ $(NSPR_LIBS) \
- $(NULL)
-
-+ifdef MOZ_JPROF
-+LIBS += -ljprof
-+endif
-+
- ifdef MOZ_LINKER
- LIBS += $(ZLIB_LIBS)
- endif
-@@ -118,11 +127,17 @@
- else
- RCFLAGS += -DMOZ_PHOENIX --include-dir $(srcdir)
- endif
-+ifdef DEBUG
-+RCFLAGS += -DDEBUG
-+endif
- endif
-
- ifeq ($(OS_ARCH),OS2)
- RESFILE=splashos2.res
- RCFLAGS += -DMOZ_PHOENIX
-+ifdef DEBUG
-+RCFLAGS += -DDEBUG
-+endif
- RCFLAGS += -DFIREFOX_ICO=\"$(DIST)/branding/firefox-os2.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document-os2.ico\"
- endif
-
-@@ -150,15 +165,26 @@
-
- ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
-
--libs::
-- cp -p $(MOZ_APP_NAME)$(BIN_SUFFIX) $(DIST)/bin/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
-+$(MOZ_APP_NAME):: $(topsrcdir)/build/unix/mozilla.in $(GLOBAL_DEPS)
-+ cat $< | sed -e "s|%MOZAPPDIR%|$(installdir)|" \
-+ -e "s|%MOZ_APP_DISPLAYNAME%|$(MOZ_APP_DISPLAYNAME)|" > $@
-+ chmod +x $@
-
-+libs:: $(MOZ_APP_NAME)
-+ $(INSTALL) $< $(DIST)/bin
-+
-+install:: $(MOZ_APP_NAME)
-+ $(SYSINSTALL) $< $(DESTDIR)$(bindir)
-+
-+GARBAGE += $(MOZ_APP_NAME)
- GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/, firefox.js)
-
- endif
-
- endif # LIBXUL_SDK
-
-+DEFINES += -DFIREFOX_ICO=\"$(DIST)/branding/firefox.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\"
-+
- ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
- libs::
- $(INSTALL) $(IFLAGS1) $(DIST)/branding/mozicon128.png $(DIST)/bin/icons
-@@ -201,15 +227,17 @@
- rsync -a --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(MOZ_MACBUNDLE_NAME) --exclude English.lproj
- $(MKDIR) -p $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/$(AB).lproj
- rsync -a --exclude "*.in" $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/$(AB).lproj
-- sed -e "s/%APP_VERSION%/$(MOZ_APP_VERSION)/" -e "s/%MAC_APP_NAME%/$(MAC_APP_NAME)/" -e "s/%LOWER_MAC_APP_NAME%/$(LOWER_MAC_APP_NAME)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Info.plist
-+ sed -e "s/%APP_VERSION%/$(APP_VERSION)/" -e "s/%MAC_APP_NAME%/$(MAC_APP_NAME)/" -e "s/%LOWER_MAC_APP_NAME%/$(LOWER_MAC_APP_NAME)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Info.plist
- sed -e "s/%MAC_APP_NAME%/$(MAC_APP_NAME)/" $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/$(AB).lproj/InfoPlist.strings
- rsync -a $(DIST)/bin/ $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/$(APPFILES)
-+ $(RM) $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/$(APPFILES)/mangle $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/$(APPFILES)/shlibsign
- ifdef LIBXUL_SDK
- cp $(LIBXUL_DIST)/bin/$(XR_STUB_NAME) $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/firefox
- else
- $(RM) $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/$(PROGRAM)
- rsync -aL $(PROGRAM) $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS
- endif
-+ -cp -L $(DIST)/bin/mangle $(DIST)/bin/shlibsign $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/$(APPFILES)
- cp -RL $(DIST)/branding/firefox.icns $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/firefox.icns
- cp -RL $(DIST)/branding/document.icns $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/document.icns
- printf APPLMOZB > $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/PkgInfo
diff --git a/www/firefox/files/patch-browser-app-nsBrowserApp.cpp b/www/firefox/files/patch-browser-app-nsBrowserApp.cpp
index 1862bd5ece8a..2d5190639b79 100644
--- a/www/firefox/files/patch-browser-app-nsBrowserApp.cpp
+++ b/www/firefox/files/patch-browser-app-nsBrowserApp.cpp
@@ -1,239 +1,10 @@
---- browser/app/nsBrowserApp.cpp.orig 2012-05-23 20:56:32.000000000 +0200
-+++ browser/app/nsBrowserApp.cpp 2012-05-27 18:11:50.000000000 +0200
-@@ -37,38 +37,28 @@
- * ***** END LICENSE BLOCK ***** */
-
- #include "nsXULAppAPI.h"
--#include "application.ini.h"
--#include "nsXPCOMGlue.h"
--#if defined(XP_WIN)
-+#ifdef XP_WIN
- #include <windows.h>
- #include <stdlib.h>
--#elif defined(XP_UNIX)
--#include <sys/time.h>
--#include <sys/resource.h>
--#endif
--
--#ifdef XP_MACOSX
--#include "MacQuirks.h"
+--- browser/app/nsBrowserApp.cpp~
++++ browser/app/nsBrowserApp.cpp
+@@ -197,6 +197,7 @@ int main(int argc, char* argv[])
+ TriggerQuirks();
#endif
- #include <stdio.h>
- #include <stdarg.h>
-
-+#include "plstr.h"
-+#include "prprf.h"
-+#include "prenv.h"
-+
- #include "nsCOMPtr.h"
- #include "nsILocalFile.h"
- #include "nsStringGlue.h"
-
- #ifdef XP_WIN
-+// we want to use the DLL blocklist if possible
-+#define XRE_WANT_DLL_BLOCKLIST
- // we want a wmain entry point
- #include "nsWindowsWMain.cpp"
--#define snprintf _snprintf
--#define strcasecmp _stricmp
- #endif
--#include "BinaryPath.h"
--
--#include "nsXPCOMPrivate.h" // for MAXPATHLEN and XPCOM_DLL
--
--#include "mozilla/Telemetry.h"
-
- static void Output(const char *fmt, ... )
- {
-@@ -95,12 +85,12 @@
- {
- if (*++arg == '-')
- ++arg;
-- return !strcasecmp(arg, s);
-+ return !PL_strcasecmp(arg, s);
- }
-
- #if defined(XP_WIN) || defined(XP_OS2)
- if (*arg == '/')
-- return !strcasecmp(++arg, s);
-+ return !PL_strcasecmp(++arg, s);
- #endif
-
- return false;
-@@ -116,35 +106,22 @@
- ~ScopedLogging() { NS_LogTerm(); }
- };
-
--XRE_GetFileFromPathType XRE_GetFileFromPath;
--XRE_CreateAppDataType XRE_CreateAppData;
--XRE_FreeAppDataType XRE_FreeAppData;
--#ifdef XRE_HAS_DLL_BLOCKLIST
--XRE_SetupDllBlocklistType XRE_SetupDllBlocklist;
--#endif
--XRE_TelemetryAccumulateType XRE_TelemetryAccumulate;
--XRE_mainType XRE_main;
--
--static const nsDynamicFunctionLoad kXULFuncs[] = {
-- { "XRE_GetFileFromPath", (NSFuncPtr*) &XRE_GetFileFromPath },
-- { "XRE_CreateAppData", (NSFuncPtr*) &XRE_CreateAppData },
-- { "XRE_FreeAppData", (NSFuncPtr*) &XRE_FreeAppData },
--#ifdef XRE_HAS_DLL_BLOCKLIST
-- { "XRE_SetupDllBlocklist", (NSFuncPtr*) &XRE_SetupDllBlocklist },
--#endif
-- { "XRE_TelemetryAccumulate", (NSFuncPtr*) &XRE_TelemetryAccumulate },
-- { "XRE_main", (NSFuncPtr*) &XRE_main },
-- { nsnull, nsnull }
--};
--
--static int do_main(int argc, char* argv[])
-+int main(int argc, char* argv[])
- {
-+ ScopedLogging log;
-+
- nsCOMPtr<nsILocalFile> appini;
-- nsresult rv;
-+ nsresult rv = XRE_GetBinaryPath(argv[0], getter_AddRefs(appini));
-+ if (NS_FAILED(rv)) {
-+ Output("Couldn't calculate the application directory.");
-+ return 255;
-+ }
-+ appini->SetNativeLeafName(NS_LITERAL_CSTRING("application.ini"));
-
- // Allow firefox.exe to launch XULRunner apps via -app <application.ini>
- // Note that -app must be the *first* argument.
-- const char *appDataFile = getenv("XUL_APP_FILE");
-+ char *appEnv = nsnull;
-+ const char *appDataFile = PR_GetEnv("XUL_APP_FILE");
- if (appDataFile && *appDataFile) {
- rv = XRE_GetFileFromPath(appDataFile, getter_AddRefs(appini));
- if (NS_FAILED(rv)) {
-@@ -164,119 +141,23 @@
- return 255;
- }
-
-- char appEnv[MAXPATHLEN];
-- snprintf(appEnv, MAXPATHLEN, "XUL_APP_FILE=%s", argv[2]);
-- if (putenv(appEnv)) {
-- Output("Couldn't set %s.\n", appEnv);
-- return 255;
-- }
-+ appEnv = PR_smprintf("XUL_APP_FILE=%s", argv[2]);
-+ PR_SetEnv(appEnv);
- argv[2] = argv[0];
- argv += 2;
- argc -= 2;
- }
-
-- if (appini) {
-- nsXREAppData *appData;
-- rv = XRE_CreateAppData(appini, &appData);
-- if (NS_FAILED(rv)) {
-- Output("Couldn't read application.ini");
-- return 255;
-- }
-- int result = XRE_main(argc, argv, appData);
-- XRE_FreeAppData(appData);
-- return result;
-- }
--
-- return XRE_main(argc, argv, &sAppData);
--}
--
--int main(int argc, char* argv[])
--{
-- char exePath[MAXPATHLEN];
--
--#ifdef XP_MACOSX
-- TriggerQuirks();
--#endif
--
-- nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath);
-- if (NS_FAILED(rv)) {
-- Output("Couldn't calculate the application directory.\n");
-- return 255;
-- }
--
-- char *lastSlash = strrchr(exePath, XPCOM_FILE_PATH_SEPARATOR[0]);
-- if (!lastSlash || (lastSlash - exePath > MAXPATHLEN - sizeof(XPCOM_DLL) - 1))
-- return 255;
--
-- strcpy(++lastSlash, XPCOM_DLL);
--
-- int gotCounters;
--#if defined(XP_UNIX)
-- struct rusage initialRUsage;
-- gotCounters = !getrusage(RUSAGE_SELF, &initialRUsage);
--#elif defined(XP_WIN)
-- // GetProcessIoCounters().ReadOperationCount seems to have little to
-- // do with actual read operations. It reports 0 or 1 at this stage
-- // in the program. Luckily 1 coincides with when prefetch is
-- // enabled. If Windows prefetch didn't happen we can do our own
-- // faster dll preloading.
-- IO_COUNTERS ioCounters;
-- gotCounters = GetProcessIoCounters(GetCurrentProcess(), &ioCounters);
-- if (gotCounters && !ioCounters.ReadOperationCount)
--#endif
-- {
-- XPCOMGlueEnablePreload();
-- }
--
--
-- rv = XPCOMGlueStartup(exePath);
-- if (NS_FAILED(rv)) {
-- Output("Couldn't load XPCOM.\n");
-- return 255;
-- }
-- // Reset exePath so that it is the directory name and not the xpcom dll name
-- *lastSlash = 0;
--
-- rv = XPCOMGlueLoadXULFunctions(kXULFuncs);
-+ nsXREAppData *appData;
-+ rv = XRE_CreateAppData(appini, &appData);
++ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko19:%%LOCALBASE%%/lib/npapi/symlinks/firefox", 0);
+ nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath);
if (NS_FAILED(rv)) {
-- Output("Couldn't load XRE functions.\n");
-+ Output("Couldn't read application.ini");
- return 255;
- }
-
--#ifdef XRE_HAS_DLL_BLOCKLIST
-- XRE_SetupDllBlocklist();
--#endif
--
-- if (gotCounters) {
--#if defined(XP_WIN)
-- XRE_TelemetryAccumulate(mozilla::Telemetry::EARLY_GLUESTARTUP_READ_OPS,
-- int(ioCounters.ReadOperationCount));
-- XRE_TelemetryAccumulate(mozilla::Telemetry::EARLY_GLUESTARTUP_READ_TRANSFER,
-- int(ioCounters.ReadTransferCount / 1024));
-- IO_COUNTERS newIoCounters;
-- if (GetProcessIoCounters(GetCurrentProcess(), &newIoCounters)) {
-- XRE_TelemetryAccumulate(mozilla::Telemetry::GLUESTARTUP_READ_OPS,
-- int(newIoCounters.ReadOperationCount - ioCounters.ReadOperationCount));
-- XRE_TelemetryAccumulate(mozilla::Telemetry::GLUESTARTUP_READ_TRANSFER,
-- int((newIoCounters.ReadTransferCount - ioCounters.ReadTransferCount) / 1024));
-- }
--#elif defined(XP_UNIX)
-- XRE_TelemetryAccumulate(mozilla::Telemetry::EARLY_GLUESTARTUP_HARD_FAULTS,
-- int(initialRUsage.ru_majflt));
-- struct rusage newRUsage;
-- if (!getrusage(RUSAGE_SELF, &newRUsage)) {
-- XRE_TelemetryAccumulate(mozilla::Telemetry::GLUESTARTUP_HARD_FAULTS,
-- int(newRUsage.ru_majflt - initialRUsage.ru_majflt));
-- }
--#endif
-- }
--
-- int result;
-- {
-- ScopedLogging log;
-- result = do_main(argc, argv);
-- }
--
-- XPCOMGlueShutdown();
-+ int result = XRE_main(argc, argv, appData);
-+ XRE_FreeAppData(appData);
-+ if (appEnv)
-+ PR_smprintf_free(appEnv);
- return result;
- }
+ Output("Couldn't calculate the application directory.\n");
diff --git a/www/firefox/files/patch-bug685258 b/www/firefox/files/patch-bug685258
new file mode 100644
index 000000000000..ead2d3858209
--- /dev/null
+++ b/www/firefox/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
+--- content/media/nsAudioStream.cpp
++++ 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/firefox/files/patch-bug752895 b/www/firefox/files/patch-bug752895
new file mode 100644
index 000000000000..0942b8b247b8
--- /dev/null
+++ b/www/firefox/files/patch-bug752895
@@ -0,0 +1,71 @@
+commit de14ddd
+Author: Andrew Benton <b3nton@gmail.com>
+Date: Tue Jun 12 09:10:09 2012 +0200
+
+ Bug 752895 - Don't try to install nspr, nss and sqlite when using system libraries. r=glandium
+---
+ browser/installer/Makefile.in | 8 ++++++++
+ browser/installer/package-manifest.in | 6 ++++++
+ 2 files changed, 14 insertions(+)
+
+diff --git browser/installer/Makefile.in browser/installer/Makefile.in
+index 975b1f4..c791872 100644
+--- browser/installer/Makefile.in
++++ browser/installer/Makefile.in
+@@ -44,6 +44,14 @@ ifeq (gtk2, $(MOZ_WIDGET_TOOLKIT))
+ DEFINES += -DMOZ_GTK2=1
+ endif
+
++ifdef MOZ_NATIVE_NSPR
++DEFINES += -DMOZ_NATIVE_NSPR=1
++endif
++
++ifdef MOZ_NATIVE_NSS
++DEFINES += -DMOZ_NATIVE_NSS=1
++endif
++
+ ifdef NSS_DISABLE_DBM
+ DEFINES += -DNSS_DISABLE_DBM=1
+ endif
+diff --git browser/installer/package-manifest.in browser/installer/package-manifest.in
+index 2969643..b8fddf0 100644
+--- browser/installer/package-manifest.in
++++ browser/installer/package-manifest.in
+@@ -58,9 +58,11 @@
+ #ifndef MOZ_STATIC_JS
+ @BINPATH@/@DLL_PREFIX@mozjs@DLL_SUFFIX@
+ #endif
++#ifndef MOZ_NATIVE_NSPR
+ @BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
+ @BINPATH@/@DLL_PREFIX@plc4@DLL_SUFFIX@
+ @BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@
++#endif
+ @BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
+ #ifdef XP_MACOSX
+ @BINPATH@/XUL
+@@ -109,7 +111,9 @@
+ #endif
+ @BINPATH@/platform.ini
+ #ifndef XP_OS2
++#ifndef MOZ_NATIVE_SQLITE
+ @BINPATH@/@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
++#endif
+ #else
+ @BINPATH@/mozsqlt3@DLL_SUFFIX@
+ #endif
+@@ -583,6 +587,7 @@
+ ; NSS libraries are signed in the staging directory,
+ ; meaning their .chk files are created there directly.
+ ;
++#ifndef MOZ_NATIVE_NSS
+ @BINPATH@/@DLL_PREFIX@freebl3@DLL_SUFFIX@
+ @BINPATH@/@DLL_PREFIX@nss3@DLL_SUFFIX@
+ @BINPATH@/@DLL_PREFIX@nssckbi@DLL_SUFFIX@
+@@ -593,6 +598,7 @@
+ @BINPATH@/@DLL_PREFIX@smime3@DLL_SUFFIX@
+ @BINPATH@/@DLL_PREFIX@softokn3@DLL_SUFFIX@
+ @BINPATH@/@DLL_PREFIX@ssl3@DLL_SUFFIX@
++#endif
+ @BINPATH@/chrome/pippki@JAREXT@
+ @BINPATH@/chrome/pippki.manifest
+ @BINPATH@/components/pipboot.xpt
diff --git a/www/firefox/files/patch-bug753046 b/www/firefox/files/patch-bug753046
new file mode 100644
index 000000000000..d2d1a12efcc0
--- /dev/null
+++ b/www/firefox/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 $
+
+--- dom/plugins/ipc/PluginModuleChild.cpp.orig 2011-12-20 23:28:14.000000000 +0000
++++ 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 $
+
+--- dom/plugins/ipc/PluginModuleChild.h.orig 2011-12-20 23:28:14.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/Makefile.in.orig 2012-02-16 06:40:33.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/chromium-config.mk.orig 2012-02-16 07:40:33.000000000 +0100
++++ 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 $
+
+--- ipc/chromium/src/base/base_paths.h.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/debug_util_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000
++++ 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
++++ 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
+--- ipc/chromium/src/base/dir_reader_posix.h
++++ 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 $
+
+--- ipc/chromium/src/base/file_util.h.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/file_util_bsd.cc.orig 2012-01-07 18:21:18.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/file_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/message_loop.cc.orig 2012-02-16 07:40:33.000000000 +0100
++++ 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 $
+
+--- ipc/chromium/src/base/platform_file_posix.cc.orig 2011-06-15 21:57:27.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/platform_thread.h.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/process_util.h.orig 2011-12-21 00:28:19.000000000 +0100
++++ 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 $
+
+--- ipc/chromium/src/base/process_util_bsd.cc.orig 2012-04-01 00:04:28.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/process_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/sys_info_posix.cc.orig 2011-11-04 21:34:00.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/third_party/nspr/prcpucfg.h.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/base/third_party/nspr/prtime.cc.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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
+--- ipc/chromium/src/base/time_posix.cc
++++ 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 $
+
+--- ipc/chromium/src/build/build_config.h.orig 2012-03-13 01:36:53.000000000 +0000
++++ 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
+--- ipc/chromium/src/chrome/common/ipc_channel_posix.cc
++++ 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 $
+
+--- ipc/chromium/src/chrome/common/ipc_channel_posix.h.orig 2011-06-15 21:57:27.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/chrome/common/ipc_message_utils.h.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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 $
+
+--- ipc/chromium/src/chrome/common/transport_dib.h.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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 $
+
+--- ipc/glue/GeckoChildProcessHost.cpp.orig 2011-12-20 23:28:19.000000000 +0000
++++ 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 $
+
+--- toolkit/library/Makefile.in.orig 2012-05-23 18:57:09.000000000 +0000
++++ 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/firefox/files/patch-bugzilla-736961 b/www/firefox/files/patch-bugzilla-736961
deleted file mode 100644
index 0de541101dc0..000000000000
--- a/www/firefox/files/patch-bugzilla-736961
+++ /dev/null
@@ -1,111 +0,0 @@
---- config/rules.mk.orig Wed May 2 05:16:35 2012
-+++ config/rules.mk Fri May 11 08:42:50 2012
-@@ -1479,7 +1487,7 @@ $(XPIDL_GEN_DIR)/%.h: %.idl $(XPIDL_DEPS) $(XPIDL_GEN_
- $(PYTHON_PATH) \
- -I$(topsrcdir)/other-licenses/ply \
- -I$(topsrcdir)/xpcom/idl-parser \
-- $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
-+ $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
- @if test -n "$(findstring $*.h, $(EXPORTS))"; \
- then echo "*** WARNING: file $*.h generated from $*.idl overrides $(srcdir)/$*.h"; else true; fi
-
-@@ -1492,7 +1500,7 @@ $(XPIDL_GEN_DIR)/%.xpt: %.idl $(XPIDL_DEPS) $(XPIDL_GE
- -I$(topsrcdir)/other-licenses/ply \
- -I$(topsrcdir)/xpcom/idl-parser \
- -I$(topsrcdir)/xpcom/typelib/xpt/tools \
-- $(topsrcdir)/xpcom/idl-parser/typelib.py --cachedir=$(DEPTH)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
-+ $(topsrcdir)/xpcom/idl-parser/typelib.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
-
- # no need to link together if XPIDLSRCS contains only XPIDL_MODULE
- ifneq ($(XPIDL_MODULE).idl,$(strip $(XPIDLSRCS)))
---- js/src/config/rules.mk.orig Fri May 11 08:42:57 2012
-+++ js/src/config/rules.mk Fri May 11 08:43:15 2012
-@@ -1479,7 +1479,7 @@ $(XPIDL_GEN_DIR)/%.h: %.idl $(XPIDL_DEPS) $(XPIDL_GEN_
- $(PYTHON_PATH) \
- -I$(topsrcdir)/other-licenses/ply \
- -I$(topsrcdir)/xpcom/idl-parser \
-- $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
-+ $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
- @if test -n "$(findstring $*.h, $(EXPORTS))"; \
- then echo "*** WARNING: file $*.h generated from $*.idl overrides $(srcdir)/$*.h"; else true; fi
-
-@@ -1492,7 +1492,7 @@ $(XPIDL_GEN_DIR)/%.xpt: %.idl $(XPIDL_DEPS) $(XPIDL_GE
- -I$(topsrcdir)/other-licenses/ply \
- -I$(topsrcdir)/xpcom/idl-parser \
- -I$(topsrcdir)/xpcom/typelib/xpt/tools \
-- $(topsrcdir)/xpcom/idl-parser/typelib.py --cachedir=$(DEPTH)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
-+ $(topsrcdir)/xpcom/idl-parser/typelib.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
-
- # no need to link together if XPIDLSRCS contains only XPIDL_MODULE
- ifneq ($(XPIDL_MODULE).idl,$(strip $(XPIDLSRCS)))
---- js/xpconnect/src/Makefile.in.orig Fri May 11 08:43:27 2012
-+++ js/xpconnect/src/Makefile.in Fri May 11 08:44:03 2012
-@@ -151,7 +151,7 @@ dom_quickstubs.cpp: $(srcdir)/dom_quickstubs.qsconf \
- -I$(topsrcdir)/xpcom/idl-parser \
- $(srcdir)/qsgen.py \
- --idlpath=$(DEPTH)/dist/idl \
-- --cachedir=$(DEPTH)/xpcom/idl-parser \
-+ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \
- --header-output dom_quickstubs.h \
- --stub-output dom_quickstubs.cpp \
- --makedepend-output $(MDDEPDIR)/dom_qsgen.pp \
-@@ -172,7 +172,7 @@ dombindings_gen.h: $(srcdir)/dombindings.conf \
- -I$(topsrcdir)/xpcom/idl-parser \
- $(srcdir)/dombindingsgen.py \
- --idlpath=$(DEPTH)/dist/idl \
-- --cachedir=$(DEPTH)/xpcom/idl-parser \
-+ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \
- --header-output dombindings_gen.h \
- $(srcdir)/dombindings.conf
-
-@@ -189,7 +189,7 @@ dombindings_gen.cpp: $(srcdir)/dombindings.conf \
- -I$(topsrcdir)/xpcom/idl-parser \
- $(srcdir)/dombindingsgen.py \
- --idlpath=$(DEPTH)/dist/idl \
-- --cachedir=$(DEPTH)/xpcom/idl-parser \
-+ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \
- --stub-output dombindings_gen.cpp \
- --makedepend-output $(MDDEPDIR)/dombindingsgen.pp \
- $(srcdir)/dombindings.conf
-@@ -208,7 +208,7 @@ DictionaryHelpers.h: $(srcdir)/dictionary_helper_gen.c
- -I$(topsrcdir)/xpcom/idl-parser \
- $(srcdir)/dictionary_helper_gen.py \
- -I $(DEPTH)/dist/idl \
-- --cachedir=$(DEPTH)/xpcom/idl-parser \
-+ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \
- --header-output DictionaryHelpers.h \
- $(srcdir)/dictionary_helper_gen.conf
-
-@@ -223,7 +223,7 @@ DictionaryHelpers.cpp: $(srcdir)/dictionary_helper_gen
- -I$(topsrcdir)/xpcom/idl-parser \
- $(srcdir)/dictionary_helper_gen.py \
- -I $(DEPTH)/dist/idl \
-- --cachedir=$(DEPTH)/xpcom/idl-parser \
-+ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \
- --header-output DictionaryHelpers.h \
- --stub-output DictionaryHelpers.cpp \
- --makedepend-output $(MDDEPDIR)/dictionary_helper_gen.pp \
---- xpcom/idl-parser/Makefile.in.orig Fri May 11 08:44:10 2012
-+++ xpcom/idl-parser/Makefile.in Fri May 11 08:44:29 2012
-@@ -61,7 +61,7 @@ export:: $(PARSER_SRCS) $(PLY_PROGS)
- $(PYTHON_PATH) \
- -I$(topsrcdir)/other-licenses/ply \
- -I$(topsrcdir)/xpcom/idl-parser \
-- $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=. --regen
-+ $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache --regen
-
- check::
- $(PYTHON_PATH) \
---- xpcom/typelib/xpidl/Makefile.in.orig Fri May 11 08:44:51 2012
-+++ xpcom/typelib/xpidl/Makefile.in Fri May 11 08:45:09 2012
-@@ -48,8 +48,8 @@ SDK_BINARY = \
- $(topsrcdir)/xpcom/idl-parser/xpidl.py \
- $(topsrcdir)/xpcom/idl-parser/header.py \
- $(topsrcdir)/xpcom/idl-parser/typelib.py \
-- $(DEPTH)/xpcom/idl-parser/xpidllex.py \
-- $(DEPTH)/xpcom/idl-parser/xpidlyacc.py \
-+ $(DEPTH)/xpcom/idl-parser/cache/xpidllex.py \
-+ $(DEPTH)/xpcom/idl-parser/cache/xpidlyacc.py \
- $(NULL)
-
- ifndef MOZ_SYSTEM_PLY
diff --git a/www/firefox/files/patch-build_unix_run-mozilla.sh b/www/firefox/files/patch-build_unix_run-mozilla.sh
deleted file mode 100644
index aae079e55456..000000000000
--- a/www/firefox/files/patch-build_unix_run-mozilla.sh
+++ /dev/null
@@ -1,12 +0,0 @@
---- build/unix/run-mozilla.sh.orig Tue Feb 14 19:56:54 2006
-+++ build/unix/run-mozilla.sh Fri Dec 8 15:49:48 2006
-@@ -443,6 +443,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/gecko19:%%LOCALBASE%%/lib/npapi/symlinks/firefox
-+export MOZ_PLUGIN_PATH
-+
- if [ $moz_debug -eq 1 ]
- then
- moz_debug_program ${1+"$@"}
diff --git a/www/firefox/files/patch-config_config.mk b/www/firefox/files/patch-config_config.mk
index bea88f7f78e4..c01a1463e5d4 100644
--- a/www/firefox/files/patch-config_config.mk
+++ b/www/firefox/files/patch-config_config.mk
@@ -4,7 +4,7 @@
-I$(srcdir) \
-I. \
-I$(DIST)/include -I$(DIST)/include/nsprpub \
-+ -I%%LOCALBASE%%/include \
++ -I$(LOCALBASE)/include \
$(if $(LIBXUL_SDK),-I$(LIBXUL_SDK)/include -I$(LIBXUL_SDK)/include/nsprpub) \
$(OS_INCLUDES) \
$(NULL)
diff --git a/www/firefox/files/patch-config_mkdepend_Makefile.in b/www/firefox/files/patch-config_mkdepend_Makefile.in
index 65687c7c5feb..59df0d99a4df 100644
--- a/www/firefox/files/patch-config_mkdepend_Makefile.in
+++ b/www/firefox/files/patch-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%%LOCALBASE%%/include
++HOST_CFLAGS += -DINCLUDEDIR=\"$(LOCALBASE)/include\" -DOBJSUFFIX=\".$(OBJ_SUFFIX)\" -I$(LOCALBASE)/include
+HOST_CFLAGS += $(XCFLAGS)
ifdef GNU_CC
diff --git a/www/firefox/files/patch-configure.in b/www/firefox/files/patch-configure.in
index 74abe4451b47..733d3116c1d1 100644
--- a/www/firefox/files/patch-configure.in
+++ b/www/firefox/files/patch-configure.in
@@ -1,32 +1,28 @@
--- configure.in.orig 2012-05-23 20:56:34.000000000 +0200
+++ configure.in 2012-05-27 18:18:25.000000000 +0200
-@@ -1517,7 +1517,7 @@
- CPU_ARCH=sparc
- ;;
-
--x86_64 | ia64)
-+amd64 | x86_64 | ia64)
- CPU_ARCH="$OS_TEST"
- ;;
-
-@@ -1539,7 +1539,7 @@
- dnl ===============================================================
- INTEL_ARCHITECTURE=
- case "$OS_TEST" in
-- x86_64|i?86)
-+ amd64|x86_64|i?86)
- INTEL_ARCHITECTURE=1
- esac
-
-@@ -4580,7 +4580,7 @@
+@@ -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
@@ -5903,6 +5903,14 @@
VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC"
VPX_X86_ASM=1
@@ -35,7 +31,7 @@
+ 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
+ ;;
@@ -50,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/firefox/files/patch-content-media-gstreamer-nsGStreamerReader.cpp b/www/firefox/files/patch-content-media-gstreamer-nsGStreamerReader.cpp
new file mode 100644
index 000000000000..274a5026d6d0
--- /dev/null
+++ b/www/firefox/files/patch-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
+--- content/media/gstreamer/nsGStreamerReader.cpp
++++ 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
+--- content/media/gstreamer/nsGStreamerReader.cpp
++++ 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/firefox/files/patch-db_sqlite3_src_Makefile.in b/www/firefox/files/patch-db_sqlite3_src_Makefile.in
deleted file mode 100644
index e52ba517e14a..000000000000
--- a/www/firefox/files/patch-db_sqlite3_src_Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- db/sqlite3/src/Makefile.in.orig 2009-04-28 11:12:00.829684825 +0000
-+++ db/sqlite3/src/Makefile.in 2009-04-28 11:12:20.628076799 +0000
-@@ -45,6 +45,8 @@
-
- include $(DEPTH)/config/autoconf.mk
-
-+OS_CFLAGS = -I../../../dist/include/sqlite3
-+OS_LIBS = %%PTHREAD_LIBS%% -lc
- MODULE = sqlite3
- LIBRARY_NAME = sqlite3
- FORCE_SHARED_LIB = 1
diff --git a/www/firefox/files/patch-dom-plugins-ipc-PluginMessageUtils.cpp b/www/firefox/files/patch-dom-plugins-ipc-PluginMessageUtils.cpp
new file mode 100644
index 000000000000..1dfabdbe21bd
--- /dev/null
+++ b/www/firefox/files/patch-dom-plugins-ipc-PluginMessageUtils.cpp
@@ -0,0 +1,11 @@
+--- dom/plugins/ipc/PluginMessageUtils.cpp~
++++ 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/firefox/files/patch-gfx-harfbuzz-src-hb-ot-layout.cc b/www/firefox/files/patch-gfx-harfbuzz-src-hb-ot-layout.cc
new file mode 100644
index 000000000000..a10d1a4d0e1f
--- /dev/null
+++ b/www/firefox/files/patch-gfx-harfbuzz-src-hb-ot-layout.cc
@@ -0,0 +1,10 @@
+--- gfx/harfbuzz/src/hb-ot-layout.cc.orig 2012-06-24 22:14:46.463741874 -0400
++++ 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/firefox/files/patch-gfx-qcms-Makefile.in b/www/firefox/files/patch-gfx-qcms-Makefile.in
deleted file mode 100644
index cc7414a33fe7..000000000000
--- a/www/firefox/files/patch-gfx-qcms-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- gfx/qcms/Makefile.in.orig 2011-01-22 01:25:38.000000000 +0100
-+++ 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/firefox/files/patch-ipc-chromium-Makefile.in b/www/firefox/files/patch-ipc-chromium-Makefile.in
new file mode 100644
index 000000000000..bba9d0124037
--- /dev/null
+++ b/www/firefox/files/patch-ipc-chromium-Makefile.in
@@ -0,0 +1,28 @@
+--- ipc/chromium/Makefile.in~
++++ 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/firefox/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc b/www/firefox/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc
deleted file mode 100644
index 1c8dde492901..000000000000
--- a/www/firefox/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc
+++ /dev/null
@@ -1,10 +0,0 @@
---- ipc/chromium/src/base/atomicops_internals_mutex.cc~
-+++ 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/firefox/files/patch-ipc-chromium-src-base-dir_reader_linux.h b/www/firefox/files/patch-ipc-chromium-src-base-dir_reader_linux.h
deleted file mode 100644
index 36749ba8abc4..000000000000
--- a/www/firefox/files/patch-ipc-chromium-src-base-dir_reader_linux.h
+++ /dev/null
@@ -1,45 +0,0 @@
---- ipc/chromium/src/base/dir_reader_linux.h.orig 2011-12-16 21:29:22.000000000 +0100
-+++ 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/firefox/files/patch-ipc-chromium-src-base-file_util_linux.cc b/www/firefox/files/patch-ipc-chromium-src-base-file_util_linux.cc
deleted file mode 100644
index c6e4df63d444..000000000000
--- a/www/firefox/files/patch-ipc-chromium-src-base-file_util_linux.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- ipc/chromium/src/base/file_util_linux.cc~
-+++ 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/firefox/files/patch-ipc-chromium-src-base-file_util_posix.cc b/www/firefox/files/patch-ipc-chromium-src-base-file_util_posix.cc
deleted file mode 100644
index b43b33f44510..000000000000
--- a/www/firefox/files/patch-ipc-chromium-src-base-file_util_posix.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- ipc/chromium/src/base/file_util_posix.cc~
-+++ 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/firefox/files/patch-ipc-chromium-src-base-message_pump_libevent.cc b/www/firefox/files/patch-ipc-chromium-src-base-message_pump_libevent.cc
new file mode 100644
index 000000000000..7d4dc959eedf
--- /dev/null
+++ b/www/firefox/files/patch-ipc-chromium-src-base-message_pump_libevent.cc
@@ -0,0 +1,11 @@
+--- ipc/chromium/src/base/message_pump_libevent.cc~
++++ 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/firefox/files/patch-ipc-chromium-src-base-platform_file_posix.cc b/www/firefox/files/patch-ipc-chromium-src-base-platform_file_posix.cc
deleted file mode 100644
index 01111459c4bb..000000000000
--- a/www/firefox/files/patch-ipc-chromium-src-base-platform_file_posix.cc
+++ /dev/null
@@ -1,10 +0,0 @@
---- ipc/chromium/src/base/platform_file_posix.cc~
-+++ 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/firefox/files/patch-ipc-chromium-src-base-platform_thread_posix.cc b/www/firefox/files/patch-ipc-chromium-src-base-platform_thread_posix.cc
deleted file mode 100644
index 0b527d38d4f6..000000000000
--- a/www/firefox/files/patch-ipc-chromium-src-base-platform_thread_posix.cc
+++ /dev/null
@@ -1,25 +0,0 @@
---- ipc/chromium/src/base/platform_thread_posix.cc~
-+++ ipc/chromium/src/base/platform_thread_posix.cc
-@@ -11,6 +11,7 @@
- #include <mach/mach.h>
- #elif defined(OS_LINUX)
- #include <sys/syscall.h>
-+#include <pthread_np.h>
- #include <unistd.h>
- #endif
-
-@@ -34,7 +35,13 @@ PlatformThreadId PlatformThread::Current
- #if defined(OS_MACOSX)
- return mach_thread_self();
- #elif defined(OS_LINUX)
-- return syscall(__NR_gettid);
-+#if __FreeBSD_version > 900030
-+ return pthread_getthreadid_np();
-+#else
-+ long tid;
-+ syscall(SYS_thr_self, &tid);
-+ return tid;
-+#endif
- #endif
- }
-
diff --git a/www/firefox/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h b/www/firefox/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h
deleted file mode 100644
index 75bf9d8a0269..000000000000
--- a/www/firefox/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ipc/chromium/src/base/third_party/nspr/prcpucfg.h~
-+++ 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/firefox/files/patch-ipc-chromium-src-build-build_config.h b/www/firefox/files/patch-ipc-chromium-src-build-build_config.h
deleted file mode 100644
index 076370d85a80..000000000000
--- a/www/firefox/files/patch-ipc-chromium-src-build-build_config.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ipc/chromium/src/build/build_config.h~
-+++ 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/firefox/files/patch-js-src-Makefile.in b/www/firefox/files/patch-js-src-Makefile.in
index 75d431a9ed0e..69d3cf78e927 100644
--- a/www/firefox/files/patch-js-src-Makefile.in
+++ b/www/firefox/files/patch-js-src-Makefile.in
@@ -1,24 +1,5 @@
--- js/src/Makefile.in.orig 2012-03-15 20:40:13.000000000 +0100
+++ 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/firefox/files/patch-js-src-config-mkdepend_Makefile.in b/www/firefox/files/patch-js-src-config-mkdepend_Makefile.in
index fa2cc6012a3a..460b5d7850b0 100644
--- a/www/firefox/files/patch-js-src-config-mkdepend_Makefile.in
+++ b/www/firefox/files/patch-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%%LOCALBASE%%/include
++HOST_CFLAGS += -DINCLUDEDIR=\"$(LOCALBASE)/include\" -DOBJSUFFIX=\".$(OBJ_SUFFIX)\" -I$(LOCALBASE)/include
+HOST_CFLAGS += $(XCFLAGS)
ifdef GNU_CC
diff --git a/www/firefox/files/patch-js-src-config_config.mk b/www/firefox/files/patch-js-src-config_config.mk
index 13bf2e58a794..58873f3b1e9c 100644
--- a/www/firefox/files/patch-js-src-config_config.mk
+++ b/www/firefox/files/patch-js-src-config_config.mk
@@ -4,7 +4,7 @@
-I$(srcdir) \
-I. \
-I$(DIST)/include -I$(DIST)/include/nsprpub \
-+ -I%%LOCALBASE%%/include \
++ -I$(LOCALBASE)/include \
$(if $(LIBXUL_SDK),-I$(LIBXUL_SDK)/include -I$(LIBXUL_SDK)/include/nsprpub) \
$(OS_INCLUDES) \
$(NULL)
diff --git a/www/firefox/files/patch-js-src-configure.in b/www/firefox/files/patch-js-src-configure.in
index 3487b16d9b2d..b3ed4d332e2b 100644
--- a/www/firefox/files/patch-js-src-configure.in
+++ b/www/firefox/files/patch-js-src-configure.in
@@ -1,37 +1,10 @@
--- js/src/configure.in.orig 2012-02-22 17:06:28.000000000 +0100
+++ js/src/configure.in 2012-03-07 21:03:11.000000000 +0100
-@@ -1470,7 +1470,7 @@
- CPU_ARCH=sparc
- ;;
+@@ -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
--x86_64 | ia64)
-+amd64 | x86_64 | ia64)
- CPU_ARCH="$OS_TEST"
- ;;
+ #endif /* _JS_CONFDEFS_H_ */
-@@ -1492,7 +1492,7 @@
- dnl ===============================================================
- INTEL_ARCHITECTURE=
- case "$OS_TEST" in
-- x86_64|i?86)
-+ amd64|x86_64|i?86)
- INTEL_ARCHITECTURE=1
- esac
-
-@@ -2814,6 +2814,16 @@
- AC_DEFINE(JS_CPU_X86)
- AC_DEFINE(JS_NUNBOX32)
- ;;
-+amd64*-*)
-+ ENABLE_TRACEJIT=1
-+ NANOJIT_ARCH=X64
-+ ENABLE_METHODJIT=1
-+ ENABLE_MONOIC=1
-+ ENABLE_POLYIC=1
-+ ENABLE_POLYIC_TYPED_ARRAY=1
-+ AC_DEFINE(JS_CPU_X64)
-+ AC_DEFINE(JS_PUNBOX64)
-+ ;;
- x86_64*-*)
- ENABLE_METHODJIT=1
- ENABLE_MONOIC=1
diff --git a/www/firefox/files/patch-js-src-methodjit-MethodJIT.cpp b/www/firefox/files/patch-js-src-methodjit-MethodJIT.cpp
new file mode 100644
index 000000000000..d29c15ccc05a
--- /dev/null
+++ b/www/firefox/files/patch-js-src-methodjit-MethodJIT.cpp
@@ -0,0 +1,20 @@
+--- js/src/methodjit/MethodJIT.cpp~
++++ 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/firefox/files/patch-js_src_jsnum.cpp b/www/firefox/files/patch-js_src_jsnum.cpp
index ea2515a74d94..f47838638257 100644
--- a/www/firefox/files/patch-js_src_jsnum.cpp
+++ b/www/firefox/files/patch-js_src_jsnum.cpp
@@ -1,9 +1,9 @@
--- js/src/jsnum.cpp.orig 2010-01-05 22:35:17.000000000 -0500
+++ js/src/jsnum.cpp 2010-01-11 05:10:19.000000000 -0500
-@@ -43,6 +43,9 @@
- /*
- * JS number type and wrapper class.
- */
+@@ -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
diff --git a/www/firefox/files/patch-layout_generic_Makefile.in b/www/firefox/files/patch-layout_generic_Makefile.in
index ad2bc6b2ae3d..b48d4e13f8ce 100644
--- a/www/firefox/files/patch-layout_generic_Makefile.in
+++ b/www/firefox/files/patch-layout_generic_Makefile.in
@@ -1,9 +1,9 @@
---- layout/generic/Makefile.in.orig 2011-07-06 05:09:28.000000000 +0200
-+++ layout/generic/Makefile.in 2011-07-06 21:49:25.105659269 +0200
-@@ -159,9 +159,10 @@
- -I$(srcdir)/../../content/html/content/src \
+--- layout/generic/Makefile.in~
++++ layout/generic/Makefile.in
+@@ -154,9 +154,10 @@ LOCAL_INCLUDES += \
-I$(srcdir)/../../dom/base \
-I$(srcdir)/../../dom/plugins/base \
+ -I$(srcdir)/../svg/base/src \
- $(MOZ_CAIRO_CFLAGS) \
$(NULL)
diff --git a/www/firefox/files/patch-media-libsydneyaudio-include-sydney_audio.h b/www/firefox/files/patch-media-libsydneyaudio-include-sydney_audio.h
deleted file mode 100644
index d8e318e9bcb2..000000000000
--- a/www/firefox/files/patch-media-libsydneyaudio-include-sydney_audio.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- media/libsydneyaudio/include/sydney_audio.h.orgi 2009-04-10 12:24:01.000000000 +0200
-+++ media/libsydneyaudio/include/sydney_audio.h 2009-04-10 12:24:30.000000000 +0200
-@@ -73,7 +73,7 @@
- # endif
- #elif defined(WIN32)
- # define SA_LITTLE_ENDIAN 1
--#elif defined(__APPLE__)
-+#elif defined(__APPLE__) || defined(__FreeBSD__)
- # if defined(__BIG_ENDIAN__)
- # define SA_BIG_ENDIAN 1
- # else
diff --git a/www/firefox/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c b/www/firefox/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c
new file mode 100644
index 000000000000..a7fd5f1ffd09
--- /dev/null
+++ b/www/firefox/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c
@@ -0,0 +1,13 @@
+--- media/libsydneyaudio/src/sydney_audio_oss.c~
++++ 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/firefox/files/patch-memory-mozalloc-mozalloc.cpp b/www/firefox/files/patch-memory-mozalloc-mozalloc.cpp
new file mode 100644
index 000000000000..e03a02bfc3f1
--- /dev/null
+++ b/www/firefox/files/patch-memory-mozalloc-mozalloc.cpp
@@ -0,0 +1,21 @@
+--- memory/mozalloc/mozalloc.cpp~
++++ 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/firefox/files/patch-security-coreconf-FreeBSD.mk b/www/firefox/files/patch-security-coreconf-FreeBSD.mk
index 279110fa0321..b1ea1eb209c0 100644
--- a/www/firefox/files/patch-security-coreconf-FreeBSD.mk
+++ b/www/firefox/files/patch-security-coreconf-FreeBSD.mk
@@ -1,6 +1,6 @@
--- security/coreconf/FreeBSD.mk.orig 2010-02-28 23:30:04.000000000 +0000
+++ security/coreconf/FreeBSD.mk 2010-03-03 02:05:22.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/firefox/files/patch-security-nss-lib-Makefile b/www/firefox/files/patch-security-nss-lib-Makefile
new file mode 100644
index 000000000000..51304f730c92
--- /dev/null
+++ b/www/firefox/files/patch-security-nss-lib-Makefile
@@ -0,0 +1,11 @@
+--- security/nss/lib/Makefile~
++++ 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/firefox/files/patch-security-nss-lib-freebl-mpi-mpcpucache.c b/www/firefox/files/patch-security-nss-lib-freebl-mpi-mpcpucache.c
new file mode 100644
index 000000000000..eb54e8414e99
--- /dev/null
+++ b/www/firefox/files/patch-security-nss-lib-freebl-mpi-mpcpucache.c
@@ -0,0 +1,45 @@
+--- security/nss/lib/freebl/mpi/mpcpucache.c.orig 2011-02-27 20:08:16.000000000 +0100
++++ security/nss/lib/freebl/mpi/mpcpucache.c 2011-02-27 20:09:24.000000000 +0100
+@@ -733,6 +733,34 @@
+ #endif
+
+ #if defined(__ppc64__)
++#if defined(__FreeBSD__)
++#include <sys/stddef.h>
++#include <sys/sysctl.h>
++
++#include <machine/cpu.h>
++#include <machine/md_var.h>
++
++unsigned long
++s_mpi_getProcessorLineSize()
++{
++ static int cacheline_size = 0;
++ static int cachemib[] = { CTL_MACHDEP, CPU_CACHELINE };
++ int clen;
++
++ if (cacheline_size > 0)
++ return cacheline_size;
++
++ clen = sizeof(cacheline_size);
++ if (sysctl(cachemib, sizeof(cachemib) / sizeof(cachemib[0]),
++ &cacheline_size, &clen, NULL, 0) < 0 || !cacheline_size)
++ return 128; /* guess */
++
++ return cacheline_size;
++}
++#else /* __FreeBSD__ */
++
++
++
+ /*
+ * Sigh, The PPC has some really nice features to help us determine cache
+ * size, since it had lots of direct control functions to do so. The POWER
+@@ -786,6 +814,7 @@
+ return 0;
+ }
+
++#endif /* __FreeBSD__ */
+ #define MPI_GET_PROCESSOR_LINE_SIZE_DEFINED 1
+ #endif
+
diff --git a/www/firefox/files/patch-toolkit-xre-nsAppRunner.cpp b/www/firefox/files/patch-toolkit-xre-nsAppRunner.cpp
new file mode 100644
index 000000000000..57bae60dc967
--- /dev/null
+++ b/www/firefox/files/patch-toolkit-xre-nsAppRunner.cpp
@@ -0,0 +1,11 @@
+--- toolkit/xre/nsAppRunner.cpp~
++++ 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/firefox/files/patch-toolkit_library_Makefile.in b/www/firefox/files/patch-toolkit_library_Makefile.in
deleted file mode 100644
index 64b0c47e4b64..000000000000
--- a/www/firefox/files/patch-toolkit_library_Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- toolkit/library/Makefile.in.orig 2010-01-11 12:13:08.000000000 -0500
-+++ 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/firefox/files/patch-widget-qt-nsNativeThemeQt.cpp b/www/firefox/files/patch-widget-qt-nsNativeThemeQt.cpp
new file mode 100644
index 000000000000..c6915519e8ab
--- /dev/null
+++ b/www/firefox/files/patch-widget-qt-nsNativeThemeQt.cpp
@@ -0,0 +1,12 @@
+--- widget/qt/nsNativeThemeQt.cpp~
++++ 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/firefox/files/patch-widget-qt-nsSound.cpp b/www/firefox/files/patch-widget-qt-nsSound.cpp
new file mode 100644
index 000000000000..445dca03d3b1
--- /dev/null
+++ b/www/firefox/files/patch-widget-qt-nsSound.cpp
@@ -0,0 +1,10 @@
+--- widget/qt/nsSound.cpp~
++++ 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/firefox/files/patch-widget-qt-nsWindow.cpp b/www/firefox/files/patch-widget-qt-nsWindow.cpp
new file mode 100644
index 000000000000..ba15e5c2a895
--- /dev/null
+++ b/www/firefox/files/patch-widget-qt-nsWindow.cpp
@@ -0,0 +1,10 @@
+--- widget/qt/nsWindow.cpp~
++++ 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/firefox/files/patch-xpcom-io-nsAppFileLocationProvider.cpp b/www/firefox/files/patch-xpcom-io-nsAppFileLocationProvider.cpp
deleted file mode 100644
index c16124abefa0..000000000000
--- a/www/firefox/files/patch-xpcom-io-nsAppFileLocationProvider.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- xpcom/io/nsAppFileLocationProvider.cpp.orig 2011-09-30 15:52:07.000000000 +0200
-+++ xpcom/io/nsAppFileLocationProvider.cpp 2011-09-30 15:52:40.000000000 +0200
-@@ -238,7 +238,7 @@
- #if defined(HAVE_USR_LIB64_DIR) && defined(__LP64__)
- "/usr/lib64/mozilla/plugins";
- #else
-- "/usr/lib/mozilla/plugins";
-+ "%%LOCALBASE%%/lib/npapi/symlinks/firefox";
- #endif
- rv = NS_NewNativeLocalFile(nsDependentCString(sysLPlgDir),
- PR_FALSE, getter_AddRefs(localFile));
diff --git a/www/firefox/files/patch-xpcom_base_nsStackWalk.cpp b/www/firefox/files/patch-xpcom_base_nsStackWalk.cpp
index a6b41d4fbc54..e0ce1ad9c498 100644
--- a/www/firefox/files/patch-xpcom_base_nsStackWalk.cpp
+++ b/www/firefox/files/patch-xpcom_base_nsStackWalk.cpp
@@ -9,3 +9,11 @@
#include <dlfcn.h>
#endif
+@@ -1123,6 +1123,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/firefox/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in b/www/firefox/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in
index 169fa43553d7..1934cc3aaa47 100644
--- a/www/firefox/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in
+++ b/www/firefox/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in
@@ -1,16 +1,6 @@
--- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2011-04-26 23:22:05.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in 2011-04-26 23:48:09.637442986 +0200
-@@ -94,6 +94,9 @@
- DEFINES += -DKEEP_STACK_16_BYTE_ALIGNED
- CPPSRCS := xptcinvoke_unixish_x86.cpp xptcstubs_unixish_x86.cpp
- endif
-+ifeq (x86_64,$(OS_TEST))
-+CPPSRCS := xptcinvoke_x86_64_linux.cpp xptcstubs_x86_64_linux.cpp
-+endif
- endif
- endif
-
-@@ -117,7 +120,7 @@
+@@ -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
-@@ -130,6 +133,12 @@
- 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)
- #
- ifeq ($(OS_TARGET),NTO)
-@@ -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/firefox/pkg-message b/www/firefox/pkg-message
index c685efa51197..541e7771f224 100644
--- a/www/firefox/pkg-message
+++ b/www/firefox/pkg-message
@@ -1,9 +1,9 @@
======================================================================
-SMB issues:
+smb:// issues (GNOMEVFS2 option):
Network group, machine, and share browsing does not work correctly.
-SFTP:
+sftp:// (GNOMEVFS2 option):
Only sftp access using public key authentication works. To easily
setup public key authentication to "remote_host":
@@ -16,7 +16,8 @@ The SSH server on remote_host must allow pub key authentication.
Firefox and HTML5
-Certain functions used to display HTML5 elements need the sem module.
+Certain functions used to display HTML5 elements need the sem module
+on 7.x and 8.x releases.
If your Firefox crashes with the following message while viewing a
HTML5 page:
diff --git a/www/kompozer/Makefile b/www/kompozer/Makefile
index 06efcac6d859..1a7b73e74094 100644
--- a/www/kompozer/Makefile
+++ b/www/kompozer/Makefile
@@ -16,8 +16,6 @@ DISTNAME= ${PORTNAME}-${DISTVERSION}-src
MAINTAINER= gecko@FreeBSD.org
COMMENT= Complete Web Authoring Suite
-LIB_DEPENDS= png15:${PORTSDIR}/graphics/png
-
WANT_GNOME= yes
WANT_PERL= yes
USE_BZIP2= yes
@@ -26,11 +24,14 @@ USE_GMAKE= yes
WRKSRC= ${WRKDIR}/mozilla
MAKEFILE= client.mk
ALL_TARGET= build_all
-#CFLAGS+= -I${LOCALBASE}/include/libpng15
+USE_MOZILLA= -event -ffi -hunspell -sqlite -vpx
+MOZ_CHROME= jar
+MOZ_TOOLKIT= gtk2
MOZ_EXTENSIONS= wallet,xml-rpc,xmlextras,pref,universalchardet,spellcheck
-MOZ_OPTIONS= --with-default-mozilla-five-home=${PREFIX}/lib/${MOZILLA} \
- --enable-application=composer \
- --enable-system-cairo
+MOZ_OPTIONS= ${CONFIGURE_TARGET} \
+ --enable-xinerama \
+ --disable-xprint \
+ --enable-application=composer
PORT_MOZCONFIG= ${WRKSRC}/composer/config/mozconfig.linux
DESKTOP_ENTRIES="Kompozer" "${COMMENT}" \
@@ -40,11 +41,19 @@ DESKTOP_ENTRIES="Kompozer" "${COMMENT}" \
NOT_FOR_ARCHS= ia64
NOT_FOR_ARCHS_REASON_ia64= does not build
+.include "${.CURDIR}/../../www/firefox/Makefile.options"
+
+OPTIONS_DEFINE:=${OPTIONS_DEFINE:NDBUS:NGIO:NLIBPROXY}
+OPTIONS_SINGLE:=${OPTIONS_SINGLE:NAUDIO:NTOOLKIT}
+OPTIONS_MULTI_GNOME:=${OPTIONS_MULTI_GNOME:NGIO}
+
.include <bsd.port.pre.mk>
+.if ${ARCH} == amd64
+CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL}
+.endif
+
post-patch:
- ${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \
- ${WRKSRC}/storage/build/Makefile.in
@${RM} -f ${WRKSRC}/config.status ${WRKSRC}/config.cache
@${ECHO_CMD} "LDFLAGS += -L${LOCALBASE}/lib" >> ${WRKSRC}/toolkit/components/Makefile.in
@${ECHO_CMD} "LDFLAGS += -L${LOCALBASE}/lib" >> ${WRKSRC}/toolkit/components/gnome/Makefile.in
diff --git a/www/kompozer/files/patch-storage_build_Makefile.in b/www/kompozer/files/patch-storage_build_Makefile.in
deleted file mode 100644
index 18202a5a61d8..000000000000
--- a/www/kompozer/files/patch-storage_build_Makefile.in
+++ /dev/null
@@ -1,10 +0,0 @@
---- storage/build/Makefile.in.orig Tue Feb 21 11:18:56 2006
-+++ storage/build/Makefile.in Sun Nov 5 16:16:06 2006
-@@ -77,6 +77,7 @@
- $(EXTRA_DSO_LIBS) \
- $(MOZ_COMPONENT_LIBS) \
- $(MOZ_JS_LIBS) \
-+ %%PTHREAD_LIBS%% \
- $(NULL)
-
- include $(topsrcdir)/config/rules.mk
diff --git a/www/kompozer/files/patch-xpcom-reflect-xptcall-src-md-unix-Makefile.in b/www/kompozer/files/patch-xpcom-reflect-xptcall-src-md-unix-Makefile.in
index 0364449f8249..59d7a054f879 100644
--- a/www/kompozer/files/patch-xpcom-reflect-xptcall-src-md-unix-Makefile.in
+++ b/www/kompozer/files/patch-xpcom-reflect-xptcall-src-md-unix-Makefile.in
@@ -1,15 +1,14 @@
--- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2009-05-02 18:43:37.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in 2009-09-28 22:05:47.000000000 +0200
-@@ -66,6 +66,9 @@
- ifeq (86,$(findstring 86,$(OS_TEST)))
- CPPSRCS := xptcinvoke_unixish_x86.cpp xptcstubs_unixish_x86.cpp
- endif
-+ifeq (amd64,$(OS_TEST))
-+CPPSRCS := xptcinvoke_x86_64_linux.cpp xptcstubs_x86_64_linux.cpp
-+endif
- endif
+@@ -77,7 +77,7 @@ endif
+ # New code for Linux, et. al., with gcc
+ # Migrate other platforms here after testing
#
- # OpenBSD/amd64
+-ifneq (,$(filter Linux,$(OS_ARCH)))
++ifneq (,$(filter Linux FreeBSD,$(OS_ARCH)))
+ # Linux/x86-64
+ ifeq (x86_64,$(OS_TEST))
+ CPPSRCS := xptcinvoke_x86_64_linux.cpp xptcstubs_x86_64_linux.cpp
@@ -88,7 +91,7 @@
endif
endif
@@ -19,51 +18,21 @@
ifneq (,$(findstring ia64,$(OS_TEST)))
CPPSRCS := xptcinvoke_ipf64.cpp xptcstubs_ipf64.cpp
ASFILES := xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s
-@@ -151,9 +154,15 @@
- CPPSRCS := xptcinvoke_openbsd_alpha.cpp xptcstubs_openbsd_alpha.cpp
- endif
- #
-+# FreeBSD/Alpha
-+#
-+ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDalpha)
-+CPPSRCS := xptcinvoke_freebsd_alpha.cpp xptcstubs_freebsd_alpha.cpp
-+endif
-+#
- # Linux/Alpha
+@@ -295,7 +295,7 @@ endif
#
--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
- #
-@@ -293,6 +302,14 @@
- endif
-
- #
-+# FreeBSD/PPC
-+#
-+ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDpowerpc)
-+CPPSRCS := xptcinvoke_ppc_freebsd.cpp xptcstubs_ppc_freebsd.cpp
-+ASFILES := xptcinvoke_asm_ppc_freebsd.s xptcstubs_asm_ppc_freebsd.s
-+endif
-+
-+#
# Linux/PPC
#
- ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc)
-@@ -364,6 +381,15 @@
- ASFILES := xptcinvoke_asm_sparc_netbsd.s xptcstubs_asm_sparc_netbsd.s
+-ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc)
++ifneq (,$(filter Linuxppc FreeBSDpowerpc,$(OS_ARCH)$(OS_TEST)))
+ CPPSRCS := xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp
+ ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
+ AS := $(CC) -c -x assembler-with-cpp
+@@ -400,7 +400,7 @@ endif
+ #
+ # 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_sparcv9_solaris.s
endif
- #
-+# FreeBSD/SPARC64
-+#
-+ifeq ($(OS_ARCH),FreeBSD)
-+ifneq (,$(findstring sparc,$(OS_TEST)))
-+CPPSRCS := xptcinvoke_sparc64_freebsd.cpp xptcstubs_sparc64_freebsd.cpp
-+ASFILES := xptcinvoke_asm_sparc64_freebsd.s xptcstubs_asm_sparcv9_solaris.s
-+endif
-+endif
-+#
- # Solaris/SPARC
- #
- ifeq ($(OS_ARCH),SunOS)
diff --git a/www/kompozer/files/patch-xptcall-alpha b/www/kompozer/files/patch-xptcall-alpha
deleted file mode 100644
index 29631a98e61e..000000000000
--- a/www/kompozer/files/patch-xptcall-alpha
+++ /dev/null
@@ -1,459 +0,0 @@
---- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_freebsd_alpha.cpp.orig Tue May 27 01:37:25 2003
-+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_freebsd_alpha.cpp Tue May 27 01:37:00 2003
-@@ -0,0 +1,184 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-+/* ***** BEGIN LICENSE BLOCK *****
-+ * Version: NPL 1.1/GPL 2.0/LGPL 2.1
-+ *
-+ * The contents of this file are subject to the Netscape Public License
-+ * Version 1.1 (the "License"); you may not use this file except in
-+ * compliance with the License. You may obtain a copy of the License at
-+ * http://www.mozilla.org/NPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS IS" basis,
-+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-+ * for the specific language governing rights and limitations under the
-+ * License.
-+ *
-+ * The Original Code is mozilla.org code.
-+ *
-+ * The Initial Developer of the Original Code is
-+ * Netscape Communications Corporation.
-+ * Portions created by the Initial Developer are Copyright (C) 1998
-+ * the Initial Developer. All Rights Reserved.
-+ *
-+ * Contributor(s):
-+ *
-+ * Alternatively, the contents of this file may be used under the terms of
-+ * either the GNU General Public License Version 2 or later (the "GPL"), or
-+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-+ * in which case the provisions of the GPL or the LGPL are applicable instead
-+ * of those above. If you wish to allow use of your version of this file only
-+ * under the terms of either the GPL or the LGPL, and not to allow others to
-+ * use your version of this file under the terms of the NPL, indicate your
-+ * decision by deleting the provisions above and replace them with the notice
-+ * and other provisions required by the GPL or the LGPL. If you do not delete
-+ * the provisions above, a recipient may use your version of this file under
-+ * the terms of any one of the NPL, the GPL or the LGPL.
-+ *
-+ * ***** END LICENSE BLOCK ***** */
-+
-+/* Platform specific code to invoke XPCOM methods on native objects */
-+
-+/* contributed by Glen Nakamura <glen.nakamura@usa.net> */
-+
-+#include "xptcprivate.h"
-+
-+/* Prototype specifies unmangled function name and disables unused warning */
-+static void
-+invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s)
-+__asm__("invoke_copy_to_stack") __attribute__((unused));
-+
-+static void
-+invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s)
-+{
-+ const PRUint8 NUM_ARG_REGS = 6-1; // -1 for "this" pointer
-+
-+ for(PRUint32 i = 0; i < paramCount; i++, d++, s++)
-+ {
-+ if(s->IsPtrData())
-+ {
-+ *d = (PRUint64)s->ptr;
-+ continue;
-+ }
-+ switch(s->type)
-+ {
-+ case nsXPTType::T_I8 : *d = (PRUint64)s->val.i8; break;
-+ case nsXPTType::T_I16 : *d = (PRUint64)s->val.i16; break;
-+ case nsXPTType::T_I32 : *d = (PRUint64)s->val.i32; break;
-+ case nsXPTType::T_I64 : *d = (PRUint64)s->val.i64; break;
-+ case nsXPTType::T_U8 : *d = (PRUint64)s->val.u8; break;
-+ case nsXPTType::T_U16 : *d = (PRUint64)s->val.u16; break;
-+ case nsXPTType::T_U32 : *d = (PRUint64)s->val.u32; break;
-+ case nsXPTType::T_U64 : *d = (PRUint64)s->val.u64; break;
-+ case nsXPTType::T_FLOAT :
-+ if(i < NUM_ARG_REGS)
-+ {
-+ // convert floats to doubles if they are to be passed
-+ // via registers so we can just deal with doubles later
-+ union { PRUint64 u64; double d; } t;
-+ t.d = (double)s->val.f;
-+ *d = t.u64;
-+ }
-+ else
-+ // otherwise copy to stack normally
-+ *d = (PRUint64)s->val.u32;
-+ break;
-+ case nsXPTType::T_DOUBLE : *d = (PRUint64)s->val.u64; break;
-+ case nsXPTType::T_BOOL : *d = (PRUint64)s->val.b; break;
-+ case nsXPTType::T_CHAR : *d = (PRUint64)s->val.c; break;
-+ case nsXPTType::T_WCHAR : *d = (PRUint64)s->val.wc; break;
-+ default:
-+ // all the others are plain pointer types
-+ *d = (PRUint64)s->val.p;
-+ break;
-+ }
-+ }
-+}
-+
-+/*
-+ * XPTC_PUBLIC_API(nsresult)
-+ * XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-+ * PRUint32 paramCount, nsXPTCVariant* params, void* vt)
-+ */
-+__asm__(
-+ "#### XPTC_InvokeByIndex ####\n"
-+".text\n\t"
-+ ".align 5\n\t"
-+ ".globl XPTC_InvokeByIndex\n\t"
-+ ".ent XPTC_InvokeByIndex\n"
-+"XPTC_InvokeByIndex:\n\t"
-+ ".frame $15,32,$26,0\n\t"
-+ ".mask 0x4008000,-32\n\t"
-+ "ldgp $29,0($27)\n"
-+"$XPTC_InvokeByIndex..ng:\n\t"
-+ "subq $30,32,$30\n\t"
-+ "stq $26,0($30)\n\t"
-+ "stq $15,8($30)\n\t"
-+ "bis $30,$30,$15\n\t"
-+ ".prologue 1\n\t"
-+
-+ /*
-+ * Allocate enough stack space to hold the greater of 6 or "paramCount"+1
-+ * parameters. (+1 for "this" pointer) Room for at least 6 parameters
-+ * is required for storage of those passed via registers.
-+ */
-+
-+ "bis $31,5,$2\n\t" /* count = MAX(5, "paramCount") */
-+ "cmplt $2,$18,$1\n\t"
-+ "cmovne $1,$18,$2\n\t"
-+ "s8addq $2,16,$1\n\t" /* room for count+1 params (8 bytes each) */
-+ "bic $1,15,$1\n\t" /* stack space is rounded up to 0 % 16 */
-+ "subq $30,$1,$30\n\t"
-+
-+ "stq $16,0($30)\n\t" /* save "that" (as "this" pointer) */
-+ "stq $17,16($15)\n\t" /* save "methodIndex" */
-+
-+ "addq $30,8,$16\n\t" /* pass stack pointer */
-+ "bis $18,$18,$17\n\t" /* pass "paramCount" */
-+ "bis $19,$19,$18\n\t" /* pass "params" */
-+ "bsr $26,$invoke_copy_to_stack..ng\n\t" /* call invoke_copy_to_stack */
-+
-+ /*
-+ * Copy the first 6 parameters to registers and remove from stack frame.
-+ * Both the integer and floating point registers are set for each parameter
-+ * except the first which is the "this" pointer. (integer only)
-+ * The floating point registers are all set as doubles since the
-+ * invoke_copy_to_stack function should have converted the floats.
-+ */
-+ "ldq $16,0($30)\n\t" /* integer registers */
-+ "ldq $17,8($30)\n\t"
-+ "ldq $18,16($30)\n\t"
-+ "ldq $19,24($30)\n\t"
-+ "ldq $20,32($30)\n\t"
-+ "ldq $21,40($30)\n\t"
-+ "ldt $f17,8($30)\n\t" /* floating point registers */
-+ "ldt $f18,16($30)\n\t"
-+ "ldt $f19,24($30)\n\t"
-+ "ldt $f20,32($30)\n\t"
-+ "ldt $f21,40($30)\n\t"
-+
-+ "addq $30,48,$30\n\t" /* remove params from stack */
-+
-+ /*
-+ * Call the virtual function with the constructed stack frame.
-+ */
-+ "bis $16,$16,$1\n\t" /* load "this" */
-+ "ldq $2,16($15)\n\t" /* load "methodIndex" */
-+ "ldq $1,0($1)\n\t" /* load vtable */
-+#if 0
-+ "s8addq $2,16,$2\n\t" /* vtable index = "methodIndex" * 8 + 16 */
-+#else
-+ "mulq $2, 8, $2\n\t"
-+ "addq $2, 0, $2\n\t" /* vtable index = "methodIndex" * 16 + 24 */
-+#endif
-+ "addq $1,$2,$1\n\t"
-+ "ldq $27,0($1)\n\t" /* load address of function */
-+ "jsr $26,($27),0\n\t" /* call virtual function */
-+ "ldgp $29,0($26)\n\t"
-+
-+ "bis $15,$15,$30\n\t"
-+ "ldq $26,0($30)\n\t"
-+ "ldq $15,8($30)\n\t"
-+ "addq $30,32,$30\n\t"
-+ "ret $31,($26),1\n\t"
-+ ".end XPTC_InvokeByIndex"
-+ );
-+
---- xpcom/reflect/xptcall/src/md/unix/xptcstubs_freebsd_alpha.cpp.orig Tue May 27 01:37:30 2003
-+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_freebsd_alpha.cpp Tue May 27 01:37:04 2003
-@@ -0,0 +1,269 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-+/* ***** BEGIN LICENSE BLOCK *****
-+ * Version: NPL 1.1/GPL 2.0/LGPL 2.1
-+ *
-+ * The contents of this file are subject to the Netscape Public License
-+ * Version 1.1 (the "License"); you may not use this file except in
-+ * compliance with the License. You may obtain a copy of the License at
-+ * http://www.mozilla.org/NPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS IS" basis,
-+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-+ * for the specific language governing rights and limitations under the
-+ * License.
-+ *
-+ * The Original Code is mozilla.org code.
-+ *
-+ * The Initial Developer of the Original Code is
-+ * Netscape Communications Corporation.
-+ * Portions created by the Initial Developer are Copyright (C) 1999
-+ * the Initial Developer. All Rights Reserved.
-+ *
-+ * Contributor(s):
-+ *
-+ * Alternatively, the contents of this file may be used under the terms of
-+ * either the GNU General Public License Version 2 or later (the "GPL"), or
-+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-+ * in which case the provisions of the GPL or the LGPL are applicable instead
-+ * of those above. If you wish to allow use of your version of this file only
-+ * under the terms of either the GPL or the LGPL, and not to allow others to
-+ * use your version of this file under the terms of the NPL, indicate your
-+ * decision by deleting the provisions above and replace them with the notice
-+ * and other provisions required by the GPL or the LGPL. If you do not delete
-+ * the provisions above, a recipient may use your version of this file under
-+ * the terms of any one of the NPL, the GPL or the LGPL.
-+ *
-+ * ***** END LICENSE BLOCK ***** */
-+
-+/* Implement shared vtbl methods. */
-+
-+/* contributed by Glen Nakamura <glen.nakamura@usa.net> */
-+
-+#include <sys/types.h>
-+#include <machine/cpu.h>
-+#include "xptcprivate.h"
-+
-+/* Prototype specifies unmangled function name and disables unused warning */
-+static nsresult
-+PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args)
-+__asm__("PrepareAndDispatch") __attribute__((unused));
-+
-+static nsresult
-+PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args)
-+{
-+ const PRUint8 PARAM_BUFFER_COUNT = 16;
-+ const PRUint8 NUM_ARG_REGS = 6-1; // -1 for "this" pointer
-+
-+ 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");
-+
-+ // args[0] to args[NUM_ARG_REGS] hold floating point register values
-+ PRUint64* ap = args + NUM_ARG_REGS;
-+ 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 = (PRInt8) *ap; break;
-+ case nsXPTType::T_I16 : dp->val.i16 = (PRInt16) *ap; break;
-+ case nsXPTType::T_I32 : dp->val.i32 = (PRInt32) *ap; break;
-+ case nsXPTType::T_I64 : dp->val.i64 = (PRInt64) *ap; break;
-+ case nsXPTType::T_U8 : dp->val.u8 = (PRUint8) *ap; break;
-+ case nsXPTType::T_U16 : dp->val.u16 = (PRUint16) *ap; break;
-+ case nsXPTType::T_U32 : dp->val.u32 = (PRUint32) *ap; break;
-+ case nsXPTType::T_U64 : dp->val.u64 = (PRUint64) *ap; break;
-+ case nsXPTType::T_FLOAT :
-+ if(i < NUM_ARG_REGS)
-+ {
-+ // floats passed via registers are stored as doubles
-+ // in the first NUM_ARG_REGS entries in args
-+ dp->val.u64 = (PRUint64) args[i];
-+ dp->val.f = (float) dp->val.d; // convert double to float
-+ }
-+ else
-+ dp->val.u32 = (PRUint32) *ap;
-+ break;
-+ case nsXPTType::T_DOUBLE :
-+ // doubles passed via registers are also stored
-+ // in the first NUM_ARG_REGS entries in args
-+ dp->val.u64 = (i < NUM_ARG_REGS) ? args[i] : *ap;
-+ break;
-+ case nsXPTType::T_BOOL : dp->val.b = (PRBool) *ap; break;
-+ case nsXPTType::T_CHAR : dp->val.c = (char) *ap; break;
-+ case nsXPTType::T_WCHAR : dp->val.wc = (PRUnichar) *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;
-+}
-+
-+/*
-+ * SharedStub()
-+ * Collects arguments and calls PrepareAndDispatch. The "methodIndex" is
-+ * passed to this function via $1 to preserve the argument registers.
-+ */
-+__asm__(
-+ "#### SharedStub ####\n"
-+".text\n\t"
-+ ".align 5\n\t"
-+ ".ent SharedStub\n"
-+"SharedStub:\n\t"
-+ ".frame $30,96,$26,0\n\t"
-+ ".mask 0x4000000,-96\n\t"
-+ "ldgp $29,0($27)\n"
-+"$SharedStub..ng:\n\t"
-+ "subq $30,96,$30\n\t"
-+ "stq $26,0($30)\n\t"
-+ ".prologue 1\n\t"
-+
-+ /*
-+ * Store arguments passed via registers to the stack.
-+ * Floating point registers are stored as doubles and converted
-+ * to floats in PrepareAndDispatch if necessary.
-+ */
-+ "stt $f17,16($30)\n\t" /* floating point registers */
-+ "stt $f18,24($30)\n\t"
-+ "stt $f19,32($30)\n\t"
-+ "stt $f20,40($30)\n\t"
-+ "stt $f21,48($30)\n\t"
-+ "stq $17,56($30)\n\t" /* integer registers */
-+ "stq $18,64($30)\n\t"
-+ "stq $19,72($30)\n\t"
-+ "stq $20,80($30)\n\t"
-+ "stq $21,88($30)\n\t"
-+
-+ /*
-+ * Call PrepareAndDispatch function.
-+ */
-+ "bis $1,$1,$17\n\t" /* pass "methodIndex" */
-+ "addq $30,16,$18\n\t" /* pass "args" */
-+ "bsr $26,$PrepareAndDispatch..ng\n\t"
-+
-+ "ldq $26,0($30)\n\t"
-+ "addq $30,96,$30\n\t"
-+ "ret $31,($26),1\n\t"
-+ ".end SharedStub"
-+ );
-+
-+#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
-+/*
-+ * nsresult nsXPTCStubBase::Stub##n()
-+ * Sets register $1 to "methodIndex" and jumps to SharedStub.
-+ */
-+#define STUB_ENTRY(n) \
-+__asm__( \
-+ "#### Stub"#n" ####\n" \
-+".text\n\t" \
-+ ".align 5\n\t" \
-+ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev\n\t" \
-+ ".ent _ZN14nsXPTCStubBase5Stub"#n"Ev\n" \
-+"_ZN14nsXPTCStubBase5Stub"#n"Ev:\n\t" \
-+ ".frame $30,0,$26,0\n\t" \
-+ "ldgp $29,0($27)\n" \
-+"$_ZN14nsXPTCStubBase5Stub"#n"Ev..ng:\n\t" \
-+ ".prologue 1\n\t" \
-+ "lda $1,"#n"\n\t" \
-+ "br $31,$SharedStub..ng\n\t" \
-+ ".end _ZN14nsXPTCStubBase5Stub"#n"Ev" \
-+ ); \
-+__asm__( \
-+ "#### Stub"#n" ####\n" \
-+".text\n\t" \
-+ ".align 5\n\t" \
-+ ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev\n\t" \
-+ ".ent _ZN14nsXPTCStubBase6Stub"#n"Ev\n" \
-+"_ZN14nsXPTCStubBase6Stub"#n"Ev:\n\t" \
-+ ".frame $30,0,$26,0\n\t" \
-+ "ldgp $29,0($27)\n" \
-+"$_ZN14nsXPTCStubBase6Stub"#n"Ev..ng:\n\t" \
-+ ".prologue 1\n\t" \
-+ "lda $1,"#n"\n\t" \
-+ "br $31,$SharedStub..ng\n\t" \
-+ ".end _ZN14nsXPTCStubBase6Stub"#n"Ev" \
-+ ); \
-+__asm__( \
-+ "#### Stub"#n" ####\n" \
-+".text\n\t" \
-+ ".align 5\n\t" \
-+ ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev\n\t" \
-+ ".ent _ZN14nsXPTCStubBase7Stub"#n"Ev\n" \
-+"_ZN14nsXPTCStubBase7Stub"#n"Ev:\n\t" \
-+ ".frame $30,0,$26,0\n\t" \
-+ "ldgp $29,0($27)\n" \
-+"$_ZN14nsXPTCStubBase7Stub"#n"Ev..ng:\n\t" \
-+ ".prologue 1\n\t" \
-+ "lda $1,"#n"\n\t" \
-+ "br $31,$SharedStub..ng\n\t" \
-+ ".end _ZN14nsXPTCStubBase7Stub"#n"Ev" \
-+ );
-+#else
-+/*
-+ * nsresult nsXPTCStubBase::Stub##n()
-+ * Sets register $1 to "methodIndex" and jumps to SharedStub.
-+ */
-+#define STUB_ENTRY(n) \
-+nsresult nsXPTCStubBase::Stub##n() \
-+{ \
-+ nsresult result; \
-+__asm__ __volatile__( \
-+ "ldah $29,0($27)\n\t" \
-+ "lda $29,0($29)\n\t" \
-+ "lda $1, "#n"\n\t" \
-+ "br $31, $SharedStub..ng\n\t" \
-+ "mov $0, %0\n\t" \
-+ : "=r" (result) \
-+ ); \
-+ return result; \
-+}
-+#endif
-+
-+#define SENTINEL_ENTRY(n) \
-+nsresult nsXPTCStubBase::Sentinel##n() \
-+{ \
-+ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-+ return NS_ERROR_NOT_IMPLEMENTED; \
-+}
-+
-+#include "xptcstubsdef.inc"
-+
diff --git a/www/kompozer/files/patch-xptcall-ia64 b/www/kompozer/files/patch-xptcall-ia64
deleted file mode 100644
index bf26f9222007..000000000000
--- a/www/kompozer/files/patch-xptcall-ia64
+++ /dev/null
@@ -1,38 +0,0 @@
---- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ipf64.s.orig Sun Jul 20 00:05:32 2003
-+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ipf64.s Sun Jul 20 00:06:37 2003
-@@ -8,6 +8,7 @@
- // Section has executable code
- .section .text, "ax","progbits"
- // procedure named 'XPTC_InvokeByIndex'
-+ .global XPTC_InvokeByIndex
- .proc XPTC_InvokeByIndex
- // manual bundling
- .explicit
-@@ -24,7 +25,7 @@
-
- // XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
- // PRUint32 paramCount, nsXPTCVariant* params);
--XPTC_InvokeByIndex::
-+XPTC_InvokeByIndex:
- .prologue
- .save ar.pfs, r37
- // allocate 4 input args, 6 local args, and 8 output args
---- xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ipf64.s.orig 2009-05-02 18:43:37.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ipf64.s 2009-08-31 15:05:05.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/kompozer/files/patch-xptcall-powerpc b/www/kompozer/files/patch-xptcall-powerpc
deleted file mode 100644
index e5b867500639..000000000000
--- a/www/kompozer/files/patch-xptcall-powerpc
+++ /dev/null
@@ -1,584 +0,0 @@
---- xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_freebsd.cpp.orig 2009-09-28 22:06:31.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_freebsd.cpp 2009-09-28 22:06:31.000000000 +0200
-@@ -0,0 +1,232 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-+/* ***** BEGIN LICENSE BLOCK *****
-+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
-+ *
-+ * The contents of this file are subject to the Mozilla Public License Version
-+ * 1.1 (the "License"); you may not use this file except in compliance with
-+ * the License. You may obtain a copy of the License at
-+ * http://www.mozilla.org/MPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS IS" basis,
-+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-+ * for the specific language governing rights and limitations under the
-+ * License.
-+ *
-+ * The Original Code is mozilla.org code.
-+ *
-+ * The Initial Developer of the Original Code is
-+ * Netscape Communications Corporation.
-+ * Portions created by the Initial Developer are Copyright (C) 1999
-+ * the Initial Developer. All Rights Reserved.
-+ *
-+ * Contributor(s):
-+ * Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
-+ * beard@netscape.com (Patrick Beard)
-+ * waterson@netscape.com (Chris Waterson)
-+ *
-+ * Alternatively, the contents of this file may be used under the terms of
-+ * either of the GNU General Public License Version 2 or later (the "GPL"),
-+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-+ * in which case the provisions of the GPL or the LGPL are applicable instead
-+ * of those above. If you wish to allow use of your version of this file only
-+ * under the terms of either the GPL or the LGPL, and not to allow others to
-+ * use your version of this file under the terms of the MPL, indicate your
-+ * decision by deleting the provisions above and replace them with the notice
-+ * and other provisions required by the GPL or the LGPL. If you do not delete
-+ * the provisions above, a recipient may use your version of this file under
-+ * the terms of any one of the MPL, the GPL or the LGPL.
-+ *
-+ * ***** END LICENSE BLOCK ***** */
-+
-+// Implement shared vtbl methods.
-+
-+#include "xptcprivate.h"
-+
-+// The PPC/SYSV ABI passes the first 8 integral
-+// parameters and the first 8 floating point parameters in registers
-+// (r3-r10 and f1-f8), no stack space is allocated for these by the
-+// caller. The rest of the parameters are passed in the callers stack
-+// area. The stack pointer has to retain 16-byte alignment, longlongs
-+// and doubles are aligned on 8-byte boundaries.
-+
-+#define PARAM_BUFFER_COUNT 16
-+#define GPR_COUNT 8
-+#define FPR_COUNT 8
-+
-+// PrepareAndDispatch() is called by SharedStub() and calls the actual method.
-+//
-+// - 'args[]' contains the arguments passed on stack
-+// - 'gprData[]' contains the arguments passed in integer registers
-+// - 'fprData[]' contains the arguments passed in floating point registers
-+//
-+// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
-+// and then the method gets called.
-+
-+extern "C" nsresult
-+PrepareAndDispatch(nsXPTCStubBase* self,
-+ PRUint32 methodIndex,
-+ PRUint32* args,
-+ PRUint32 *gprData,
-+ double *fprData)
-+{
-+ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-+ nsXPTCMiniVariant* dispatchParams = NULL;
-+ 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;
-+
-+ PRUint32* ap = args;
-+ PRUint32 gpr = 1; // skip one GPR register
-+ PRUint32 fpr = 0;
-+ PRUint32 tempu32;
-+ PRUint64 tempu64;
-+
-+ for(i = 0; i < paramCount; i++) {
-+ const nsXPTParamInfo& param = info->GetParam(i);
-+ const nsXPTType& type = param.GetType();
-+ nsXPTCMiniVariant* dp = &dispatchParams[i];
-+
-+ if (!param.IsOut() && type == nsXPTType::T_DOUBLE) {
-+ if (fpr < FPR_COUNT)
-+ dp->val.d = fprData[fpr++];
-+ else {
-+ if ((PRUint32) ap & 4) ap++; // doubles are 8-byte aligned on stack
-+ dp->val.d = *(double*) ap;
-+ ap += 2;
-+ }
-+ continue;
-+ }
-+ else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
-+ if (fpr < FPR_COUNT)
-+ dp->val.f = (float) fprData[fpr++]; // in registers floats are passed as doubles
-+ else
-+ dp->val.f = *(float*) ap++;
-+ continue;
-+ }
-+ else if (!param.IsOut() && (type == nsXPTType::T_I64
-+ || type == nsXPTType::T_U64)) {
-+ if (gpr & 1) gpr++; // longlongs are aligned in odd/even register pairs, eg. r5/r6
-+ if ((gpr + 1) < GPR_COUNT) {
-+ tempu64 = *(PRUint64*) &gprData[gpr];
-+ gpr += 2;
-+ }
-+ else {
-+ if ((PRUint32) ap & 4) ap++; // longlongs are 8-byte aligned on stack
-+ tempu64 = *(PRUint64*) ap;
-+ ap += 2;
-+ }
-+ }
-+ else {
-+ if (gpr < GPR_COUNT)
-+ tempu32 = gprData[gpr++];
-+ else
-+ tempu32 = *ap++;
-+ }
-+
-+ if(param.IsOut() || !type.IsArithmetic()) {
-+ dp->val.p = (void*) tempu32;
-+ continue;
-+ }
-+
-+ switch(type) {
-+ case nsXPTType::T_I8: dp->val.i8 = (PRInt8) tempu32; break;
-+ case nsXPTType::T_I16: dp->val.i16 = (PRInt16) tempu32; break;
-+ case nsXPTType::T_I32: dp->val.i32 = (PRInt32) tempu32; break;
-+ case nsXPTType::T_I64: dp->val.i64 = (PRInt64) tempu64; break;
-+ case nsXPTType::T_U8: dp->val.u8 = (PRUint8) tempu32; break;
-+ case nsXPTType::T_U16: dp->val.u16 = (PRUint16) tempu32; break;
-+ case nsXPTType::T_U32: dp->val.u32 = (PRUint32) tempu32; break;
-+ case nsXPTType::T_U64: dp->val.u64 = (PRUint64) tempu64; break;
-+ case nsXPTType::T_BOOL: dp->val.b = (PRBool) tempu32; break;
-+ case nsXPTType::T_CHAR: dp->val.c = (char) tempu32; break;
-+ case nsXPTType::T_WCHAR: dp->val.wc = (wchar_t) tempu32; break;
-+
-+ default:
-+ NS_ASSERTION(0, "bad type");
-+ break;
-+ }
-+ }
-+
-+ result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams);
-+
-+ NS_RELEASE(iface_info);
-+
-+ if (dispatchParams != paramBuffer)
-+ delete [] dispatchParams;
-+
-+ return result;
-+}
-+
-+// Load r11 with the constant 'n' and branch to SharedStub().
-+
-+// As G++3 ABI contains the length of the functionname in the mangled
-+// name, it is difficult to get a generic assembler mechanism like
-+// in the G++ 2.95 case.
-+// Create names would be like:
-+// _ZN14nsXPTCStubBase5Stub1Ev
-+// _ZN14nsXPTCStubBase6Stub12Ev
-+// _ZN14nsXPTCStubBase7Stub123Ev
-+// _ZN14nsXPTCStubBase8Stub1234Ev
-+// etc.
-+// Use assembler directives to get the names right...
-+
-+# define STUB_ENTRY(n) \
-+__asm__ ( \
-+ ".align 2 \n\t" \
-+ ".if "#n" < 10 \n\t" \
-+ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \
-+ ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \
-+"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
-+ \
-+ ".elseif "#n" < 100 \n\t" \
-+ ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \
-+ ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \
-+"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
-+ \
-+ ".elseif "#n" < 1000 \n\t" \
-+ ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \
-+ ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \
-+"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \
-+ \
-+ ".else \n\t" \
-+ ".err \"stub number "#n" >= 1000 not yet supported\"\n" \
-+ ".endif \n\t" \
-+ \
-+ "li 11,"#n" \n\t" \
-+ "b SharedStub@local \n" \
-+);
-+
-+#define SENTINEL_ENTRY(n) \
-+nsresult nsXPTCStubBase::Sentinel##n() \
-+{ \
-+ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-+ return NS_ERROR_NOT_IMPLEMENTED; \
-+}
-+
-+#include "xptcstubsdef.inc"
---- xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_freebsd.s.orig 2009-09-28 22:06:31.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_freebsd.s 2009-09-28 22:06:31.000000000 +0200
-@@ -0,0 +1,89 @@
-+# -*- Mode: Asm -*-
-+#
-+# The contents of this file are subject to the Netscape Public
-+# License Version 1.1 (the "License"); you may not use this file
-+# except in compliance with the License. You may obtain a copy of
-+# the License at http://www.mozilla.org/NPL/
-+#
-+# Software distributed under the License is distributed on an "AS
-+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-+# implied. See the License for the specific language governing
-+# rights and limitations under the License.
-+#
-+# The Original Code is mozilla.org code.
-+#
-+# The Initial Developer of the Original Code is Netscape
-+# Communications Corporation. Portions created by Netscape are
-+# Copyright (C) 1999 Netscape Communications Corporation. All
-+# Rights Reserved.
-+#
-+# Contributor(s):
-+# Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
-+# beard@netscape.com (Patrick Beard)
-+# waterson@netscape.com (Chris Waterson)
-+#
-+
-+.set r0,0; .set sp,1; .set RTOC,2; .set r3,3; .set r4,4
-+.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
-+.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
-+.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
-+.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
-+.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
-+.set r30,30; .set r31,31
-+.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
-+.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
-+.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
-+.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
-+.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
-+.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
-+.set f30,30; .set f31,31
-+
-+ .section ".text"
-+ .align 2
-+ .globl SharedStub
-+ .type SharedStub,@function
-+
-+SharedStub:
-+ stwu sp,-112(sp) # room for
-+ # linkage (8),
-+ # gprData (32),
-+ # fprData (64),
-+ # stack alignment(8)
-+ mflr r0
-+ stw r0,116(sp) # save LR backchain
-+
-+ stw r4,12(sp) # save GP registers
-+ stw r5,16(sp) # (n.b. that we don't save r3
-+ stw r6,20(sp) # because PrepareAndDispatch() is savvy)
-+ stw r7,24(sp)
-+ stw r8,28(sp)
-+ stw r9,32(sp)
-+ stw r10,36(sp)
-+
-+ stfd f1,40(sp) # save FP registers
-+ stfd f2,48(sp)
-+ stfd f3,56(sp)
-+ stfd f4,64(sp)
-+ stfd f5,72(sp)
-+ stfd f6,80(sp)
-+ stfd f7,88(sp)
-+ stfd f8,96(sp)
-+
-+ # r3 has the 'self' pointer already
-+
-+ mr r4,r11 # r4 <= methodIndex selector, passed
-+ # via r11 in the nsXPTCStubBase::StubXX() call
-+
-+ addi r5,sp,120 # r5 <= pointer to callers args area,
-+ # beyond r3-r10/f1-f8 mapped range
-+
-+ addi r6,sp,8 # r6 <= gprData
-+ addi r7,sp,40 # r7 <= fprData
-+
-+ bl PrepareAndDispatch@local # Go!
-+
-+ lwz r0,116(sp) # restore LR
-+ mtlr r0
-+ la sp,112(sp) # clean up the stack
-+ blr
-+
---- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_freebsd.cpp.orig 2009-09-28 22:06:31.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_freebsd.cpp 2009-09-28 22:06:31.000000000 +0200
-@@ -0,0 +1,141 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-+/* ***** BEGIN LICENSE BLOCK *****
-+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
-+ *
-+ * The contents of this file are subject to the Mozilla Public License Version
-+ * 1.1 (the "License"); you may not use this file except in compliance with
-+ * the License. You may obtain a copy of the License at
-+ * http://www.mozilla.org/MPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS IS" basis,
-+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-+ * for the specific language governing rights and limitations under the
-+ * License.
-+ *
-+ * The Original Code is mozilla.org code.
-+ *
-+ * The Initial Developer of the Original Code is
-+ * Netscape Communications Corporation.
-+ * Portions created by the Initial Developer are Copyright (C) 1998
-+ * the Initial Developer. All Rights Reserved.
-+ *
-+ * Contributor(s):
-+ * Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
-+ * beard@netscape.com (Patrick Beard)
-+ * waterson@netscape.com (Chris Waterson)
-+ *
-+ * Alternatively, the contents of this file may be used under the terms of
-+ * either of the GNU General Public License Version 2 or later (the "GPL"),
-+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-+ * in which case the provisions of the GPL or the LGPL are applicable instead
-+ * of those above. If you wish to allow use of your version of this file only
-+ * under the terms of either the GPL or the LGPL, and not to allow others to
-+ * use your version of this file under the terms of the MPL, indicate your
-+ * decision by deleting the provisions above and replace them with the notice
-+ * and other provisions required by the GPL or the LGPL. If you do not delete
-+ * the provisions above, a recipient may use your version of this file under
-+ * the terms of any one of the MPL, the GPL or the LGPL.
-+ *
-+ * ***** END LICENSE BLOCK ***** */
-+
-+// Platform specific code to invoke XPCOM methods on native objects
-+
-+// The purpose of XPTC_InvokeByIndex() is to map a platform
-+// indepenpent call to the platform ABI. To do that,
-+// XPTC_InvokeByIndex() has to determine the method to call via vtable
-+// access. The parameters for the method are read from the
-+// nsXPTCVariant* and prepared for th native ABI. For the Linux/PPC
-+// ABI this means that the first 8 integral and floating point
-+// parameters are passed in registers.
-+
-+#include "xptcprivate.h"
-+
-+// 8 integral parameters are passed in registers
-+#define GPR_COUNT 8
-+
-+// 8 floating point parameters are passed in registers, floats are
-+// promoted to doubles when passed in registers
-+#define FPR_COUNT 8
-+
-+extern "C" PRUint32
-+invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
-+{
-+ return PRUint32(((paramCount * 2) + 3) & ~3);
-+}
-+
-+extern "C" void
-+invoke_copy_to_stack(PRUint32* d,
-+ PRUint32 paramCount,
-+ nsXPTCVariant* s,
-+ PRUint32* gpregs,
-+ double* fpregs)
-+{
-+ PRUint32 gpr = 1; // skip one GP reg for 'that'
-+ PRUint32 fpr = 0;
-+ PRUint32 tempu32;
-+ PRUint64 tempu64;
-+
-+ for(uint32 i = 0; i < paramCount; i++, s++) {
-+ if(s->IsPtrData())
-+ tempu32 = (PRUint32) s->ptr;
-+ else {
-+ switch(s->type) {
-+ case nsXPTType::T_FLOAT: break;
-+ case nsXPTType::T_DOUBLE: break;
-+ case nsXPTType::T_I8: tempu32 = s->val.i8; break;
-+ case nsXPTType::T_I16: tempu32 = s->val.i16; break;
-+ case nsXPTType::T_I32: tempu32 = s->val.i32; break;
-+ case nsXPTType::T_I64: tempu64 = s->val.i64; break;
-+ case nsXPTType::T_U8: tempu32 = s->val.u8; break;
-+ case nsXPTType::T_U16: tempu32 = s->val.u16; break;
-+ case nsXPTType::T_U32: tempu32 = s->val.u32; break;
-+ case nsXPTType::T_U64: tempu64 = s->val.u64; break;
-+ case nsXPTType::T_BOOL: tempu32 = s->val.b; break;
-+ case nsXPTType::T_CHAR: tempu32 = s->val.c; break;
-+ case nsXPTType::T_WCHAR: tempu32 = s->val.wc; break;
-+ default: tempu32 = (PRUint32) s->val.p; break;
-+ }
-+ }
-+
-+ if (!s->IsPtrData() && s->type == nsXPTType::T_DOUBLE) {
-+ if (fpr < FPR_COUNT)
-+ fpregs[fpr++] = s->val.d;
-+ else {
-+ if ((PRUint32) d & 4) d++; // doubles are 8-byte aligned on stack
-+ *((double*) d) = s->val.d;
-+ d += 2;
-+ }
-+ }
-+ else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
-+ if (fpr < FPR_COUNT)
-+ fpregs[fpr++] = s->val.f; // if passed in registers, floats are promoted to doubles
-+ else
-+ *((float*) d++) = s->val.f;
-+ }
-+ else if (!s->IsPtrData() && (s->type == nsXPTType::T_I64
-+ || s->type == nsXPTType::T_U64)) {
-+ if ((gpr + 1) < GPR_COUNT) {
-+ if (gpr & 1) gpr++; // longlongs are aligned in odd/even register pairs, eg. r5/r6
-+ *((PRUint64*) &gpregs[gpr]) = tempu64;
-+ gpr += 2;
-+ }
-+ else {
-+ if ((PRUint32) d & 4) d++; // longlongs are 8-byte aligned on stack
-+ *((PRUint64*) d) = tempu64;
-+ d += 2;
-+ }
-+ }
-+ else {
-+ if (gpr < GPR_COUNT)
-+ gpregs[gpr++] = tempu32;
-+ else
-+ *d++ = tempu32;
-+ }
-+
-+ }
-+}
-+
-+extern "C"
-+XPTC_PUBLIC_API(nsresult)
-+XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-+ PRUint32 paramCount, nsXPTCVariant* params);
---- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_freebsd.s.orig 2009-09-28 22:06:31.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_freebsd.s 2009-09-28 22:06:31.000000000 +0200
-@@ -0,0 +1,110 @@
-+# -*- Mode: Asm -*-
-+#
-+# The contents of this file are subject to the Netscape Public
-+# License Version 1.1 (the "License"); you may not use this file
-+# except in compliance with the License. You may obtain a copy of
-+# the License at http://www.mozilla.org/NPL/
-+#
-+# Software distributed under the License is distributed on an "AS
-+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-+# implied. See the License for the specific language governing
-+# rights and limitations under the License.
-+#
-+# The Original Code is mozilla.org code.
-+#
-+# The Initial Developer of the Original Code is Netscape
-+# Communications Corporation. Portions created by Netscape are
-+# Copyright (C) 1999 Netscape Communications Corporation. All
-+# Rights Reserved.
-+#
-+# Contributor(s):
-+# Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
-+# beard@netscape.com (Patrick Beard)
-+# waterson@netscape.com (Chris Waterson)
-+#
-+.set r0,0; .set sp,1; .set RTOC,2; .set r3,3; .set r4,4
-+.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
-+.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
-+.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
-+.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
-+.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
-+.set r30,30; .set r31,31
-+.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
-+.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
-+.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
-+.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
-+.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
-+.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
-+.set f30,30; .set f31,31
-+
-+ .section ".text"
-+ .align 2
-+ .globl XPTC_InvokeByIndex
-+ .type XPTC_InvokeByIndex,@function
-+
-+#
-+# XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-+# PRUint32 paramCount, nsXPTCVariant* params)
-+#
-+
-+XPTC_InvokeByIndex:
-+ stwu sp,-32(sp) # setup standard stack frame
-+ mflr r0 # save LR
-+ stw r3,8(sp) # r3 <= that
-+ stw r4,12(sp) # r4 <= methodIndex
-+ stw r30,16(sp)
-+ stw r31,20(sp)
-+
-+ stw r0,36(sp) # store LR backchain
-+ mr r31,sp
-+
-+ rlwinm r10,r5,3,0,27 # r10 = (ParamCount * 2 * 4) & ~0x0f
-+ addi r0,r10,96 # reserve stack for GPR and FPR register save area r0 = r10 + 96
-+ lwz r9,0(sp) # r9 = backchain
-+ neg r0,r0
-+ stwux r9,sp,r0 # reserve stack sapce and save SP backchain
-+
-+ addi r3,sp,8 # r3 <= args
-+ mr r4,r5 # r4 <= paramCount
-+ mr r5,r6 # r5 <= params
-+ add r6,r3,r10 # r6 <= gpregs ( == args + r10 )
-+ mr r30,r6 # store in r30 for use later...
-+ addi r7,r6,32 # r7 <= fpregs ( == gpregs + 32 )
-+
-+ bl invoke_copy_to_stack@local # (args, paramCount, params, gpregs, fpregs)
-+
-+ lfd f1,32(r30) # load FP registers with method parameters
-+ lfd f2,40(r30)
-+ lfd f3,48(r30)
-+ lfd f4,56(r30)
-+ lfd f5,64(r30)
-+ lfd f6,72(r30)
-+ lfd f7,80(r30)
-+ lfd f8,88(r30)
-+
-+ lwz r3,8(r31) # r3 <= that
-+ lwz r4,12(r31) # r4 <= methodIndex
-+ lwz r5,0(r3) # r5 <= vtable ( == *that )
-+
-+ slwi r4,r4,2 # convert to offset ( *= 4 )
-+ lwzx r0,r5,r4 # r0 <= methodpointer ( == vtable + offset )
-+
-+ lwz r4,4(r30) # load GP regs with method parameters
-+ lwz r5,8(r30)
-+ lwz r6,12(r30)
-+ lwz r7,16(r30)
-+ lwz r8,20(r30)
-+ lwz r9,24(r30)
-+ lwz r10,28(r30)
-+
-+ mtlr r0 # copy methodpointer to LR
-+ blrl # call method
-+
-+ lwz r30,16(r31) # restore r30 & r31
-+ lwz r31,20(r31)
-+
-+ lwz r11,0(sp) # clean up the stack
-+ lwz r0,4(r11)
-+ mtlr r0
-+ mr sp,r11
-+ blr
diff --git a/www/kompozer/files/patch-xptcall-sparc64 b/www/kompozer/files/patch-xptcall-sparc64
deleted file mode 100644
index 9599a8a71336..000000000000
--- a/www/kompozer/files/patch-xptcall-sparc64
+++ /dev/null
@@ -1,327 +0,0 @@
---- /dev/null Mon May 26 13:22:00 2003
-+++ 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
-+++ 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
-+++ 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;
-+}
diff --git a/www/libxul/Makefile b/www/libxul/Makefile
index 1eb971003dc8..bd5ceb2d22fe 100644
--- a/www/libxul/Makefile
+++ b/www/libxul/Makefile
@@ -17,15 +17,15 @@ MAINTAINER?= gecko@FreeBSD.org
COMMENT?= Mozilla runtime package that can be used to bootstrap XUL+XPCOM apps
WRKSRC= ${WRKDIR}/mozilla-1.9.2
-CONFLICTS= mozilla-[0-9]*
+CONFLICTS= mozilla-[0-9]* libxul-[0-9][0-9].*
GECKO_PLIST_PRE_DIRS= lib/${MOZILLA}/bin lib/${MOZILLA}/idl \
lib/${MOZILLA}/include lib/${MOZILLA}/lib
-USE_AUTOTOOLS= autoconf213
+USE_AUTOTOOLS= autoconf213:env
WANT_GNOME= yes
WANT_PERL= yes
ALL_TARGET= default
-HAS_CONFIGURE= yes
+GNU_CONFIGURE= yes
USE_BZIP2= yes
USE_GMAKE= yes
MAKE_JOBS_SAFE= yes
@@ -34,60 +34,56 @@ LDFLAGS+= -Wl,-rpath,${PREFIX}/lib/${MOZ_RPATH}
USE_LDCONFIG= ${PREFIX}/lib/${MOZILLA}
PORT_MOZCONFIG= ${WRKSRC}/xulrunner/config/mozconfig
-MOZ_OPTIONS?= --with-default-mozilla-five-home=${PREFIX}/lib/${MOZILLA} \
- --disable-javaxpcom --enable-canvas \
- --enable-system-cairo --disable-updater \
- --disable-necko-wifi --disable-ipc
+MOZ_OPTIONS?= --disable-ipc
MOZ_EXTENSIONS= default,cookie,permissions
-OPTIONS= # Empty, used for generic gecko OPTIONS
-USE_GECKO_OPTIONS= java debug logging optimized_cflags
USE_GECKO= gecko
MOZILLA_EXEC_NAME=xulrunner
-MOZ_TOOLKIT= cairo-gtk2
-USE_MOZILLA= -png -nss -dbm -jpeg
+USE_MOZILLA= -event -ffi -vpx
+MOZ_CHROME= jar
MOZ_PKGCONFIG_FILES= libxul-embedding libxul mozilla-gtkmozembed-embedding \
- mozilla-gtkmozembed mozilla-js mozilla-nss mozilla-plugin
+ mozilla-gtkmozembed mozilla-js mozilla-plugin
-OPTIONS= DBUS "Enable D-BUS support" on
+OPTIONS_DEFINE= JAVA
+JAVA_DESC?= JAVA xpcom
+
+.include "${.CURDIR}/../../www/firefox/Makefile.options"
+
+OPTIONS_DEFINE:=${OPTIONS_DEFINE:NLIBPROXY}
+OPTIONS_SINGLE:=${OPTIONS_SINGLE:NTOOLKIT}
.include <bsd.port.pre.mk>
-.if ${OSVERSION} < 700000
-LIB_DEPENDS+= pulse.0:${PORTSDIR}/audio/pulseaudio
-EXTRA_PATCHES= ${FILESDIR}/releng6_pulseaudio
-.else
-EXTRA_PATCHES= ${FILESDIR}/libsydney_oss
+.if ${USE_MOZILLA:M-nss}
+MOZ_PKGCONFIG_FILES+= mozilla-nss
.endif
-.if ${ARCH} == powerpc64
+.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
-CONFIGURE_ENV+= UNAME_m="powerpc64"
+MOZ_EXPORT+= UNAME_m="powerpc64"
CFLAGS+= -mminimal-toc
.endif
.endif
-.if defined(WITHOUT_DBUS)
-MOZ_OPTIONS+= --disable-dbus --disable-libnotify
+.if ${PORT_OPTIONS:MJAVA}
+USE_JAVA= yes
+JAVA_VERSION+= 1.5+
+JAVA_OS+= native
+MOZ_EXPORT+= JAVA_HOME="${JAVA_HOME}"
+MOZ_OPTIONS+= --enable-javaxpcom
.else
-LIB_DEPENDS+= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib \
- notify.4:${PORTSDIR}/devel/libnotify
+MOZ_OPTIONS+= --disable-javaxpcom
.endif
post-patch:
- ${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \
- ${WRKSRC}/storage/build/Makefile.in \
- ${WRKSRC}/db/sqlite3/src/Makefile.in
${REINPLACE_CMD} -e 's|/usr/local/include|${LOCALBASE}/include|' \
${WRKSRC}/js/src/config/mkdepend/Makefile.in
- @${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g ; \
- s|-lpthread|${PTHREAD_LIBS}|g ; \
- s|echo aout|echo elf|g ; \
- s|/usr/X11R6|${LOCALBASE}|g' \
- ${WRKSRC}/js/src/configure
pre-configure:
+ (cd ${WRKSRC} && ${AUTOCONF})
(cd ${WRKSRC}/js/src/ && ${AUTOCONF})
post-build:
diff --git a/www/libxul/files/patch-alsapulse b/www/libxul/files/patch-alsapulse
new file mode 100644
index 000000000000..f3e0ffb31f6d
--- /dev/null
+++ b/www/libxul/files/patch-alsapulse
@@ -0,0 +1,122 @@
+--- config/autoconf.mk.in~
++++ config/autoconf.mk.in
+@@ -555,6 +555,14 @@ 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@
+ GLIB_GMODULE_LIBS = @GLIB_GMODULE_LIBS@
+--- configure.in~
++++ configure.in
+@@ -5660,15 +5660,49 @@ dnl ====================================
+
+ dnl If using sydneyaudio with Linux, ensure that the alsa library is available
+ if test "$COMPILE_ENVIRONMENT"; then
+-if test -n "$MOZ_SYDNEYAUDIO"; then
++MOZ_ARG_ENABLE_BOOL(alsa,
++[ --enable-alsa Enable Alsa support],
++MOZ_ALSA=1,
++MOZ_ALSA= MOZ_ALSA_FORCE=$enableval)
++
++if test -n "$MOZ_SYDNEYAUDIO" -a "$MOZ_ALSA_FORCE" != "no"; then
+ case "$target_os" in
+ linux*)
+- AC_CHECK_LIB(asound, snd_pcm_open,,AC_MSG_ERROR([Ogg support on Linux requires the alsa library]))
++ 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.)])])
++fi
+ fi
+
++AC_SUBST(MOZ_ALSA_CFLAGS)
++AC_SUBST(MOZ_ALSA_LIBS)
++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 Splashscreen
+ dnl ========================================================
+--- media/libsydneyaudio/src/Makefile.in~
++++ media/libsydneyaudio/src/Makefile.in
+@@ -45,12 +45,6 @@ MODULE = sydneyaudio
+ LIBRARY_NAME = sydneyaudio
+ FORCE_STATIC_LIB= 1
+
+-ifeq ($(OS_ARCH),Linux)
+-CSRCS = \
+- sydney_audio_alsa.c \
+- $(NULL)
+-endif
+-
+ ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
+ CSRCS = \
+ sydney_audio_waveapi.c \
+@@ -83,6 +83,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
+--- toolkit/library/libxul-config.mk~
++++ toolkit/library/libxul-config.mk
+@@ -90,6 +90,14 @@ endif
+ LOCAL_INCLUDES += -I$(topsrcdir)/widget/src/os2
+ endif
+
++ifdef MOZ_ALSA
++EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
++endif
++
++ifdef MOZ_PULSEAUDIO
++EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS)
++endif
++
+ # dependent libraries
+ ifdef MOZ_IPC
+ STATIC_LIBS += \
diff --git a/www/libxul/files/patch-bug685258 b/www/libxul/files/patch-bug685258
new file mode 100644
index 000000000000..598a6ea5f3d5
--- /dev/null
+++ b/www/libxul/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
+--- content/media/nsAudioStream.cpp
++++ content/media/nsAudioStream.cpp
+@@ -83,7 +83,7 @@ void nsAudioStream::Init(PRInt32 aNumCha
+ mChannels = aNumChannels;
+ 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/libxul/files/patch-configure.in b/www/libxul/files/patch-configure.in
deleted file mode 100644
index aab5aa4ba2df..000000000000
--- a/www/libxul/files/patch-configure.in
+++ /dev/null
@@ -1,22 +0,0 @@
---- configure.in.orig 2009-10-29 23:11:31.000000000 +0100
-+++ configure.in 2009-11-16 19:51:19.000000000 +0100
-@@ -1352,7 +1352,7 @@
- CPU_ARCH=sparc
- ;;
-
--x86_64 | ia64)
-+amd64 | x86_64 | ia64)
- CPU_ARCH="$OS_TEST"
- ;;
-
-@@ -3582,8 +3582,8 @@
- *)
-
- AC_CHECK_LIB(c, iconv, [_ICONV_LIBS="$_ICONV_LIBS"],
-- AC_CHECK_LIB(iconv, iconv, [_ICONV_LIBS="$_ICONV_LIBS -liconv"],
-- AC_CHECK_LIB(iconv, libiconv, [_ICONV_LIBS="$_ICONV_LIBS -liconv"])))
-+ AC_CHECK_LIB(iconv, iconv, [_ICONV_LIBS="$_ICONV_LIBS -L$LOCALBASE/lib -liconv"],
-+ AC_CHECK_LIB(iconv, libiconv, [_ICONV_LIBS="$_ICONV_LIBS -L$LOCALBASE/lib -liconv"])))
- _SAVE_LIBS=$LIBS
- LIBS="$LIBS $_ICONV_LIBS"
- AC_CACHE_CHECK(
diff --git a/www/libxul/files/patch-db_sqlite3_src_Makefile.in b/www/libxul/files/patch-db_sqlite3_src_Makefile.in
deleted file mode 100644
index 71b84da6d4c2..000000000000
--- a/www/libxul/files/patch-db_sqlite3_src_Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- db/sqlite3/src/Makefile.in.orig 2008-06-19 11:03:17.000000000 -0500
-+++ db/sqlite3/src/Makefile.in 2008-06-19 11:04:15.000000000 -0500
-@@ -45,6 +45,8 @@
-
- include $(DEPTH)/config/autoconf.mk
-
-+OS_CFLAGS = -I../../../dist/include/sqlite3
-+OS_LIBS = %%PTHREAD_LIBS%%
- MODULE = sqlite3
- LIBRARY_NAME = sqlite3
- FORCE_SHARED_LIB = 1
diff --git a/www/libxul/files/patch-js-src-config-mkdepend-Makefile.in b/www/libxul/files/patch-js-src-config-mkdepend-Makefile.in
index e65ee360d347..871f914f1b86 100644
--- a/www/libxul/files/patch-js-src-config-mkdepend-Makefile.in
+++ b/www/libxul/files/patch-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/libxul/files/libsydney_oss b/www/libxul/files/patch-media-libsydneyaudio-src-Makefile.in
index a68d549b2fef..0812d1af8d4d 100644
--- a/www/libxul/files/libsydney_oss
+++ b/www/libxul/files/patch-media-libsydneyaudio-src-Makefile.in
@@ -10,6 +10,6 @@
+ $(NULL)
+endif
+
- ifeq ($(OS_ARCH),Linux)
+ ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
CSRCS = \
- sydney_audio_alsa.c \
+ sydney_audio_waveapi.c \
diff --git a/www/libxul/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c b/www/libxul/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c
new file mode 100644
index 000000000000..a7fd5f1ffd09
--- /dev/null
+++ b/www/libxul/files/patch-media-libsydneyaudio-src-sydney_audio_oss.c
@@ -0,0 +1,13 @@
+--- media/libsydneyaudio/src/sydney_audio_oss.c~
++++ 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/libxul/files/patch-modules-libpr0n-encoders-png-nsPNGDecoder.cpp b/www/libxul/files/patch-modules-libpr0n-encoders-png-nsPNGDecoder.cpp
new file mode 100644
index 000000000000..c3c6dd3a2a57
--- /dev/null
+++ b/www/libxul/files/patch-modules-libpr0n-encoders-png-nsPNGDecoder.cpp
@@ -0,0 +1,74 @@
+--- modules/libpr0n/decoders/png/nsPNGDecoder.cpp.orig 2009-05-02 18:39:49.000000000 +0200
++++ modules/libpr0n/decoders/png/nsPNGDecoder.cpp 2012-05-09 13:14:57.000000000 +0200
+@@ -116,7 +116,7 @@ void nsPNGDecoder::CreateFrame(png_uint_
+ nsresult rv = mImage->AppendFrame(x_offset, y_offset, width, height, format,
+ &mImageData, &imageDataLength);
+ if (NS_FAILED(rv))
+- longjmp(mPNG->jmpbuf, 5); // NS_ERROR_OUT_OF_MEMORY
++ longjmp(png_jmpbuf(mPNG), 5); // NS_ERROR_OUT_OF_MEMORY
+
+ mFrameRect.x = x_offset;
+ mFrameRect.y = y_offset;
+@@ -376,7 +376,7 @@ static NS_METHOD ReadDataOut(nsIInputStr
+ }
+
+ // we need to do the setjmp here otherwise bad things will happen
+- if (setjmp(decoder->mPNG->jmpbuf)) {
++ if (setjmp(png_jmpbuf(decoder->mPNG))) {
+ png_destroy_read_struct(&decoder->mPNG, &decoder->mInfo, NULL);
+
+ decoder->mError = PR_TRUE;
+@@ -443,7 +443,8 @@ PNGGetColorProfile(png_structp png_ptr,
+ // First try to see if iCCP chunk is present
+ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_iCCP)) {
+ png_uint_32 profileLen;
+- char *profileData, *profileName;
++ unsigned char *profileData;
++ char *profileName;
+ int compression;
+
+ png_get_iCCP(png_ptr, info_ptr, &profileName, &compression,
+@@ -551,7 +552,7 @@ info_callback(png_structp png_ptr, png_i
+ /* limit image dimensions (bug #251381) */
+ #define MOZ_PNG_MAX_DIMENSION 1000000L
+ if (width > MOZ_PNG_MAX_DIMENSION || height > MOZ_PNG_MAX_DIMENSION)
+- longjmp(decoder->mPNG->jmpbuf, 1);
++ longjmp(png_jmpbuf(decoder->mPNG), 1);
+ #undef MOZ_PNG_MAX_DIMENSION
+
+ if (color_type == PNG_COLOR_TYPE_PALETTE)
+@@ -667,7 +668,7 @@ info_callback(png_structp png_ptr, png_i
+ // the image hasn't been inited yet
+ decoder->mImage->Init(width, height, decoder->mObserver);
+ } else if (containerWidth != PRInt32(width) || containerHeight != PRInt32(height)) {
+- longjmp(decoder->mPNG->jmpbuf, 5); // NS_ERROR_UNEXPECTED
++ longjmp(png_jmpbuf(decoder->mPNG), 5); // NS_ERROR_UNEXPECTED
+ }
+
+ if (decoder->mObserver)
+@@ -693,14 +694,14 @@ info_callback(png_structp png_ptr, png_i
+ decoder->mCMSLine =
+ (PRUint8 *)nsMemory::Alloc(bpp[channels] * width);
+ if (!decoder->mCMSLine)
+- longjmp(decoder->mPNG->jmpbuf, 5); // NS_ERROR_OUT_OF_MEMORY
++ longjmp(png_jmpbuf(decoder->mPNG), 5); // NS_ERROR_OUT_OF_MEMORY
+ }
+
+ if (interlace_type == PNG_INTERLACE_ADAM7) {
+ if (height < PR_INT32_MAX / (width * channels))
+ decoder->interlacebuf = (PRUint8 *)nsMemory::Alloc(channels * width * height);
+ if (!decoder->interlacebuf) {
+- longjmp(decoder->mPNG->jmpbuf, 5); // NS_ERROR_OUT_OF_MEMORY
++ longjmp(png_jmpbuf(decoder->mPNG), 5); // NS_ERROR_OUT_OF_MEMORY
+ }
+ }
+
+@@ -920,7 +921,7 @@ void
+ error_callback(png_structp png_ptr, png_const_charp error_msg)
+ {
+ PR_LOG(gPNGLog, PR_LOG_ERROR, ("libpng error: %s\n", error_msg));
+- longjmp(png_ptr->jmpbuf, 1);
++ longjmp(png_jmpbuf(png_ptr), 1);
+ }
+
+
diff --git a/www/libxul/files/patch-modules-libpr0n-encoders-png-nsPNGEncoder.cpp b/www/libxul/files/patch-modules-libpr0n-encoders-png-nsPNGEncoder.cpp
new file mode 100644
index 000000000000..9e474153007d
--- /dev/null
+++ b/www/libxul/files/patch-modules-libpr0n-encoders-png-nsPNGEncoder.cpp
@@ -0,0 +1,11 @@
+--- modules/libpr0n/encoders/png/nsPNGEncoder.cpp 2010-03-28 13:48:53.000000000 +0200
++++ modules/libpr0n/encoders/png/nsPNGEncoder.cpp.orig 2010-03-28 13:46:50.000000000 +0200
+@@ -135,7 +135,7 @@ NS_IMETHODIMP nsPNGEncoder::StartImageEn
+
+ // initialize
+ mPNG = png_create_write_struct(PNG_LIBPNG_VER_STRING,
+- png_voidp_NULL,
++ NULL,
+ ErrorCallback,
+ ErrorCallback);
+ if (! mPNG)
diff --git a/www/libxul/files/patch-security-nss-lib-Makefile b/www/libxul/files/patch-security-nss-lib-Makefile
new file mode 100644
index 000000000000..51304f730c92
--- /dev/null
+++ b/www/libxul/files/patch-security-nss-lib-Makefile
@@ -0,0 +1,11 @@
+--- security/nss/lib/Makefile~
++++ 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/libxul/files/patch-security_coreconf_FreeBSD.mk b/www/libxul/files/patch-security_coreconf_FreeBSD.mk
index 2ae0716f1bb1..7aa6a8a0fbe1 100644
--- a/www/libxul/files/patch-security_coreconf_FreeBSD.mk
+++ b/www/libxul/files/patch-security_coreconf_FreeBSD.mk
@@ -1,18 +1,46 @@
---- security/coreconf/FreeBSD.mk.orig 2010-06-26 07:29:06.000000000 +0200
-+++ security/coreconf/FreeBSD.mk 2010-07-18 13:25:06.000000000 +0200
-@@ -49,9 +49,6 @@
+--- security/coreconf/FreeBSD.mk.orig 2010-03-16 09:57:06.000000000 +0000
++++ security/coreconf/FreeBSD.mk 2010-03-20 17:40:12.000000000 +0000
+@@ -49,8 +49,24 @@
ifeq ($(CPU_ARCH),pc98)
CPU_ARCH = x86
endif
-ifeq ($(CPU_ARCH),amd64)
-CPU_ARCH = x86_64
--endif
++ifeq ($(OS_TEST),alpha)
++CPU_ARCH = alpha
++endif
++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
++ifeq ($(OS_TEST),sparc64)
++CPU_ARCH = sparc64
+ endif
OS_CFLAGS = $(DSO_CFLAGS) -ansi -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
+@@ -78,7 +90,7 @@
+ DLL_SUFFIX = so.1.0
+ endif
-@@ -87,4 +84,4 @@
+-MKSHLIB = $(CC) $(DSO_LDOPTS)
++MKSHLIB = $(CC) -Wl,-Bsymbolic -lc $(DSO_LDOPTS) -o $@
+ ifdef MAPFILE
+ MKSHLIB += -Wl,--version-script,$(MAPFILE)
+ endif
+@@ -87,4 +99,6 @@
G++INCLUDES = -I/usr/include/g++
-INCLUDES += -I/usr/X11R6/include
-+#INCLUDES += -I/usr/X11R6/include
++USE_SYSTEM_ZLIB = 1
++ZLIB_LIBS = -lz
++INCLUDES += -I$(LOCALBASE)/include
diff --git a/www/libxul/files/patch-storage_build_Makefile.in b/www/libxul/files/patch-storage_build_Makefile.in
deleted file mode 100644
index 18202a5a61d8..000000000000
--- a/www/libxul/files/patch-storage_build_Makefile.in
+++ /dev/null
@@ -1,10 +0,0 @@
---- storage/build/Makefile.in.orig Tue Feb 21 11:18:56 2006
-+++ storage/build/Makefile.in Sun Nov 5 16:16:06 2006
-@@ -77,6 +77,7 @@
- $(EXTRA_DSO_LIBS) \
- $(MOZ_COMPONENT_LIBS) \
- $(MOZ_JS_LIBS) \
-+ %%PTHREAD_LIBS%% \
- $(NULL)
-
- include $(topsrcdir)/config/rules.mk
diff --git a/www/libxul/files/patch-toolkit-xre-nsAppRunner.cpp b/www/libxul/files/patch-toolkit-xre-nsAppRunner.cpp
new file mode 100644
index 000000000000..4e9a34873720
--- /dev/null
+++ b/www/libxul/files/patch-toolkit-xre-nsAppRunner.cpp
@@ -0,0 +1,11 @@
+--- toolkit/xre/nsAppRunner.cpp~
++++ toolkit/xre/nsAppRunner.cpp
+@@ -3046,7 +3046,7 @@ XRE_main(int argc, char* argv[], const n
+ QApplication app(gArgc, gArgv);
+ #endif
+ #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/libxul/files/patch-xpcom_base_nsStackWalk.cpp b/www/libxul/files/patch-xpcom_base_nsStackWalk.cpp
index 3485b1509ad1..76a5dc8b9f7c 100644
--- a/www/libxul/files/patch-xpcom_base_nsStackWalk.cpp
+++ b/www/libxul/files/patch-xpcom_base_nsStackWalk.cpp
@@ -9,3 +9,11 @@
#include <dlfcn.h>
#endif
+@@ -1123,6 +1123,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/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in b/www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in
index 124e86202838..21314a4eec66 100644
--- a/www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in
+++ b/www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in
@@ -1,16 +1,15 @@
---- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2010-04-02 16:03:13.000000000 +0000
-+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in 2010-06-06 19:19:44.000000000 +0000
-@@ -73,6 +73,9 @@
- DEFINES += -DKEEP_STACK_16_BYTE_ALIGNED
- CPPSRCS := xptcinvoke_unixish_x86.cpp xptcstubs_unixish_x86.cpp
- endif
-+ifeq (x86_64,$(OS_TEST))
-+CPPSRCS := xptcinvoke_x86_64_linux.cpp xptcstubs_x86_64_linux.cpp
-+endif
- endif
- endif
-
-@@ -96,7 +99,7 @@
+--- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2011-04-26 23:22:05.000000000 +0200
++++ xpcom/reflect/xptcall/src/md/unix/Makefile.in 2011-04-26 23:48:09.637442986 +0200
+@@ -85,7 +85,7 @@
+ # New code for Linux, et. al., with gcc
+ # Migrate other platforms here after testing
+ #
+-ifneq (,$(filter Linux GNU_%,$(OS_ARCH)))
++ifneq (,$(filter Linux FreeBSD GNU_%,$(OS_ARCH)))
+ # Linux/x86-64
+ ifeq (x86_64,$(OS_TEST))
+ CPPSRCS := xptcinvoke_x86_64_unix.cpp xptcstubs_x86_64_linux.cpp
+@@ -70,7 +70,7 @@
endif
endif
# IA64 Linux
@@ -19,35 +18,20 @@
ifneq (,$(findstring ia64,$(OS_TEST)))
CPPSRCS := xptcinvoke_ipf64.cpp xptcstubs_ipf64.cpp
ASFILES := xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s
-@@ -111,8 +114,8 @@
- #
- # FreeBSD/amd64
+@@ -109,12 +109,6 @@ ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDx86_64
+ CPPSRCS := xptcinvoke_amd64_openbsd.cpp xptcstubs_amd64_openbsd.cpp
+ endif
#
+-# FreeBSD/amd64
+-#
-ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDx86_64)
-CPPSRCS := xptcinvoke_amd64_linux.cpp xptcstubs_amd64_linux.cpp
-+ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDamd64)
-+CPPSRCS := xptcinvoke_amd64_openbsd.cpp xptcstubs_amd64_openbsd.cpp
- endif
- #
+-endif
+-#
# BeOS/Intel (uses the same unixish_x86 code)
-@@ -165,9 +168,15 @@
- ASFILES := xptcinvoke_asm_osf1_alpha.s xptcstubs_asm_osf1_alpha.s
- endif
- #
-+# 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
#
-@@ -322,7 +331,7 @@
+ ifeq ($(OS_ARCH)$(OS_TEST),BeOSBePC)
+@@ -341,7 +356,7 @@
#
# Linux/PPC
#
@@ -56,32 +40,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
-@@ -331,9 +340,9 @@
+@@ -350,7 +365,7 @@
#
# Linux/PPC64
#
-ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64)
--CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
--ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
+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
+ 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
- endif
-
-@@ -400,6 +409,15 @@
- ASFILES := xptcinvoke_asm_sparc_netbsd.s xptcstubs_asm_sparc_netbsd.s
- endif
+@@ -350,7 +350,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
+ # OpenBSD/SPARC64
#
- ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDsparc)
+-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/libxul/files/patch-xptcall-alpha b/www/libxul/files/patch-xptcall-alpha
deleted file mode 100644
index 29631a98e61e..000000000000
--- a/www/libxul/files/patch-xptcall-alpha
+++ /dev/null
@@ -1,459 +0,0 @@
---- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_freebsd_alpha.cpp.orig Tue May 27 01:37:25 2003
-+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_freebsd_alpha.cpp Tue May 27 01:37:00 2003
-@@ -0,0 +1,184 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-+/* ***** BEGIN LICENSE BLOCK *****
-+ * Version: NPL 1.1/GPL 2.0/LGPL 2.1
-+ *
-+ * The contents of this file are subject to the Netscape Public License
-+ * Version 1.1 (the "License"); you may not use this file except in
-+ * compliance with the License. You may obtain a copy of the License at
-+ * http://www.mozilla.org/NPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS IS" basis,
-+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-+ * for the specific language governing rights and limitations under the
-+ * License.
-+ *
-+ * The Original Code is mozilla.org code.
-+ *
-+ * The Initial Developer of the Original Code is
-+ * Netscape Communications Corporation.
-+ * Portions created by the Initial Developer are Copyright (C) 1998
-+ * the Initial Developer. All Rights Reserved.
-+ *
-+ * Contributor(s):
-+ *
-+ * Alternatively, the contents of this file may be used under the terms of
-+ * either the GNU General Public License Version 2 or later (the "GPL"), or
-+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-+ * in which case the provisions of the GPL or the LGPL are applicable instead
-+ * of those above. If you wish to allow use of your version of this file only
-+ * under the terms of either the GPL or the LGPL, and not to allow others to
-+ * use your version of this file under the terms of the NPL, indicate your
-+ * decision by deleting the provisions above and replace them with the notice
-+ * and other provisions required by the GPL or the LGPL. If you do not delete
-+ * the provisions above, a recipient may use your version of this file under
-+ * the terms of any one of the NPL, the GPL or the LGPL.
-+ *
-+ * ***** END LICENSE BLOCK ***** */
-+
-+/* Platform specific code to invoke XPCOM methods on native objects */
-+
-+/* contributed by Glen Nakamura <glen.nakamura@usa.net> */
-+
-+#include "xptcprivate.h"
-+
-+/* Prototype specifies unmangled function name and disables unused warning */
-+static void
-+invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s)
-+__asm__("invoke_copy_to_stack") __attribute__((unused));
-+
-+static void
-+invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s)
-+{
-+ const PRUint8 NUM_ARG_REGS = 6-1; // -1 for "this" pointer
-+
-+ for(PRUint32 i = 0; i < paramCount; i++, d++, s++)
-+ {
-+ if(s->IsPtrData())
-+ {
-+ *d = (PRUint64)s->ptr;
-+ continue;
-+ }
-+ switch(s->type)
-+ {
-+ case nsXPTType::T_I8 : *d = (PRUint64)s->val.i8; break;
-+ case nsXPTType::T_I16 : *d = (PRUint64)s->val.i16; break;
-+ case nsXPTType::T_I32 : *d = (PRUint64)s->val.i32; break;
-+ case nsXPTType::T_I64 : *d = (PRUint64)s->val.i64; break;
-+ case nsXPTType::T_U8 : *d = (PRUint64)s->val.u8; break;
-+ case nsXPTType::T_U16 : *d = (PRUint64)s->val.u16; break;
-+ case nsXPTType::T_U32 : *d = (PRUint64)s->val.u32; break;
-+ case nsXPTType::T_U64 : *d = (PRUint64)s->val.u64; break;
-+ case nsXPTType::T_FLOAT :
-+ if(i < NUM_ARG_REGS)
-+ {
-+ // convert floats to doubles if they are to be passed
-+ // via registers so we can just deal with doubles later
-+ union { PRUint64 u64; double d; } t;
-+ t.d = (double)s->val.f;
-+ *d = t.u64;
-+ }
-+ else
-+ // otherwise copy to stack normally
-+ *d = (PRUint64)s->val.u32;
-+ break;
-+ case nsXPTType::T_DOUBLE : *d = (PRUint64)s->val.u64; break;
-+ case nsXPTType::T_BOOL : *d = (PRUint64)s->val.b; break;
-+ case nsXPTType::T_CHAR : *d = (PRUint64)s->val.c; break;
-+ case nsXPTType::T_WCHAR : *d = (PRUint64)s->val.wc; break;
-+ default:
-+ // all the others are plain pointer types
-+ *d = (PRUint64)s->val.p;
-+ break;
-+ }
-+ }
-+}
-+
-+/*
-+ * XPTC_PUBLIC_API(nsresult)
-+ * XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-+ * PRUint32 paramCount, nsXPTCVariant* params, void* vt)
-+ */
-+__asm__(
-+ "#### XPTC_InvokeByIndex ####\n"
-+".text\n\t"
-+ ".align 5\n\t"
-+ ".globl XPTC_InvokeByIndex\n\t"
-+ ".ent XPTC_InvokeByIndex\n"
-+"XPTC_InvokeByIndex:\n\t"
-+ ".frame $15,32,$26,0\n\t"
-+ ".mask 0x4008000,-32\n\t"
-+ "ldgp $29,0($27)\n"
-+"$XPTC_InvokeByIndex..ng:\n\t"
-+ "subq $30,32,$30\n\t"
-+ "stq $26,0($30)\n\t"
-+ "stq $15,8($30)\n\t"
-+ "bis $30,$30,$15\n\t"
-+ ".prologue 1\n\t"
-+
-+ /*
-+ * Allocate enough stack space to hold the greater of 6 or "paramCount"+1
-+ * parameters. (+1 for "this" pointer) Room for at least 6 parameters
-+ * is required for storage of those passed via registers.
-+ */
-+
-+ "bis $31,5,$2\n\t" /* count = MAX(5, "paramCount") */
-+ "cmplt $2,$18,$1\n\t"
-+ "cmovne $1,$18,$2\n\t"
-+ "s8addq $2,16,$1\n\t" /* room for count+1 params (8 bytes each) */
-+ "bic $1,15,$1\n\t" /* stack space is rounded up to 0 % 16 */
-+ "subq $30,$1,$30\n\t"
-+
-+ "stq $16,0($30)\n\t" /* save "that" (as "this" pointer) */
-+ "stq $17,16($15)\n\t" /* save "methodIndex" */
-+
-+ "addq $30,8,$16\n\t" /* pass stack pointer */
-+ "bis $18,$18,$17\n\t" /* pass "paramCount" */
-+ "bis $19,$19,$18\n\t" /* pass "params" */
-+ "bsr $26,$invoke_copy_to_stack..ng\n\t" /* call invoke_copy_to_stack */
-+
-+ /*
-+ * Copy the first 6 parameters to registers and remove from stack frame.
-+ * Both the integer and floating point registers are set for each parameter
-+ * except the first which is the "this" pointer. (integer only)
-+ * The floating point registers are all set as doubles since the
-+ * invoke_copy_to_stack function should have converted the floats.
-+ */
-+ "ldq $16,0($30)\n\t" /* integer registers */
-+ "ldq $17,8($30)\n\t"
-+ "ldq $18,16($30)\n\t"
-+ "ldq $19,24($30)\n\t"
-+ "ldq $20,32($30)\n\t"
-+ "ldq $21,40($30)\n\t"
-+ "ldt $f17,8($30)\n\t" /* floating point registers */
-+ "ldt $f18,16($30)\n\t"
-+ "ldt $f19,24($30)\n\t"
-+ "ldt $f20,32($30)\n\t"
-+ "ldt $f21,40($30)\n\t"
-+
-+ "addq $30,48,$30\n\t" /* remove params from stack */
-+
-+ /*
-+ * Call the virtual function with the constructed stack frame.
-+ */
-+ "bis $16,$16,$1\n\t" /* load "this" */
-+ "ldq $2,16($15)\n\t" /* load "methodIndex" */
-+ "ldq $1,0($1)\n\t" /* load vtable */
-+#if 0
-+ "s8addq $2,16,$2\n\t" /* vtable index = "methodIndex" * 8 + 16 */
-+#else
-+ "mulq $2, 8, $2\n\t"
-+ "addq $2, 0, $2\n\t" /* vtable index = "methodIndex" * 16 + 24 */
-+#endif
-+ "addq $1,$2,$1\n\t"
-+ "ldq $27,0($1)\n\t" /* load address of function */
-+ "jsr $26,($27),0\n\t" /* call virtual function */
-+ "ldgp $29,0($26)\n\t"
-+
-+ "bis $15,$15,$30\n\t"
-+ "ldq $26,0($30)\n\t"
-+ "ldq $15,8($30)\n\t"
-+ "addq $30,32,$30\n\t"
-+ "ret $31,($26),1\n\t"
-+ ".end XPTC_InvokeByIndex"
-+ );
-+
---- xpcom/reflect/xptcall/src/md/unix/xptcstubs_freebsd_alpha.cpp.orig Tue May 27 01:37:30 2003
-+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_freebsd_alpha.cpp Tue May 27 01:37:04 2003
-@@ -0,0 +1,269 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-+/* ***** BEGIN LICENSE BLOCK *****
-+ * Version: NPL 1.1/GPL 2.0/LGPL 2.1
-+ *
-+ * The contents of this file are subject to the Netscape Public License
-+ * Version 1.1 (the "License"); you may not use this file except in
-+ * compliance with the License. You may obtain a copy of the License at
-+ * http://www.mozilla.org/NPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS IS" basis,
-+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-+ * for the specific language governing rights and limitations under the
-+ * License.
-+ *
-+ * The Original Code is mozilla.org code.
-+ *
-+ * The Initial Developer of the Original Code is
-+ * Netscape Communications Corporation.
-+ * Portions created by the Initial Developer are Copyright (C) 1999
-+ * the Initial Developer. All Rights Reserved.
-+ *
-+ * Contributor(s):
-+ *
-+ * Alternatively, the contents of this file may be used under the terms of
-+ * either the GNU General Public License Version 2 or later (the "GPL"), or
-+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-+ * in which case the provisions of the GPL or the LGPL are applicable instead
-+ * of those above. If you wish to allow use of your version of this file only
-+ * under the terms of either the GPL or the LGPL, and not to allow others to
-+ * use your version of this file under the terms of the NPL, indicate your
-+ * decision by deleting the provisions above and replace them with the notice
-+ * and other provisions required by the GPL or the LGPL. If you do not delete
-+ * the provisions above, a recipient may use your version of this file under
-+ * the terms of any one of the NPL, the GPL or the LGPL.
-+ *
-+ * ***** END LICENSE BLOCK ***** */
-+
-+/* Implement shared vtbl methods. */
-+
-+/* contributed by Glen Nakamura <glen.nakamura@usa.net> */
-+
-+#include <sys/types.h>
-+#include <machine/cpu.h>
-+#include "xptcprivate.h"
-+
-+/* Prototype specifies unmangled function name and disables unused warning */
-+static nsresult
-+PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args)
-+__asm__("PrepareAndDispatch") __attribute__((unused));
-+
-+static nsresult
-+PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args)
-+{
-+ const PRUint8 PARAM_BUFFER_COUNT = 16;
-+ const PRUint8 NUM_ARG_REGS = 6-1; // -1 for "this" pointer
-+
-+ 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");
-+
-+ // args[0] to args[NUM_ARG_REGS] hold floating point register values
-+ PRUint64* ap = args + NUM_ARG_REGS;
-+ 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 = (PRInt8) *ap; break;
-+ case nsXPTType::T_I16 : dp->val.i16 = (PRInt16) *ap; break;
-+ case nsXPTType::T_I32 : dp->val.i32 = (PRInt32) *ap; break;
-+ case nsXPTType::T_I64 : dp->val.i64 = (PRInt64) *ap; break;
-+ case nsXPTType::T_U8 : dp->val.u8 = (PRUint8) *ap; break;
-+ case nsXPTType::T_U16 : dp->val.u16 = (PRUint16) *ap; break;
-+ case nsXPTType::T_U32 : dp->val.u32 = (PRUint32) *ap; break;
-+ case nsXPTType::T_U64 : dp->val.u64 = (PRUint64) *ap; break;
-+ case nsXPTType::T_FLOAT :
-+ if(i < NUM_ARG_REGS)
-+ {
-+ // floats passed via registers are stored as doubles
-+ // in the first NUM_ARG_REGS entries in args
-+ dp->val.u64 = (PRUint64) args[i];
-+ dp->val.f = (float) dp->val.d; // convert double to float
-+ }
-+ else
-+ dp->val.u32 = (PRUint32) *ap;
-+ break;
-+ case nsXPTType::T_DOUBLE :
-+ // doubles passed via registers are also stored
-+ // in the first NUM_ARG_REGS entries in args
-+ dp->val.u64 = (i < NUM_ARG_REGS) ? args[i] : *ap;
-+ break;
-+ case nsXPTType::T_BOOL : dp->val.b = (PRBool) *ap; break;
-+ case nsXPTType::T_CHAR : dp->val.c = (char) *ap; break;
-+ case nsXPTType::T_WCHAR : dp->val.wc = (PRUnichar) *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;
-+}
-+
-+/*
-+ * SharedStub()
-+ * Collects arguments and calls PrepareAndDispatch. The "methodIndex" is
-+ * passed to this function via $1 to preserve the argument registers.
-+ */
-+__asm__(
-+ "#### SharedStub ####\n"
-+".text\n\t"
-+ ".align 5\n\t"
-+ ".ent SharedStub\n"
-+"SharedStub:\n\t"
-+ ".frame $30,96,$26,0\n\t"
-+ ".mask 0x4000000,-96\n\t"
-+ "ldgp $29,0($27)\n"
-+"$SharedStub..ng:\n\t"
-+ "subq $30,96,$30\n\t"
-+ "stq $26,0($30)\n\t"
-+ ".prologue 1\n\t"
-+
-+ /*
-+ * Store arguments passed via registers to the stack.
-+ * Floating point registers are stored as doubles and converted
-+ * to floats in PrepareAndDispatch if necessary.
-+ */
-+ "stt $f17,16($30)\n\t" /* floating point registers */
-+ "stt $f18,24($30)\n\t"
-+ "stt $f19,32($30)\n\t"
-+ "stt $f20,40($30)\n\t"
-+ "stt $f21,48($30)\n\t"
-+ "stq $17,56($30)\n\t" /* integer registers */
-+ "stq $18,64($30)\n\t"
-+ "stq $19,72($30)\n\t"
-+ "stq $20,80($30)\n\t"
-+ "stq $21,88($30)\n\t"
-+
-+ /*
-+ * Call PrepareAndDispatch function.
-+ */
-+ "bis $1,$1,$17\n\t" /* pass "methodIndex" */
-+ "addq $30,16,$18\n\t" /* pass "args" */
-+ "bsr $26,$PrepareAndDispatch..ng\n\t"
-+
-+ "ldq $26,0($30)\n\t"
-+ "addq $30,96,$30\n\t"
-+ "ret $31,($26),1\n\t"
-+ ".end SharedStub"
-+ );
-+
-+#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
-+/*
-+ * nsresult nsXPTCStubBase::Stub##n()
-+ * Sets register $1 to "methodIndex" and jumps to SharedStub.
-+ */
-+#define STUB_ENTRY(n) \
-+__asm__( \
-+ "#### Stub"#n" ####\n" \
-+".text\n\t" \
-+ ".align 5\n\t" \
-+ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev\n\t" \
-+ ".ent _ZN14nsXPTCStubBase5Stub"#n"Ev\n" \
-+"_ZN14nsXPTCStubBase5Stub"#n"Ev:\n\t" \
-+ ".frame $30,0,$26,0\n\t" \
-+ "ldgp $29,0($27)\n" \
-+"$_ZN14nsXPTCStubBase5Stub"#n"Ev..ng:\n\t" \
-+ ".prologue 1\n\t" \
-+ "lda $1,"#n"\n\t" \
-+ "br $31,$SharedStub..ng\n\t" \
-+ ".end _ZN14nsXPTCStubBase5Stub"#n"Ev" \
-+ ); \
-+__asm__( \
-+ "#### Stub"#n" ####\n" \
-+".text\n\t" \
-+ ".align 5\n\t" \
-+ ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev\n\t" \
-+ ".ent _ZN14nsXPTCStubBase6Stub"#n"Ev\n" \
-+"_ZN14nsXPTCStubBase6Stub"#n"Ev:\n\t" \
-+ ".frame $30,0,$26,0\n\t" \
-+ "ldgp $29,0($27)\n" \
-+"$_ZN14nsXPTCStubBase6Stub"#n"Ev..ng:\n\t" \
-+ ".prologue 1\n\t" \
-+ "lda $1,"#n"\n\t" \
-+ "br $31,$SharedStub..ng\n\t" \
-+ ".end _ZN14nsXPTCStubBase6Stub"#n"Ev" \
-+ ); \
-+__asm__( \
-+ "#### Stub"#n" ####\n" \
-+".text\n\t" \
-+ ".align 5\n\t" \
-+ ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev\n\t" \
-+ ".ent _ZN14nsXPTCStubBase7Stub"#n"Ev\n" \
-+"_ZN14nsXPTCStubBase7Stub"#n"Ev:\n\t" \
-+ ".frame $30,0,$26,0\n\t" \
-+ "ldgp $29,0($27)\n" \
-+"$_ZN14nsXPTCStubBase7Stub"#n"Ev..ng:\n\t" \
-+ ".prologue 1\n\t" \
-+ "lda $1,"#n"\n\t" \
-+ "br $31,$SharedStub..ng\n\t" \
-+ ".end _ZN14nsXPTCStubBase7Stub"#n"Ev" \
-+ );
-+#else
-+/*
-+ * nsresult nsXPTCStubBase::Stub##n()
-+ * Sets register $1 to "methodIndex" and jumps to SharedStub.
-+ */
-+#define STUB_ENTRY(n) \
-+nsresult nsXPTCStubBase::Stub##n() \
-+{ \
-+ nsresult result; \
-+__asm__ __volatile__( \
-+ "ldah $29,0($27)\n\t" \
-+ "lda $29,0($29)\n\t" \
-+ "lda $1, "#n"\n\t" \
-+ "br $31, $SharedStub..ng\n\t" \
-+ "mov $0, %0\n\t" \
-+ : "=r" (result) \
-+ ); \
-+ return result; \
-+}
-+#endif
-+
-+#define SENTINEL_ENTRY(n) \
-+nsresult nsXPTCStubBase::Sentinel##n() \
-+{ \
-+ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-+ return NS_ERROR_NOT_IMPLEMENTED; \
-+}
-+
-+#include "xptcstubsdef.inc"
-+
diff --git a/www/libxul/files/patch-xptcall-amd64 b/www/libxul/files/patch-xptcall-amd64
deleted file mode 100644
index 908b5fc7401c..000000000000
--- a/www/libxul/files/patch-xptcall-amd64
+++ /dev/null
@@ -1,380 +0,0 @@
---- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_amd64_freebsd.cpp.orig 2009-10-02 22:13:13.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_amd64_freebsd.cpp 2009-10-02 22:41:36.000000000 +0200
-@@ -0,0 +1,174 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-+// Platform specific code to invoke XPCOM methods on native objects
-+
-+#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"
-+EXPORT_XPCOM_API(nsresult)
-+NS_InvokeByIndex_P(nsISupports * that, PRUint32 methodIndex,
-+ PRUint32 paramCount, nsXPTCVariant * params)
-+{
-+ PRUint32 nr_gpr, nr_fpr, nr_stack;
-+ invoke_count_words(paramCount, params, nr_gpr, nr_fpr, nr_stack);
-+
-+ // Stack, if used, must be 16-bytes aligned
-+ if (nr_stack)
-+ nr_stack = (nr_stack + 1) & ~1;
-+
-+ // Load parameters to stack, if necessary
-+ PRUint64 *stack = (PRUint64 *) __builtin_alloca(nr_stack * 8);
-+ PRUint64 gpregs[GPR_COUNT];
-+ double fpregs[FPR_COUNT];
-+ invoke_copy_to_stack(stack, paramCount, params, gpregs, fpregs);
-+
-+ // Load FPR registers from fpregs[]
-+ register double d0 asm("xmm0");
-+ register double d1 asm("xmm1");
-+ register double d2 asm("xmm2");
-+ register double d3 asm("xmm3");
-+ register double d4 asm("xmm4");
-+ register double d5 asm("xmm5");
-+ register double d6 asm("xmm6");
-+ register double d7 asm("xmm7");
-+
-+ switch (nr_fpr) {
-+#define ARG_FPR(N) \
-+ case N+1: d##N = fpregs[N];
-+ ARG_FPR(7);
-+ ARG_FPR(6);
-+ ARG_FPR(5);
-+ ARG_FPR(4);
-+ ARG_FPR(3);
-+ ARG_FPR(2);
-+ ARG_FPR(1);
-+ ARG_FPR(0);
-+ case 0:;
-+#undef ARG_FPR
-+ }
-+
-+ // Load GPR registers from gpregs[]
-+ register PRUint64 a0 asm("rdi");
-+ register PRUint64 a1 asm("rsi");
-+ register PRUint64 a2 asm("rdx");
-+ register PRUint64 a3 asm("rcx");
-+ register PRUint64 a4 asm("r8");
-+ register PRUint64 a5 asm("r9");
-+
-+ switch (nr_gpr) {
-+#define ARG_GPR(N) \
-+ case N+1: a##N = gpregs[N];
-+ ARG_GPR(5);
-+ ARG_GPR(4);
-+ ARG_GPR(3);
-+ ARG_GPR(2);
-+ ARG_GPR(1);
-+ case 1: a0 = (PRUint64) that;
-+ case 0:;
-+#undef ARG_GPR
-+ }
-+
-+ // Ensure that assignments to SSE registers won't be optimized away
-+ asm("" ::
-+ "x" (d0), "x" (d1), "x" (d2), "x" (d3),
-+ "x" (d4), "x" (d5), "x" (d6), "x" (d7));
-+
-+ // Get pointer to method
-+ PRUint64 methodAddress = *((PRUint64 *)that);
-+ methodAddress += 8 * methodIndex;
-+ methodAddress = *((PRUint64 *)methodAddress);
-+
-+ typedef PRUint32 (*Method)(PRUint64, PRUint64, PRUint64, PRUint64, PRUint64, PRUint64);
-+ PRUint32 result = ((Method)methodAddress)(a0, a1, a2, a3, a4, a5);
-+ return result;
-+}
---- xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_freebsd.cpp.orig 2009-10-02 22:13:13.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_freebsd.cpp 2009-10-02 22:39:37.000000000 +0200
-@@ -0,0 +1,200 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-+
-+// Implement shared vtbl methods.
-+
-+#include "xptcprivate.h"
-+#include "xptiprivate.h"
-+
-+// The Linux/x86-64 ABI passes the first 6 integral parameters and the
-+// first 8 floating point parameters in registers (rdi, rsi, rdx, rcx,
-+// 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;
-+ const nsXPTMethodInfo* info;
-+ PRUint32 paramCount;
-+ PRUint32 i;
-+ nsresult result = NS_ERROR_FAILURE;
-+
-+ NS_ASSERTION(self,"no self");
-+
-+ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
-+ NS_ASSERTION(info,"no method info");
-+ if (! info)
-+ return NS_ERROR_UNEXPECTED;
-+
-+ paramCount = info->GetParamCount();
-+
-+ // setup variant array pointer
-+ if(paramCount > PARAM_BUFFER_COUNT)
-+ dispatchParams = new nsXPTCMiniVariant[paramCount];
-+ else
-+ dispatchParams = paramBuffer;
-+
-+ NS_ASSERTION(dispatchParams,"no place for params");
-+ if (! dispatchParams)
-+ return NS_ERROR_OUT_OF_MEMORY;
-+
-+ PRUint64* ap = args;
-+ PRUint32 nr_gpr = 1; // skip one GPR register for 'that'
-+ PRUint32 nr_fpr = 0;
-+ PRUint64 value;
-+
-+ for(i = 0; i < paramCount; i++) {
-+ const nsXPTParamInfo& param = info->GetParam(i);
-+ const nsXPTType& type = param.GetType();
-+ nsXPTCMiniVariant* dp = &dispatchParams[i];
-+
-+ if (!param.IsOut() && type == nsXPTType::T_DOUBLE) {
-+ if (nr_fpr < FPR_COUNT)
-+ dp->val.d = fpregs[nr_fpr++];
-+ else
-+ dp->val.d = *(double*) ap++;
-+ continue;
-+ }
-+ else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
-+ if (nr_fpr < FPR_COUNT)
-+ // The value in %xmm register is already prepared to
-+ // be retrieved as a float. Therefore, we pass the
-+ // value verbatim, as a double without conversion.
-+ dp->val.d = *(double*) ap++;
-+ else
-+ dp->val.f = *(float*) ap++;
-+ continue;
-+ }
-+ else {
-+ if (nr_gpr < GPR_COUNT)
-+ value = gpregs[nr_gpr++];
-+ else
-+ value = *ap++;
-+ }
-+
-+ if (param.IsOut() || !type.IsArithmetic()) {
-+ dp->val.p = (void*) value;
-+ continue;
-+ }
-+
-+ switch (type) {
-+ case nsXPTType::T_I8: dp->val.i8 = (PRInt8) value; break;
-+ case nsXPTType::T_I16: dp->val.i16 = (PRInt16) value; break;
-+ case nsXPTType::T_I32: dp->val.i32 = (PRInt32) value; break;
-+ case nsXPTType::T_I64: dp->val.i64 = (PRInt64) value; break;
-+ case nsXPTType::T_U8: dp->val.u8 = (PRUint8) value; break;
-+ case nsXPTType::T_U16: dp->val.u16 = (PRUint16) value; break;
-+ case nsXPTType::T_U32: dp->val.u32 = (PRUint32) value; break;
-+ case nsXPTType::T_U64: dp->val.u64 = (PRUint64) value; break;
-+ case nsXPTType::T_BOOL: dp->val.b = (PRBool) value; break;
-+ case nsXPTType::T_CHAR: dp->val.c = (char) value; break;
-+ case nsXPTType::T_WCHAR: dp->val.wc = (wchar_t) value; break;
-+
-+ default:
-+ NS_ASSERTION(0, "bad type");
-+ break;
-+ }
-+ }
-+
-+ result = self->mOuter->CallMethod((PRUint16)methodIndex, info,
-+ dispatchParams);
-+
-+ if (dispatchParams != paramBuffer)
-+ delete [] dispatchParams;
-+
-+ return result;
-+}
-+
-+#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/libxul/files/patch-xptcall-powerpc b/www/libxul/files/patch-xptcall-powerpc
deleted file mode 100644
index 6824d8a31260..000000000000
--- a/www/libxul/files/patch-xptcall-powerpc
+++ /dev/null
@@ -1,580 +0,0 @@
---- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_freebsd.s.orig 2009-09-26 22:23:56.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_freebsd.s 2009-09-27 10:01:48.000000000 +0200
-@@ -0,0 +1,110 @@
-+# -*- Mode: Asm -*-
-+#
-+# The contents of this file are subject to the Netscape Public
-+# License Version 1.1 (the "License"); you may not use this file
-+# except in compliance with the License. You may obtain a copy of
-+# the License at http://www.mozilla.org/NPL/
-+#
-+# Software distributed under the License is distributed on an "AS
-+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-+# implied. See the License for the specific language governing
-+# rights and limitations under the License.
-+#
-+# The Original Code is mozilla.org code.
-+#
-+# The Initial Developer of the Original Code is Netscape
-+# Communications Corporation. Portions created by Netscape are
-+# Copyright (C) 1999 Netscape Communications Corporation. All
-+# Rights Reserved.
-+#
-+# Contributor(s):
-+# Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
-+# beard@netscape.com (Patrick Beard)
-+# waterson@netscape.com (Chris Waterson)
-+#
-+.set r0,0; .set sp,1; .set RTOC,2; .set r3,3; .set r4,4
-+.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
-+.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
-+.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
-+.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
-+.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
-+.set r30,30; .set r31,31
-+.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
-+.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
-+.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
-+.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
-+.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
-+.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
-+.set f30,30; .set f31,31
-+
-+ .section ".text"
-+ .align 2
-+ .globl NS_InvokeByIndex_P
-+ .type NS_InvokeByIndex_P,@function
-+
-+#
-+# NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
-+# PRUint32 paramCount, nsXPTCVariant* params)
-+#
-+
-+NS_InvokeByIndex_P:
-+ stwu sp,-32(sp) # setup standard stack frame
-+ mflr r0 # save LR
-+ stw r3,8(sp) # r3 <= that
-+ stw r4,12(sp) # r4 <= methodIndex
-+ stw r30,16(sp)
-+ stw r31,20(sp)
-+
-+ stw r0,36(sp) # store LR backchain
-+ mr r31,sp
-+
-+ rlwinm r10,r5,3,0,27 # r10 = (ParamCount * 2 * 4) & ~0x0f
-+ addi r0,r10,96 # reserve stack for GPR and FPR register save area r0 = r10 + 96
-+ lwz r9,0(sp) # r9 = backchain
-+ neg r0,r0
-+ stwux r9,sp,r0 # reserve stack sapce and save SP backchain
-+
-+ addi r3,sp,8 # r3 <= args
-+ mr r4,r5 # r4 <= paramCount
-+ mr r5,r6 # r5 <= params
-+ add r6,r3,r10 # r6 <= gpregs ( == args + r10 )
-+ mr r30,r6 # store in r30 for use later...
-+ addi r7,r6,32 # r7 <= fpregs ( == gpregs + 32 )
-+
-+ bl invoke_copy_to_stack@local # (args, paramCount, params, gpregs, fpregs)
-+
-+ lfd f1,32(r30) # load FP registers with method parameters
-+ lfd f2,40(r30)
-+ lfd f3,48(r30)
-+ lfd f4,56(r30)
-+ lfd f5,64(r30)
-+ lfd f6,72(r30)
-+ lfd f7,80(r30)
-+ lfd f8,88(r30)
-+
-+ lwz r3,8(r31) # r3 <= that
-+ lwz r4,12(r31) # r4 <= methodIndex
-+ lwz r5,0(r3) # r5 <= vtable ( == *that )
-+
-+ slwi r4,r4,2 # convert to offset ( *= 4 )
-+ lwzx r0,r5,r4 # r0 <= methodpointer ( == vtable + offset )
-+
-+ lwz r4,4(r30) # load GP regs with method parameters
-+ lwz r5,8(r30)
-+ lwz r6,12(r30)
-+ lwz r7,16(r30)
-+ lwz r8,20(r30)
-+ lwz r9,24(r30)
-+ lwz r10,28(r30)
-+
-+ mtlr r0 # copy methodpointer to LR
-+ blrl # call method
-+
-+ lwz r30,16(r31) # restore r30 & r31
-+ lwz r31,20(r31)
-+
-+ lwz r11,0(sp) # clean up the stack
-+ lwz r0,4(r11)
-+ mtlr r0
-+ mr sp,r11
-+ blr
---- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_freebsd.cpp.orig 2009-09-26 22:23:56.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_freebsd.cpp 2009-09-27 09:58:59.000000000 +0200
-@@ -0,0 +1,141 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-+/* ***** BEGIN LICENSE BLOCK *****
-+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
-+ *
-+ * The contents of this file are subject to the Mozilla Public License Version
-+ * 1.1 (the "License"); you may not use this file except in compliance with
-+ * the License. You may obtain a copy of the License at
-+ * http://www.mozilla.org/MPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS IS" basis,
-+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-+ * for the specific language governing rights and limitations under the
-+ * License.
-+ *
-+ * The Original Code is mozilla.org code.
-+ *
-+ * The Initial Developer of the Original Code is
-+ * Netscape Communications Corporation.
-+ * Portions created by the Initial Developer are Copyright (C) 1998
-+ * the Initial Developer. All Rights Reserved.
-+ *
-+ * Contributor(s):
-+ * Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
-+ * beard@netscape.com (Patrick Beard)
-+ * waterson@netscape.com (Chris Waterson)
-+ *
-+ * Alternatively, the contents of this file may be used under the terms of
-+ * either of the GNU General Public License Version 2 or later (the "GPL"),
-+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-+ * in which case the provisions of the GPL or the LGPL are applicable instead
-+ * of those above. If you wish to allow use of your version of this file only
-+ * under the terms of either the GPL or the LGPL, and not to allow others to
-+ * use your version of this file under the terms of the MPL, indicate your
-+ * decision by deleting the provisions above and replace them with the notice
-+ * and other provisions required by the GPL or the LGPL. If you do not delete
-+ * the provisions above, a recipient may use your version of this file under
-+ * the terms of any one of the MPL, the GPL or the LGPL.
-+ *
-+ * ***** END LICENSE BLOCK ***** */
-+
-+// Platform specific code to invoke XPCOM methods on native objects
-+
-+// The purpose of NS_InvokeByIndex_P() is to map a platform
-+// indepenpent call to the platform ABI. To do that,
-+// NS_InvokeByIndex_P() has to determine the method to call via vtable
-+// access. The parameters for the method are read from the
-+// nsXPTCVariant* and prepared for th native ABI. For the Linux/PPC
-+// ABI this means that the first 8 integral and floating point
-+// parameters are passed in registers.
-+
-+#include "xptcprivate.h"
-+
-+// 8 integral parameters are passed in registers
-+#define GPR_COUNT 8
-+
-+// 8 floating point parameters are passed in registers, floats are
-+// promoted to doubles when passed in registers
-+#define FPR_COUNT 8
-+
-+extern "C" PRUint32
-+invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
-+{
-+ return PRUint32(((paramCount * 2) + 3) & ~3);
-+}
-+
-+extern "C" void
-+invoke_copy_to_stack(PRUint32* d,
-+ PRUint32 paramCount,
-+ nsXPTCVariant* s,
-+ PRUint32* gpregs,
-+ double* fpregs)
-+{
-+ PRUint32 gpr = 1; // skip one GP reg for 'that'
-+ PRUint32 fpr = 0;
-+ PRUint32 tempu32;
-+ PRUint64 tempu64;
-+
-+ for(uint32 i = 0; i < paramCount; i++, s++) {
-+ if(s->IsPtrData())
-+ tempu32 = (PRUint32) s->ptr;
-+ else {
-+ switch(s->type) {
-+ case nsXPTType::T_FLOAT: break;
-+ case nsXPTType::T_DOUBLE: break;
-+ case nsXPTType::T_I8: tempu32 = s->val.i8; break;
-+ case nsXPTType::T_I16: tempu32 = s->val.i16; break;
-+ case nsXPTType::T_I32: tempu32 = s->val.i32; break;
-+ case nsXPTType::T_I64: tempu64 = s->val.i64; break;
-+ case nsXPTType::T_U8: tempu32 = s->val.u8; break;
-+ case nsXPTType::T_U16: tempu32 = s->val.u16; break;
-+ case nsXPTType::T_U32: tempu32 = s->val.u32; break;
-+ case nsXPTType::T_U64: tempu64 = s->val.u64; break;
-+ case nsXPTType::T_BOOL: tempu32 = s->val.b; break;
-+ case nsXPTType::T_CHAR: tempu32 = s->val.c; break;
-+ case nsXPTType::T_WCHAR: tempu32 = s->val.wc; break;
-+ default: tempu32 = (PRUint32) s->val.p; break;
-+ }
-+ }
-+
-+ if (!s->IsPtrData() && s->type == nsXPTType::T_DOUBLE) {
-+ if (fpr < FPR_COUNT)
-+ fpregs[fpr++] = s->val.d;
-+ else {
-+ if ((PRUint32) d & 4) d++; // doubles are 8-byte aligned on stack
-+ *((double*) d) = s->val.d;
-+ d += 2;
-+ }
-+ }
-+ else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
-+ if (fpr < FPR_COUNT)
-+ fpregs[fpr++] = s->val.f; // if passed in registers, floats are promoted to doubles
-+ else
-+ *((float*) d++) = s->val.f;
-+ }
-+ else if (!s->IsPtrData() && (s->type == nsXPTType::T_I64
-+ || s->type == nsXPTType::T_U64)) {
-+ if ((gpr + 1) < GPR_COUNT) {
-+ if (gpr & 1) gpr++; // longlongs are aligned in odd/even register pairs, eg. r5/r6
-+ *((PRUint64*) &gpregs[gpr]) = tempu64;
-+ gpr += 2;
-+ }
-+ else {
-+ if ((PRUint32) d & 4) d++; // longlongs are 8-byte aligned on stack
-+ *((PRUint64*) d) = tempu64;
-+ d += 2;
-+ }
-+ }
-+ else {
-+ if (gpr < GPR_COUNT)
-+ gpregs[gpr++] = tempu32;
-+ else
-+ *d++ = tempu32;
-+ }
-+
-+ }
-+}
-+
-+extern "C"
-+EXPORT_XPCOM_API(nsresult)
-+NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
-+ PRUint32 paramCount, nsXPTCVariant* params);
---- xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_freebsd.s.orig 2009-09-26 22:23:56.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_freebsd.s 2009-09-26 22:23:56.000000000 +0200
-@@ -0,0 +1,89 @@
-+# -*- Mode: Asm -*-
-+#
-+# The contents of this file are subject to the Netscape Public
-+# License Version 1.1 (the "License"); you may not use this file
-+# except in compliance with the License. You may obtain a copy of
-+# the License at http://www.mozilla.org/NPL/
-+#
-+# Software distributed under the License is distributed on an "AS
-+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-+# implied. See the License for the specific language governing
-+# rights and limitations under the License.
-+#
-+# The Original Code is mozilla.org code.
-+#
-+# The Initial Developer of the Original Code is Netscape
-+# Communications Corporation. Portions created by Netscape are
-+# Copyright (C) 1999 Netscape Communications Corporation. All
-+# Rights Reserved.
-+#
-+# Contributor(s):
-+# Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
-+# beard@netscape.com (Patrick Beard)
-+# waterson@netscape.com (Chris Waterson)
-+#
-+
-+.set r0,0; .set sp,1; .set RTOC,2; .set r3,3; .set r4,4
-+.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
-+.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
-+.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
-+.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
-+.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
-+.set r30,30; .set r31,31
-+.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
-+.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
-+.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
-+.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
-+.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
-+.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
-+.set f30,30; .set f31,31
-+
-+ .section ".text"
-+ .align 2
-+ .globl SharedStub
-+ .type SharedStub,@function
-+
-+SharedStub:
-+ stwu sp,-112(sp) # room for
-+ # linkage (8),
-+ # gprData (32),
-+ # fprData (64),
-+ # stack alignment(8)
-+ mflr r0
-+ stw r0,116(sp) # save LR backchain
-+
-+ stw r4,12(sp) # save GP registers
-+ stw r5,16(sp) # (n.b. that we don't save r3
-+ stw r6,20(sp) # because PrepareAndDispatch() is savvy)
-+ stw r7,24(sp)
-+ stw r8,28(sp)
-+ stw r9,32(sp)
-+ stw r10,36(sp)
-+
-+ stfd f1,40(sp) # save FP registers
-+ stfd f2,48(sp)
-+ stfd f3,56(sp)
-+ stfd f4,64(sp)
-+ stfd f5,72(sp)
-+ stfd f6,80(sp)
-+ stfd f7,88(sp)
-+ stfd f8,96(sp)
-+
-+ # r3 has the 'self' pointer already
-+
-+ mr r4,r11 # r4 <= methodIndex selector, passed
-+ # via r11 in the nsXPTCStubBase::StubXX() call
-+
-+ addi r5,sp,120 # r5 <= pointer to callers args area,
-+ # beyond r3-r10/f1-f8 mapped range
-+
-+ addi r6,sp,8 # r6 <= gprData
-+ addi r7,sp,40 # r7 <= fprData
-+
-+ bl PrepareAndDispatch@local # Go!
-+
-+ lwz r0,116(sp) # restore LR
-+ mtlr r0
-+ la sp,112(sp) # clean up the stack
-+ blr
-+
---- xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_freebsd.cpp.orig 2009-09-26 22:23:56.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_freebsd.cpp 2009-09-26 22:43:57.000000000 +0200
-@@ -0,0 +1,228 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-+/* ***** BEGIN LICENSE BLOCK *****
-+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
-+ *
-+ * The contents of this file are subject to the Mozilla Public License Version
-+ * 1.1 (the "License"); you may not use this file except in compliance with
-+ * the License. You may obtain a copy of the License at
-+ * http://www.mozilla.org/MPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS IS" basis,
-+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-+ * for the specific language governing rights and limitations under the
-+ * License.
-+ *
-+ * The Original Code is mozilla.org code.
-+ *
-+ * The Initial Developer of the Original Code is
-+ * Netscape Communications Corporation.
-+ * Portions created by the Initial Developer are Copyright (C) 1999
-+ * the Initial Developer. All Rights Reserved.
-+ *
-+ * Contributor(s):
-+ * Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
-+ * beard@netscape.com (Patrick Beard)
-+ * waterson@netscape.com (Chris Waterson)
-+ *
-+ * Alternatively, the contents of this file may be used under the terms of
-+ * either of the GNU General Public License Version 2 or later (the "GPL"),
-+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-+ * in which case the provisions of the GPL or the LGPL are applicable instead
-+ * of those above. If you wish to allow use of your version of this file only
-+ * under the terms of either the GPL or the LGPL, and not to allow others to
-+ * use your version of this file under the terms of the MPL, indicate your
-+ * decision by deleting the provisions above and replace them with the notice
-+ * and other provisions required by the GPL or the LGPL. If you do not delete
-+ * the provisions above, a recipient may use your version of this file under
-+ * the terms of any one of the MPL, the GPL or the LGPL.
-+ *
-+ * ***** END LICENSE BLOCK ***** */
-+
-+// Implement shared vtbl methods.
-+
-+#include "xptcprivate.h"
-+#include "xptiprivate.h"
-+
-+// The PPC/SYSV ABI passes the first 8 integral
-+// parameters and the first 8 floating point parameters in registers
-+// (r3-r10 and f1-f8), no stack space is allocated for these by the
-+// caller. The rest of the parameters are passed in the callers stack
-+// area. The stack pointer has to retain 16-byte alignment, longlongs
-+// and doubles are aligned on 8-byte boundaries.
-+
-+#define PARAM_BUFFER_COUNT 16
-+#define GPR_COUNT 8
-+#define FPR_COUNT 8
-+
-+// PrepareAndDispatch() is called by SharedStub() and calls the actual method.
-+//
-+// - 'args[]' contains the arguments passed on stack
-+// - 'gprData[]' contains the arguments passed in integer registers
-+// - 'fprData[]' contains the arguments passed in floating point registers
-+//
-+// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
-+// and then the method gets called.
-+
-+extern "C" nsresult
-+PrepareAndDispatch(nsXPTCStubBase* self,
-+ PRUint32 methodIndex,
-+ PRUint32* args,
-+ PRUint32 *gprData,
-+ double *fprData)
-+{
-+ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-+ nsXPTCMiniVariant* dispatchParams = NULL;
-+ const nsXPTMethodInfo* info = NULL;
-+ PRUint32 paramCount;
-+ PRUint32 i;
-+ nsresult result = NS_ERROR_FAILURE;
-+
-+ NS_ASSERTION(self,"no self");
-+
-+ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
-+ NS_ASSERTION(info,"no method info");
-+ if (! info)
-+ return NS_ERROR_UNEXPECTED;
-+
-+ paramCount = info->GetParamCount();
-+
-+ // setup variant array pointer
-+ if(paramCount > PARAM_BUFFER_COUNT)
-+ dispatchParams = new nsXPTCMiniVariant[paramCount];
-+ else
-+ dispatchParams = paramBuffer;
-+
-+ NS_ASSERTION(dispatchParams,"no place for params");
-+ if (! dispatchParams)
-+ return NS_ERROR_OUT_OF_MEMORY;
-+
-+ PRUint32* ap = args;
-+ PRUint32 gpr = 1; // skip one GPR register
-+ PRUint32 fpr = 0;
-+ PRUint32 tempu32;
-+ PRUint64 tempu64;
-+
-+ for(i = 0; i < paramCount; i++) {
-+ const nsXPTParamInfo& param = info->GetParam(i);
-+ const nsXPTType& type = param.GetType();
-+ nsXPTCMiniVariant* dp = &dispatchParams[i];
-+
-+ if (!param.IsOut() && type == nsXPTType::T_DOUBLE) {
-+ if (fpr < FPR_COUNT)
-+ dp->val.d = fprData[fpr++];
-+ else {
-+ if ((PRUint32) ap & 4) ap++; // doubles are 8-byte aligned on stack
-+ dp->val.d = *(double*) ap;
-+ ap += 2;
-+ }
-+ continue;
-+ }
-+ else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
-+ if (fpr < FPR_COUNT)
-+ dp->val.f = (float) fprData[fpr++]; // in registers floats are passed as doubles
-+ else
-+ dp->val.f = *(float*) ap++;
-+ continue;
-+ }
-+ else if (!param.IsOut() && (type == nsXPTType::T_I64
-+ || type == nsXPTType::T_U64)) {
-+ if (gpr & 1) gpr++; // longlongs are aligned in odd/even register pairs, eg. r5/r6
-+ if ((gpr + 1) < GPR_COUNT) {
-+ tempu64 = *(PRUint64*) &gprData[gpr];
-+ gpr += 2;
-+ }
-+ else {
-+ if ((PRUint32) ap & 4) ap++; // longlongs are 8-byte aligned on stack
-+ tempu64 = *(PRUint64*) ap;
-+ ap += 2;
-+ }
-+ }
-+ else {
-+ if (gpr < GPR_COUNT)
-+ tempu32 = gprData[gpr++];
-+ else
-+ tempu32 = *ap++;
-+ }
-+
-+ if(param.IsOut() || !type.IsArithmetic()) {
-+ dp->val.p = (void*) tempu32;
-+ continue;
-+ }
-+
-+ switch(type) {
-+ case nsXPTType::T_I8: dp->val.i8 = (PRInt8) tempu32; break;
-+ case nsXPTType::T_I16: dp->val.i16 = (PRInt16) tempu32; break;
-+ case nsXPTType::T_I32: dp->val.i32 = (PRInt32) tempu32; break;
-+ case nsXPTType::T_I64: dp->val.i64 = (PRInt64) tempu64; break;
-+ case nsXPTType::T_U8: dp->val.u8 = (PRUint8) tempu32; break;
-+ case nsXPTType::T_U16: dp->val.u16 = (PRUint16) tempu32; break;
-+ case nsXPTType::T_U32: dp->val.u32 = (PRUint32) tempu32; break;
-+ case nsXPTType::T_U64: dp->val.u64 = (PRUint64) tempu64; break;
-+ case nsXPTType::T_BOOL: dp->val.b = (PRBool) tempu32; break;
-+ case nsXPTType::T_CHAR: dp->val.c = (char) tempu32; break;
-+ case nsXPTType::T_WCHAR: dp->val.wc = (wchar_t) tempu32; break;
-+
-+ default:
-+ NS_ASSERTION(0, "bad type");
-+ break;
-+ }
-+ }
-+
-+ result = self->mOuter->CallMethod((PRUint16)methodIndex,
-+ info,
-+ dispatchParams);
-+
-+ if (dispatchParams != paramBuffer)
-+ delete [] dispatchParams;
-+
-+ return result;
-+
-+}
-+
-+// Load r11 with the constant 'n' and branch to SharedStub().
-+
-+// As G++3 ABI contains the length of the functionname in the mangled
-+// name, it is difficult to get a generic assembler mechanism like
-+// in the G++ 2.95 case.
-+// Create names would be like:
-+// _ZN14nsXPTCStubBase5Stub1Ev
-+// _ZN14nsXPTCStubBase6Stub12Ev
-+// _ZN14nsXPTCStubBase7Stub123Ev
-+// _ZN14nsXPTCStubBase8Stub1234Ev
-+// etc.
-+// Use assembler directives to get the names right...
-+
-+# define STUB_ENTRY(n) \
-+__asm__ ( \
-+ ".align 2 \n\t" \
-+ ".if "#n" < 10 \n\t" \
-+ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \
-+ ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \
-+"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
-+ \
-+ ".elseif "#n" < 100 \n\t" \
-+ ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \
-+ ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \
-+"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
-+ \
-+ ".elseif "#n" < 1000 \n\t" \
-+ ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \
-+ ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \
-+"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \
-+ \
-+ ".else \n\t" \
-+ ".err \"stub number "#n" >= 1000 not yet supported\"\n" \
-+ ".endif \n\t" \
-+ \
-+ "li 11,"#n" \n\t" \
-+ "b SharedStub@local \n" \
-+);
-+
-+#define SENTINEL_ENTRY(n) \
-+nsresult nsXPTCStubBase::Sentinel##n() \
-+{ \
-+ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-+ return NS_ERROR_NOT_IMPLEMENTED; \
-+}
-+
-+#include "xptcstubsdef.inc"
diff --git a/www/libxul/files/patch-xptcall-sparc64 b/www/libxul/files/patch-xptcall-sparc64
deleted file mode 100644
index 8d87d8cbd8d4..000000000000
--- a/www/libxul/files/patch-xptcall-sparc64
+++ /dev/null
@@ -1,329 +0,0 @@
---- xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_freebsd.cpp.orig 2009-09-30 22:48:25.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_freebsd.cpp 2009-09-30 23:09:48.000000000 +0200
-@@ -0,0 +1,125 @@
-+/* -*- 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"
-+#include "xptiprivate.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;
-+ const nsXPTMethodInfo* info;
-+ PRUint8 paramCount;
-+ PRUint8 i;
-+ nsresult result = NS_ERROR_FAILURE;
-+
-+ NS_ASSERTION(self,"no self");
-+
-+ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
-+ NS_ASSERTION(info,"no method info");
-+ if (! info)
-+ return NS_ERROR_UNEXPECTED;
-+
-+ paramCount = info->GetParamCount();
-+
-+ // setup variant array pointer
-+ if(paramCount > PARAM_BUFFER_COUNT)
-+ dispatchParams = new nsXPTCMiniVariant[paramCount];
-+ else
-+ dispatchParams = paramBuffer;
-+
-+ NS_ASSERTION(dispatchParams,"no place for params");
-+
-+ if (! dispatchParams)
-+ return NS_ERROR_OUT_OF_MEMORY;
-+
-+ PRUint64* ap = args;
-+ 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->mOuter->CallMethod((PRUint16)methodIndex, info,
-+ dispatchParams);
-+
-+ 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__ */
---- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc64_freebsd.s.orig 2009-09-30 22:48:25.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc64_freebsd.s 2009-09-30 22:48:25.000000000 +0200
-@@ -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 NS_InvokeByIndex_P
-+ .type NS_InvokeByIndex_P, #function
-+
-+/*
-+ NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
-+ PRUint32 paramCount, nsXPTCVariant* params);
-+
-+*/
-+NS_InvokeByIndex_P:
-+ 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 NS_InvokeByIndex_P, .-NS_InvokeByIndex_P
---- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_sparc64_freebsd.cpp.orig 2009-09-30 22:48:25.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_sparc64_freebsd.cpp 2009-09-30 22:48:25.000000000 +0200
-@@ -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;
-+}
diff --git a/www/libxul/files/patch-xulrunner_installer_libxul-embedding.pc.in b/www/libxul/files/patch-xulrunner_installer_libxul-embedding.pc.in
new file mode 100644
index 000000000000..e7ffbd5d1a9d
--- /dev/null
+++ b/www/libxul/files/patch-xulrunner_installer_libxul-embedding.pc.in
@@ -0,0 +1,9 @@
+--- xulrunner/installer/libxul-embedding.pc.in~
++++ xulrunner/installer/libxul-embedding.pc.in
+@@ -6,5 +6,5 @@ idldir=%idldir%
+ Name: libxul-embedding
+ Description: Static library for version-independent embedding of the Mozilla runtime
+ Version: %MOZILLA_VERSION%
+-Libs: -L${sdkdir}/lib -lxpcomglue -ldl
++Libs: -L${sdkdir}/lib -L%%MOZ_LIBDIR%% -lxpcomglue
+ Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS%
diff --git a/www/libxul/files/releng6_pulseaudio b/www/libxul/files/releng6_pulseaudio
deleted file mode 100644
index 2d83f3c1c441..000000000000
--- a/www/libxul/files/releng6_pulseaudio
+++ /dev/null
@@ -1,32 +0,0 @@
---- media/libsydneyaudio/src/Makefile.in.orig 2009-08-11 17:22:08.000000000 +0200
-+++ media/libsydneyaudio/src/Makefile.in 2009-08-11 17:22:36.000000000 +0200
-@@ -45,6 +45,12 @@
- LIBRARY_NAME = sydneyaudio
- FORCE_STATIC_LIB= 1
-
-+ifeq ($(OS_ARCH),FreeBSD)
-+CSRCS = \
-+ sydney_audio_pulseaudio.c \
-+ $(NULL)
-+endif
-+
- ifeq ($(OS_ARCH),Linux)
- CSRCS = \
- sydney_audio_alsa.c \
---- toolkit/library/Makefile.in.orig 2009-08-11 17:22:45.000000000 +0200
-+++ toolkit/library/Makefile.in 2009-08-11 17:23:22.000000000 +0200
-@@ -231,12 +231,12 @@
- endif
-
- ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT))
--EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) $(MOZ_PANGO_LIBS) $(MOZ_GTK2_LIBS) $(XT_LIBS) -lgthread-2.0
-+EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) $(MOZ_PANGO_LIBS) $(MOZ_GTK2_LIBS) $(XT_LIBS) -lgthread-2.0 -lpulse -lpthread
- EXTRA_DSO_LDOPTS += $(FT2_LIBS)
- endif
-
- ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
--EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XT_LIBS) $(MOZ_QT_LIBS) -lgthread-2.0
-+EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XT_LIBS) $(MOZ_QT_LIBS) -lgthread-2.0 -lpulse -lpthread
- EXTRA_DSO_LDOPTS += $(FT2_LIBS)
- endif
-
diff --git a/www/linux-firefox/Makefile b/www/linux-firefox/Makefile
index d3fc088343d0..2b52f3b9ff8e 100644
--- a/www/linux-firefox/Makefile
+++ b/www/linux-firefox/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= firefox
-PORTVERSION= 10.0.5
+PORTVERSION= 10.0.6
PORTEPOCH= 1
CATEGORIES= www
MASTER_SITE_SUBDIR?= firefox/releases/${PORTVERSION}esr/linux-i686/en-US
@@ -18,7 +18,7 @@ COMMENT= Web browser based on the browser portion of Mozilla
USE_LDCONFIG= yes
USE_BZIP2= yes
-USE_LINUX_APPS= dbusglib dbuslibs alsalib
+USE_LINUX_APPS= dbusglib dbuslibs alsalib alsa-plugins-oss
.include "${.CURDIR}/../linux-seamonkey/Makefile.common"
.include <bsd.port.mk>
diff --git a/www/linux-firefox/distinfo b/www/linux-firefox/distinfo
index 893efa512896..9792a60a2e71 100644
--- a/www/linux-firefox/distinfo
+++ b/www/linux-firefox/distinfo
@@ -1,2 +1,2 @@
-SHA256 (firefox-10.0.5esr.tar.bz2) = 6d8d4b35c00b582514d7745f3b6e560c09c70732bba8c45374ee6dbc81c084e5
-SIZE (firefox-10.0.5esr.tar.bz2) = 17296995
+SHA256 (firefox-10.0.6esr.tar.bz2) = d2a3fb68bcdb3f0a19885b194f1372a8c3720e5a6019327d41dc8554c805c1cd
+SIZE (firefox-10.0.6esr.tar.bz2) = 17298232
diff --git a/www/linux-seamonkey/Makefile b/www/linux-seamonkey/Makefile
index e9235ba9d13c..1ed27456f377 100644
--- a/www/linux-seamonkey/Makefile
+++ b/www/linux-seamonkey/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= seamonkey
-PORTVERSION= 2.10.1
+PORTVERSION= 2.11
CATEGORIES= www
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${PORTVERSION}/linux-i686/en-US
@@ -15,7 +15,7 @@ COMMENT= The open source, standards compliant web browser
USE_BZIP2= yes
-USE_LINUX_APPS= dbusglib dbuslibs alsalib
+USE_LINUX_APPS= dbusglib dbuslibs alsalib alsa-plugins-oss
.include "${.CURDIR}/Makefile.common"
.include <bsd.port.mk>
diff --git a/www/linux-seamonkey/distinfo b/www/linux-seamonkey/distinfo
index 9861f0a3c432..13f1efe09993 100644
--- a/www/linux-seamonkey/distinfo
+++ b/www/linux-seamonkey/distinfo
@@ -1,2 +1,2 @@
-SHA256 (seamonkey-2.10.1.tar.bz2) = 6599fdd30fb6f69df1ecabb61ad7fca021a42223afbc266f84c623d65688c031
-SIZE (seamonkey-2.10.1.tar.bz2) = 22910552
+SHA256 (seamonkey-2.11.tar.bz2) = a00c9c4d01a1ad74bc5828cbc96cfc349076ad78e0b218ec0ba871e80ff5c405
+SIZE (seamonkey-2.11.tar.bz2) = 23241380
diff --git a/www/linux-seamonkey/pkg-plist b/www/linux-seamonkey/pkg-plist
index f99ba84ce48d..197ed7f4ce13 100644
--- a/www/linux-seamonkey/pkg-plist
+++ b/www/linux-seamonkey/pkg-plist
@@ -16,12 +16,9 @@ lib/%%APP_NAME%%/chrome/icons/default/ablistWindow48.png
lib/%%APP_NAME%%/chrome/icons/default/addressbookWindow.png
lib/%%APP_NAME%%/chrome/icons/default/addressbookWindow16.png
lib/%%APP_NAME%%/chrome/icons/default/addressbookWindow48.png
-lib/%%APP_NAME%%/chrome/icons/default/bmPropsWindow.png
-lib/%%APP_NAME%%/chrome/icons/default/bmPropsWindow16.png
-lib/%%APP_NAME%%/chrome/icons/default/bmPropsWindow48.png
-lib/%%APP_NAME%%/chrome/icons/default/bookmark-window.png
-lib/%%APP_NAME%%/chrome/icons/default/bookmark-window16.png
-lib/%%APP_NAME%%/chrome/icons/default/bookmark-window48.png
+lib/%%APP_NAME%%/chrome/icons/default/bookmarkproperties.png
+lib/%%APP_NAME%%/chrome/icons/default/bookmarkproperties48.png
+lib/%%APP_NAME%%/chrome/icons/default/bookmarkproperties16.png
lib/%%APP_NAME%%/chrome/icons/default/default.png
lib/%%APP_NAME%%/chrome/icons/default/default16.png
lib/%%APP_NAME%%/chrome/icons/default/default48.png
@@ -49,6 +46,9 @@ lib/%%APP_NAME%%/chrome/icons/default/messengerWindow48.png
lib/%%APP_NAME%%/chrome/icons/default/msgcomposeWindow.png
lib/%%APP_NAME%%/chrome/icons/default/msgcomposeWindow16.png
lib/%%APP_NAME%%/chrome/icons/default/msgcomposeWindow48.png
+lib/%%APP_NAME%%/chrome/icons/default/places.png
+lib/%%APP_NAME%%/chrome/icons/default/places16.png
+lib/%%APP_NAME%%/chrome/icons/default/places48.png
lib/%%APP_NAME%%/chrome/icons/default/seamonkey.png
lib/%%APP_NAME%%/chrome/icons/default/venkman-window.png
lib/%%APP_NAME%%/chrome/icons/default/venkman-window16.png
diff --git a/www/seamonkey-i18n/Makefile b/www/seamonkey-i18n/Makefile
index 5adbda33b034..b5ea0b0a658b 100644
--- a/www/seamonkey-i18n/Makefile
+++ b/www/seamonkey-i18n/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= seamonkey-i18n
-PORTVERSION= 2.9.1
+PORTVERSION= 2.11
CATEGORIES= www
MASTER_SITE_SUBDIR= seamonkey/releases/${PORTVERSION}/langpack
PKGNAMEPREFIX=
@@ -22,7 +22,7 @@ PLIST?= ${WRKDIR}/plist
PLISTD?= ${WRKDIR}/plist_dirs
PLISTF?= ${WRKDIR}/plist_files
-USE_SEAMONKEY= 29
+USE_SEAMONKEY= 11
USE_XPI= seamonkey linux-seamonkey
USE_SUBMAKE= yes
diff --git a/www/seamonkey-i18n/distinfo b/www/seamonkey-i18n/distinfo
index 92f06ea77478..982a76ad61a1 100644
--- a/www/seamonkey-i18n/distinfo
+++ b/www/seamonkey-i18n/distinfo
@@ -1,44 +1,44 @@
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.ca.langpack.xpi) = b08f59c866fcedad3f56907ba58403e8412056b2e86579bdc46eb13a89d64af5
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.ca.langpack.xpi) = 816788
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.cs.langpack.xpi) = 8d45826f882d885030d3a0c6d42fdbdc055dcd056e1d19c545fdbbd72e3f805a
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.cs.langpack.xpi) = 821567
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.de.langpack.xpi) = 9ba90ae3d9bb6c37524dd9ad1c7e7b4a08cd9cbdf27ae32d6aa812c1678d8a09
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.de.langpack.xpi) = 862443
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.en-GB.langpack.xpi) = 13d5830aec455c4426e6ea2a57f5eb1ddd230fdb781267016b12376576251096
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.en-GB.langpack.xpi) = 791747
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.en-US.langpack.xpi) = dc9252e2dbd775bd96998b12b1b7d9df44225ea762d6679300b0fd524f4c937a
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.en-US.langpack.xpi) = 791354
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.es-AR.langpack.xpi) = 64e31013c2d1eb3a354595d83ae3ab66f28c94496d2752a3e4cc93c1e260de35
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.es-AR.langpack.xpi) = 862277
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.es-ES.langpack.xpi) = fccab4832cd33833f12ed7537af1c597df7ca917725bafd77ac94c05dde3d61d
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.es-ES.langpack.xpi) = 791379
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.fi.langpack.xpi) = 6e462e2cba5f8f06a45e3d88f0c4f0fff54b1d12ac55aff5f71615226cfca9d1
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.fi.langpack.xpi) = 811711
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.fr.langpack.xpi) = 33314c8b1774e3e9ac68c95556d9ee7ae548786f944add0af57958221f1b0eda
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.fr.langpack.xpi) = 817437
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.hu.langpack.xpi) = ac80b79fa8939172872196ddd33fb867f2814d4956e647d1d65abf310ba2c31e
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.hu.langpack.xpi) = 836335
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.it.langpack.xpi) = 7907090f60e287ef9120e0d626c10a54d1ce0f45cb5688c8a0681616400cd311
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.it.langpack.xpi) = 741586
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.ja-JP-mac.langpack.xpi) = 2de0984e97284b909a9e88d5fea974f133566e5c9f706425291ee08ad132a970
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.ja-JP-mac.langpack.xpi) = 891827
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.ja.langpack.xpi) = 16d7f9eca6cab4b9bf9241c9a9499fedc7629b7f41a177fae0a171363db5b57c
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.ja.langpack.xpi) = 867236
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.lt.langpack.xpi) = f2212afb392f79d1443c23ce3a2bec0f7fc481c7cad9ef9c92585176a3b46aaa
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.lt.langpack.xpi) = 935534
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.nb-NO.langpack.xpi) = c909f0a13208710323765680e72bfc80a6abf5a670d05c0eb262f87d2e66afbc
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.nb-NO.langpack.xpi) = 810284
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.nl.langpack.xpi) = 8b24996c45b6198a06f883232b445b04651d0c6e0b5e5974370ecda6e96c572b
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.nl.langpack.xpi) = 808494
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.pl.langpack.xpi) = 328bd252d599c2ff98342488d8ff9f9f4ef368f792a03743bea3947c79dc661e
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.pl.langpack.xpi) = 832375
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.pt-PT.langpack.xpi) = d6b37cd0e93b36bd94d1b402f1a145fef3722244b47a61e818a83149cfbbdf8c
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.pt-PT.langpack.xpi) = 847906
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.ru.langpack.xpi) = ee09e9708f456e23e16c52eaf64690bb7380703e6d655b836c97144014033294
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.ru.langpack.xpi) = 895673
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.sk.langpack.xpi) = 0261c0334354e48e70b4b67b8cb6ba4eadeb8584fafc30c4840bbc4321b18acd
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.sk.langpack.xpi) = 845683
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.sv-SE.langpack.xpi) = a50b14efaf1c782b536178105c31e9c5afbe762e85daec02cd3df8745240d2f6
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.sv-SE.langpack.xpi) = 873454
-SHA256 (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.tr.langpack.xpi) = 2bd704fe8bd2760cb89f06fcceb377a76c53d0d1186af3fe83aba27c94d1e9ef
-SIZE (xpi/seamonkey-i18n-2.9.1/seamonkey-2.9.1.tr.langpack.xpi) = 812532
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.ca.langpack.xpi) = d5b4dc442fe46b0c487979640956699f56f4de0b9d9243f9343fb6a17d4727d3
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.ca.langpack.xpi) = 819469
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.cs.langpack.xpi) = 3524d6b0d951b1dfd6bd3ba055319e613f92e6170d12b61e41cb4e9be4b762c7
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.cs.langpack.xpi) = 824922
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.de.langpack.xpi) = 6c1c191801c6d916d6323dcb183e638f63851640ecf05dac83a5ee587677de81
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.de.langpack.xpi) = 865755
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.en-GB.langpack.xpi) = bcd1efb2d86aae06843640aae0d4cd75512bb312e03dccbae7dc33d0e8c4cc25
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.en-GB.langpack.xpi) = 795528
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.en-US.langpack.xpi) = fc00a92a0f854d834b07610f6e9c05696e077dfc689b2e27f333d484e01432e5
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.en-US.langpack.xpi) = 795006
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.es-AR.langpack.xpi) = d3a87e633096c022dfa93e21c180fc67131a66c4e626bae141a8e11e303dfdb0
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.es-AR.langpack.xpi) = 865195
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.es-ES.langpack.xpi) = c82e644a7d22a2f776ba2a4585e2267f9d73239944561335f96913d1a815b73c
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.es-ES.langpack.xpi) = 795253
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.fi.langpack.xpi) = 5b1d4d11460a0141c78ab2238c3218ec165d3daf826a1b267b26091638acd3a6
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.fi.langpack.xpi) = 815315
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.fr.langpack.xpi) = a2d11a653cd9da1f7be2fb1a997881793a9ae480b39c362f726aae5c9ad2994c
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.fr.langpack.xpi) = 820894
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.hu.langpack.xpi) = 9c97f1e9141408e9ac80f8733b7495c0fac41c6c59e5e8597a8897e4b334c74e
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.hu.langpack.xpi) = 840751
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.it.langpack.xpi) = 751ce8d2d844b8839ee9fc5fccf501f48c2bb0e82814de584ea132fb57f67f14
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.it.langpack.xpi) = 743800
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.ja-JP-mac.langpack.xpi) = deaf96d00898dec4744fac0882d8f57f1a783e1cee27473028e51e354ccbe73c
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.ja-JP-mac.langpack.xpi) = 897029
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.ja.langpack.xpi) = 775d2b967451128eb24bd02a61a4eea4f2a3241fcccb29cc9cb44bbe5831454d
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.ja.langpack.xpi) = 872431
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.lt.langpack.xpi) = 4c6ddd5b4344b76ca0101e7dbfa7ce939cfe0da1f3f69e391198d80153565a87
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.lt.langpack.xpi) = 929356
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.nb-NO.langpack.xpi) = 6ede9126b0c5ac08c707109bc88c90e89db787d4236da2a6dabf49cb8858c124
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.nb-NO.langpack.xpi) = 814347
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.nl.langpack.xpi) = ed5e3c4c41b7d073fb8f48eaba6dc6999026e4957cd0e2ecfb60654c60ec1bf2
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.nl.langpack.xpi) = 811697
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.pl.langpack.xpi) = 09e38a6f253ed705b45f7606141b6e443775bc107173dc5c5a31bcdbfde3abcb
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.pl.langpack.xpi) = 835858
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.pt-PT.langpack.xpi) = 772000b298e05550e4af99a1bf9e2b8ba892f6f2282654c4b7c45fc45e41b462
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.pt-PT.langpack.xpi) = 850701
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.ru.langpack.xpi) = 9fa36ae44ca1432b1a0ed62c3a7da0ad0d5fe1322bdd780ecddc730462ad16e0
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.ru.langpack.xpi) = 897998
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.sk.langpack.xpi) = c91cd45bc3c6062fcef464d0c2fe90a0012e8d240a3e50bac3f66707ef5d73f3
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.sk.langpack.xpi) = 849951
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.sv-SE.langpack.xpi) = 72621e1821e00b66fab0083f83dc41573f66df31e499bd1129f316f8d37ca75a
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.sv-SE.langpack.xpi) = 876916
+SHA256 (xpi/seamonkey-i18n-2.11/seamonkey-2.11.tr.langpack.xpi) = 81f13cf11cb9549f44ba006f4beb7b833771affd2f4272d2304fd837ced860d3
+SIZE (xpi/seamonkey-i18n-2.11/seamonkey-2.11.tr.langpack.xpi) = 817050
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;
-+}