summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpho <pho>2014-05-30 03:03:36 +0000
committerpho <pho>2014-05-30 03:03:36 +0000
commitde76644b784b5535ee19977bd862eeb15cc140ff (patch)
tree8ded93d0cc161c51422e91505191addadd2d0019
parent731bcfeca20b0491530ef7b25beadf219963d806 (diff)
downloadpkgsrc-de76644b784b5535ee19977bd862eeb15cc140ff.tar.gz
PR pkg/48840: Don't assume cocoa toolkit just because OS_ARCH is Darwin
-rw-r--r--www/firefox/distinfo36
-rw-r--r--www/firefox/mozilla-common.mk15
-rw-r--r--www/firefox/patches/patch-browser_app_nsBrowserApp.cpp40
-rw-r--r--www/firefox/patches/patch-content_canvas_src_WebGLContext.h24
-rw-r--r--www/firefox/patches/patch-dom_events_nsEventStateManager.cpp51
-rw-r--r--www/firefox/patches/patch-dom_plugins_ipc_PluginProcessChild.cpp16
-rw-r--r--www/firefox/patches/patch-gfx_2d_Factory.cpp56
-rw-r--r--www/firefox/patches/patch-gfx_gl_GLScreenBuffer.cpp24
-rw-r--r--www/firefox/patches/patch-gfx_gl_GLTextureImage.cpp33
-rw-r--r--www/firefox/patches/patch-gfx_layers_basic_TextureHostBasic.cpp15
-rw-r--r--www/firefox/patches/patch-gfx_thebes_gfxPlatform.cpp51
-rw-r--r--www/firefox/patches/patch-intl_locale_src_nsLocaleConstructors.h20
-rw-r--r--www/firefox/patches/patch-intl_locale_src_nsLocaleService.cpp60
-rw-r--r--www/firefox/patches/patch-ipc_chromium_src_base_file__util__posix.cc24
-rw-r--r--www/firefox/patches/patch-ipc_chromium_src_base_message__loop.cc42
-rw-r--r--www/firefox/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc78
-rw-r--r--www/firefox/patches/patch-ipc_chromium_src_base_scoped__nsautorelease__pool.h45
-rw-r--r--www/firefox/patches/patch-ipc_glue_GeckoChildProcessHost.cpp42
-rw-r--r--www/firefox/patches/patch-ipc_glue_ScopedXREEmbed.cpp16
-rw-r--r--www/firefox/patches/patch-ipc_glue_StringUtil.cpp24
-rw-r--r--www/firefox/patches/patch-js_xpconnect_shell_xpcshell.cpp33
-rw-r--r--www/firefox/patches/patch-media_libcubeb_src_moz.build15
-rw-r--r--www/firefox/patches/patch-netwerk_build_nsNetModule.cpp24
-rw-r--r--www/firefox/patches/patch-profile_dirserviceprovider_src_nsProfileLock.cpp33
-rw-r--r--www/firefox/patches/patch-toolkit_components_jsdownloads_src_DownloadPlatform.cpp33
-rw-r--r--www/firefox/patches/patch-toolkit_library_Makefile.in20
-rw-r--r--www/firefox/patches/patch-toolkit_library_nsStaticXULComponents.cpp24
-rw-r--r--www/firefox/patches/patch-uriloader_exthandler_nsLocalHandlerApp.h15
-rw-r--r--www/firefox/patches/patch-xpcom_base_nsUUIDGenerator.cpp42
-rw-r--r--www/firefox/patches/patch-xpcom_base_nsUUIDGenerator.h15
-rw-r--r--www/firefox/patches/patch-xpcom_build_BinaryPath.h24
31 files changed, 952 insertions, 38 deletions
diff --git a/www/firefox/distinfo b/www/firefox/distinfo
index 4395ff92981..d8043d66e5d 100644
--- a/www/firefox/distinfo
+++ b/www/firefox/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.150 2014/05/29 17:03:58 pho Exp $
+$NetBSD: distinfo,v 1.151 2014/05/30 03:03:36 pho Exp $
SHA1 (firefox-29.0.1.source.tar.bz2) = 2819ef63403de2bcfff5496bd21a3b8cb5dfce82
RMD160 (firefox-29.0.1.source.tar.bz2) = f728179a12a46824971ca01cf79eb0318e4775c5
@@ -11,7 +11,7 @@ SHA1 (patch-as) = fd8d7ad61f5557693af96bb5fe9439f8cdb347db
SHA1 (patch-bf) = 75c971043e9f693203d6bd670b2c20c4952a7756
SHA1 (patch-bg) = d6c02294765265d9e85cf49c22320d88573c2e25
SHA1 (patch-bi) = 3dd927d93431afe000cd4a45b4d9920e63158a85
-SHA1 (patch-browser_app_nsBrowserApp.cpp) = 93e7fef0f27a755204429e2b436f44b1ba93c5eb
+SHA1 (patch-browser_app_nsBrowserApp.cpp) = 2820b1f2ec97788d49fddc15e4742fa0068c666c
SHA1 (patch-browser_app_profile_firefox.js) = 108efbe1ae65669912d2f76caec546753e1ac8f3
SHA1 (patch-browser_components_build_nsModule.cpp) = df72e03d68ff7edb5e0316600c9812f6677773ad
SHA1 (patch-browser_installer_package-manifest.in) = d5792a3c5dd7498d24ac0426aacf7d0b9a842c67
@@ -31,6 +31,7 @@ SHA1 (patch-config_system-headers) = e6d68f60e24a29fd72c7d40c3001cabd5ea17361
SHA1 (patch-config_system__wrappers_unwind.h) = b3bdac0710179b9c8f8eabd824216d0114504491
SHA1 (patch-content_base_src_Makefile.in) = 44016467828b787343444ba62c12637988e0f903
SHA1 (patch-content_base_src_nsObjectLoadingContent.cpp) = f1daf958a99024c78bcc82598a65b748c507f4e3
+SHA1 (patch-content_canvas_src_WebGLContext.h) = 4705978ef5cc463bbf85e437bba698c2edd5a886
SHA1 (patch-content_media_AudioStream.cpp) = 70021dfd1cc86e8999f144b49a23bfb27dd24157
SHA1 (patch-content_media_AudioStream.h) = 905a0ff67c131fbf50670b5836bff84f1284d0c4
SHA1 (patch-content_media_Makefile.in) = 7aaac3bac94c9463ca324e05ebab4b9858f46fc5
@@ -48,6 +49,7 @@ SHA1 (patch-content_media_test_manifest.js) = 5b98d9eb16f898211fc0e30d821303bf72
SHA1 (patch-content_svg_content_src_SVGComponentTransferFunctionElement.h) = 64aff36cbd72b5d61eb6d7dde6e57b7d77b56a50
SHA1 (patch-content_svg_content_src_nsSVGFilters.cpp) = ed8810687e5f5b60b64c51286daeaf7787c09dda
SHA1 (patch-content_svg_content_src_nsSVGFilters.h) = 37ead5c8f14551d843be8bc09be254175b38b4d7
+SHA1 (patch-dom_events_nsEventStateManager.cpp) = 2c8209d0a6555042afe745cb8939c367f22e847a
SHA1 (patch-dom_indexedDB_IDBEvents.cpp) = 4b3c649fe0119b8b883cd4bcf25a594510096d50
SHA1 (patch-dom_indexedDB_IDBEvents.h) = 7558cd531ae408736e38efa2fdbff218e2d2124f
SHA1 (patch-dom_plugins_base_PluginPRLibrary.cpp) = fd68ac57888cca50b908fc2e156148744174f68c
@@ -70,15 +72,20 @@ SHA1 (patch-dom_plugins_ipc_PluginModuleChild.cpp) = 2f3bac291304f885889cbd5e6aa
SHA1 (patch-dom_plugins_ipc_PluginModuleChild.h) = 0a7f3167e939822013ae6195406657453578453e
SHA1 (patch-dom_plugins_ipc_PluginModuleParent.cpp) = cb9e0690ccd1e746b4a40bb17c0d43bfb762f21c
SHA1 (patch-dom_plugins_ipc_PluginModuleParent.h) = f0e11d0f781222202d1fd86835907e2e428d8c7e
+SHA1 (patch-dom_plugins_ipc_PluginProcessChild.cpp) = 5ab28cc0398b72cb5e1b0586406845495b9f87e4
SHA1 (patch-dom_system_OSFileConstants.cpp) = 3defa673b428415d6b72103b8f1892d5c976d0ef
SHA1 (patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp) = a2a0652d0eac018fda06e729bf5ba786dd8a3866
+SHA1 (patch-gfx_2d_Factory.cpp) = 341e772be3de1f896b92621211363b6c0215523d
SHA1 (patch-gfx__skia__include__core__SkPreConfig.h) = 6f99cf0eb5d4617d529c378707f537bc1e5cb28f
SHA1 (patch-gfx_gl_GLContext.cpp) = 80625c5745722fdf05f9b03d00a43043da59d5e6
SHA1 (patch-gfx_gl_GLContextFeatures.cpp) = 6e70ea9110ffe9e24baf728c03c4e2ac1219dd97
SHA1 (patch-gfx_gl_GLContextProvider.h) = 5e43dda114f49c03f12a9bfaacb24d8ba408646e
+SHA1 (patch-gfx_gl_GLScreenBuffer.cpp) = d4954ab87c256572839369dc11fa338033fb0a53
+SHA1 (patch-gfx_gl_GLTextureImage.cpp) = 6854261f8e051504ac4e8ee3dc99290e57920cb0
SHA1 (patch-gfx_graphite2_src_Bidi.cpp) = 5e80b4a32a47ae44d237fec69ea87bdd612a76ce
SHA1 (patch-gfx_layers_ImageContainer.cpp) = 272cbcc0256b44a4f2c1ffe97c1d8c122fd93250
SHA1 (patch-gfx_layers_basic_BasicImages.cpp) = 2b6fed10689ae4ea19cafa3b5fc8ac710faef529
+SHA1 (patch-gfx_layers_basic_TextureHostBasic.cpp) = 61344026335f793d858b5276da0271a4a4042b00
SHA1 (patch-gfx_layers_client_ClientCanvasLayer.cpp) = 5ea3410eed5e3a81527e138459ee87d058844c6d
SHA1 (patch-gfx_layers_composite_LayerManagerComposite.cpp) = 0ff02f5c4e354e301d0acefcbc8d7623a44cc78b
SHA1 (patch-gfx_layers_opengl_TextureHostOGL.cpp) = 32ad7dcf580cb7030511ce0dabb770da53d4d259
@@ -89,38 +96,47 @@ SHA1 (patch-gfx_skia_src_utils_SkThreadUtils__pthread__linux.cpp) = 19342e66383e
SHA1 (patch-gfx_src_nsDeviceContext.cpp) = 9f6102ef7b66508f5ca8b2754331e59c7ccf79ef
SHA1 (patch-gfx_thebes_Makefile.in) = 16b63bc42870aa8c042416c6e04b3513981ca6f0
SHA1 (patch-gfx_thebes_gfxFont.cpp) = 7888a16944c4b6371a8bdeb3fc70ed395de8e1ea
+SHA1 (patch-gfx_thebes_gfxPlatform.cpp) = b3baf73460dcede6497e08cc3082bf646f17ba01
SHA1 (patch-image_decoders_nsJPEGDecoder.cpp) = e5df11499b1ec14e1d4c9a1408c0611d1c4e0574
SHA1 (patch-image_src_imgFrame.cpp) = 242d2373234a36f37fb37a14bb54311f11643328
SHA1 (patch-image_src_imgFrame.h) = 9082d396e731f64b13ec6c49ec44b3a4133cac36
SHA1 (patch-intl_hyphenation_src_hnjalloc.h) = 7fcc7b0fcf5a33486214197e925fbc8e6e22e2ee
+SHA1 (patch-intl_locale_src_nsLocaleConstructors.h) = 46db67dbfc07872279dab5ddb1bc3b524f50ef26
+SHA1 (patch-intl_locale_src_nsLocaleService.cpp) = 0d8866591382a98cb6c1ea84e1b0b27448ab0aae
SHA1 (patch-intl_unicharutil_util_Makefile.in) = c8f37cc420ba26b63c66fbbf69b13a8b4fea43fc
SHA1 (patch-ipc_chromium_Makefile.in) = 3a1f5b218217fc8e5e9a07195054618071c38059
SHA1 (patch-ipc_chromium_moz.build) = de12255865e45cfdf0f7dc57ce101be75ac8ad54
SHA1 (patch-ipc_chromium_src_base_base__paths.h) = 7bc83577a9678542db4dff7dda19d751ff6d78c1
SHA1 (patch-ipc_chromium_src_base_debug__util__posix.cc) = 677f0b5ccdcde7a8551f2d07d2a472361a5da03f
SHA1 (patch-ipc_chromium_src_base_file__util.h) = 9d6d074b1692c6b4e722bfac8d67c66040a6fa76
-SHA1 (patch-ipc_chromium_src_base_file__util__posix.cc) = 43645104f62ecd6e1aa4b17078d6719e5eda8896
+SHA1 (patch-ipc_chromium_src_base_file__util__posix.cc) = 18096b89ac3f239a0eb7c1d9c5080c1ac2c73e1b
+SHA1 (patch-ipc_chromium_src_base_message__loop.cc) = 8be8d93843e28a828b5f221ab1b59929ee5740ba
SHA1 (patch-ipc_chromium_src_base_message__pump__libevent.cc) = 12f3e063cf3fef23f0e3e0fdba5d5a4c1fc32af3
SHA1 (patch-ipc_chromium_src_base_platform__thread.h) = e6d7ac39a8b2a1b232638f7671e8530acfed0b97
-SHA1 (patch-ipc_chromium_src_base_platform__thread__posix.cc) = e386bfd56ae6f77ef1aaadd0fa81af147a09f75d
+SHA1 (patch-ipc_chromium_src_base_platform__thread__posix.cc) = ff1371ffb84abf2d2adcf25e66502943992d5109
SHA1 (patch-ipc_chromium_src_base_process__util.h) = 31b592d69d3c4f63642dae3c81c771ee3dfa8502
SHA1 (patch-ipc_chromium_src_base_process__util__bsd.cc) = 4f05fce050796f86b5aedf910eb709c9969fa982
SHA1 (patch-ipc_chromium_src_base_process__util__posix.cc) = 6b2611cc902f17e726aabcf4fb5fff2c71852408
+SHA1 (patch-ipc_chromium_src_base_scoped__nsautorelease__pool.h) = 8c61a35e99e7f54e4b2bf5931c59eb2b7a04127a
SHA1 (patch-ipc_chromium_src_base_sys__info__posix.cc) = 27890c56194e483fc0758ed767ca5795cc5112eb
SHA1 (patch-ipc_chromium_src_base_time__posix.cc) = 337a0b4a5d51d68c7699b79c7591b953ea23ca67
SHA1 (patch-ipc_chromium_src_build_build__config.h) = af5a10df7d8fe9715f0e43cd6be14f8f20c53517
SHA1 (patch-ipc_chromium_src_chrome_common_transport__dib.h) = 7af18973c005d7b144a225bacf41833e059cb400
-SHA1 (patch-ipc_glue_GeckoChildProcessHost.cpp) = 0fccd3224433017c7214b2615aa2c6c2d8ed658f
+SHA1 (patch-ipc_glue_GeckoChildProcessHost.cpp) = 50373a1c428bd1ca38e80ce9c2e48fe6562a0924
+SHA1 (patch-ipc_glue_ScopedXREEmbed.cpp) = 97c39f25527dac4c22b38ce446ca2cd4cef08fd0
+SHA1 (patch-ipc_glue_StringUtil.cpp) = f238adebb5bdf57f7109a781c6f3fb195763f3c0
SHA1 (patch-js__src__vm__SPSProfiler.cpp) = 989ba25e4c5308d21d07baa802decce13609a475
SHA1 (patch-js_src_Makefile.in) = f6ce5f02a9292e3e524424c5e810850232efe524
SHA1 (patch-js_src_ctypes_CTypes.h) = 768a084239f92a424c1c7dc9eaaf9be9456ca9f0
SHA1 (patch-js_src_frontend_ParseMaps.cpp) = c00117d79b78904bc50a1d664a8fc0e4e339bfbc
SHA1 (patch-js_src_gc_Memory.cpp) = 3db31553ec6f7b1fac4fd4ce11b77be1ea4208b8
SHA1 (patch-js_src_jsmath.cpp) = 7d4993ae91e9b5e6820358165603819aefb586f9
+SHA1 (patch-js_xpconnect_shell_xpcshell.cpp) = 3ff9a9b622338171a0addff5f19d09fae076743d
SHA1 (patch-layout_generic_nsObjectFrame.cpp) = 5ea44d7cf6eac92e5e7e3fc8fc063be89910f6d6
SHA1 (patch-mb) = b661abce429a88554fca6c930b4dbf71ba6bb5cb
SHA1 (patch-media_libcubeb_src_Makefile.in) = 671fff09dedc1aa7aea251b4856c12d78b19b23b
SHA1 (patch-media_libcubeb_src_cubeb__alsa.c) = 5ef0de0ac875334e959ff0d4bfa43a2e5ab087b9
+SHA1 (patch-media_libcubeb_src_moz.build) = 822833bc0fd60cd4936550dc43af3294ebac40cd
SHA1 (patch-media_libpng_pngpriv.h) = c9cefd1b5dd85fbd0c875c3f9bc108975398fe3a
SHA1 (patch-media_libsoundtouch_src_cpu__detect__x86.cpp) = db61737afa7773e8cbd82976de3a02c917174696
SHA1 (patch-media_libtheora_Makefile.in) = 80ac9cb20760fe4d94047f7cb1c6a16bbdd6b505
@@ -140,6 +156,7 @@ SHA1 (patch-memory_jemalloc_Makefile.in) = 772e996c8da254f952d0f3a0c9325a177c838
SHA1 (patch-memory_mozalloc_mozalloc__abort.cpp) = 9d9036ddd28c7b8ce37860e0120df2997a3a0c59
SHA1 (patch-mfbt_Poison.cpp) = b582943c02f57835451c9eecd004c9912d42ce84
SHA1 (patch-modules_libjar_nsZipArchive.cpp) = 6aff0f8ed42575d8ca36a524e12e9a1f7351004a
+SHA1 (patch-netwerk_build_nsNetModule.cpp) = ea680300cea2eee2cdbb516a371afafdbf4935d5
SHA1 (patch-netwerk_dns_Makefile.in) = b6bd9814d909dd6f7cff10dbeac3bedd79c2508e
SHA1 (patch-netwerk_protocol_http_nsHttpHandler.cpp) = 517cf1ac41a06ce1d02c7e1a6c5e74a983307dd6
SHA1 (patch-netwerk_sctp_src_netinet6_sctp6__usrreq.c) = 31d49db31b1e130f1b455f883e5b7c606d438771
@@ -152,18 +169,22 @@ SHA1 (patch-netwerk_wifi_moz.build) = 8c88e5bab2a5e164e97ce568686bd280d4b90bec
SHA1 (patch-netwerk_wifi_nsWifiScannerFreeBSD.cpp) = c5711adc111dc8413a7234e7d5814a0af9ceeecc
SHA1 (patch-pb) = 97c9b2e4cefd524dc6ba825f71c3da2a761aa1f4
SHA1 (patch-pc) = 8b2baa88f0983a2fef4f801cf6b1ae425f6c813a
+SHA1 (patch-profile_dirserviceprovider_src_nsProfileLock.cpp) = d5d9f5f840a144dadbd2cb95e6e4c18b469290b0
SHA1 (patch-rc) = 2733724442a2cb49c5091146fd7e6001af686121
SHA1 (patch-security_manager_ssl_src_nsNSSComponent.cpp) = c4c96b7d3cb0c5dbcfe3820fd52421eec2592452
SHA1 (patch-toolkit_components_downloads_nsDownloadManager.cpp) = 551ff33446cc1b99a4f3c1bd3a5db257bd10b68a
+SHA1 (patch-toolkit_components_jsdownloads_src_DownloadPlatform.cpp) = 2c1d15a5ddbe0815e49ce39bd4e91fde35ed0a5d
SHA1 (patch-toolkit_components_osfile_modules_osfile__unix__allthreads.jsm) = 12f5722de5d59f06236cad3d188c9503387805c1
SHA1 (patch-toolkit_components_osfile_modules_osfile__unix__back.jsm) = 274b06bd4bfea5b6d7d67c0d39a484d179ed560c
-SHA1 (patch-toolkit_library_Makefile.in) = 481172e5c62b862633708106a1708a941c9ffb9d
+SHA1 (patch-toolkit_library_Makefile.in) = fbbd166267a23d840babb0896c24a57e62708c7f
+SHA1 (patch-toolkit_library_nsStaticXULComponents.cpp) = 135d4f2013d998d1f03d2c6af21a86a53c59ede7
SHA1 (patch-toolkit_profile_nsToolkitProfileService.cpp) = 142cff366da213d1283ce32ae371915f3cf76f88
SHA1 (patch-toolkit_toolkit.mozbuild) = 0993d50cc02c2b421e6de087dfb0a9cb30562c6b
SHA1 (patch-toolkit_xre_nsAppRunner.cpp) = cfa9c6624139a2ee4fb0c720b987c2888bb8a078
SHA1 (patch-toolkit_xre_nsEmbedFunctions.cpp) = 524b391a0bb1c9775a187b50570a980ca9e7f7f7
SHA1 (patch-toolkit_xre_nsXREDirProvider.cpp) = 74786b02b50cff00544a1005c3273243ef367939
SHA1 (patch-uriloader_exthandler_nsExternalHelperAppService.cpp) = 65f882f3eda21cc78e7ea0ad03bef9ab98b7056e
+SHA1 (patch-uriloader_exthandler_nsLocalHandlerApp.h) = d1c179732cca18c56fe469ef6ed8ef364d0a174d
SHA1 (patch-webapprt_moz.build) = cb3d92bc8ada1e2b49877cf7bbe6fbc32278230a
SHA1 (patch-widget_shared_NativeKeyToDOMKeyName.h) = 7b05b2521a41ebb85fde88d1125171983cd22345
SHA1 (patch-widget_xpwidgets_nsBaseWidget.cpp) = f55df2e11aabf60d8c99700bc97f2c22b3195c48
@@ -175,7 +196,10 @@ SHA1 (patch-xg) = b80e660e85b06e4f71146bd41bd4bc0d2e3b6488
SHA1 (patch-xl) = 9555b86c72b2e144e341d6af1dbfbc07cc8c94db
SHA1 (patch-xm) = 81e02e410c00175cbb98c646dda90c7adf199657
SHA1 (patch-xpcom_base_nsStackWalk.cpp) = b4a21504a6884ba08005c34ee7d7cc9dfeeaf9b4
+SHA1 (patch-xpcom_base_nsUUIDGenerator.cpp) = e562fc0fc654ebbcc5e72fd60e87a1a9b03db81c
+SHA1 (patch-xpcom_base_nsUUIDGenerator.h) = bcc5362df162b9dcba972408df195d96c94d473a
SHA1 (patch-xpcom_base_nscore.h) = b1a190d8ef4478b882daeceda51584f947555a28
+SHA1 (patch-xpcom_build_BinaryPath.h) = 04b2992074af279aa47f188ff467100bf968224d
SHA1 (patch-xpcom_ds_TimeStamp.h) = a1fb060f91720eb330f102b28d9373bbdbe96e30
SHA1 (patch-xpcom_io_nsLocalFileUnix.cpp) = 3de3345eb98ffe78628d5bac672ce4ab5806270e
SHA1 (patch-xpcom_reflect_xptcall_src_md_unix_moz.build) = 954b60998c5621b896fae372fe067df693574ea4
diff --git a/www/firefox/mozilla-common.mk b/www/firefox/mozilla-common.mk
index 4ba300fcc53..ea7c64d2b06 100644
--- a/www/firefox/mozilla-common.mk
+++ b/www/firefox/mozilla-common.mk
@@ -1,4 +1,4 @@
-# $NetBSD: mozilla-common.mk,v 1.35 2014/05/28 06:25:58 pho Exp $
+# $NetBSD: mozilla-common.mk,v 1.36 2014/05/30 03:03:36 pho Exp $
#
# common Makefile fragment for mozilla packages based on gecko 2.0.
#
@@ -90,19 +90,6 @@ CONFIGURE_ARGS+= --disable-icf
CONFIGURE_ARGS+= --disable-necko-wifi
CONFIGURE_ARGS+= --disable-updater
-# Set the MacOS X version requirement appropriately.
-# Otherwise ${WRKSRC}/media/libcubeb/src/cubeb_audiounit.c can not be
-# built on MacOS X < 10.6
-.if ${OPSYS} == "Darwin"
-. if !empty(OS_VERSION:M[0-7].*)
-CONFIGURE_ARGS+= --enable-macos-target=10.3
-. elif !empty(OS_VERSION:M8.*)
-CONFIGURE_ARGS+= --enable-macos-target=10.4
-. elif !empty(OS_VERSION:M9.*)
-CONFIGURE_ARGS+= --enable-macos-target=10.5
-. endif
-.endif
-
SUBST_CLASSES+= fix-paths
SUBST_STAGE.fix-paths= pre-configure
SUBST_MESSAGE.fix-paths= Fixing absolute paths.
diff --git a/www/firefox/patches/patch-browser_app_nsBrowserApp.cpp b/www/firefox/patches/patch-browser_app_nsBrowserApp.cpp
index 3f6672bff6c..20e19f6bd84 100644
--- a/www/firefox/patches/patch-browser_app_nsBrowserApp.cpp
+++ b/www/firefox/patches/patch-browser_app_nsBrowserApp.cpp
@@ -1,8 +1,33 @@
-$NetBSD: patch-browser_app_nsBrowserApp.cpp,v 1.3 2014/04/30 15:07:18 ryoon Exp $
+$NetBSD: patch-browser_app_nsBrowserApp.cpp,v 1.4 2014/05/30 03:03:36 pho Exp $
---- browser/app/nsBrowserApp.cpp.orig 2014-04-18 02:02:30.000000000 +0000
+* Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- browser/app/nsBrowserApp.cpp.orig 2014-05-06 22:55:09.000000000 +0000
+++ browser/app/nsBrowserApp.cpp
-@@ -586,6 +586,7 @@ int main(int argc, char* argv[])
+@@ -20,6 +20,8 @@
+
+ #ifdef XP_MACOSX
+ #include <mach/mach_time.h>
++#endif
++#ifdef MOZ_WIDGET_COCOA
+ #include "MacQuirks.h"
+ #endif
+
+@@ -499,7 +501,7 @@ InitXPCOMGlue(const char *argv0, nsIFile
+ lastSlash += sizeof(XPCOM_PATH) - sizeof(XPCOM_DLL);
+
+ if (!FileExists(exePath)) {
+-#if defined(LIBXUL_SDK) && defined(XP_MACOSX)
++#if defined(LIBXUL_SDK) && defined(MOZ_WIDGET_COCOA)
+ // Check for <bundle>/Contents/Frameworks/XUL.framework/libxpcom.dylib
+ bool greFound = false;
+ CFBundleRef appBundle = CFBundleGetMainBundle();
+@@ -582,10 +584,11 @@ int main(int argc, char* argv[])
+ #endif
+ uint64_t start = TimeStamp_Now();
+
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
TriggerQuirks();
#endif
@@ -10,3 +35,12 @@ $NetBSD: patch-browser_app_nsBrowserApp.cpp,v 1.3 2014/04/30 15:07:18 ryoon Exp
int gotCounters;
#if defined(XP_UNIX)
struct rusage initialRUsage;
+@@ -644,7 +647,7 @@ int main(int argc, char* argv[])
+
+ NS_LogTerm();
+
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ // Allow writes again. While we would like to catch writes from static
+ // destructors to allow early exits to use _exit, we know that there is
+ // at least one such write that we don't control (see bug 826029). For
diff --git a/www/firefox/patches/patch-content_canvas_src_WebGLContext.h b/www/firefox/patches/patch-content_canvas_src_WebGLContext.h
new file mode 100644
index 00000000000..bc4aceceb8f
--- /dev/null
+++ b/www/firefox/patches/patch-content_canvas_src_WebGLContext.h
@@ -0,0 +1,24 @@
+$NetBSD: patch-content_canvas_src_WebGLContext.h,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- content/canvas/src/WebGLContext.h.orig 2014-05-06 22:55:17.000000000 +0000
++++ content/canvas/src/WebGLContext.h
+@@ -30,7 +30,7 @@
+ #include "mozilla/Scoped.h"
+ #include "mozilla/gfx/2D.h"
+
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ #include "ForceDiscreteGPUHelperCGL.h"
+ #endif
+
+@@ -1173,7 +1173,7 @@ protected:
+
+ void ReattachTextureToAnyFramebufferToWorkAroundBugs(WebGLTexture *tex, GLint level);
+
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ // see bug 713305. This RAII helper guarantees that we're on the discrete GPU, during its lifetime
+ // Debouncing note: we don't want to switch GPUs too frequently, so try to not create and destroy
+ // these objects at high frequency. Having WebGLContext's hold one such object seems fine,
diff --git a/www/firefox/patches/patch-dom_events_nsEventStateManager.cpp b/www/firefox/patches/patch-dom_events_nsEventStateManager.cpp
new file mode 100644
index 00000000000..c6092ebcbd1
--- /dev/null
+++ b/www/firefox/patches/patch-dom_events_nsEventStateManager.cpp
@@ -0,0 +1,51 @@
+$NetBSD: patch-dom_events_nsEventStateManager.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- dom/events/nsEventStateManager.cpp.orig 2014-05-06 22:55:23.000000000 +0000
++++ dom/events/nsEventStateManager.cpp
+@@ -85,7 +85,7 @@
+ #include "GeckoProfiler.h"
+ #include "Units.h"
+
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ #import <ApplicationServices/ApplicationServices.h>
+ #endif
+
+@@ -1865,7 +1865,7 @@ nsEventStateManager::FireContextClick()
+ return;
+ }
+
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ // Hack to ensure that we don't show a context menu when the user
+ // let go of the mouse after a long cpu-hogging operation prevented
+ // us from handling any OS events. See bug 117589.
+@@ -3137,7 +3137,7 @@ nsEventStateManager::DecideGestureEvent(
+ aEvent->panDirection = panDirection;
+ }
+
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ static bool
+ NodeAllowsClickThrough(nsINode* aNode)
+ {
+@@ -3314,7 +3314,7 @@ nsEventStateManager::PostHandleEvent(nsP
+ // focused frame
+ EnsureDocument(mPresContext);
+ if (mDocument) {
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ if (!activeContent || !activeContent->IsXUL())
+ #endif
+ fm->ClearFocus(mDocument->GetWindow());
+@@ -3689,7 +3689,7 @@ nsEventStateManager::PostHandleEvent(nsP
+ }
+ break;
+
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ case NS_MOUSE_ACTIVATE:
+ if (mCurrentTarget) {
+ nsCOMPtr<nsIContent> targetContent;
diff --git a/www/firefox/patches/patch-dom_plugins_ipc_PluginProcessChild.cpp b/www/firefox/patches/patch-dom_plugins_ipc_PluginProcessChild.cpp
new file mode 100644
index 00000000000..bce0ea7d01c
--- /dev/null
+++ b/www/firefox/patches/patch-dom_plugins_ipc_PluginProcessChild.cpp
@@ -0,0 +1,16 @@
+$NetBSD: patch-dom_plugins_ipc_PluginProcessChild.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Just because OS_ARCH is Darwin does not mean
+libplugin_child_interpose.dylib is used.
+
+--- dom/plugins/ipc/PluginProcessChild.cpp.orig 2014-05-06 22:55:25.000000000 +0000
++++ dom/plugins/ipc/PluginProcessChild.cpp
+@@ -42,7 +42,7 @@ namespace plugins {
+ bool
+ PluginProcessChild::Init()
+ {
+-#if defined(XP_MACOSX)
++#if defined(MOZ_WIDGET_COCOA)
+ // Remove the trigger for "dyld interposing" that we added in
+ // GeckoChildProcessHost::PerformAsyncLaunchInternal(), in the host
+ // process just before we were launched. Dyld interposing will still
diff --git a/www/firefox/patches/patch-gfx_2d_Factory.cpp b/www/firefox/patches/patch-gfx_2d_Factory.cpp
new file mode 100644
index 00000000000..40eda7b89e8
--- /dev/null
+++ b/www/firefox/patches/patch-gfx_2d_Factory.cpp
@@ -0,0 +1,56 @@
+$NetBSD: patch-gfx_2d_Factory.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- gfx/2d/Factory.cpp.orig 2014-05-06 22:55:32.000000000 +0000
++++ gfx/2d/Factory.cpp
+@@ -23,12 +23,8 @@
+ #include "ScaledFontWin.h"
+ #endif
+
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ #include "ScaledFontMac.h"
+-#endif
+-
+-
+-#ifdef XP_MACOSX
+ #include "DrawTargetCG.h"
+ #endif
+
+@@ -258,7 +254,7 @@ Factory::CreateDrawTarget(BackendType aB
+ break;
+ }
+ #endif
+-#elif defined XP_MACOSX
++#elif defined MOZ_WIDGET_COCOA
+ case BackendType::COREGRAPHICS:
+ case BackendType::COREGRAPHICS_ACCELERATED:
+ {
+@@ -340,7 +336,7 @@ Factory::CreateDrawTargetForData(Backend
+ retVal = newTarget;
+ }
+ #endif
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ case BackendType::COREGRAPHICS:
+ {
+ RefPtr<DrawTargetCG> newTarget = new DrawTargetCG();
+@@ -393,7 +389,7 @@ Factory::CreateScaledFontForNativeFont(c
+ }
+ #endif
+ #endif
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ case NativeFontType::MAC_FONT_FACE:
+ {
+ return new ScaledFontMac(static_cast<CGFontRef>(aNativeFont.mFont), aSize);
+@@ -656,7 +652,7 @@ Factory::CreateSourceSurfaceForCairoSurf
+ return retVal;
+ }
+
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ TemporaryRef<DrawTarget>
+ Factory::CreateDrawTargetForCairoCGContext(CGContextRef cg, const IntSize& aSize)
+ {
diff --git a/www/firefox/patches/patch-gfx_gl_GLScreenBuffer.cpp b/www/firefox/patches/patch-gfx_gl_GLScreenBuffer.cpp
new file mode 100644
index 00000000000..0eebe65e98a
--- /dev/null
+++ b/www/firefox/patches/patch-gfx_gl_GLScreenBuffer.cpp
@@ -0,0 +1,24 @@
+$NetBSD: patch-gfx_gl_GLScreenBuffer.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- gfx/gl/GLScreenBuffer.cpp.orig 2014-05-06 22:55:33.000000000 +0000
++++ gfx/gl/GLScreenBuffer.cpp
+@@ -16,7 +16,7 @@
+ #include "SharedSurfaceGralloc.h"
+ #include "nsXULAppAPI.h"
+ #endif
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ #include "SharedSurfaceIO.h"
+ #endif
+ #include "ScopedGLHelpers.h"
+@@ -47,7 +47,7 @@ GLScreenBuffer::Create(GLContext* gl,
+ factory = new SurfaceFactory_Gralloc(gl, caps);
+ }
+ #endif
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ /* On OSX, we want an IOSurface factory, and we want one right at the start */
+ if (!factory)
+ {
diff --git a/www/firefox/patches/patch-gfx_gl_GLTextureImage.cpp b/www/firefox/patches/patch-gfx_gl_GLTextureImage.cpp
new file mode 100644
index 00000000000..b8e5fe93672
--- /dev/null
+++ b/www/firefox/patches/patch-gfx_gl_GLTextureImage.cpp
@@ -0,0 +1,33 @@
+$NetBSD: patch-gfx_gl_GLTextureImage.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- gfx/gl/GLTextureImage.cpp.orig 2014-05-06 22:55:33.000000000 +0000
++++ gfx/gl/GLTextureImage.cpp
+@@ -13,7 +13,7 @@
+ #include "GLUploadHelpers.h"
+
+ #include "TextureImageEGL.h"
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ #include "TextureImageCGL.h"
+ #endif
+
+@@ -29,7 +29,7 @@ CreateTextureImage(GLContext* gl,
+ TextureImage::ImageFormat aImageFormat)
+ {
+ switch (gl->GetContextType()) {
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ case GLContextType::CGL:
+ return CreateTextureImageCGL(gl, aSize, aContentType, aWrapMode, aFlags, aImageFormat);
+ #endif
+@@ -49,7 +49,7 @@ TileGenFunc(GLContext* gl,
+ TextureImage::ImageFormat aImageFormat)
+ {
+ switch (gl->GetContextType()) {
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ case GLContextType::CGL:
+ return TileGenFuncCGL(gl, aSize, aContentType, aFlags, aImageFormat);
+ #endif
diff --git a/www/firefox/patches/patch-gfx_layers_basic_TextureHostBasic.cpp b/www/firefox/patches/patch-gfx_layers_basic_TextureHostBasic.cpp
new file mode 100644
index 00000000000..9ca103ed6b2
--- /dev/null
+++ b/www/firefox/patches/patch-gfx_layers_basic_TextureHostBasic.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-gfx_layers_basic_TextureHostBasic.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- gfx/layers/basic/TextureHostBasic.cpp.orig 2014-05-06 22:55:33.000000000 +0000
++++ gfx/layers/basic/TextureHostBasic.cpp
+@@ -17,7 +17,7 @@ CreateTextureHostBasic(const SurfaceDesc
+ ISurfaceAllocator* aDeallocator,
+ TextureFlags aFlags)
+ {
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ if (aDesc.type() == SurfaceDescriptor::TSurfaceDescriptorMacIOSurface) {
+ const SurfaceDescriptorMacIOSurface& desc =
+ aDesc.get_SurfaceDescriptorMacIOSurface();
diff --git a/www/firefox/patches/patch-gfx_thebes_gfxPlatform.cpp b/www/firefox/patches/patch-gfx_thebes_gfxPlatform.cpp
new file mode 100644
index 00000000000..cef9774b9f8
--- /dev/null
+++ b/www/firefox/patches/patch-gfx_thebes_gfxPlatform.cpp
@@ -0,0 +1,51 @@
+$NetBSD: patch-gfx_thebes_gfxPlatform.cpp,v 1.3 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- gfx/thebes/gfxPlatform.cpp.orig 2014-05-06 22:55:35.000000000 +0000
++++ gfx/thebes/gfxPlatform.cpp
+@@ -30,7 +30,7 @@
+ #if defined(XP_WIN)
+ #include "gfxWindowsPlatform.h"
+ #include "gfxD2DSurface.h"
+-#elif defined(XP_MACOSX)
++#elif defined(MOZ_WIDGET_COCOA)
+ #include "gfxPlatformMac.h"
+ #include "gfxQuartzSurface.h"
+ #elif defined(MOZ_WIDGET_GTK)
+@@ -398,7 +398,7 @@ gfxPlatform::Init()
+
+ #if defined(XP_WIN)
+ gPlatform = new gfxWindowsPlatform;
+-#elif defined(XP_MACOSX)
++#elif defined(MOZ_WIDGET_COCOA)
+ gPlatform = new gfxPlatformMac;
+ #elif defined(MOZ_WIDGET_GTK)
+ gPlatform = new gfxPlatformGtk;
+@@ -432,7 +432,7 @@ gfxPlatform::Init()
+
+ nsresult rv;
+
+-#if defined(XP_MACOSX) || defined(XP_WIN) || defined(ANDROID) // temporary, until this is implemented on others
++#if defined(MOZ_WIDGET_COCOA) || defined(XP_WIN) || defined(ANDROID) // temporary, until this is implemented on others
+ rv = gfxPlatformFontList::Init();
+ if (NS_FAILED(rv)) {
+ NS_RUNTIMEABORT("Could not initialize gfxPlatformFontList");
+@@ -518,7 +518,7 @@ gfxPlatform::Shutdown()
+ gfxFontGroup::Shutdown();
+ gfxGradientCache::Shutdown();
+ gfxGraphiteShaper::Shutdown();
+-#if defined(XP_MACOSX) || defined(XP_WIN) // temporary, until this is implemented on others
++#if defined(MOZ_WIDGET_COCOA) || defined(XP_WIN) // temporary, until this is implemented on others
+ gfxPlatformFontList::Shutdown();
+ #endif
+
+@@ -664,7 +664,7 @@ gfxPlatform::CreateDrawTargetForSurface(
+ RefPtr<DrawTarget>
+ gfxPlatform::CreateDrawTargetForUpdateSurface(gfxASurface *aSurface, const IntSize& aSize)
+ {
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ // this is a bit of a hack that assumes that the buffer associated with the CGContext
+ // will live around long enough that nothing bad will happen.
+ if (aSurface->GetType() == gfxSurfaceType::Quartz) {
diff --git a/www/firefox/patches/patch-intl_locale_src_nsLocaleConstructors.h b/www/firefox/patches/patch-intl_locale_src_nsLocaleConstructors.h
new file mode 100644
index 00000000000..e72e1cb1cbb
--- /dev/null
+++ b/www/firefox/patches/patch-intl_locale_src_nsLocaleConstructors.h
@@ -0,0 +1,20 @@
+$NetBSD: patch-intl_locale_src_nsLocaleConstructors.h,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- intl/locale/src/nsLocaleConstructors.h.orig 2014-05-06 22:55:40.000000000 +0000
++++ intl/locale/src/nsLocaleConstructors.h
+@@ -16,11 +16,11 @@
+ #include "nsPlatformCharset.h"
+ #include "nsLocaleCID.h"
+
+-#if defined(XP_MACOSX)
++#if defined(MOZ_WIDGET_COCOA)
+ #define USE_MAC_LOCALE
+ #endif
+
+-#if defined(XP_UNIX) && !defined(XP_MACOSX)
++#if defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
+ #define USE_UNIX_LOCALE
+ #endif
+
diff --git a/www/firefox/patches/patch-intl_locale_src_nsLocaleService.cpp b/www/firefox/patches/patch-intl_locale_src_nsLocaleService.cpp
new file mode 100644
index 00000000000..ddd06b86c71
--- /dev/null
+++ b/www/firefox/patches/patch-intl_locale_src_nsLocaleService.cpp
@@ -0,0 +1,60 @@
+$NetBSD: patch-intl_locale_src_nsLocaleService.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- intl/locale/src/nsLocaleService.cpp.orig 2014-05-06 22:55:40.000000000 +0000
++++ intl/locale/src/nsLocaleService.cpp
+@@ -26,7 +26,7 @@
+ # include "nsServiceManagerUtils.h"
+ # include "unidef.h"
+ # include "nsIOS2Locale.h"
+-#elif defined(XP_MACOSX)
++#elif defined(MOZ_WIDGET_COCOA)
+ # include <Carbon/Carbon.h>
+ #elif defined(XP_UNIX)
+ # include <locale.h>
+@@ -50,7 +50,7 @@ const char* LocaleList[LocaleListLength]
+ #define NSILOCALE_MAX_ACCEPT_LANGUAGE 16
+ #define NSILOCALE_MAX_ACCEPT_LENGTH 18
+
+-#if (defined(XP_UNIX) && !defined(XP_MACOSX)) || defined(XP_OS2)
++#if (defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)) || defined(XP_OS2)
+ static int posix_locale_category[LocaleListLength] =
+ {
+ LC_COLLATE,
+@@ -122,7 +122,7 @@ nsLocaleService::nsLocaleService(void)
+ rv = NewLocale(xpLocale, getter_AddRefs(mApplicationLocale));
+ NS_ENSURE_SUCCESS_VOID(rv);
+ #endif
+-#if defined(XP_UNIX) && !defined(XP_MACOSX)
++#if defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
+ nsRefPtr<nsLocale> resultLocale(new nsLocale());
+ NS_ENSURE_TRUE_VOID(resultLocale);
+
+@@ -215,7 +215,7 @@ nsLocaleService::nsLocaleService(void)
+ } // if ( NS_SUCCEEDED )...
+ #endif // XP_OS2
+
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ // Get string representation of user's current locale
+ CFLocaleRef userLocaleRef = ::CFLocaleCopyCurrent();
+ CFStringRef userLocaleStr = ::CFLocaleGetIdentifier(userLocaleRef);
+@@ -243,7 +243,7 @@ nsLocaleService::nsLocaleService(void)
+ ::CFRelease(userLocaleRef);
+
+ NS_ASSERTION(mApplicationLocale, "Failed to create locale objects");
+-#endif // XP_MACOSX
++#endif // MOZ_WIDGET_COCOA
+ }
+
+ nsLocaleService::~nsLocaleService(void)
+@@ -266,7 +266,7 @@ nsLocaleService::NewLocale(const nsAStri
+ NS_ConvertASCIItoUTF16 category(LocaleList[i]);
+ result = resultLocale->AddCategory(category, aLocale);
+ if (NS_FAILED(result)) return result;
+-#if defined(XP_UNIX) && !defined(XP_MACOSX)
++#if defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
+ category.AppendLiteral("##PLATFORM");
+ result = resultLocale->AddCategory(category, aLocale);
+ if (NS_FAILED(result)) return result;
diff --git a/www/firefox/patches/patch-ipc_chromium_src_base_file__util__posix.cc b/www/firefox/patches/patch-ipc_chromium_src_base_file__util__posix.cc
index 2d213c48a08..e0639b3d62f 100644
--- a/www/firefox/patches/patch-ipc_chromium_src_base_file__util__posix.cc
+++ b/www/firefox/patches/patch-ipc_chromium_src_base_file__util__posix.cc
@@ -1,6 +1,9 @@
-$NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.4 2014/02/20 13:19:03 ryoon Exp $
+$NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.5 2014/05/30 03:03:36 pho Exp $
---- ipc/chromium/src/base/file_util_posix.cc.orig 2013-12-05 16:07:35.000000000 +0000
+* Just because OS_ARCH is Darwin does not mean MacOS X specific
+ implementation should be used.
+
+--- ipc/chromium/src/base/file_util_posix.cc.orig 2014-05-06 22:55:41.000000000 +0000
+++ ipc/chromium/src/base/file_util_posix.cc
@@ -8,7 +8,7 @@
#include <errno.h>
@@ -29,3 +32,20 @@ $NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.4 2014/02/20 13:19
// XXX Need ftsless impl for bionic
return false;
#else
+@@ -435,7 +435,7 @@ bool SetCurrentDirectory(const FilePath&
+ return !ret;
+ }
+
+-#if !defined(OS_MACOSX)
++#if !defined(MOZ_WIDGET_COCOA)
+ bool GetTempDir(FilePath* path) {
+ const char* tmp = getenv("TMPDIR");
+ if (tmp)
+@@ -499,6 +499,6 @@ bool CopyFile(const FilePath& from_path,
+
+ return result;
+ }
+-#endif // !defined(OS_MACOSX)
++#endif // !defined(MOZ_WIDGET_COCOA)
+
+ } // namespace file_util
diff --git a/www/firefox/patches/patch-ipc_chromium_src_base_message__loop.cc b/www/firefox/patches/patch-ipc_chromium_src_base_message__loop.cc
new file mode 100644
index 00000000000..06eff91ea1e
--- /dev/null
+++ b/www/firefox/patches/patch-ipc_chromium_src_base_message__loop.cc
@@ -0,0 +1,42 @@
+$NetBSD: patch-ipc_chromium_src_base_message__loop.cc,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- ipc/chromium/src/base/message_loop.cc.orig 2014-05-06 22:55:41.000000000 +0000
++++ ipc/chromium/src/base/message_loop.cc
+@@ -14,20 +14,18 @@
+ #include "base/string_util.h"
+ #include "base/thread_local.h"
+
+-#if defined(OS_MACOSX)
++#if defined(MOZ_WIDGET_COCOA)
+ #include "base/message_pump_mac.h"
+ #endif
+ #if defined(OS_POSIX)
+ #include "base/message_pump_libevent.h"
+ #endif
+-#if defined(OS_LINUX) || defined(OS_BSD)
+ #if defined(MOZ_WIDGET_GTK)
+ #include "base/message_pump_glib.h"
+ #endif
+ #ifdef MOZ_WIDGET_QT
+ #include "base/message_pump_qt.h"
+ #endif
+-#endif
+ #ifdef ANDROID
+ #include "base/message_pump_android.h"
+ #endif
+@@ -135,11 +133,11 @@ MessageLoop::MessageLoop(Type type)
+ }
+ #elif defined(OS_POSIX)
+ if (type_ == TYPE_UI) {
+-#if defined(OS_MACOSX)
++#if defined(MOZ_WIDGET_COCOA)
+ pump_ = base::MessagePumpMac::Create();
+-#elif defined(OS_LINUX) || defined(OS_BSD)
++#elif defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_QT)
+ pump_ = new base::MessagePumpForUI();
+ #endif // OS_LINUX
+ } else if (type_ == TYPE_IO) {
+ pump_ = new base::MessagePumpLibevent();
+ } else {
diff --git a/www/firefox/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc b/www/firefox/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc
index f9ca27b3a3b..0fb5b4ed341 100644
--- a/www/firefox/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc
+++ b/www/firefox/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc
@@ -1,10 +1,16 @@
-$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.5 2014/02/20 13:19:03 ryoon Exp $
+$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.6 2014/05/30 03:03:36 pho Exp $
---- ipc/chromium/src/base/platform_thread_posix.cc.orig 2013-09-10 03:43:34.000000000 +0000
+* Just because OS_ARCH is Darwin does not mean MacOS X specific
+ kludges are needed.
+
+--- ipc/chromium/src/base/platform_thread_posix.cc.orig 2014-05-06 22:55:41.000000000 +0000
+++ ipc/chromium/src/base/platform_thread_posix.cc
-@@ -10,7 +10,9 @@
+@@ -9,8 +9,12 @@
+
#if defined(OS_MACOSX)
#include <mach/mach.h>
++#include <dlfcn.h>
++#include <string>
#elif defined(OS_NETBSD)
+_Pragma("GCC visibility push(default)")
#include <lwp.h>
@@ -12,13 +18,75 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.5 2014/02/20
#elif defined(OS_LINUX)
#include <sys/syscall.h>
#include <sys/prctl.h>
-@@ -110,7 +112,8 @@ void PlatformThread::SetName(const char*
+@@ -19,15 +23,13 @@
+ #include <sys/thr.h>
+ #endif
+
+-#if !defined(OS_MACOSX)
+ #include <unistd.h>
+-#endif
+
+ #if defined(OS_BSD) && !defined(OS_NETBSD) && !defined(__GLIBC__)
+ #include <pthread_np.h>
+ #endif
+
+-#if defined(OS_MACOSX)
++#if defined(MOZ_WIDGET_COCOA)
+ namespace base {
+ void InitThreading();
+ } // namespace
+@@ -91,7 +93,7 @@ void PlatformThread::Sleep(int duration_
+ sleep_time = remaining;
+ }
+
+-#ifndef OS_MACOSX
++#ifndef MOZ_WIDGET_COCOA
+ // Mac is implemented in platform_thread_mac.mm.
+
+ // static
+@@ -114,19 +116,41 @@ void PlatformThread::SetName(const char*
pthread_setname_np(pthread_self(), "%s", (void *)name);
#elif defined(OS_BSD) && !defined(__GLIBC__)
pthread_set_name_np(pthread_self(), name);
-#else
++#elif defined(OS_MACOSX)
++ // Copied from platform_thread_mac.mm
++
++ // pthread_setname_np is only available in 10.6 or later, so test
++ // for it at runtime.
++ int (*dynamic_pthread_setname_np)(const char*);
++ *reinterpret_cast<void**>(&dynamic_pthread_setname_np) =
++ dlsym(RTLD_DEFAULT, "pthread_setname_np");
++ if (!dynamic_pthread_setname_np)
++ return;
++
++ // Mac OS X does not expose the length limit of the name, so
++ // hardcode it.
++ const int kMaxNameLength = 63;
++ std::string shortened_name = std::string(name).substr(0, kMaxNameLength);
++ // pthread_setname() fails (harmlessly) in the sandbox, ignore when it does.
++ // See http://crbug.com/47058
++
++ // The name parameter is copied thus it's safe to release it after calling.
++ // Checked against the bionic implementation in bionic/libc/bionic/pthread.c
++ dynamic_pthread_setname_np(shortened_name.c_str());
+#elif !defined(OS_SOLARIS)
+ prctl(PR_SET_NAME, reinterpret_cast<uintptr_t>(name), 0, 0, 0);
#endif
}
- #endif // !OS_MACOSX
+-#endif // !OS_MACOSX
++#endif // !MOZ_WIDGET_COCOA
+
+ namespace {
+
+ bool CreateThread(size_t stack_size, bool joinable,
+ PlatformThread::Delegate* delegate,
+ PlatformThreadHandle* thread_handle) {
+-#if defined(OS_MACOSX)
++#if defined(MOZ_WIDGET_COCOA)
+ base::InitThreading();
+-#endif // OS_MACOSX
++#endif // MOZ_WIDGET_COCOA
+
+ bool success = false;
+ pthread_attr_t attributes;
diff --git a/www/firefox/patches/patch-ipc_chromium_src_base_scoped__nsautorelease__pool.h b/www/firefox/patches/patch-ipc_chromium_src_base_scoped__nsautorelease__pool.h
new file mode 100644
index 00000000000..0cc59346461
--- /dev/null
+++ b/www/firefox/patches/patch-ipc_chromium_src_base_scoped__nsautorelease__pool.h
@@ -0,0 +1,45 @@
+$NetBSD: patch-ipc_chromium_src_base_scoped__nsautorelease__pool.h,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Just because OS_ARCH is Darwin does not mean ScopedNSAutoreleasePool
+is needed.
+
+--- ipc/chromium/src/base/scoped_nsautorelease_pool.h.orig 2014-05-06 22:55:41.000000000 +0000
++++ ipc/chromium/src/base/scoped_nsautorelease_pool.h
+@@ -7,13 +7,13 @@
+
+ #include "base/basictypes.h"
+
+-#if defined(OS_MACOSX)
++#if defined(MOZ_WIDGET_COCOA)
+ #if defined(__OBJC__)
+ @class NSAutoreleasePool;
+ #else // __OBJC__
+ class NSAutoreleasePool;
+ #endif // __OBJC__
+-#endif // OS_MACOSX
++#endif // MOZ_WIDGET_COCOA
+
+ namespace base {
+
+@@ -27,10 +27,10 @@ namespace base {
+ // ugly #ifdefs.
+ class ScopedNSAutoreleasePool {
+ public:
+-#if !defined(OS_MACOSX)
++#if !defined(MOZ_WIDGET_COCOA)
+ ScopedNSAutoreleasePool() {}
+ void Recycle() { }
+-#else // OS_MACOSX
++#else // MOZ_WIDGET_COCOA
+ ScopedNSAutoreleasePool();
+ ~ScopedNSAutoreleasePool();
+
+@@ -41,7 +41,7 @@ class ScopedNSAutoreleasePool {
+ void Recycle();
+ private:
+ NSAutoreleasePool* autorelease_pool_;
+-#endif // OS_MACOSX
++#endif // MOZ_WIDGET_COCOA
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ScopedNSAutoreleasePool);
diff --git a/www/firefox/patches/patch-ipc_glue_GeckoChildProcessHost.cpp b/www/firefox/patches/patch-ipc_glue_GeckoChildProcessHost.cpp
index 3c0dbc624d9..869e4db0e92 100644
--- a/www/firefox/patches/patch-ipc_glue_GeckoChildProcessHost.cpp
+++ b/www/firefox/patches/patch-ipc_glue_GeckoChildProcessHost.cpp
@@ -1,6 +1,9 @@
-$NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.6 2014/03/20 21:02:00 ryoon Exp $
+$NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.7 2014/05/30 03:03:36 pho Exp $
---- ipc/glue/GeckoChildProcessHost.cpp.orig 2014-03-15 05:19:19.000000000 +0000
+* Just because OS_ARCH is Darwin does not mean MacOS X specific
+ kludges are needed.
+
+--- ipc/glue/GeckoChildProcessHost.cpp.orig 2014-05-06 22:55:41.000000000 +0000
+++ ipc/glue/GeckoChildProcessHost.cpp
@@ -4,7 +4,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -16,7 +19,7 @@ $NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.6 2014/03/20 21:02:00 ryoo
#if defined(XP_WIN) && defined(MOZ_CONTENT_SANDBOX)
#include "sandboxBroker.h"
-@@ -499,7 +505,7 @@ GeckoChildProcessHost::PerformAsyncLaunc
+@@ -504,7 +510,7 @@ GeckoChildProcessHost::PerformAsyncLaunc
// and passing wstrings from one config to the other is unsafe. So
// we split the logic here.
@@ -25,7 +28,7 @@ $NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.6 2014/03/20 21:02:00 ryoo
base::environment_map newEnvVars;
ChildPrivileges privs = mPrivileges;
if (privs == base::PRIVILEGES_DEFAULT) {
-@@ -518,7 +524,7 @@ GeckoChildProcessHost::PerformAsyncLaunc
+@@ -523,7 +529,7 @@ GeckoChildProcessHost::PerformAsyncLaunc
if (NS_SUCCEEDED(rv)) {
nsCString path;
greDir->GetNativePath(path);
@@ -34,7 +37,34 @@ $NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.6 2014/03/20 21:02:00 ryoo
# if defined(MOZ_WIDGET_ANDROID)
path += "/lib";
# endif // MOZ_WIDGET_ANDROID
-@@ -627,7 +633,7 @@ GeckoChildProcessHost::PerformAsyncLaunc
+@@ -538,7 +544,17 @@ GeckoChildProcessHost::PerformAsyncLaunc
+ newEnvVars["LD_LIBRARY_PATH"] = path.get();
+ }
+ # elif OS_MACOSX
+- newEnvVars["DYLD_LIBRARY_PATH"] = path.get();
++ const char *dyld_library_path = PR_GetEnv("DYLD_LIBRARY_PATH");
++ nsCString new_dyld_lib_path;
++ if (dyld_library_path && *dyld_library_path) {
++ new_dyld_lib_path.Assign(path.get());
++ new_dyld_lib_path.AppendLiteral(":");
++ new_dyld_lib_path.Append(dyld_library_path);
++ newEnvVars["DYLD_LIBRARY_PATH"] = new_dyld_lib_path.get();
++ } else {
++ newEnvVars["DYLD_LIBRARY_PATH"] = path.get();
++ }
++# if defined(MOZ_WIDGET_COCOA)
+ // XXX DYLD_INSERT_LIBRARIES should only be set when launching a plugin
+ // process, and has no effect on other subprocesses (the hooks in
+ // libplugin_child_interpose.dylib become noops). But currently it
+@@ -558,6 +574,7 @@ GeckoChildProcessHost::PerformAsyncLaunc
+ interpose.Append(path.get());
+ interpose.AppendLiteral("/libplugin_child_interpose.dylib");
+ newEnvVars["DYLD_INSERT_LIBRARIES"] = interpose.get();
++# endif // MOZ_WIDGET_COCOA
+ # endif // OS_LINUX
+ }
+ }
+@@ -632,7 +649,7 @@ GeckoChildProcessHost::PerformAsyncLaunc
childArgv.push_back(pidstring);
#if defined(MOZ_CRASHREPORTER)
@@ -43,7 +73,7 @@ $NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.6 2014/03/20 21:02:00 ryoo
int childCrashFd, childCrashRemapFd;
if (!CrashReporter::CreateNotificationPipeForChild(
&childCrashFd, &childCrashRemapFd))
-@@ -660,7 +666,7 @@ GeckoChildProcessHost::PerformAsyncLaunc
+@@ -665,7 +682,7 @@ GeckoChildProcessHost::PerformAsyncLaunc
childArgv.push_back(childProcessType);
base::LaunchApp(childArgv, mFileMap,
diff --git a/www/firefox/patches/patch-ipc_glue_ScopedXREEmbed.cpp b/www/firefox/patches/patch-ipc_glue_ScopedXREEmbed.cpp
new file mode 100644
index 00000000000..bccbf8f491b
--- /dev/null
+++ b/www/firefox/patches/patch-ipc_glue_ScopedXREEmbed.cpp
@@ -0,0 +1,16 @@
+$NetBSD: patch-ipc_glue_ScopedXREEmbed.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Walking out of [subprocess].app/Contents/MacOS would only be needed if
+we were using the cocoa toolkit.
+
+--- ipc/glue/ScopedXREEmbed.cpp.orig 2014-05-06 22:55:41.000000000 +0000
++++ ipc/glue/ScopedXREEmbed.cpp
+@@ -66,7 +66,7 @@ ScopedXREEmbed::Start()
+ localFile = do_QueryInterface(parent);
+ NS_ENSURE_TRUE_VOID(localFile);
+
+-#ifdef OS_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ if (XRE_GetProcessType() == GeckoProcessType_Content) {
+ // We're an XPCOM-using subprocess. Walk out of
+ // [subprocess].app/Contents/MacOS to the real GRE dir.
diff --git a/www/firefox/patches/patch-ipc_glue_StringUtil.cpp b/www/firefox/patches/patch-ipc_glue_StringUtil.cpp
new file mode 100644
index 00000000000..28aeb87cdac
--- /dev/null
+++ b/www/firefox/patches/patch-ipc_glue_StringUtil.cpp
@@ -0,0 +1,24 @@
+$NetBSD: patch-ipc_glue_StringUtil.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Just because OS_ARCH is Darwin does not mean
+sys_string_conversions_mac.mm can be used.
+
+--- ipc/glue/StringUtil.cpp.orig 2014-05-06 22:55:41.000000000 +0000
++++ ipc/glue/StringUtil.cpp
+@@ -64,14 +64,14 @@ namespace base {
+ // converters, and implementing the one that doesn't exist for OS X
+ // and Windows.
+
+-#if !defined(OS_MACOSX) && !defined(OS_WIN)
++#if !defined(MOZ_WIDGET_COCOA) && !defined(OS_WIN)
+ std::string SysWideToUTF8(const std::wstring& wide) {
+ // FIXME/cjones: do this with iconv
+ return GhettoStringConvert<std::wstring, std::string>(wide);
+ }
+ #endif
+
+-#if !defined(OS_MACOSX) && !defined(OS_WIN)
++#if !defined(MOZ_WIDGET_COCOA) && !defined(OS_WIN)
+ std::wstring SysUTF8ToWide(const StringPiece& utf8) {
+ // FIXME/cjones: do this with iconv
+ return GhettoStringConvert<StringPiece, std::wstring>(utf8);
diff --git a/www/firefox/patches/patch-js_xpconnect_shell_xpcshell.cpp b/www/firefox/patches/patch-js_xpconnect_shell_xpcshell.cpp
new file mode 100644
index 00000000000..8ba4c375f3f
--- /dev/null
+++ b/www/firefox/patches/patch-js_xpconnect_shell_xpcshell.cpp
@@ -0,0 +1,33 @@
+$NetBSD: patch-js_xpconnect_shell_xpcshell.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- js/xpconnect/shell/xpcshell.cpp.orig 2014-05-06 22:55:51.000000000 +0000
++++ js/xpconnect/shell/xpcshell.cpp
+@@ -12,7 +12,7 @@
+ #include "mozilla/WindowsDllBlocklist.h"
+
+ #include "nsXULAppAPI.h"
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ #include "xpcshellMacUtils.h"
+ #endif
+ #ifdef XP_WIN
+@@ -28,7 +28,7 @@
+ int
+ main(int argc, char** argv, char** envp)
+ {
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ InitAutoreleasePool();
+ #endif
+
+@@ -42,7 +42,7 @@ main(int argc, char** argv, char** envp)
+
+ int result = XRE_XPCShellMain(argc, argv, envp);
+
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ FinishAutoreleasePool();
+ #endif
+
diff --git a/www/firefox/patches/patch-media_libcubeb_src_moz.build b/www/firefox/patches/patch-media_libcubeb_src_moz.build
new file mode 100644
index 00000000000..aa4e4db390f
--- /dev/null
+++ b/www/firefox/patches/patch-media_libcubeb_src_moz.build
@@ -0,0 +1,15 @@
+$NetBSD: patch-media_libcubeb_src_moz.build,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_TARGET is Darwin.
+
+--- media/libcubeb/src/moz.build.orig 2014-05-06 22:56:07.000000000 +0000
++++ media/libcubeb/src/moz.build
+@@ -28,7 +28,7 @@ if CONFIG['OS_ARCH'] == 'OpenBSD':
+ ]
+ DEFINES['USE_SNDIO'] = True
+
+-if CONFIG['OS_TARGET'] == 'Darwin':
++if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+ SOURCES += [
+ 'cubeb_audiounit.c',
+ ]
diff --git a/www/firefox/patches/patch-netwerk_build_nsNetModule.cpp b/www/firefox/patches/patch-netwerk_build_nsNetModule.cpp
new file mode 100644
index 00000000000..fd691bfad1f
--- /dev/null
+++ b/www/firefox/patches/patch-netwerk_build_nsNetModule.cpp
@@ -0,0 +1,24 @@
+$NetBSD: patch-netwerk_build_nsNetModule.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- netwerk/build/nsNetModule.cpp.orig 2014-05-06 22:56:19.000000000 +0000
++++ netwerk/build/nsNetModule.cpp
+@@ -44,7 +44,7 @@
+
+ #include "nsNetCID.h"
+
+-#ifndef XP_MACOSX
++#ifndef MOZ_WIDGET_COCOA
+ #define BUILD_BINHEX_DECODER 1
+ #endif
+
+@@ -664,7 +664,7 @@ static void nsNetShutdown()
+
+ // Release global state used by the URL helper module.
+ net_ShutdownURLHelper();
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ net_ShutdownURLHelperOSX();
+ #endif
+
diff --git a/www/firefox/patches/patch-profile_dirserviceprovider_src_nsProfileLock.cpp b/www/firefox/patches/patch-profile_dirserviceprovider_src_nsProfileLock.cpp
new file mode 100644
index 00000000000..33c4a26c040
--- /dev/null
+++ b/www/firefox/patches/patch-profile_dirserviceprovider_src_nsProfileLock.cpp
@@ -0,0 +1,33 @@
+$NetBSD: patch-profile_dirserviceprovider_src_nsProfileLock.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- profile/dirserviceprovider/src/nsProfileLock.cpp.orig 2014-05-06 22:56:22.000000000 +0000
++++ profile/dirserviceprovider/src/nsProfileLock.cpp
+@@ -7,7 +7,7 @@
+ #include "nsProfileLock.h"
+ #include "nsCOMPtr.h"
+
+-#if defined(XP_MACOSX)
++#if defined(MOZ_WIDGET_COCOA)
+ #include <Carbon/Carbon.h>
+ #include <CoreFoundation/CoreFoundation.h>
+ #endif
+@@ -432,7 +432,7 @@ nsresult nsProfileLock::GetReplacedLockT
+ nsresult nsProfileLock::Lock(nsIFile* aProfileDir,
+ nsIProfileUnlocker* *aUnlocker)
+ {
+-#if defined (XP_MACOSX)
++#if defined (MOZ_WIDGET_COCOA)
+ NS_NAMED_LITERAL_STRING(LOCKFILE_NAME, ".parentlock");
+ NS_NAMED_LITERAL_STRING(OLD_LOCKFILE_NAME, "parent.lock");
+ #elif defined (XP_UNIX)
+@@ -464,7 +464,7 @@ nsresult nsProfileLock::Lock(nsIFile* aP
+ if (NS_FAILED(rv))
+ return rv;
+
+-#if defined(XP_MACOSX)
++#if defined(MOZ_WIDGET_COCOA)
+ // First, try locking using fcntl. It is more reliable on
+ // a local machine, but may not be supported by an NFS server.
+
diff --git a/www/firefox/patches/patch-toolkit_components_jsdownloads_src_DownloadPlatform.cpp b/www/firefox/patches/patch-toolkit_components_jsdownloads_src_DownloadPlatform.cpp
new file mode 100644
index 00000000000..b99c75499f0
--- /dev/null
+++ b/www/firefox/patches/patch-toolkit_components_jsdownloads_src_DownloadPlatform.cpp
@@ -0,0 +1,33 @@
+$NetBSD: patch-toolkit_components_jsdownloads_src_DownloadPlatform.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- toolkit/components/jsdownloads/src/DownloadPlatform.cpp.orig 2014-05-06 22:56:29.000000000 +0000
++++ toolkit/components/jsdownloads/src/DownloadPlatform.cpp
+@@ -17,7 +17,7 @@
+ #include "nsILocalFileWin.h"
+ #endif
+
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ #include <CoreFoundation/CoreFoundation.h>
+ #endif
+
+@@ -67,7 +67,7 @@ static void gio_set_metadata_done(GObjec
+ nsresult DownloadPlatform::DownloadDone(nsIURI* aSource, nsIFile* aTarget,
+ const nsACString& aContentType, bool aIsPrivate)
+ {
+-#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GTK)
++#if defined(XP_WIN) || defined(MOZ_WIDGET_COCOA) || defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GTK)
+ nsAutoString path;
+ if (aTarget && NS_SUCCEEDED(aTarget->GetPath(path))) {
+ #if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
+@@ -106,7 +106,7 @@ nsresult DownloadPlatform::DownloadDone(
+ #endif
+ }
+ #endif
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ // On OS X, make the downloads stack bounce.
+ CFStringRef observedObject = ::CFStringCreateWithCString(kCFAllocatorDefault,
+ NS_ConvertUTF16toUTF8(path).get(),
diff --git a/www/firefox/patches/patch-toolkit_library_Makefile.in b/www/firefox/patches/patch-toolkit_library_Makefile.in
index b421a74e89a..38fad7a1492 100644
--- a/www/firefox/patches/patch-toolkit_library_Makefile.in
+++ b/www/firefox/patches/patch-toolkit_library_Makefile.in
@@ -1,6 +1,13 @@
-$NetBSD: patch-toolkit_library_Makefile.in,v 1.6 2014/04/30 15:07:18 ryoon Exp $
+$NetBSD: patch-toolkit_library_Makefile.in,v 1.7 2014/05/30 03:03:36 pho Exp $
---- toolkit/library/Makefile.in.orig 2014-04-18 02:04:27.000000000 +0000
+* It's true Mach-O systems aren't supported by
+ ${WRKSRC}/content/media/gstreamer/GStreamerLoader.cpp so
+ $(GSTREAMER_LIBS) must be directly appended to $(EXTRA_DSO_LDOPTS)
+ on such platforms. The problem is that "ifeq
+ (cocoa,$(MOZ_WIDGET_TOOLKIT))" ain't the right thing to do when
+ testing for Mach-O is what we need.
+
+--- toolkit/library/Makefile.in.orig 2014-05-06 22:56:33.000000000 +0000
+++ toolkit/library/Makefile.in
@@ -149,6 +149,34 @@ ifdef MOZ_NATIVE_HUNSPELL
EXTRA_DSO_LDOPTS += $(MOZ_HUNSPELL_LIBS)
@@ -62,3 +69,12 @@ $NetBSD: patch-toolkit_library_Makefile.in,v 1.6 2014/04/30 15:07:18 ryoon Exp $
ifdef MOZ_WEBRTC
ifeq (WINNT,$(OS_TARGET))
EXTRA_DSO_LDOPTS += \
+@@ -351,7 +391,7 @@ ifdef MOZ_ENABLE_QT
+ EXTRA_DSO_LDOPTS += $(MOZ_QT_LDFLAGS) $(XEXT_LIBS)
+ endif
+
+-ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
++ifeq (Darwin,$(OS_ARCH))
+ ifdef MOZ_GSTREAMER
+ EXTRA_DSO_LDOPTS += $(GSTREAMER_LIBS)
+ endif
diff --git a/www/firefox/patches/patch-toolkit_library_nsStaticXULComponents.cpp b/www/firefox/patches/patch-toolkit_library_nsStaticXULComponents.cpp
new file mode 100644
index 00000000000..95960c4e4ac
--- /dev/null
+++ b/www/firefox/patches/patch-toolkit_library_nsStaticXULComponents.cpp
@@ -0,0 +1,24 @@
+$NetBSD: patch-toolkit_library_nsStaticXULComponents.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- toolkit/library/nsStaticXULComponents.cpp.orig 2014-05-06 22:56:34.000000000 +0000
++++ toolkit/library/nsStaticXULComponents.cpp
+@@ -29,7 +29,7 @@
+
+ #ifdef XP_WIN
+ # define WIDGET_MODULES MODULE(nsWidgetModule)
+-#elif defined(XP_MACOSX)
++#elif defined(MOZ_WIDGET_COCOA)
+ # define WIDGET_MODULES MODULE(nsWidgetMacModule)
+ #elif defined(XP_OS2)
+ # define WIDGET_MODULES MODULE(nsWidgetOS2Module)
+@@ -122,7 +122,7 @@
+ #define UNIXPROXY_MODULE
+ #endif
+
+-#if defined(XP_MACOSX)
++#if defined(MOZ_WIDGET_COCOA)
+ #define OSXPROXY_MODULE MODULE(nsOSXProxyModule)
+ #else
+ #define OSXPROXY_MODULE
diff --git a/www/firefox/patches/patch-uriloader_exthandler_nsLocalHandlerApp.h b/www/firefox/patches/patch-uriloader_exthandler_nsLocalHandlerApp.h
new file mode 100644
index 00000000000..8ebe0f1ae23
--- /dev/null
+++ b/www/firefox/patches/patch-uriloader_exthandler_nsLocalHandlerApp.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-uriloader_exthandler_nsLocalHandlerApp.h,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- uriloader/exthandler/nsLocalHandlerApp.h.orig 2014-05-06 22:56:37.000000000 +0000
++++ uriloader/exthandler/nsLocalHandlerApp.h
+@@ -47,7 +47,7 @@ protected:
+
+ // any platforms that need a platform-specific class instead of just
+ // using nsLocalHandlerApp need to add an include and a typedef here.
+-#ifdef XP_MACOSX
++#ifdef MOZ_WIDGET_COCOA
+ # ifndef NSLOCALHANDLERAPPMAC_H_
+ # include "mac/nsLocalHandlerAppMac.h"
+ typedef nsLocalHandlerAppMac PlatformLocalHandlerApp_t;
diff --git a/www/firefox/patches/patch-xpcom_base_nsUUIDGenerator.cpp b/www/firefox/patches/patch-xpcom_base_nsUUIDGenerator.cpp
new file mode 100644
index 00000000000..857ec6e5610
--- /dev/null
+++ b/www/firefox/patches/patch-xpcom_base_nsUUIDGenerator.cpp
@@ -0,0 +1,42 @@
+$NetBSD: patch-xpcom_base_nsUUIDGenerator.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- xpcom/base/nsUUIDGenerator.cpp.orig 2014-05-06 22:56:38.000000000 +0000
++++ xpcom/base/nsUUIDGenerator.cpp
+@@ -6,7 +6,7 @@
+ #if defined(XP_WIN)
+ #include <windows.h>
+ #include <objbase.h>
+-#elif defined(XP_MACOSX)
++#elif defined(MOZ_WIDGET_COCOA)
+ #include <CoreFoundation/CoreFoundation.h>
+ #else
+ #include <stdlib.h>
+@@ -34,7 +34,7 @@ nsUUIDGenerator::Init()
+ // We're a service, so we're guaranteed that Init() is not going
+ // to be reentered while we're inside Init().
+
+-#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(ANDROID)
++#if !defined(XP_WIN) && !defined(MOZ_WIDGET_COCOA) && !defined(ANDROID)
+ /* initialize random number generator using NSPR random noise */
+ unsigned int seed;
+
+@@ -67,7 +67,7 @@ nsUUIDGenerator::Init()
+ return NS_ERROR_FAILURE;
+ #endif
+
+-#endif /* non XP_WIN and non XP_MACOSX */
++#endif /* non XP_WIN and non MOZ_WIDGET_COCOA */
+
+ return NS_OK;
+ }
+@@ -100,7 +100,7 @@ nsUUIDGenerator::GenerateUUIDInPlace(nsI
+ HRESULT hr = CoCreateGuid((GUID*)id);
+ if (FAILED(hr))
+ return NS_ERROR_FAILURE;
+-#elif defined(XP_MACOSX)
++#elif defined(MOZ_WIDGET_COCOA)
+ CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault);
+ if (!uuid)
+ return NS_ERROR_FAILURE;
diff --git a/www/firefox/patches/patch-xpcom_base_nsUUIDGenerator.h b/www/firefox/patches/patch-xpcom_base_nsUUIDGenerator.h
new file mode 100644
index 00000000000..8c636237c08
--- /dev/null
+++ b/www/firefox/patches/patch-xpcom_base_nsUUIDGenerator.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-xpcom_base_nsUUIDGenerator.h,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- xpcom/base/nsUUIDGenerator.h.orig 2014-05-06 22:56:38.000000000 +0000
++++ xpcom/base/nsUUIDGenerator.h
+@@ -27,7 +27,7 @@ private:
+ protected:
+
+ mozilla::Mutex mLock;
+-#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(ANDROID)
++#if !defined(XP_WIN) && !defined(MOZ_WIDGET_COCOA) && !defined(ANDROID)
+ char mState[128];
+ char *mSavedState;
+ uint8_t mRBytes;
diff --git a/www/firefox/patches/patch-xpcom_build_BinaryPath.h b/www/firefox/patches/patch-xpcom_build_BinaryPath.h
new file mode 100644
index 00000000000..c23a3ca91b9
--- /dev/null
+++ b/www/firefox/patches/patch-xpcom_build_BinaryPath.h
@@ -0,0 +1,24 @@
+$NetBSD: patch-xpcom_build_BinaryPath.h,v 1.1 2014/05/30 03:03:36 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- xpcom/build/BinaryPath.h.orig 2014-05-06 22:56:38.000000000 +0000
++++ xpcom/build/BinaryPath.h
+@@ -8,7 +8,7 @@
+ #include "nsXPCOMPrivate.h" // for MAXPATHLEN
+ #ifdef XP_WIN
+ #include <windows.h>
+-#elif defined(XP_MACOSX)
++#elif defined(MOZ_WIDGET_COCOA)
+ #include <CoreFoundation/CoreFoundation.h>
+ #elif defined(XP_UNIX)
+ #include <sys/stat.h>
+@@ -39,7 +39,7 @@ private:
+ return NS_ERROR_FAILURE;
+ }
+
+-#elif defined(XP_MACOSX)
++#elif defined(MOZ_WIDGET_COCOA)
+ static nsresult Get(const char *argv0, char aResult[MAXPATHLEN])
+ {
+ // Works even if we're not bundled.