diff options
Diffstat (limited to 'www/firefox/patches')
98 files changed, 1190 insertions, 2076 deletions
diff --git a/www/firefox/patches/patch-aa b/www/firefox/patches/patch-aa index 5dc4dc84198..17e957ec11f 100644 --- a/www/firefox/patches/patch-aa +++ b/www/firefox/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.14 2013/08/07 12:17:54 ryoon Exp $ +$NetBSD: patch-aa,v 1.15 2013/09/19 12:37:49 ryoon Exp $ ---- configure.in.orig 2013-07-30 00:57:59.000000000 +0000 +--- configure.in.orig 2013-09-10 03:43:23.000000000 +0000 +++ configure.in -@@ -1411,6 +1411,17 @@ if test "$GNU_CC"; then +@@ -1370,6 +1370,17 @@ if test "$GNU_CC"; then CFLAGS=$_SAVE_CFLAGS AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSE4_1) @@ -20,7 +20,7 @@ $NetBSD: patch-aa,v 1.14 2013/08/07 12:17:54 ryoon Exp $ # Turn on GNU-specific warnings: # -Wall - turn on a lot of warnings # -Wpointer-arith - good to have -@@ -2088,6 +2099,9 @@ ia64*-hpux*) +@@ -2047,6 +2058,9 @@ ia64*-hpux*) if test -z "$MC"; then MC=mc.exe fi @@ -30,7 +30,7 @@ $NetBSD: patch-aa,v 1.14 2013/08/07 12:17:54 ryoon Exp $ ;; *-mingw*) DSO_CFLAGS= -@@ -2887,6 +2901,7 @@ EOF +@@ -2843,6 +2857,7 @@ EOF #pragma GCC visibility push(hidden) #pragma GCC visibility push(default) #include <string.h> @@ -38,7 +38,7 @@ $NetBSD: patch-aa,v 1.14 2013/08/07 12:17:54 ryoon Exp $ #pragma GCC visibility pop __attribute__ ((visibility ("default"))) void Func() { -@@ -2895,7 +2910,7 @@ __attribute__ ((visibility ("default"))) +@@ -2851,7 +2866,7 @@ __attribute__ ((visibility ("default"))) } EOF ac_cv_have_visibility_builtin_bug=no @@ -47,7 +47,7 @@ $NetBSD: patch-aa,v 1.14 2013/08/07 12:17:54 ryoon Exp $ ac_cv_have_visibility_builtin_bug=yes else if test `grep -c "@PLT" conftest.S` = 0; then -@@ -3057,6 +3072,9 @@ dnl ==================================== +@@ -3017,6 +3032,9 @@ dnl ==================================== case $target in *-hpux11.*) ;; @@ -57,7 +57,7 @@ $NetBSD: patch-aa,v 1.14 2013/08/07 12:17:54 ryoon Exp $ *) AC_CHECK_LIB(c_r, gethostbyname_r) ;; -@@ -3358,6 +3376,9 @@ AC_CACHE_CHECK( +@@ -3319,6 +3337,9 @@ AC_CACHE_CHECK( #ifdef linux #define _BSD_SOURCE 1 #endif @@ -67,7 +67,7 @@ $NetBSD: patch-aa,v 1.14 2013/08/07 12:17:54 ryoon Exp $ #include <resolv.h> ], [int foo = res_ninit(&_res);], -@@ -4012,6 +4033,14 @@ if test -n "$YASM"; then +@@ -3973,6 +3994,14 @@ if test -n "$YASM"; then _YASM_BUILD=` echo ${YASM_VERSION} | $AWK -F\. '{ print $4 }'` fi @@ -82,7 +82,7 @@ $NetBSD: patch-aa,v 1.14 2013/08/07 12:17:54 ryoon Exp $ if test -z "$SKIP_LIBRARY_CHECKS"; then dnl system JPEG support dnl ======================================================== -@@ -4039,11 +4068,7 @@ if test "$MOZ_NATIVE_JPEG" = 1; then +@@ -4000,11 +4029,7 @@ if test "$MOZ_NATIVE_JPEG" = 1; then #include <jpeglib.h> ], [ #if JPEG_LIB_VERSION < $MOZJPEG #error "Insufficient JPEG library version ($MOZJPEG required)." @@ -95,7 +95,30 @@ $NetBSD: patch-aa,v 1.14 2013/08/07 12:17:54 ryoon Exp $ MOZ_NATIVE_JPEG=1, AC_MSG_ERROR([Insufficient JPEG library version for --with-system-jpeg])) fi -@@ -5270,7 +5295,7 @@ dnl --enable-webrtc to override. Can di +@@ -4139,6 +4164,22 @@ if test -n "$MOZ_NATIVE_FFI"; then + fi + + dnl ======================================================== ++dnl system icu support ++dnl ======================================================== ++MOZ_NATIVE_ICU= ++MOZ_ARG_WITH_BOOL(system-icu, ++[ --with-system-icu ++ Use system icu (located with pkgconfig)], ++ MOZ_NATIVE_ICU=1) ++ ++if test -n "$MOZ_NATIVE_ICU"; then ++ PKG_CHECK_MODULES(MOZ_ICU, icu-i18n >= 50.1) ++ MOZ_JS_STATIC_LIBS="$MOZ_JS_STATIC_LIBS $MOZ_ICU_LIBS" ++fi ++ ++AC_SUBST(MOZ_NATIVE_ICU) ++ ++dnl ======================================================== + dnl Java SDK support + dnl ======================================================== + +@@ -5297,7 +5338,7 @@ dnl --enable-webrtc to override. Can di dnl the master list above. if test -n "$MOZ_WEBRTC"; then case "$target" in @@ -104,7 +127,7 @@ $NetBSD: patch-aa,v 1.14 2013/08/07 12:17:54 ryoon Exp $ dnl Leave enabled ;; *) -@@ -5323,6 +5348,9 @@ if test -n "$MOZ_WEBRTC"; then +@@ -5353,6 +5394,9 @@ if test -n "$MOZ_WEBRTC"; then MOZ_VP8_ENCODER=1 MOZ_VP8_ERROR_CONCEALMENT=1 @@ -114,7 +137,7 @@ $NetBSD: patch-aa,v 1.14 2013/08/07 12:17:54 ryoon Exp $ dnl enable once Signaling lands MOZ_WEBRTC_SIGNALING=1 AC_DEFINE(MOZ_WEBRTC_SIGNALING) -@@ -5349,15 +5377,18 @@ AC_SUBST(MOZ_SRTP) +@@ -5379,15 +5423,18 @@ AC_SUBST(MOZ_SRTP) dnl Use integers over floats for audio on B2G and Android, because audio dnl backends for those platforms don't support floats. @@ -136,7 +159,7 @@ $NetBSD: patch-aa,v 1.14 2013/08/07 12:17:54 ryoon Exp $ dnl ======================================================== dnl = Disable Speech API code -@@ -5707,7 +5738,7 @@ MOZ_ALSA=) +@@ -5737,7 +5784,7 @@ MOZ_ALSA=) if test -n "$MOZ_ALSA"; then AC_DEFINE(MOZ_CUBEB) @@ -145,16 +168,7 @@ $NetBSD: patch-aa,v 1.14 2013/08/07 12:17:54 ryoon Exp $ [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 -@@ -6410,7 +6441,7 @@ MOZ_ARG_ENABLE_BOOL(gtest, - MOZ_ENABLE_GTEST= ) - - if test -n "$MOZ_ENABLE_GTEST"; then -- if test "${OS_TARGET}" = "WINNT" -o "${OS_TARGET}" = "Darwin" -o "${OS_TARGET}" = "Linux" -o "${OS_TARGET}" = "Android"; then -+ if test "${OS_TARGET}" = "WINNT" -o "${OS_TARGET}" = "Darwin" -o "${OS_TARGET}" = "Linux" -o "${OS_TARGET}" = "Android" -o "${OS_TARGET}" = "NetBSD"; then - MOZ_ENABLE_GTEST=1 - GTEST_HAS_RTTI=0 - AC_DEFINE(MOZ_ENABLE_GTEST) -@@ -8330,7 +8361,7 @@ if test "$MOZ_ENABLE_SKIA"; then +@@ -8385,7 +8432,7 @@ if test "$MOZ_ENABLE_SKIA"; then AC_DEFINE(GR_DLL) fi @@ -163,7 +177,7 @@ $NetBSD: patch-aa,v 1.14 2013/08/07 12:17:54 ryoon Exp $ MOZ_ENABLE_SKIA_GPU=1 AC_DEFINE(USE_SKIA_GPU) AC_SUBST(MOZ_ENABLE_SKIA_GPU) -@@ -8411,16 +8442,26 @@ MOZ_ARG_DISABLE_BOOL(necko-wifi, +@@ -8466,16 +8513,26 @@ MOZ_ARG_DISABLE_BOOL(necko-wifi, NECKO_WIFI=, NECKO_WIFI=1) @@ -200,7 +214,7 @@ $NetBSD: patch-aa,v 1.14 2013/08/07 12:17:54 ryoon Exp $ fi if test "$NECKO_WIFI"; then -@@ -9114,6 +9155,27 @@ if test -z "$HAVE_TOOLCHAIN_SUPPORT_MSSE +@@ -9186,6 +9243,27 @@ if test -z "$HAVE_TOOLCHAIN_SUPPORT_SSSE EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D yuv_disable_asm=1" fi diff --git a/www/firefox/patches/patch-as b/www/firefox/patches/patch-as index dbf4713e7dd..9c825a3126a 100644 --- a/www/firefox/patches/patch-as +++ b/www/firefox/patches/patch-as @@ -1,10 +1,10 @@ -$NetBSD: patch-as,v 1.3 2013/05/23 13:12:13 ryoon Exp $ +$NetBSD: patch-as,v 1.4 2013/09/19 12:37:49 ryoon Exp $ Treat DragonFly like FreeBSD. ---- js/src/configure.in.orig 2013-05-11 19:19:32.000000000 +0000 +--- js/src/configure.in.orig 2013-09-10 03:43:34.000000000 +0000 +++ js/src/configure.in -@@ -2399,6 +2399,7 @@ EOF +@@ -2424,6 +2424,7 @@ EOF #pragma GCC visibility push(hidden) #pragma GCC visibility push(default) #include <string.h> @@ -12,7 +12,7 @@ Treat DragonFly like FreeBSD. #pragma GCC visibility pop __attribute__ ((visibility ("default"))) void Func() { -@@ -2407,7 +2408,7 @@ __attribute__ ((visibility ("default"))) +@@ -2432,7 +2433,7 @@ __attribute__ ((visibility ("default"))) } EOF ac_cv_have_visibility_builtin_bug=no @@ -21,7 +21,7 @@ Treat DragonFly like FreeBSD. ac_cv_have_visibility_builtin_bug=yes else if test `grep -c "@PLT" conftest.S` = 0; then -@@ -2628,7 +2629,7 @@ then +@@ -2657,7 +2658,7 @@ then fi case "$target" in @@ -30,7 +30,12 @@ Treat DragonFly like FreeBSD. AC_DEFINE(_REENTRANT) AC_DEFINE(_THREAD_SAFE) dnl -pthread links in -lpthread, so don't specify it explicitly. -@@ -2711,6 +2712,9 @@ AC_CACHE_CHECK( +@@ -2736,14 +2737,19 @@ fi + AC_CACHE_CHECK( + [for res_ninit()], + ac_cv_func_res_ninit, +- [AC_TRY_LINK([ ++ [AC_TRY_RUN([ #ifdef linux #define _BSD_SOURCE 1 #endif @@ -38,9 +43,17 @@ Treat DragonFly like FreeBSD. + #error use of global _res variable in threaded programs is not portable + #endif #include <resolv.h> - ], - [int foo = res_ninit(&_res);], -@@ -3486,7 +3490,7 @@ if test "$MOZ_MEMORY"; then +- ], +- [int foo = res_ninit(&_res);], ++ int main(int argc, char **argv){ ++ int foo = res_ninit(&_res); ++ }], + [ac_cv_func_res_ninit=yes], ++ [ac_cv_func_res_ninit=no], + [ac_cv_func_res_ninit=no]) + ]) + +@@ -3517,7 +3523,7 @@ if test "$MOZ_MEMORY"; then *-darwin*) AC_DEFINE(MOZ_MEMORY_DARWIN) ;; @@ -49,3 +62,80 @@ Treat DragonFly like FreeBSD. AC_DEFINE(MOZ_MEMORY_BSD) ;; *-android*|*-linuxandroid*) +@@ -4417,6 +4423,16 @@ fi + dnl ======================================================== + dnl ECMAScript Internationalization API Support (uses ICU) + dnl ======================================================== ++ICU_LIB_NAMES= ++MOZ_NATIVE_ICU= ++MOZ_ARG_WITH_BOOL(system-icu, ++[ --with-system-icu ++ Use system icu (located with pkgconfig)], ++ MOZ_NATIVE_ICU=1) ++ ++if test -n "$MOZ_NATIVE_ICU"; then ++ PKG_CHECK_MODULES(MOZ_ICU, icu-i18n >= 50.1) ++fi + + if test -n "$JS_STANDALONE"; then + ENABLE_INTL_API=1 +@@ -4429,37 +4445,36 @@ MOZ_ARG_ENABLE_BOOL(intl-api, + dnl Settings for the implementation of the ECMAScript Internationalization API + if test -n "$ENABLE_INTL_API"; then + AC_DEFINE(ENABLE_INTL_API) +- # We build ICU as a static library. +- AC_DEFINE(U_STATIC_IMPLEMENTATION) + +- case "$OS_TARGET" in +- WINNT) +- ICU_LIB_NAMES="icuin icuuc icudt" +- ;; +- Darwin|Linux) +- ICU_LIB_NAMES="icui18n icuuc icudata" +- ;; +- *) +- AC_MSG_ERROR([ECMAScript Internationalization API is not yet supported on this platform]) +- esac +- +- ICU_LIBS='$(call EXPAND_LIBNAME_PATH,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/lib)' +-else +- ICU_LIB_NAMES= +- ICU_LIBS= ++ if test -z "$MOZ_NATIVE_ICU"; then ++ case "$OS_TARGET" in ++ WINNT) ++ ICU_LIB_NAMES="icuin icuuc icudt" ++ ;; ++ Darwin|Linux) ++ ICU_LIB_NAMES="icui18n icuuc icudata" ++ ;; ++ *) ++ AC_MSG_ERROR([ECMAScript Internationalization API is not yet supported on this platform]) ++ esac ++ MOZ_ICU_LIBS='$(call EXPAND_LIBNAME_PATH,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/lib)' ++ fi + fi + + AC_SUBST(ENABLE_INTL_API) + AC_SUBST(ICU_LIB_NAMES) +-AC_SUBST(ICU_LIBS) ++AC_SUBST(MOZ_ICU_LIBS) ++AC_SUBST(MOZ_NATIVE_ICU) + +-dnl Source files that use ICU should have control over which parts of the ICU +-dnl namespace they want to use. +-AC_DEFINE(U_USING_ICU_NAMESPACE,0) ++dnl Settings for ICU ++if test -n "$ENABLE_INTL_API" -a -z "$MOZ_NATIVE_ICU"; then ++ dnl We build ICU as a static library. ++ AC_DEFINE(U_STATIC_IMPLEMENTATION) + ++ dnl Source files that use ICU should have control over which parts of the ICU ++ dnl namespace they want to use. ++ AC_DEFINE(U_USING_ICU_NAMESPACE,0) + +-dnl Settings for ICU +-if test -n "$ENABLE_INTL_API" ; then + # Set ICU compile options + ICU_CPPFLAGS="" + # don't use icu namespace automatically in client code diff --git a/www/firefox/patches/patch-bf b/www/firefox/patches/patch-bf index 55c998c98e1..700b7b2a50e 100644 --- a/www/firefox/patches/patch-bf +++ b/www/firefox/patches/patch-bf @@ -1,17 +1,8 @@ -$NetBSD: patch-bf,v 1.1 2013/05/23 13:12:13 ryoon Exp $ +$NetBSD: patch-bf,v 1.2 2013/09/19 12:37:49 ryoon Exp $ ---- js/src/jsnativestack.cpp.orig 2013-03-26 22:17:48.000000000 +0000 +--- js/src/jsnativestack.cpp.orig 2013-09-10 03:43:36.000000000 +0000 +++ js/src/jsnativestack.cpp -@@ -19,7 +19,7 @@ - #elif defined(XP_MACOSX) || defined(DARWIN) || defined(XP_UNIX) - # include <pthread.h> - --# if defined(__FreeBSD__) || defined(__OpenBSD__) -+# if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) - # include <pthread_np.h> - # endif - -@@ -112,7 +112,7 @@ js::GetNativeStackBaseImpl() +@@ -114,7 +114,7 @@ js::GetNativeStackBaseImpl() pthread_attr_init(&sattr); # if defined(__OpenBSD__) stack_t ss; diff --git a/www/firefox/patches/patch-browser_app_profile_firefox.js b/www/firefox/patches/patch-browser_app_profile_firefox.js new file mode 100644 index 00000000000..d97001544b3 --- /dev/null +++ b/www/firefox/patches/patch-browser_app_profile_firefox.js @@ -0,0 +1,12 @@ +$NetBSD: patch-browser_app_profile_firefox.js,v 1.1 2013/09/19 12:37:49 ryoon Exp $ + +--- browser/app/profile/firefox.js.orig 2013-09-10 03:43:20.000000000 +0000 ++++ browser/app/profile/firefox.js +@@ -354,6 +354,7 @@ pref("browser.search.log", false); + pref("browser.search.order.1", "chrome://browser-region/locale/region.properties"); + pref("browser.search.order.2", "chrome://browser-region/locale/region.properties"); + pref("browser.search.order.3", "chrome://browser-region/locale/region.properties"); ++pref("browser.search.order.4", "chrome://browser-region/locale/region.properties"); + + // search bar results always open in a new tab + pref("browser.search.openintab", false); diff --git a/www/firefox/patches/patch-browser_locales_en-US_chrome_browser-region_region.properties b/www/firefox/patches/patch-browser_locales_en-US_chrome_browser-region_region.properties new file mode 100644 index 00000000000..f27a7cca15e --- /dev/null +++ b/www/firefox/patches/patch-browser_locales_en-US_chrome_browser-region_region.properties @@ -0,0 +1,12 @@ +$NetBSD: patch-browser_locales_en-US_chrome_browser-region_region.properties,v 1.1 2013/09/19 12:37:49 ryoon Exp $ + +--- browser/locales/en-US/chrome/browser-region/region.properties.orig 2013-09-10 03:43:22.000000000 +0000 ++++ browser/locales/en-US/chrome/browser-region/region.properties +@@ -9,6 +9,7 @@ browser.search.defaultenginename=Google + browser.search.order.1=Google + browser.search.order.2=Yahoo + browser.search.order.3=Bing ++browser.search.order.4=DuckDuckGo + + # This is the default set of web based feed handlers shown in the reader + # selection UI diff --git a/www/firefox/patches/patch-browser_locales_en-US_searchplugins_duckduckgo.xml b/www/firefox/patches/patch-browser_locales_en-US_searchplugins_duckduckgo.xml new file mode 100644 index 00000000000..6715d630595 --- /dev/null +++ b/www/firefox/patches/patch-browser_locales_en-US_searchplugins_duckduckgo.xml @@ -0,0 +1,16 @@ +$NetBSD: patch-browser_locales_en-US_searchplugins_duckduckgo.xml,v 1.1 2013/09/19 12:37:49 ryoon Exp $ + +--- browser/locales/en-US/searchplugins/duckduckgo.xml.orig 2013-09-14 15:17:46.000000000 +0000 ++++ browser/locales/en-US/searchplugins/duckduckgo.xml +@@ -0,0 +1,11 @@ ++<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> ++<ShortName>DuckDuckGo</ShortName> ++<Description>We believe in better search and not tracking.</Description> ++<InputEncoding>UTF-8</InputEncoding> ++<Image height="16" width="16" type="image/x-icon">data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAANcNAADXDQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJyDsJmlk8pf6+v3s/v7+++zr/fcnIOyzJyDsgCcg7CYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnIOwBJyDscCcg7PZttJ7/7Pfs//////++xO7/S5GA/ycg7P8nIOz2JyDscCcg7AEAAAAAAAAAAAAAAAAnIOwBJyDstScg7P8nIOz/Y8p5/2fHZf9Yv0z/YcF2/1rBUv8nIOz/JyDs/ycg7P8nIOy1JyDsAQAAAAAAAAAAJyDscCcg7P8nIOz/JyDs/4jQoP/p9+n//////05X3v9LkYD/JyDs/ycg7P8nIOz/JyDs/ycg7HAAAAAAJyDsJicg7PYnIOz/JyDs/zUu7f/+/v////////////89N+7/JyDs/yUo7f8nIOz/JyDs/ycg7P8nIOz2JyDsJicg7IAnIOz/JyDs/ycg7P9hXPH////////////t/P//GIr2/wfD+/8Gyfz/DKv5/yM57/8nIOz/JyDs/ycg7H8nIOyzJyDs/ycg7P8nIOz/jov1////////////Otz9/w3G/P8cWfH/JSvt/ycg7P8nIOz/JyDs/ycg7P8nIOyzJyDs5icg7P8nIOz/JyDs/7u5+f///////////27l/v8E0v3/BNL9/wTQ/f8Oofn/IT7v/ycg7P8nIOz/JyDs5icg7OYnIOz/JyDs/ycg7P/p6P3/uWsC////////////5fr//6Po/f8Thfb/DKv5/w6f+f8nIOz/JyDs/ycg7OYnIOyzJyDs/ycg7P8nIOz/9/b+/////////////////7lrAv/V1Pv/JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOyzJyDsgCcg7P8nIOz/JyDs/8/N+///////////////////////iIX1/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDsfycg7CYnIOz2JyDs/ycg7P9FP+7/q6n4/+7u/f/n5v3/fXn0/yoj7P8nIOz/JyDs/ycg7P8nIOz/JyDs9icg7CYAAAAAJyDscCcg7P8nIOz/wsD6/+no/f/Y1/z/eHTz/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7HAAAAAAAAAAACcg7AEnIOy1JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7LUnIOwBAAAAAAAAAAAAAAAAJyDsAScg7HAnIOz2JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs9icg7HAnIOwBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJyDsJicg7IAnIOyzJyDs5icg7OYnIOyzJyDsgCcg7CYAAAAAAAAAAAAAAAAAAAAA+B8AAPAPAADAAwAAwAMAAIABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAACAAQAAwAMAAMADAADwDwAA+B8AAA==</Image> ++<Url type="text/html" method="GET" template="https://duckduckgo.com/"> ++<Param name="q" value="{searchTerms}"/> ++<Param name="t" value="freebsd"/> ++</Url> ++<SearchForm>https://duckduckgo.com/</SearchForm> ++</SearchPlugin> diff --git a/www/firefox/patches/patch-browser_locales_en-US_searchplugins_list.txt b/www/firefox/patches/patch-browser_locales_en-US_searchplugins_list.txt new file mode 100644 index 00000000000..debcccc95cd --- /dev/null +++ b/www/firefox/patches/patch-browser_locales_en-US_searchplugins_list.txt @@ -0,0 +1,11 @@ +$NetBSD: patch-browser_locales_en-US_searchplugins_list.txt,v 1.1 2013/09/19 12:37:49 ryoon Exp $ + +--- browser/locales/en-US/searchplugins/list.txt.orig 2013-09-10 03:43:22.000000000 +0000 ++++ browser/locales/en-US/searchplugins/list.txt +@@ -1,5 +1,6 @@ + amazondotcom + bing ++duckduckgo + eBay + google + twitter diff --git a/www/firefox/patches/patch-build_pgo_profileserver.py b/www/firefox/patches/patch-build_pgo_profileserver.py new file mode 100644 index 00000000000..b45da7921cc --- /dev/null +++ b/www/firefox/patches/patch-build_pgo_profileserver.py @@ -0,0 +1,13 @@ +$NetBSD: patch-build_pgo_profileserver.py,v 1.1 2013/09/19 12:37:49 ryoon Exp $ + +--- build/pgo/profileserver.py.orig 2013-09-10 03:43:22.000000000 +0000 ++++ build/pgo/profileserver.py +@@ -59,7 +59,7 @@ if __name__ == '__main__': + env["MOZ_JAR_LOG_FILE"] = os.path.abspath(jarlog) + print "jarlog: %s" % env["MOZ_JAR_LOG_FILE"] + +- cmdargs = ["http://localhost:%d/index.html" % PORT] ++ cmdargs = ["http://127.0.0.1:%d/index.html" % PORT] + runner = FirefoxRunner(profile=profile, + binary=build.get_binary_path(where="staged-package"), + cmdargs=cmdargs, diff --git a/www/firefox/patches/patch-config_Makefile.in b/www/firefox/patches/patch-config_Makefile.in new file mode 100644 index 00000000000..b9ed3992add --- /dev/null +++ b/www/firefox/patches/patch-config_Makefile.in @@ -0,0 +1,12 @@ +$NetBSD: patch-config_Makefile.in,v 1.1 2013/09/19 12:37:49 ryoon Exp $ + +--- config/Makefile.in.orig 2013-09-10 03:43:23.000000000 +0000 ++++ config/Makefile.in +@@ -102,6 +102,7 @@ export:: $(export-preqs) + -DMOZ_NATIVE_JPEG=$(MOZ_NATIVE_JPEG) \ + -DMOZ_NATIVE_LIBEVENT=$(MOZ_NATIVE_LIBEVENT) \ + -DMOZ_NATIVE_LIBVPX=$(MOZ_NATIVE_LIBVPX) \ ++ -DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \ + $(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers + $(INSTALL) system_wrappers $(DIST) + diff --git a/www/firefox/patches/patch-config_system-headers b/www/firefox/patches/patch-config_system-headers index a7136c49c30..f83f3ada4d2 100644 --- a/www/firefox/patches/patch-config_system-headers +++ b/www/firefox/patches/patch-config_system-headers @@ -1,10 +1,19 @@ -$NetBSD: patch-config_system-headers,v 1.1 2013/05/23 13:12:13 ryoon Exp $ +$NetBSD: patch-config_system-headers,v 1.2 2013/09/19 12:37:49 ryoon Exp $ ---- config/system-headers.orig 2013-05-11 19:19:23.000000000 +0000 +--- config/system-headers.orig 2013-09-10 03:43:23.000000000 +0000 +++ config/system-headers -@@ -1126,3 +1126,5 @@ sys/thr.h - sys/user.h - kvm.h +@@ -1132,3 +1132,14 @@ kvm.h spawn.h -+err.h -+xlocale.h + err.h + xlocale.h ++#if MOZ_NATIVE_ICU==1 ++unicode/locid.h ++unicode/numsys.h ++unicode/ucal.h ++unicode/ucol.h ++unicode/udat.h ++unicode/udatpg.h ++unicode/uenum.h ++unicode/unum.h ++unicode/ustring.h ++#endif diff --git a/www/firefox/patches/patch-content_media_gstreamer_GStreamerFormatHelper.cpp b/www/firefox/patches/patch-content_media_gstreamer_GStreamerFormatHelper.cpp new file mode 100644 index 00000000000..0fdaee27d85 --- /dev/null +++ b/www/firefox/patches/patch-content_media_gstreamer_GStreamerFormatHelper.cpp @@ -0,0 +1,166 @@ +$NetBSD: patch-content_media_gstreamer_GStreamerFormatHelper.cpp,v 1.1 2013/09/19 12:37:49 ryoon Exp $ + +--- content/media/gstreamer/GStreamerFormatHelper.cpp.orig 2013-09-10 03:43:24.000000000 +0000 ++++ content/media/gstreamer/GStreamerFormatHelper.cpp +@@ -6,7 +6,7 @@ + + #include "GStreamerFormatHelper.h" + #include "nsCharSeparatedTokenizer.h" +-#include "nsXPCOMStrings.h" ++#include "nsString.h" + #include "GStreamerLoader.h" + + #define ENTRY_FORMAT(entry) entry[0] +@@ -36,7 +36,7 @@ void GStreamerFormatHelper::Shutdown() { + } + } + +-char const *const GStreamerFormatHelper::mContainers[6][2] = { ++static char const *const sContainers[6][2] = { + {"video/mp4", "video/quicktime"}, + {"video/quicktime", "video/quicktime"}, + {"audio/mp4", "audio/x-m4a"}, +@@ -45,7 +45,7 @@ char const *const GStreamerFormatHelper: + {"audio/mp3", "audio/mpeg, mpegversion=(int)1"}, + }; + +-char const *const GStreamerFormatHelper::mCodecs[9][2] = { ++static char const *const sCodecs[9][2] = { + {"avc1.42E01E", "video/x-h264"}, + {"avc1.42001E", "video/x-h264"}, + {"avc1.58A01E", "video/x-h264"}, +@@ -57,6 +57,15 @@ char const *const GStreamerFormatHelper: + {"mp3", "audio/mpeg, mpegversion=(int)1"}, + }; + ++static char const * const sDefaultCodecCaps[][2] = { ++ {"video/mp4", "video/x-h264"}, ++ {"video/quicktime", "video/x-h264"}, ++ {"audio/mp4", "audio/mpeg, mpegversion=(int)4"}, ++ {"audio/x-m4a", "audio/mpeg, mpegversion=(int)4"}, ++ {"audio/mp3", "audio/mpeg, layer=(int)3"}, ++ {"audio/mpeg", "audio/mpeg, layer=(int)3"} ++}; ++ + GStreamerFormatHelper::GStreamerFormatHelper() + : mFactories(nullptr), + mCookie(static_cast<uint32_t>(-1)) +@@ -66,15 +75,15 @@ GStreamerFormatHelper::GStreamerFormatHe + } + + mSupportedContainerCaps = gst_caps_new_empty(); +- for (unsigned int i = 0; i < G_N_ELEMENTS(mContainers); i++) { +- const char* capsString = mContainers[i][1]; ++ for (unsigned int i = 0; i < G_N_ELEMENTS(sContainers); i++) { ++ const char* capsString = sContainers[i][1]; + GstCaps* caps = gst_caps_from_string(capsString); + gst_caps_append(mSupportedContainerCaps, caps); + } + + mSupportedCodecCaps = gst_caps_new_empty(); +- for (unsigned int i = 0; i < G_N_ELEMENTS(mCodecs); i++) { +- const char* capsString = mCodecs[i][1]; ++ for (unsigned int i = 0; i < G_N_ELEMENTS(sCodecs); i++) { ++ const char* capsString = sCodecs[i][1]; + GstCaps* caps = gst_caps_from_string(capsString); + gst_caps_append(mSupportedCodecCaps, caps); + } +@@ -92,6 +101,41 @@ GStreamerFormatHelper::~GStreamerFormatH + g_list_free(mFactories); + } + ++static GstCaps * ++GetContainerCapsFromMIMEType(const char *aType) { ++ /* convert aMIMEType to gst container caps */ ++ const char* capsString = nullptr; ++ for (uint32_t i = 0; i < G_N_ELEMENTS(sContainers); i++) { ++ if (!strcmp(ENTRY_FORMAT(sContainers[i]), aType)) { ++ capsString = ENTRY_CAPS(sContainers[i]); ++ break; ++ } ++ } ++ ++ if (!capsString) { ++ /* we couldn't find any matching caps */ ++ return nullptr; ++ } ++ ++ return gst_caps_from_string(capsString); ++} ++ ++static GstCaps * ++GetDefaultCapsFromMIMEType(const char *aType) { ++ GstCaps *caps = GetContainerCapsFromMIMEType(aType); ++ ++ for (uint32_t i = 0; i < G_N_ELEMENTS(sDefaultCodecCaps); i++) { ++ if (!strcmp(sDefaultCodecCaps[i][0], aType)) { ++ GstCaps *tmp = gst_caps_from_string(sDefaultCodecCaps[i][1]); ++ ++ gst_caps_append(caps, tmp); ++ return caps; ++ } ++ } ++ ++ return nullptr; ++} ++ + bool GStreamerFormatHelper::CanHandleMediaType(const nsACString& aMIMEType, + const nsAString* aCodecs) { + if (!sLoadOK) { +@@ -101,7 +145,15 @@ bool GStreamerFormatHelper::CanHandleMed + const char *type; + NS_CStringGetData(aMIMEType, &type, NULL); + +- GstCaps* caps = ConvertFormatsToCaps(type, aCodecs); ++ GstCaps *caps; ++ if (aCodecs && !aCodecs->IsEmpty()) { ++ caps = ConvertFormatsToCaps(type, aCodecs); ++ } else { ++ // Get a minimal set of codec caps for this MIME type we should support so ++ // that we don't overreport MIME types we are able to play. ++ caps = GetDefaultCapsFromMIMEType(type); ++ } ++ + if (!caps) { + return false; + } +@@ -118,21 +170,11 @@ GstCaps* GStreamerFormatHelper::ConvertF + + unsigned int i; + +- /* convert aMIMEType to gst container caps */ +- const char* capsString = nullptr; +- for (i = 0; i < G_N_ELEMENTS(mContainers); i++) { +- if (!strcmp(ENTRY_FORMAT(mContainers[i]), aMIMEType)) { +- capsString = ENTRY_CAPS(mContainers[i]); +- break; +- } +- } +- +- if (!capsString) { +- /* we couldn't find any matching caps */ ++ GstCaps *caps = GetContainerCapsFromMIMEType(aMIMEType); ++ if (!caps) { + return nullptr; + } + +- GstCaps* caps = gst_caps_from_string(capsString); + /* container only */ + if (!aCodecs) { + return caps; +@@ -141,11 +183,11 @@ GstCaps* GStreamerFormatHelper::ConvertF + nsCharSeparatedTokenizer tokenizer(*aCodecs, ','); + while (tokenizer.hasMoreTokens()) { + const nsSubstring& codec = tokenizer.nextToken(); +- capsString = nullptr; ++ const char *capsString = nullptr; + +- for (i = 0; i < G_N_ELEMENTS(mCodecs); i++) { +- if (codec.EqualsASCII(ENTRY_FORMAT(mCodecs[i]))) { +- capsString = ENTRY_CAPS(mCodecs[i]); ++ for (i = 0; i < G_N_ELEMENTS(sCodecs); i++) { ++ if (codec.EqualsASCII(ENTRY_FORMAT(sCodecs[i]))) { ++ capsString = ENTRY_CAPS(sCodecs[i]); + break; + } + } diff --git a/www/firefox/patches/patch-dist_stl__wrappers_ios b/www/firefox/patches/patch-dist_stl__wrappers_ios deleted file mode 100644 index f2519fadc29..00000000000 --- a/www/firefox/patches/patch-dist_stl__wrappers_ios +++ /dev/null @@ -1,8 +0,0 @@ -$NetBSD: patch-dist_stl__wrappers_ios,v 1.1 2013/08/07 12:17:54 ryoon Exp $ - ---- dist/stl_wrappers/ios.orig 2013-08-04 08:03:50.000000000 +0000 -+++ dist/stl_wrappers/ios -@@ -0,0 +1,3 @@ -+#pragma GCC visibility push(default) -+#include_next <ios> -+#pragma GCC visibility pop diff --git a/www/firefox/patches/patch-dist_stl__wrappers_ostream b/www/firefox/patches/patch-dist_stl__wrappers_ostream deleted file mode 100644 index 2ebd29d83c7..00000000000 --- a/www/firefox/patches/patch-dist_stl__wrappers_ostream +++ /dev/null @@ -1,8 +0,0 @@ -$NetBSD: patch-dist_stl__wrappers_ostream,v 1.1 2013/08/07 12:17:54 ryoon Exp $ - ---- dist/stl_wrappers/ostream.orig 2013-08-04 08:03:50.000000000 +0000 -+++ dist/stl_wrappers/ostream -@@ -0,0 +1,3 @@ -+#pragma GCC visibility push(default) -+#include_next <ostream> -+#pragma GCC visibility pop diff --git a/www/firefox/patches/patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp b/www/firefox/patches/patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp new file mode 100644 index 00000000000..a3bb06d8e72 --- /dev/null +++ b/www/firefox/patches/patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp @@ -0,0 +1,17 @@ +$NetBSD: patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp,v 1.1 2013/09/19 12:37:49 ryoon Exp $ + +--- extensions/spellcheck/hunspell/src/mozHunspell.cpp.orig 2013-09-10 03:43:29.000000000 +0000 ++++ extensions/spellcheck/hunspell/src/mozHunspell.cpp +@@ -417,6 +417,12 @@ mozHunspell::LoadDictionaryList() + } + } + ++ // load system hunspell dictionaries ++ nsIFile* hunDir; ++ NS_NewNativeLocalFile(NS_LITERAL_CSTRING("@PREFIX@/share/hunspell"), ++ true, &hunDir); ++ LoadDictionariesFromDir(hunDir); ++ + // find dictionaries from extensions requiring restart + nsCOMPtr<nsISimpleEnumerator> dictDirs; + rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY_LIST, diff --git a/www/firefox/patches/patch-gfx_skia_Makefile.in b/www/firefox/patches/patch-gfx_skia_Makefile.in deleted file mode 100644 index 57738e8e543..00000000000 --- a/www/firefox/patches/patch-gfx_skia_Makefile.in +++ /dev/null @@ -1,16 +0,0 @@ -$NetBSD: patch-gfx_skia_Makefile.in,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- gfx/skia/Makefile.in.orig 2013-01-04 23:44:33.000000000 +0000 -+++ gfx/skia/Makefile.in -@@ -355,10 +355,9 @@ CPPSRCS += \ - SkMMapStream.cpp \ - SkOSFile.cpp \ - $(NULL) --ifeq (Linux,$(OS_TARGET)) -+ifneq (,$(or $(MOZ_X11),$(filter Linux,$(OS_TARGET)))) - CPPSRCS += \ - SkFontHost_linux.cpp \ -- SkFontHost_tables.cpp \ - SkTime_Unix.cpp \ - $(NULL) - endif diff --git a/www/firefox/patches/patch-gfx_skia_moz.build b/www/firefox/patches/patch-gfx_skia_moz.build new file mode 100644 index 00000000000..c61d41b5e87 --- /dev/null +++ b/www/firefox/patches/patch-gfx_skia_moz.build @@ -0,0 +1,16 @@ +$NetBSD: patch-gfx_skia_moz.build,v 1.1 2013/09/19 12:37:49 ryoon Exp $ + +--- gfx/skia/moz.build.orig 2013-09-10 03:43:30.000000000 +0000 ++++ gfx/skia/moz.build +@@ -188,10 +188,9 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt + 'SkMMapStream.cpp', + 'SkOSFile.cpp', + ] +- if CONFIG['OS_TARGET'] == 'Linux': ++ if CONFIG['MOZ_X11'] == 1 or CONFIG['OS_TARGET'] == 'Linux': + CPP_SOURCES += [ + 'SkFontHost_linux.cpp', +- 'SkFontHost_tables.cpp', + 'SkThread_pthread.cpp', + 'SkTime_Unix.cpp', + ] diff --git a/www/firefox/patches/patch-gfx_thebes_gfxPlatform.cpp b/www/firefox/patches/patch-gfx_thebes_gfxPlatform.cpp deleted file mode 100644 index f9bc2d0eedc..00000000000 --- a/www/firefox/patches/patch-gfx_thebes_gfxPlatform.cpp +++ /dev/null @@ -1,36 +0,0 @@ -$NetBSD: patch-gfx_thebes_gfxPlatform.cpp,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- gfx/thebes/gfxPlatform.cpp.orig 2013-01-04 23:44:33.000000000 +0000 -+++ gfx/thebes/gfxPlatform.cpp -@@ -507,11 +507,9 @@ void SourceBufferDestroy(void *srcSurfUD - delete static_cast<SourceSurfaceUserData*>(srcSurfUD); - } - --void SourceSnapshotDetached(cairo_surface_t *nullSurf) -+void SourceSnapshotDetached(void *nullSurf) - { -- gfxImageSurface* origSurf = -- static_cast<gfxImageSurface*>(cairo_surface_get_user_data(nullSurf, &kSourceSurface)); -- -+ gfxImageSurface *origSurf = static_cast<gfxImageSurface*>(nullSurf); - origSurf->SetData(&kSourceSurface, NULL, NULL); - } - -@@ -626,14 +624,9 @@ gfxPlatform::GetSourceSurfaceForSurface( - - } - -- cairo_surface_t *nullSurf = -- cairo_null_surface_create(CAIRO_CONTENT_COLOR_ALPHA); -- cairo_surface_set_user_data(nullSurf, -- &kSourceSurface, -- imgSurface, -- NULL); -- cairo_surface_attach_snapshot(imgSurface->CairoSurface(), nullSurf, SourceSnapshotDetached); -- cairo_surface_destroy(nullSurf); -+ cairo_surface_set_mime_data(imgSurface->CairoSurface(), "mozilla/magic", -+ (const unsigned char *) "data", 4, -+ SourceSnapshotDetached, imgSurface.get()); - } - - SourceSurfaceUserData *srcSurfUD = new SourceSurfaceUserData; diff --git a/www/firefox/patches/patch-ipc_chromium_Makefile.in b/www/firefox/patches/patch-ipc_chromium_Makefile.in index 4f3ce4461ee..e68ecf9ea86 100644 --- a/www/firefox/patches/patch-ipc_chromium_Makefile.in +++ b/www/firefox/patches/patch-ipc_chromium_Makefile.in @@ -1,10 +1,21 @@ -$NetBSD: patch-ipc_chromium_Makefile.in,v 1.1 2013/07/17 11:00:13 jperkin Exp $ +$NetBSD: patch-ipc_chromium_Makefile.in,v 1.2 2013/09/19 12:37:49 ryoon Exp $ ---- ipc/chromium/Makefile.in.orig 2013-05-11 19:19:32.000000000 +0000 +--- ipc/chromium/Makefile.in.orig 2013-09-10 03:43:34.000000000 +0000 +++ ipc/chromium/Makefile.in -@@ -267,6 +267,33 @@ endif +@@ -23,9 +23,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_CFLAGS)) + endif # } - endif # } OS_BSD + vpath %.cc \ +@@ -68,6 +66,33 @@ CMMSRCS += \ + + endif # } OS_MACOSX +ifdef OS_SOLARIS # { + diff --git a/www/firefox/patches/patch-ipc_chromium_src_base_platform__thread.h b/www/firefox/patches/patch-ipc_chromium_src_base_platform__thread.h index 341e5891908..2320a5b4052 100644 --- a/www/firefox/patches/patch-ipc_chromium_src_base_platform__thread.h +++ b/www/firefox/patches/patch-ipc_chromium_src_base_platform__thread.h @@ -1,9 +1,9 @@ -$NetBSD: patch-ipc_chromium_src_base_platform__thread.h,v 1.1 2013/07/17 11:00:13 jperkin Exp $ +$NetBSD: patch-ipc_chromium_src_base_platform__thread.h,v 1.2 2013/09/19 12:37:49 ryoon Exp $ ---- ipc/chromium/src/base/platform_thread.h.orig 2013-05-11 19:19:32.000000000 +0000 +--- ipc/chromium/src/base/platform_thread.h.orig 2013-09-10 03:43:34.000000000 +0000 +++ ipc/chromium/src/base/platform_thread.h @@ -25,6 +25,9 @@ typedef pthread_t PlatformThreadHandle; - #if defined(OS_LINUX) || defined(OS_OPENBSD) + #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(__GLIBC__) #include <unistd.h> typedef pid_t PlatformThreadId; +#elif defined(OS_SOLARIS) 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 077f126ddb0..b9f49fea019 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,6 +1,6 @@ -$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.2 2013/07/17 11:00:13 jperkin Exp $ +$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.3 2013/09/19 12:37:49 ryoon Exp $ ---- ipc/chromium/src/base/platform_thread_posix.cc.orig 2013-06-18 11:01:23.000000000 +0000 +--- ipc/chromium/src/base/platform_thread_posix.cc.orig 2013-09-10 03:43:34.000000000 +0000 +++ ipc/chromium/src/base/platform_thread_posix.cc @@ -10,7 +10,9 @@ #if defined(OS_MACOSX) @@ -12,12 +12,13 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.2 2013/07/17 #elif defined(OS_LINUX) #include <sys/syscall.h> #include <sys/prctl.h> -@@ -106,7 +108,7 @@ void PlatformThread::SetName(const char* - pthread_set_name_np(pthread_self(), name); - #elif defined(OS_NETBSD) +@@ -110,7 +112,8 @@ 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_SOLARIS) - prctl(PR_SET_NAME, reinterpret_cast<uintptr_t>(name), 0, 0, 0); ++ prctl(PR_SET_NAME, reinterpret_cast<uintptr_t>(name), 0, 0, 0); #endif } + #endif // !OS_MACOSX diff --git a/www/firefox/patches/patch-ipc_chromium_src_base_process__util.h b/www/firefox/patches/patch-ipc_chromium_src_base_process__util.h index 3fab645a60d..f048690bf4c 100644 --- a/www/firefox/patches/patch-ipc_chromium_src_base_process__util.h +++ b/www/firefox/patches/patch-ipc_chromium_src_base_process__util.h @@ -1,13 +1,13 @@ -$NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.1 2013/07/17 11:00:13 jperkin Exp $ +$NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.2 2013/09/19 12:37:49 ryoon Exp $ ---- ipc/chromium/src/base/process_util.h.orig 2013-05-11 19:19:32.000000000 +0000 +--- ipc/chromium/src/base/process_util.h.orig 2013-09-10 03:43:34.000000000 +0000 +++ ipc/chromium/src/base/process_util.h @@ -13,7 +13,7 @@ #if defined(OS_WIN) #include <windows.h> #include <tlhelp32.h> --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_SOLARIS) +-#elif defined(OS_LINUX) || defined(__GLIBC__) ++#elif defined(OS_LINUX) || defined(__GLIBC__) || defined(OS_SOLARIS) #include <dirent.h> #include <limits.h> #include <sys/types.h> @@ -21,12 +21,12 @@ $NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.1 2013/07/17 11:00:13 j // TODO(port): we should not rely on a Win32 structure. struct ProcessEntry { int pid; -@@ -317,7 +320,7 @@ class NamedProcessIterator { +@@ -316,7 +319,7 @@ class NamedProcessIterator { #if defined(OS_WIN) HANDLE snapshot_; bool started_iteration_; --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_SOLARIS) +-#elif defined(OS_LINUX) || defined(__GLIBC__) ++#elif defined(OS_LINUX) || defined(__GLIBC__) || defined(OS_SOLARIS) DIR *procfs_dir_; #elif defined(OS_BSD) std::vector<ProcessEntry> content; diff --git a/www/firefox/patches/patch-js__public__HeapAPI.h b/www/firefox/patches/patch-js__public__HeapAPI.h deleted file mode 100644 index 5bdfd080f57..00000000000 --- a/www/firefox/patches/patch-js__public__HeapAPI.h +++ /dev/null @@ -1,37 +0,0 @@ -$NetBSD: patch-js__public__HeapAPI.h,v 1.3 2013/08/07 12:17:54 ryoon Exp $ - -From bugzilla, bug 840242, -https://hg.mozilla.org/integration/mozilla-inbound/rev/49e4ff129351 -Use the runtime page size to control arena decommit. - -As a side effect, this removes the hard coded page-size == 4k requirement. - - -+++ js/public/HeapAPI.h ---- js/public/HeapAPI.h.orig 2013-07-30 00:58:18.000000000 +0000 -+++ js/public/HeapAPI.h -@@ -13,24 +13,7 @@ - namespace js { - namespace gc { - --/* -- * Page size must be static to support our arena pointer optimizations, so we -- * are forced to support each platform with non-4096 pages as a special case. -- * Note: The freelist supports a maximum arena shift of 15. -- * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. -- */ --#if (defined(SOLARIS) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && \ -- (defined(__sparc) || defined(__sparcv9) || defined(__ia64)) --const size_t PageShift = 13; --const size_t ArenaShift = PageShift; --#elif defined(__powerpc64__) --const size_t PageShift = 16; - const size_t ArenaShift = 12; --#else --const size_t PageShift = 12; --const size_t ArenaShift = PageShift; --#endif --const size_t PageSize = size_t(1) << PageShift; - const size_t ArenaSize = size_t(1) << ArenaShift; - const size_t ArenaMask = ArenaSize - 1; - diff --git a/www/firefox/patches/patch-js__public__Value.h b/www/firefox/patches/patch-js__public__Value.h deleted file mode 100644 index 968744fe625..00000000000 --- a/www/firefox/patches/patch-js__public__Value.h +++ /dev/null @@ -1,16 +0,0 @@ -$NetBSD: patch-js__public__Value.h,v 1.1 2013/08/22 14:23:35 martin Exp $ - -Fix jsvalue_layout for big endian 64 bit case. -Fixed the same way upstream already. - - ---- js/public/Value.h.orig 2013-08-14 15:49:29.000000000 +0200 -+++ js/public/Value.h 2013-08-22 14:55:04.000000000 +0200 -@@ -321,7 +321,6 @@ typedef union jsval_layout - int32_t i32; - uint32_t u32; - JSWhyMagic why; -- uintptr_t word; - } payload; - } s; - double asDouble; diff --git a/www/firefox/patches/patch-js__src__gc__Marking.cpp b/www/firefox/patches/patch-js__src__gc__Marking.cpp deleted file mode 100644 index 3041f88e4bd..00000000000 --- a/www/firefox/patches/patch-js__src__gc__Marking.cpp +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-js__src__gc__Marking.cpp,v 1.2 2013/06/26 11:32:12 ryoon Exp $ - -# HG changeset patch -# User Martin Husemann <martin@netbsd.org> -# Date 1370038993 -7200 -# Node ID d16914942a9c502dde37dce2a1deb09050218ba8 -# Parent d296fcc8f3dd6254c862cdfd47a5580ee05a94f4 -Bug 871101: Make "kind" a full uintptr_t value so it overwrites its pointer union counterpart for sure r=billm - -diff js/src/gc/Marking.cpp js/src/gc/Marking.cpp ---- js/src/gc/Marking.cpp.orig 2013-06-17 22:13:09.000000000 +0000 -+++ js/src/gc/Marking.cpp -@@ -1143,7 +1143,7 @@ struct SlotArrayLayout - { - union { - HeapSlot *end; -- HeapSlot::Kind kind; -+ uintptr_t kind; - }; - union { - HeapSlot *start; diff --git a/www/firefox/patches/patch-js__src__gc__Memory.cpp b/www/firefox/patches/patch-js__src__gc__Memory.cpp deleted file mode 100644 index cd4734fe3ff..00000000000 --- a/www/firefox/patches/patch-js__src__gc__Memory.cpp +++ /dev/null @@ -1,319 +0,0 @@ -$NetBSD: patch-js__src__gc__Memory.cpp,v 1.1 2013/06/21 23:11:42 ryoon Exp $ - -From bugzilla, bug 840242, attachment v1 -Use the runtime page size to control arena decommit. - -As a side effect, this removes the hard coded page-size == 4k requirement. - - -diff js/src/gc/Memory.cpp js/src/gc/Memory.cpp ---- js/src/gc/Memory.cpp.orig 2013-05-11 21:19:33.000000000 +0200 -+++ js/src/gc/Memory.cpp 2013-06-10 13:45:26.000000000 +0200 -@@ -8,6 +8,7 @@ - #include "mozilla/Assertions.h" - - #include "jsapi.h" -+#include "jscntxt.h" - - #include "js/HeapAPI.h" - #include "js/Utility.h" -@@ -17,40 +18,35 @@ - using namespace js::gc; - - /* Unused memory decommiting requires the arena size match the page size. */ --static bool --DecommitEnabled() -+bool -+gc::DecommitEnabled(JSRuntime *rt) - { -- return PageSize == ArenaSize; -+ return rt->gcSystemPageSize == ArenaSize; - } - - #if defined(XP_WIN) - #include "jswin.h" - #include <psapi.h> - --static size_t AllocationGranularity = 0; -- - void - gc::InitMemorySubsystem() - { - SYSTEM_INFO sysinfo; - GetSystemInfo(&sysinfo); -- if (sysinfo.dwPageSize != PageSize) { -- fprintf(stderr,"SpiderMonkey compiled with incorrect page size; please update js/public/HeapAPI.h.\n"); -- MOZ_CRASH(); -- } -- AllocationGranularity = sysinfo.dwAllocationGranularity; -+ rt->gcSystemPageSize = sysinfo.dwPageSize; -+ rt->gcSystemAllocGranularity = sysinfo.dwAllocationGranularity; - } - - void * --gc::MapAlignedPages(size_t size, size_t alignment) -+gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) - { - JS_ASSERT(size >= alignment); - JS_ASSERT(size % alignment == 0); -- JS_ASSERT(size % PageSize == 0); -- JS_ASSERT(alignment % AllocationGranularity == 0); -+ JS_ASSERT(size % rt->gcSystemPageSize == 0); -+ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); - - /* Special case: If we want allocation alignment, no further work is needed. */ -- if (alignment == AllocationGranularity) { -+ if (alignment == rt->gcSystemAllocGranularity) { - return VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); - } - -@@ -74,7 +70,7 @@ - if (!p) - return NULL; - void *chunkStart = (void *)(uintptr_t(p) + (alignment - (uintptr_t(p) % alignment))); -- UnmapPages(p, size * 2); -+ UnmapPages(rt, p, size * 2); - p = VirtualAlloc(chunkStart, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); - - /* Failure here indicates a race with another thread, so try again. */ -@@ -85,26 +81,26 @@ - } - - void --gc::UnmapPages(void *p, size_t size) -+gc::UnmapPages(JSRuntime *rt, void *p, size_t size) - { - JS_ALWAYS_TRUE(VirtualFree(p, 0, MEM_RELEASE)); - } - - bool --gc::MarkPagesUnused(void *p, size_t size) -+gc::MarkPagesUnused(JSRuntime *rt, void *p, size_t size) - { -- if (!DecommitEnabled()) -- return false; -+ if (!DecommitEnabled(rt)) -+ return true; - -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - LPVOID p2 = VirtualAlloc(p, size, MEM_RESET, PAGE_READWRITE); - return p2 == p; - } - - bool --gc::MarkPagesInUse(void *p, size_t size) -+gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) - { -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - return true; - } - -@@ -126,12 +122,13 @@ - #define OS2_MAX_RECURSIONS 16 - - void --gc::InitMemorySubsystem() -+gc::InitMemorySubsystem(JSRuntime *rt) - { -+ rt->gcSystemPageSize = rt->gcSystemAllocGranularity = ArenaSize; - } - - void --gc::UnmapPages(void *addr, size_t size) -+gc::UnmapPages(JSRuntime *rt, void *addr, size_t size) - { - if (!DosFreeMem(addr)) - return; -@@ -152,7 +149,7 @@ - } - - static void * --gc::MapAlignedPagesRecursively(size_t size, size_t alignment, int& recursions) -+gc::MapAlignedPagesRecursively(JSRuntime *rt, size_t size, size_t alignment, int& recursions) - { - if (++recursions >= OS2_MAX_RECURSIONS) - return NULL; -@@ -178,7 +175,7 @@ - unsigned long rc = DosQueryMem(&(static_cast<char*>(tmp))[size], - &cb, &flags); - if (!rc && (flags & PAG_FREE) && cb >= filler) { -- UnmapPages(tmp, 0); -+ UnmapPages(rt, tmp, 0); - if (DosAllocMem(&tmp, filler, - OBJ_ANY | PAG_COMMIT | PAG_READ | PAG_WRITE)) { - JS_ALWAYS_TRUE(DosAllocMem(&tmp, filler, -@@ -186,19 +183,19 @@ - } - } - -- void *p = MapAlignedPagesRecursively(size, alignment, recursions); -- UnmapPages(tmp, 0); -+ void *p = MapAlignedPagesRecursively(rt, size, alignment, recursions); -+ UnmapPages(rt, tmp, 0); - - return p; - } - - void * --gc::MapAlignedPages(size_t size, size_t alignment) -+gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) - { - JS_ASSERT(size >= alignment); - JS_ASSERT(size % alignment == 0); -- JS_ASSERT(size % PageSize == 0); -- JS_ASSERT(alignment % PageSize == 0); -+ JS_ASSERT(size % rt->gcSystemPageSize == 0); -+ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); - - int recursions = -1; - -@@ -207,7 +204,7 @@ - * of the right size by recursively allocating blocks of unaligned - * free memory until only an aligned allocation is possible. - */ -- void *p = MapAlignedPagesRecursively(size, alignment, recursions); -+ void *p = MapAlignedPagesRecursively(rt, size, alignment, recursions); - if (p) - return p; - -@@ -229,16 +226,16 @@ - } - - bool --gc::MarkPagesUnused(void *p, size_t size) -+gc::MarkPagesUnused(JSRuntime *rt, void *p, size_t size) - { -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - return true; - } - - bool --gc::MarkPagesInUse(void *p, size_t size) -+gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) - { -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - return true; - } - -@@ -258,17 +255,18 @@ - #endif - - void --gc::InitMemorySubsystem() -+gc::InitMemorySubsystem(JSRuntime *rt) - { -+ rt->gcSystemPageSize = rt->gcSystemAllocGranularity = size_t(sysconf(_SC_PAGESIZE)); - } - - void * --gc::MapAlignedPages(size_t size, size_t alignment) -+gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) - { - JS_ASSERT(size >= alignment); - JS_ASSERT(size % alignment == 0); -- JS_ASSERT(size % PageSize == 0); -- JS_ASSERT(alignment % PageSize == 0); -+ JS_ASSERT(size % rt->gcSystemPageSize == 0); -+ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); - - int prot = PROT_READ | PROT_WRITE; - int flags = MAP_PRIVATE | MAP_ANON | MAP_ALIGN | MAP_NOSYNC; -@@ -280,22 +278,22 @@ - } - - void --gc::UnmapPages(void *p, size_t size) -+gc::UnmapPages(JSRuntime *rt, void *p, size_t size) - { - JS_ALWAYS_TRUE(0 == munmap((caddr_t)p, size)); - } - - bool --gc::MarkPagesUnused(void *p, size_t size) -+gc::MarkPagesUnused(JSRuntime *rt, void *p, size_t size) - { -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - return true; - } - - bool --gc::MarkPagesInUse(void *p, size_t size) -+gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) - { -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - return true; - } - -@@ -313,27 +311,24 @@ - #include <unistd.h> - - void --gc::InitMemorySubsystem() -+gc::InitMemorySubsystem(JSRuntime *rt) - { -- if (size_t(sysconf(_SC_PAGESIZE)) != PageSize) { -- fprintf(stderr,"SpiderMonkey compiled with incorrect page size; please update js/public/HeapAPI.h.\n"); -- MOZ_CRASH(); -- } -+ rt->gcSystemPageSize = rt->gcSystemAllocGranularity = size_t(sysconf(_SC_PAGESIZE)); - } - - void * --gc::MapAlignedPages(size_t size, size_t alignment) -+gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) - { - JS_ASSERT(size >= alignment); - JS_ASSERT(size % alignment == 0); -- JS_ASSERT(size % PageSize == 0); -- JS_ASSERT(alignment % PageSize == 0); -+ JS_ASSERT(size % rt->gcSystemPageSize == 0); -+ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); - - int prot = PROT_READ | PROT_WRITE; - int flags = MAP_PRIVATE | MAP_ANON; - - /* Special case: If we want page alignment, no further work is needed. */ -- if (alignment == PageSize) { -+ if (alignment == rt->gcSystemAllocGranularity) { - return mmap(NULL, size, prot, flags, -1, 0); - } - -@@ -359,26 +354,26 @@ - } - - void --gc::UnmapPages(void *p, size_t size) -+gc::UnmapPages(JSRuntime *rt, void *p, size_t size) - { - JS_ALWAYS_TRUE(0 == munmap(p, size)); - } - - bool --gc::MarkPagesUnused(void *p, size_t size) -+gc::MarkPagesUnused(JSRuntime *rt, void *p, size_t size) - { -- if (!DecommitEnabled()) -+ if (!DecommitEnabled(rt)) - return false; - -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - int result = madvise(p, size, MADV_DONTNEED); - return result != -1; - } - - bool --gc::MarkPagesInUse(void *p, size_t size) -+gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) - { -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - return true; - } - diff --git a/www/firefox/patches/patch-js__src__gc__Memory.h b/www/firefox/patches/patch-js__src__gc__Memory.h deleted file mode 100644 index 3dc16c68337..00000000000 --- a/www/firefox/patches/patch-js__src__gc__Memory.h +++ /dev/null @@ -1,52 +0,0 @@ -$NetBSD: patch-js__src__gc__Memory.h,v 1.2 2013/06/26 11:32:12 ryoon Exp $ - -From bugzilla, bug 840242, attachment v1 -Use the runtime page size to control arena decommit. - -As a side effect, this removes the hard coded page-size == 4k requirement. - - -diff js/src/gc/Memory.h js/src/gc/Memory.h ---- js/src/gc/Memory.h.orig 2013-06-17 22:13:09.000000000 +0000 -+++ js/src/gc/Memory.h -@@ -16,23 +16,34 @@ namespace gc { - - // Sanity check that our compiled configuration matches the currently running - // instance and initialize any runtime data needed for allocation. --void InitMemorySubsystem(); -+void -+InitMemorySubsystem(JSRuntime *rt); -+ -+// Decommiting unused memory requires the arena size match the page size. -+bool -+DecommitEnabled(JSRuntime *rt); - - // Allocate or deallocate pages from the system with the given alignment. --void *MapAlignedPages(size_t size, size_t alignment); --void UnmapPages(void *p, size_t size); -+void * -+MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment); -+ -+void -+UnmapPages(JSRuntime *rt, void *p, size_t size); - - // Tell the OS that the given pages are not in use, so they should not - // be written to a paging file. This may be a no-op on some platforms. --bool MarkPagesUnused(void *p, size_t size); -+bool -+MarkPagesUnused(JSRuntime *rt, void *p, size_t size); - - // Undo |MarkPagesUnused|: tell the OS that the given pages are of interest - // and should be paged in and out normally. This may be a no-op on some - // platforms. --bool MarkPagesInUse(void *p, size_t size); -+bool -+MarkPagesInUse(JSRuntime *rt, void *p, size_t size); - - // Returns #(hard faults) + #(soft faults) --size_t GetPageFaultCount(); -+size_t -+GetPageFaultCount(); - - } // namespace gc - } // namespace js diff --git a/www/firefox/patches/patch-js__src__jsapi.cpp b/www/firefox/patches/patch-js__src__jsapi.cpp deleted file mode 100644 index a6aa5bbc122..00000000000 --- a/www/firefox/patches/patch-js__src__jsapi.cpp +++ /dev/null @@ -1,20 +0,0 @@ -$NetBSD: patch-js__src__jsapi.cpp,v 1.2 2013/06/26 11:32:12 ryoon Exp $ - -From bugzilla, bug 840242, attachment v1 -Use the runtime page size to control arena decommit. - -As a side effect, this removes the hard coded page-size == 4k requirement. - - -diff js/src/jsapi.cpp js/src/jsapi.cpp ---- js/src/jsapi.cpp.orig 2013-06-17 22:13:11.000000000 +0000 -+++ js/src/jsapi.cpp -@@ -1131,8 +1131,6 @@ JS_NewRuntime(uint32_t maxbytes, JSUseHe - #undef MSG_DEF - #endif /* DEBUG */ - -- InitMemorySubsystem(); -- - if (!js::TlsPerThreadData.init()) - return NULL; - diff --git a/www/firefox/patches/patch-js__src__jscntxt.h b/www/firefox/patches/patch-js__src__jscntxt.h deleted file mode 100644 index 03e4fd1307e..00000000000 --- a/www/firefox/patches/patch-js__src__jscntxt.h +++ /dev/null @@ -1,27 +0,0 @@ -$NetBSD: patch-js__src__jscntxt.h,v 1.2 2013/06/26 11:32:12 ryoon Exp $ - -From bugzilla, bug 840242, attachment v1 -Use the runtime page size to control arena decommit. - -As a side effect, this removes the hard coded page-size == 4k requirement. - - -diff js/src/jscntxt.h js/src/jscntxt.h ---- js/src/jscntxt.h.orig 2013-06-17 22:13:11.000000000 +0000 -+++ js/src/jscntxt.h -@@ -1101,6 +1101,15 @@ struct JSRuntime : js::RuntimeFriendFiel - /* Stack of thread-stack-allocated GC roots. */ - js::AutoGCRooter *autoGCRooters; - -+ /* -+ * The GC can only safely decommit memory when the page size of the -+ * running process matches the compiled arena size. -+ */ -+ size_t gcSystemPageSize; -+ -+ /* The OS allocation granularity may not match the page size. */ -+ size_t gcSystemAllocGranularity; -+ - /* Strong references on scripts held for PCCount profiling API. */ - js::ScriptAndCountsVector *scriptAndCountsVector; - diff --git a/www/firefox/patches/patch-js__src__jsgc.cpp b/www/firefox/patches/patch-js__src__jsgc.cpp deleted file mode 100644 index 6bcf834b1e0..00000000000 --- a/www/firefox/patches/patch-js__src__jsgc.cpp +++ /dev/null @@ -1,135 +0,0 @@ -$NetBSD: patch-js__src__jsgc.cpp,v 1.2 2013/06/26 11:32:12 ryoon Exp $ - -From bugzilla, bug 840242, -https://hg.mozilla.org/integration/mozilla-inbound/rev/49e4ff129351 -Use the runtime page size to control arena decommit. - -As a side effect, this removes the hard coded page-size == 4k requirement. - - -diff js/src/jsgc.cpp js/src/jsgc.cpp ---- js/src/jsgc.cpp.orig 2013-05-11 21:19:34.000000000 +0200 -+++ js/src/jsgc.cpp 2013-06-10 13:49:13.000000000 +0200 -@@ -465,13 +465,15 @@ FinalizeArenas(FreeOp *fop, - } - - static inline Chunk * --AllocChunk() { -- return static_cast<Chunk *>(MapAlignedPages(ChunkSize, ChunkSize)); -+AllocChunk(JSRuntime *rt) -+{ -+ return static_cast<Chunk *>(MapAlignedPages(rt, ChunkSize, ChunkSize)); - } - - static inline void --FreeChunk(Chunk *p) { -- UnmapPages(static_cast<void *>(p), ChunkSize); -+FreeChunk(JSRuntime *rt, Chunk *p) -+{ -+ UnmapPages(rt, static_cast<void *>(p), ChunkSize); - } - - inline bool -@@ -561,25 +563,25 @@ ChunkPool::expire(JSRuntime *rt, bool re - } - - static void --FreeChunkList(Chunk *chunkListHead) -+FreeChunkList(JSRuntime *rt, Chunk *chunkListHead) - { - while (Chunk *chunk = chunkListHead) { - JS_ASSERT(!chunk->info.numArenasFreeCommitted); - chunkListHead = chunk->info.next; -- FreeChunk(chunk); -+ FreeChunk(rt, chunk); - } - } - - void - ChunkPool::expireAndFree(JSRuntime *rt, bool releaseAll) - { -- FreeChunkList(expire(rt, releaseAll)); -+ FreeChunkList(rt, expire(rt, releaseAll)); - } - - /* static */ Chunk * - Chunk::allocate(JSRuntime *rt) - { -- Chunk *chunk = static_cast<Chunk *>(AllocChunk()); -+ Chunk *chunk = AllocChunk(rt); - - #ifdef JSGC_ROOT_ANALYSIS - // Our poison pointers are not guaranteed to be invalid on 64-bit -@@ -592,7 +594,7 @@ Chunk::allocate(JSRuntime *rt) - // were marked as uncommitted, but it's a little complicated to avoid - // clobbering pre-existing unrelated mappings. - while (IsPoisonedPtr(chunk)) -- chunk = static_cast<Chunk *>(AllocChunk()); -+ chunk = AllocChunk(rt); - #endif - - if (!chunk) -@@ -608,7 +610,7 @@ Chunk::release(JSRuntime *rt, Chunk *chu - { - JS_ASSERT(chunk); - chunk->prepareToBeFreed(rt); -- FreeChunk(chunk); -+ FreeChunk(rt, chunk); - } - - inline void -@@ -736,7 +738,7 @@ Chunk::fetchNextDecommittedArena() - decommittedArenas.unset(offset); - - Arena *arena = &arenas[offset]; -- MarkPagesInUse(arena, ArenaSize); -+ MarkPagesInUse(info.runtime, arena, ArenaSize); - arena->aheader.setAsNotAllocated(); - - return &arena->aheader; -@@ -937,6 +939,8 @@ static const int64_t JIT_SCRIPT_RELEASE_ - JSBool - js_InitGC(JSRuntime *rt, uint32_t maxbytes) - { -+ InitMemorySubsystem(rt); -+ - if (!rt->gcChunkSet.init(INITIAL_CHUNK_CAPACITY)) - return false; - -@@ -2051,6 +2055,9 @@ js::MaybeGC(JSContext *cx) - static void - DecommitArenasFromAvailableList(JSRuntime *rt, Chunk **availableListHeadp) - { -+ if (!DecommitEnabled(rt)) -+ return; -+ - Chunk *chunk = *availableListHeadp; - if (!chunk) - return; -@@ -2102,7 +2109,7 @@ DecommitArenasFromAvailableList(JSRuntim - Maybe<AutoUnlockGC> maybeUnlock; - if (!rt->isHeapBusy()) - maybeUnlock.construct(rt); -- ok = MarkPagesUnused(aheader->getArena(), ArenaSize); -+ ok = MarkPagesUnused(rt, aheader->getArena(), ArenaSize); - } - - if (ok) { -@@ -2132,7 +2139,7 @@ DecommitArenasFromAvailableList(JSRuntim - JS_ASSERT(chunk->info.prevp); - } - -- if (rt->gcChunkAllocationSinceLastGC) { -+ if (rt->gcChunkAllocationSinceLastGC || !ok) { - /* - * The allocator thread has started to get new chunks. We should stop - * to avoid decommitting arenas in just allocated chunks. -@@ -2170,7 +2177,7 @@ ExpireChunksAndArenas(JSRuntime *rt, boo - { - if (Chunk *toFree = rt->gcChunkPool.expire(rt, shouldShrink)) { - AutoUnlockGC unlock(rt); -- FreeChunkList(toFree); -+ FreeChunkList(rt, toFree); - } - - if (shouldShrink) diff --git a/www/firefox/patches/patch-js__src__jsscript.cpp b/www/firefox/patches/patch-js__src__jsscript.cpp deleted file mode 100644 index b389c7ae90c..00000000000 --- a/www/firefox/patches/patch-js__src__jsscript.cpp +++ /dev/null @@ -1,37 +0,0 @@ -$NetBSD: patch-js__src__jsscript.cpp,v 1.1 2013/06/21 23:11:42 ryoon Exp $ - -# HG changeset patch -# User Martin Husemann <martin@netbsd.org> -# Date 1370581392 25200 -# Node ID 88d63d06dec9a9d12a8e1200f1117d648fc386e2 -# Parent 1c14b70442b380d63119dbc7d3c465e9c0e655fd -Bug 870325 - Fix alignment of Bindings on SPARC64. r=nnethercote. - -diff js/src/jsscript.cpp js/src/jsscript.cpp ---- js/src/jsscript.cpp.orig 2013-05-11 21:19:34.000000000 +0200 -+++ js/src/jsscript.cpp 2013-06-10 13:58:15.000000000 +0200 -@@ -1695,7 +1695,11 @@ - if (ntrynotes != 0) - size += sizeof(TryNoteArray) + ntrynotes * sizeof(JSTryNote); - -- size += nbindings * sizeof(Binding); -+ if (nbindings != 0) { -+ // account for padding pre bindings -+ size = JS_ROUNDUP(size, JS_ALIGNMENT_OF(Binding)) + nbindings * sizeof(Binding); -+ } -+ - return size; - } - -@@ -1822,6 +1826,11 @@ - cursor += vectorSize; - } - -+ if (script->bindings.count() != 0) { -+ // Make sure bindings are sufficiently aligned. -+ cursor = reinterpret_cast<uint8_t*> -+ (JS_ROUNDUP(reinterpret_cast<uintptr_t>(cursor), JS_ALIGNMENT_OF(Binding))); -+ } - cursor = script->bindings.switchToScriptStorage(reinterpret_cast<Binding *>(cursor)); - - JS_ASSERT(cursor == script->data + size); diff --git a/www/firefox/patches/patch-js__src__vm__SPSProfiler.cpp b/www/firefox/patches/patch-js__src__vm__SPSProfiler.cpp index c0b9acfcfda..02e36b6059e 100644 --- a/www/firefox/patches/patch-js__src__vm__SPSProfiler.cpp +++ b/www/firefox/patches/patch-js__src__vm__SPSProfiler.cpp @@ -1,16 +1,16 @@ -$NetBSD: patch-js__src__vm__SPSProfiler.cpp,v 1.1 2013/06/21 23:11:42 ryoon Exp $ +$NetBSD: patch-js__src__vm__SPSProfiler.cpp,v 1.2 2013/09/19 12:37:50 ryoon Exp $ Unclear fallout from our version of bug 840242, attachment v1: some architectures fail to link if we do not add the inlines here - might be compiler/arch specific. ---- js/src/vm/SPSProfiler.cpp.orig 2013-05-11 21:19:36.000000000 +0200 -+++ js/src/vm/SPSProfiler.cpp 2013-06-15 11:49:39.000000000 +0200 -@@ -9,6 +9,7 @@ +--- js/src/vm/SPSProfiler.cpp.orig 2013-09-10 03:43:39.000000000 +0000 ++++ js/src/vm/SPSProfiler.cpp +@@ -8,6 +8,7 @@ #include "jsnum.h" #include "jsscript.h" +#include "jscntxtinlines.h" - #include "methodjit/MethodJIT.h" - #include "methodjit/Compiler.h" + #include "vm/SPSProfiler.h" + #include "vm/StringBuffer.h" diff --git a/www/firefox/patches/patch-js__src__yarr__YarrInterpreter.cpp b/www/firefox/patches/patch-js__src__yarr__YarrInterpreter.cpp deleted file mode 100644 index 7fe8125ce8d..00000000000 --- a/www/firefox/patches/patch-js__src__yarr__YarrInterpreter.cpp +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-js__src__yarr__YarrInterpreter.cpp,v 1.1 2013/06/21 23:11:42 ryoon Exp $ - -Bugzilla ticket #871444 - -diff -r 581ea0e6531e js/src/yarr/YarrInterpreter.cpp ---- js/src/yarr/YarrInterpreter.cpp Tue May 07 09:47:43 2013 -0400 -+++ js/src/yarr/YarrInterpreter.cpp Sun May 12 17:41:08 2013 +0200 -@@ -156,6 +156,7 @@ - ParenthesesDisjunctionContext* allocParenthesesDisjunctionContext(ByteDisjunction* disjunction, unsigned* output, ByteTerm& term) - { - size_t size = sizeof(ParenthesesDisjunctionContext) - sizeof(unsigned) + (term.atom.parenthesesDisjunction->m_numSubpatterns << 1) * sizeof(unsigned) + sizeof(DisjunctionContext) - sizeof(uintptr_t) + disjunction->m_frameSize * sizeof(uintptr_t); -+ size = JS_ROUNDUP(size, JS_ALIGNMENT_OF(ParenthesesDisjunctionContext)); - allocatorPool = allocatorPool->ensureCapacity(size); - if (!allocatorPool) - CRASH(); diff --git a/www/firefox/patches/patch-js_src_Makefile.in b/www/firefox/patches/patch-js_src_Makefile.in index 83b1e5b5008..836e276ed77 100644 --- a/www/firefox/patches/patch-js_src_Makefile.in +++ b/www/firefox/patches/patch-js_src_Makefile.in @@ -1,8 +1,52 @@ -$NetBSD: patch-js_src_Makefile.in,v 1.1 2013/05/23 13:12:13 ryoon Exp $ +$NetBSD: patch-js_src_Makefile.in,v 1.2 2013/09/19 12:37:50 ryoon Exp $ ---- js/src/Makefile.in.orig 2013-05-11 19:19:32.000000000 +0000 +--- js/src/Makefile.in.orig 2013-09-10 03:43:34.000000000 +0000 +++ js/src/Makefile.in -@@ -791,6 +791,13 @@ EXTRA_LIBS += -lposix4 -ldl -lnsl -lsock +@@ -237,10 +237,14 @@ endif + # ICU headers need to be available whether we build with the complete + # Internationalization API or not - ICU stubs rely on them. + ++ifdef MOZ_NATIVE_ICU ++LOCAL_INCLUDES += $(MOZ_ICU_CFLAGS) ++else + LOCAL_INCLUDES += \ + -I$(topsrcdir)/../../intl/icu/source/common \ + -I$(topsrcdir)/../../intl/icu/source/i18n \ + $(NULL) ++endif + + ifdef ENABLE_INTL_API + +@@ -256,6 +260,7 @@ ifeq ($(OS_ARCH),WINNT) + cp -p intl/icu/lib/s$(libname)$(ICU_LIB_SUFFIX).lib intl/icu/lib/$(libname).lib;) + endif + ++ifndef MOZ_NATIVE_ICU + # - Build ICU as part of the "export" target, so things get built + # in the right order. + # - ICU requires GNU make according to its readme.html. pymake can't be used +@@ -269,6 +274,7 @@ export:: + + distclean clean:: + $(call SUBMAKE,$@,intl/icu) ++endif + + endif + +@@ -408,7 +414,11 @@ ifneq (,$(MOZ_ZLIB_LIBS)$(MOZ_GLUE_LDFLA + DEFINES += -DUSE_ZLIB + endif + +-SHARED_LIBRARY_LIBS += $(ICU_LIBS) ++ifdef MOZ_NATIVE_ICU ++EXTRA_DSO_LDOPTS += $(MOZ_ICU_LIBS) ++else ++SHARED_LIBRARY_LIBS += $(MOZ_ICU_LIBS) ++endif + + # Prevent floating point errors caused by VC++ optimizations + ifdef _MSC_VER +@@ -467,6 +477,13 @@ EXTRA_LIBS += -lposix4 -ldl -lnsl -lsock endif endif diff --git a/www/firefox/patches/patch-js_src_config_Makefile.in b/www/firefox/patches/patch-js_src_config_Makefile.in new file mode 100644 index 00000000000..66326718401 --- /dev/null +++ b/www/firefox/patches/patch-js_src_config_Makefile.in @@ -0,0 +1,12 @@ +$NetBSD: patch-js_src_config_Makefile.in,v 1.1 2013/09/19 12:37:50 ryoon Exp $ + +--- js/src/config/Makefile.in.orig 2013-09-10 03:43:34.000000000 +0000 ++++ js/src/config/Makefile.in +@@ -59,6 +59,7 @@ export:: \ + $(call mkdir_deps,system_wrappers_js) \ + $(NULL) + $(PYTHON) $(srcdir)/Preprocessor.py $(DEFINES) $(ACDEFINES) \ ++ -DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \ + $(srcdir)/system-headers | $(PERL) $(srcdir)/make-system-wrappers.pl system_wrappers_js + $(INSTALL) system_wrappers_js $(DIST) + diff --git a/www/firefox/patches/patch-js_src_config_system-headers b/www/firefox/patches/patch-js_src_config_system-headers index ba6adbc619c..56c1a217c96 100644 --- a/www/firefox/patches/patch-js_src_config_system-headers +++ b/www/firefox/patches/patch-js_src_config_system-headers @@ -1,10 +1,19 @@ -$NetBSD: patch-js_src_config_system-headers,v 1.1 2013/05/23 13:12:13 ryoon Exp $ +$NetBSD: patch-js_src_config_system-headers,v 1.2 2013/09/19 12:37:50 ryoon Exp $ ---- js/src/config/system-headers.orig 2013-05-11 19:19:32.000000000 +0000 +--- js/src/config/system-headers.orig 2013-09-10 03:43:34.000000000 +0000 +++ js/src/config/system-headers -@@ -1126,3 +1126,5 @@ sys/thr.h - sys/user.h - kvm.h +@@ -1132,3 +1132,14 @@ kvm.h spawn.h -+err.h -+xlocale.h + err.h + xlocale.h ++#if MOZ_NATIVE_ICU==1 ++unicode/locid.h ++unicode/numsys.h ++unicode/ucal.h ++unicode/ucol.h ++unicode/udat.h ++unicode/udatpg.h ++unicode/uenum.h ++unicode/unum.h ++unicode/ustring.h ++#endif diff --git a/www/firefox/patches/patch-bd b/www/firefox/patches/patch-js_src_ctypes_CTypes.h index 42b00ac8f52..07d82afc429 100644 --- a/www/firefox/patches/patch-bd +++ b/www/firefox/patches/patch-js_src_ctypes_CTypes.h @@ -1,10 +1,10 @@ -$NetBSD: patch-bd,v 1.1 2013/05/23 13:12:13 ryoon Exp $ +$NetBSD: patch-js_src_ctypes_CTypes.h,v 1.1 2013/09/19 12:37:50 ryoon Exp $ ---- js/src/ctypes/CTypes.cpp.orig 2013-01-04 23:44:34.000000000 +0000 -+++ js/src/ctypes/CTypes.cpp -@@ -5,6 +5,23 @@ +--- js/src/ctypes/CTypes.h.orig 2013-09-10 03:43:34.000000000 +0000 ++++ js/src/ctypes/CTypes.h +@@ -13,6 +13,23 @@ - #include "mozilla/FloatingPoint.h" + #include "js/HashTable.h" +#if defined(__NetBSD__) +#include <stdint.h> @@ -23,6 +23,6 @@ $NetBSD: patch-bd,v 1.1 2013/05/23 13:12:13 ryoon Exp $ +#define off_t off_t +#endif + - #include "CTypes.h" - #include "Library.h" - #include "jsnum.h" + namespace js { + namespace ctypes { + diff --git a/www/firefox/patches/patch-js_src_frontend_ParseMaps.cpp b/www/firefox/patches/patch-js_src_frontend_ParseMaps.cpp new file mode 100644 index 00000000000..206bd1f2464 --- /dev/null +++ b/www/firefox/patches/patch-js_src_frontend_ParseMaps.cpp @@ -0,0 +1,12 @@ +$NetBSD: patch-js_src_frontend_ParseMaps.cpp,v 1.1 2013/09/19 12:37:50 ryoon Exp $ + +--- js/src/frontend/ParseMaps.cpp.orig 2013-09-10 03:43:34.000000000 +0000 ++++ js/src/frontend/ParseMaps.cpp +@@ -132,5 +132,5 @@ frontend::InitAtomMap(JSContext *cx, fro + } + } + +-template class js::frontend::AtomDecls<FullParseHandler>; +-template class js::frontend::AtomDecls<SyntaxParseHandler>; ++template class frontend::AtomDecls<FullParseHandler>; ++template class frontend::AtomDecls<SyntaxParseHandler>; diff --git a/www/firefox/patches/patch-js_src_gdb_Makefile.in b/www/firefox/patches/patch-js_src_gdb_Makefile.in new file mode 100644 index 00000000000..f8764982c74 --- /dev/null +++ b/www/firefox/patches/patch-js_src_gdb_Makefile.in @@ -0,0 +1,15 @@ +$NetBSD: patch-js_src_gdb_Makefile.in,v 1.1 2013/09/19 12:37:50 ryoon Exp $ + +--- js/src/gdb/Makefile.in.orig 2013-09-10 03:43:34.000000000 +0000 ++++ js/src/gdb/Makefile.in +@@ -19,6 +19,10 @@ LIBS = $(DEPTH)/$(LIB_PREFIX)js_static.$ + + LOCAL_INCLUDES += -I$(topsrcdir) -I.. + ++ifdef MOZ_NATIVE_ICU ++EXTRA_LIBS += $(MOZ_ICU_LIBS) ++endif ++ + EXTRA_LIBS += $(MOZ_FFI_LIBS) + + # Place a GDB Python auto-load file next to the gdb-tests executable, both diff --git a/www/firefox/patches/patch-js_src_ion_AsmJS.cpp b/www/firefox/patches/patch-js_src_ion_AsmJS.cpp deleted file mode 100644 index c9b504c9a6a..00000000000 --- a/www/firefox/patches/patch-js_src_ion_AsmJS.cpp +++ /dev/null @@ -1,31 +0,0 @@ -$NetBSD: patch-js_src_ion_AsmJS.cpp,v 1.1 2013/06/26 11:32:12 ryoon Exp $ - ---- js/src/ion/AsmJS.cpp.orig 2013-06-17 22:13:09.000000000 +0000 -+++ js/src/ion/AsmJS.cpp -@@ -1324,7 +1324,7 @@ class ModuleCompiler - - void setSecondPassComplete() { - JS_ASSERT(currentPass_ == 2); -- masm_.align(gc::PageSize); -+ masm_.align(AsmJSPageSize); - module_->setFunctionBytes(masm_.size()); - currentPass_ = 3; - } -@@ -1357,7 +1357,7 @@ class ModuleCompiler - - // The code must be page aligned, so include extra space so that we can - // AlignBytes the allocation result below. -- size_t allocedBytes = totalBytes + gc::PageSize; -+ size_t allocedBytes = totalBytes + AsmJSPageSize; - - // Allocate the slab of memory. - JSC::ExecutableAllocator *execAlloc = cx_->compartment->ionCompartment()->execAlloc(); -@@ -1365,7 +1365,7 @@ class ModuleCompiler - uint8_t *unalignedBytes = (uint8_t*)execAlloc->alloc(allocedBytes, &pool, JSC::ASMJS_CODE); - if (!unalignedBytes) - return false; -- uint8_t *code = (uint8_t*)AlignBytes((uintptr_t)unalignedBytes, gc::PageSize); -+ uint8_t *code = (uint8_t*)AlignBytes((uintptr_t)unalignedBytes, AsmJSPageSize); - - // The ExecutablePool owns the memory and must be released by the AsmJSModule. - module_->takeOwnership(pool, code, codeBytes, totalBytes); diff --git a/www/firefox/patches/patch-js_src_ion_AsmJS.h b/www/firefox/patches/patch-js_src_ion_AsmJS.h deleted file mode 100644 index 8dbcf77e8b9..00000000000 --- a/www/firefox/patches/patch-js_src_ion_AsmJS.h +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-js_src_ion_AsmJS.h,v 1.1 2013/06/26 11:32:12 ryoon Exp $ - ---- js/src/ion/AsmJS.h.orig 2013-06-17 22:13:09.000000000 +0000 -+++ js/src/ion/AsmJS.h -@@ -97,6 +97,9 @@ class AsmJSActivation - void setResumePC(void *pc) { resumePC_ = pc; } - }; - -+// The assumed page size; dynamically checked in CompileAsmJS. -+const size_t AsmJSPageSize = 4096; -+ - // The asm.js spec requires that the ArrayBuffer's byteLength be a multiple of 4096. - static const size_t AsmJSAllocationGranularity = 4096; - diff --git a/www/firefox/patches/patch-js_src_ion_AsmJSModule.h b/www/firefox/patches/patch-js_src_ion_AsmJSModule.h deleted file mode 100644 index 6e1145ce023..00000000000 --- a/www/firefox/patches/patch-js_src_ion_AsmJSModule.h +++ /dev/null @@ -1,37 +0,0 @@ -$NetBSD: patch-js_src_ion_AsmJSModule.h,v 1.1 2013/08/07 12:17:54 ryoon Exp $ - ---- js/src/ion/AsmJSModule.h.orig 2013-07-30 00:58:18.000000000 +0000 -+++ js/src/ion/AsmJSModule.h -@@ -582,12 +582,12 @@ class AsmJSModule - } - - void setFunctionBytes(size_t functionBytes) { -- JS_ASSERT(functionBytes % gc::PageSize == 0); -+ JS_ASSERT(functionBytes % AsmJSPageSize == 0); - functionBytes_ = functionBytes; - } - size_t functionBytes() const { - JS_ASSERT(functionBytes_); -- JS_ASSERT(functionBytes_ % gc::PageSize == 0); -+ JS_ASSERT(functionBytes_ % AsmJSPageSize == 0); - return functionBytes_; - } - bool containsPC(void *pc) const { -@@ -648,7 +648,7 @@ class AsmJSModule - - - void takeOwnership(JSC::ExecutablePool *pool, uint8_t *code, size_t codeBytes, size_t totalBytes) { -- JS_ASSERT(uintptr_t(code) % gc::PageSize == 0); -+ JS_ASSERT(uintptr_t(code) % AsmJSPageSize == 0); - codePool_ = pool; - code_ = code; - codeBytes_ = codeBytes; -@@ -656,7 +656,7 @@ class AsmJSModule - } - uint8_t *functionCode() const { - JS_ASSERT(code_); -- JS_ASSERT(uintptr_t(code_) % gc::PageSize == 0); -+ JS_ASSERT(uintptr_t(code_) % AsmJSPageSize == 0); - return code_; - } - diff --git a/www/firefox/patches/patch-js_src_ion_AsmJSSignalHandlers.cpp b/www/firefox/patches/patch-js_src_ion_AsmJSSignalHandlers.cpp deleted file mode 100644 index d594060bdb5..00000000000 --- a/www/firefox/patches/patch-js_src_ion_AsmJSSignalHandlers.cpp +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-js_src_ion_AsmJSSignalHandlers.cpp,v 1.1 2013/06/26 11:32:12 ryoon Exp $ - ---- js/src/ion/AsmJSSignalHandlers.cpp.orig 2013-06-17 22:13:09.000000000 +0000 -+++ js/src/ion/AsmJSSignalHandlers.cpp -@@ -271,7 +271,7 @@ LookupHeapAccess(const AsmJSModule &modu - # if defined(JS_CPU_X64) - # if defined(__DragonFly__) - # include <machine/npx.h> // for union savefpu --# elif defined(__FreeBSD__) || defined(__OpenBSD__) -+# elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) - # include <machine/fpu.h> // for struct savefpu/fxsave64 - # endif - # endif diff --git a/www/firefox/patches/patch-js_src_jit_AsmJSSignalHandlers.cpp b/www/firefox/patches/patch-js_src_jit_AsmJSSignalHandlers.cpp new file mode 100644 index 00000000000..5455e754c25 --- /dev/null +++ b/www/firefox/patches/patch-js_src_jit_AsmJSSignalHandlers.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-js_src_jit_AsmJSSignalHandlers.cpp,v 1.1 2013/09/19 12:37:50 ryoon Exp $ + +--- js/src/jit/AsmJSSignalHandlers.cpp.orig 2013-09-10 03:43:36.000000000 +0000 ++++ js/src/jit/AsmJSSignalHandlers.cpp +@@ -269,7 +269,7 @@ LookupHeapAccess(const AsmJSModule &modu + # if defined(JS_CPU_X64) + # if defined(__DragonFly__) + # include <machine/npx.h> // for union savefpu +-# elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__) ++# elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) + # include <machine/fpu.h> // for struct savefpu/fxsave64 + # endif + # endif diff --git a/www/firefox/patches/patch-js_src_jsapi-tests_Makefile.in b/www/firefox/patches/patch-js_src_jsapi-tests_Makefile.in new file mode 100644 index 00000000000..8641f21303e --- /dev/null +++ b/www/firefox/patches/patch-js_src_jsapi-tests_Makefile.in @@ -0,0 +1,15 @@ +$NetBSD: patch-js_src_jsapi-tests_Makefile.in,v 1.1 2013/09/19 12:37:50 ryoon Exp $ + +--- js/src/jsapi-tests/Makefile.in.orig 2013-09-10 03:43:36.000000000 +0000 ++++ js/src/jsapi-tests/Makefile.in +@@ -20,6 +20,10 @@ LIBS = $(DEPTH)/$(LIB_PREFIX)js_sta + + LOCAL_INCLUDES += -I$(topsrcdir) -I.. + ++ifdef MOZ_NATIVE_ICU ++EXTRA_LIBS += $(MOZ_ICU_LIBS) ++endif ++ + EXTRA_LIBS += $(MOZ_FFI_LIBS) + + ifdef QEMU_EXE diff --git a/www/firefox/patches/patch-js_src_jsmath.cpp b/www/firefox/patches/patch-js_src_jsmath.cpp index 86961e3b6b6..c0e5a214454 100644 --- a/www/firefox/patches/patch-js_src_jsmath.cpp +++ b/www/firefox/patches/patch-js_src_jsmath.cpp @@ -1,13 +1,13 @@ -$NetBSD: patch-js_src_jsmath.cpp,v 1.1 2013/07/17 11:00:13 jperkin Exp $ +$NetBSD: patch-js_src_jsmath.cpp,v 1.2 2013/09/19 12:37:50 ryoon Exp $ ---- js/src/jsmath.cpp.orig 2013-05-11 19:19:34.000000000 +0000 +--- js/src/jsmath.cpp.orig 2013-09-10 03:43:36.000000000 +0000 +++ js/src/jsmath.cpp -@@ -195,7 +195,7 @@ math_atan2_kernel(double x, double y) +@@ -244,7 +244,7 @@ js::ecmaAtan2(double y, double x) } #endif -#if defined(SOLARIS) && defined(__GNUC__) +#if defined(notSOLARIS) && defined(__GNUC__) - if (x == 0) { - if (MOZ_DOUBLE_IS_NEGZERO(y)) - return js_copysign(M_PI, x); + if (y == 0) { + if (IsNegativeZero(x)) + return js_copysign(M_PI, y); diff --git a/www/firefox/patches/patch-js_src_jstypedarray.cpp b/www/firefox/patches/patch-js_src_jstypedarray.cpp deleted file mode 100644 index 82baf5c0866..00000000000 --- a/www/firefox/patches/patch-js_src_jstypedarray.cpp +++ /dev/null @@ -1,53 +0,0 @@ -$NetBSD: patch-js_src_jstypedarray.cpp,v 1.2 2013/08/07 12:17:54 ryoon Exp $ - -https://hg.mozilla.org/integration/mozilla-inbound/rev/49e4ff129351 - ---- js/src/jstypedarray.cpp.orig 2013-07-30 00:58:21.000000000 +0000 -+++ js/src/jstypedarray.cpp -@@ -338,9 +338,9 @@ ArrayBufferObject::uninlineData(JSContex - // | \ / - // obj->elements required to be page boundaries - // --JS_STATIC_ASSERT(sizeof(ObjectElements) < PageSize); --JS_STATIC_ASSERT(AsmJSAllocationGranularity == PageSize); --static const size_t AsmJSMappedSize = PageSize + AsmJSBufferProtectedSize; -+JS_STATIC_ASSERT(sizeof(ObjectElements) < AsmJSPageSize); -+JS_STATIC_ASSERT(AsmJSAllocationGranularity == AsmJSPageSize); -+static const size_t AsmJSMappedSize = AsmJSPageSize + AsmJSBufferProtectedSize; - - bool - ArrayBufferObject::prepareForAsmJS(JSContext *cx, Handle<ArrayBufferObject*> buffer) -@@ -363,19 +363,19 @@ ArrayBufferObject::prepareForAsmJS(JSCon - // Enable access to the valid region. - JS_ASSERT(buffer->byteLength() % AsmJSAllocationGranularity == 0); - # ifdef XP_WIN -- if (!VirtualAlloc(p, PageSize + buffer->byteLength(), MEM_COMMIT, PAGE_READWRITE)) { -+ if (!VirtualAlloc(p, AsmJSPageSize + buffer->byteLength(), MEM_COMMIT, PAGE_READWRITE)) { - VirtualFree(p, 0, MEM_RELEASE); - return false; - } - # else -- if (mprotect(p, PageSize + buffer->byteLength(), PROT_READ | PROT_WRITE)) { -+ if (mprotect(p, AsmJSPageSize + buffer->byteLength(), PROT_READ | PROT_WRITE)) { - munmap(p, AsmJSMappedSize); - return false; - } - # endif - - // Copy over the current contents of the typed array. -- uint8_t *data = reinterpret_cast<uint8_t*>(p) + PageSize; -+ uint8_t *data = reinterpret_cast<uint8_t*>(p) + AsmJSPageSize; - memcpy(data, buffer->dataPointer(), buffer->byteLength()); - - // Swap the new elements into the ArrayBufferObject. -@@ -397,8 +397,8 @@ ArrayBufferObject::releaseAsmJSArrayBuff - ArrayBufferObject &buffer = obj->asArrayBuffer(); - JS_ASSERT(buffer.isAsmJSArrayBuffer()); - -- uint8_t *p = buffer.dataPointer() - PageSize ; -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ uint8_t *p = buffer.dataPointer() - AsmJSPageSize ; -+ JS_ASSERT(uintptr_t(p) % AsmJSPageSize == 0); - # ifdef XP_WIN - VirtualFree(p, 0, MEM_RELEASE); - # else diff --git a/www/firefox/patches/patch-js_src_methodjit_MethodJIT.cpp b/www/firefox/patches/patch-js_src_methodjit_MethodJIT.cpp deleted file mode 100644 index 545e2b86ff3..00000000000 --- a/www/firefox/patches/patch-js_src_methodjit_MethodJIT.cpp +++ /dev/null @@ -1,25 +0,0 @@ -$NetBSD: patch-js_src_methodjit_MethodJIT.cpp,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - -# This does not only apply to linux, but all ELF platforms (otherwise the -# generated code will not be PIC) - ---- js/src/methodjit/MethodJIT.cpp.orig 2013-05-11 19:19:34.000000000 +0000 -+++ js/src/methodjit/MethodJIT.cpp -@@ -138,7 +138,7 @@ PopActiveVMFrame(VMFrame &f) - - 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) -@@ -152,7 +152,7 @@ JS_STATIC_ASSERT(offsetof(FrameRegs, sp) - - #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/patches/patch-js_src_shell_Makefile.in b/www/firefox/patches/patch-js_src_shell_Makefile.in new file mode 100644 index 00000000000..10b79138224 --- /dev/null +++ b/www/firefox/patches/patch-js_src_shell_Makefile.in @@ -0,0 +1,14 @@ +$NetBSD: patch-js_src_shell_Makefile.in,v 1.1 2013/09/19 12:37:50 ryoon Exp $ + +--- js/src/shell/Makefile.in.orig 2013-09-10 03:43:36.000000000 +0000 ++++ js/src/shell/Makefile.in +@@ -27,6 +27,9 @@ LIBS = $(NSPR_LIBS) $(EDITLINE_LIBS + ifdef MOZ_NATIVE_FFI + EXTRA_LIBS += $(MOZ_FFI_LIBS) + endif ++ifdef MOZ_NATIVE_ICU ++EXTRA_LIBS += $(MOZ_ICU_LIBS) ++endif + + LOCAL_INCLUDES += -I$(topsrcdir) -I.. + diff --git a/www/firefox/patches/patch-js_src_vm_ObjectImpl-inl.h b/www/firefox/patches/patch-js_src_vm_ObjectImpl-inl.h index e56b10c86a9..a7b7d5f3bf9 100644 --- a/www/firefox/patches/patch-js_src_vm_ObjectImpl-inl.h +++ b/www/firefox/patches/patch-js_src_vm_ObjectImpl-inl.h @@ -1,29 +1,17 @@ -$NetBSD: patch-js_src_vm_ObjectImpl-inl.h,v 1.3 2013/08/07 12:17:54 ryoon Exp $ +$NetBSD: patch-js_src_vm_ObjectImpl-inl.h,v 1.4 2013/09/19 12:37:50 ryoon Exp $ ---- js/src/vm/ObjectImpl-inl.h.orig 2013-07-30 00:58:25.000000000 +0000 +--- js/src/vm/ObjectImpl-inl.h.orig 2013-09-10 03:43:39.000000000 +0000 +++ js/src/vm/ObjectImpl-inl.h -@@ -217,9 +217,9 @@ js::ObjectImpl::initializeSlotRange(uint - JSRuntime *rt = runtime(); - uint32_t offset = start; - for (HeapSlot *sp = fixedStart; sp < fixedEnd; sp++) -- sp->init(rt, this->asObjectPtr(), HeapSlot::Slot, offset++, UndefinedValue()); -+ sp->init(rt, this->asObjectPtr(), HeapSlot::Slot, offset++, js::UndefinedValue()); - for (HeapSlot *sp = slotsStart; sp < slotsEnd; sp++) -- sp->init(rt, this->asObjectPtr(), HeapSlot::Slot, offset++, UndefinedValue()); -+ sp->init(rt, this->asObjectPtr(), HeapSlot::Slot, offset++, js::UndefinedValue()); - } - - inline bool -@@ -389,7 +389,7 @@ ZoneOfValue(const JS::Value &value) +@@ -364,7 +364,7 @@ js::ObjectImpl::zone() const js::ObjectImpl::readBarrier(ObjectImpl *obj) { #ifdef JSGC_INCREMENTAL - Zone *zone = obj->zone(); + JS::Zone *zone = obj->zone(); if (zone->needsBarrier()) { - MOZ_ASSERT(!zone->rt->isHeapBusy()); + MOZ_ASSERT(!zone->rt->isHeapMajorCollecting()); JSObject *tmp = obj->asObjectPtr(); -@@ -403,7 +403,7 @@ inline void +@@ -378,7 +378,7 @@ inline void js::ObjectImpl::privateWriteBarrierPre(void **old) { #ifdef JSGC_INCREMENTAL @@ -32,12 +20,12 @@ $NetBSD: patch-js_src_vm_ObjectImpl-inl.h,v 1.3 2013/08/07 12:17:54 ryoon Exp $ if (zone->needsBarrier()) { if (*old && getClass()->trace) getClass()->trace(zone->barrierTracer(), this->asObjectPtr()); -@@ -430,7 +430,7 @@ js::ObjectImpl::writeBarrierPre(ObjectIm +@@ -405,7 +405,7 @@ js::ObjectImpl::writeBarrierPre(ObjectIm if (IsNullTaggedPointer(obj) || !obj->runtime()->needsBarrier()) return; - Zone *zone = obj->zone(); + JS::Zone *zone = obj->zone(); if (zone->needsBarrier()) { - MOZ_ASSERT(!zone->rt->isHeapBusy()); + MOZ_ASSERT(!zone->rt->isHeapMajorCollecting()); JSObject *tmp = obj->asObjectPtr(); diff --git a/www/firefox/patches/patch-js_src_vm_Stack.cpp b/www/firefox/patches/patch-js_src_vm_Stack.cpp deleted file mode 100644 index 7e8bf5267c5..00000000000 --- a/www/firefox/patches/patch-js_src_vm_Stack.cpp +++ /dev/null @@ -1,16 +0,0 @@ -$NetBSD: patch-js_src_vm_Stack.cpp,v 1.1 2013/07/17 11:00:13 jperkin Exp $ - ---- js/src/vm/Stack.cpp.orig 2013-05-11 19:19:36.000000000 +0000 -+++ js/src/vm/Stack.cpp -@@ -814,7 +814,11 @@ StackSpace::sizeOf() - #endif - - MincoreArgType *vec = (MincoreArgType *) js_malloc(numPages); -+#ifdef __sun -+ int result = mincore((caddr_t)base_, numBytes, vec); -+#else - int result = mincore(base_, numBytes, vec); -+#endif - if (result) { - js_free(vec); - /* diff --git a/www/firefox/patches/patch-mb b/www/firefox/patches/patch-mb index b24be6fc323..c58e97f0fc9 100644 --- a/www/firefox/patches/patch-mb +++ b/www/firefox/patches/patch-mb @@ -1,53 +1,17 @@ -$NetBSD: patch-mb,v 1.5 2013/07/02 07:18:18 martin Exp $ +$NetBSD: patch-mb,v 1.6 2013/09/19 12:37:50 ryoon Exp $ ---- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2013-02-15 21:15:14.000000000 +0000 +--- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2013-09-10 03:43:57.000000000 +0000 +++ xpcom/reflect/xptcall/src/md/unix/Makefile.in -@@ -49,7 +49,7 @@ endif - endif - endif - --ifneq (,$(filter NetBSD OpenBSD GNU,$(OS_ARCH))) -+ifneq (,$(filter GNU,$(OS_ARCH))) - ifeq (86,$(findstring 86,$(OS_TEST))) - CPPSRCS := xptcinvoke_gcc_x86_unix.cpp xptcstubs_gcc_x86_unix.cpp - endif -@@ -58,7 +58,7 @@ endif - # New code for Linux, et. al., with gcc - # Migrate other platforms here after testing - # --ifneq (,$(filter Linux FreeBSD GNU_%,$(OS_ARCH))) -+ifneq (,$(filter Linux FreeBSD DragonFly NetBSD OpenBSD GNU_%,$(OS_ARCH))) - # Linux/x86-64 - ifeq (x86_64,$(OS_TEST)) - CPPSRCS := xptcinvoke_x86_64_unix.cpp xptcstubs_x86_64_linux.cpp -@@ -157,7 +157,7 @@ endif - # NetBSD/ARM - # - ifeq ($(OS_ARCH),NetBSD) --ifneq (,$(filter arm% sa110,$(OS_TEST))) -+ifneq (,$(filter arm%,$(TARGET_CPU))) - CPPSRCS := xptcinvoke_arm_netbsd.cpp xptcstubs_arm_netbsd.cpp - endif - endif -@@ -214,7 +214,7 @@ endif - # NetBSD/m68k - # - ifeq ($(OS_ARCH),NetBSD) --ifneq (,$(filter amiga atari hp300 mac68k mvme68k next68k sun3 sun3x x68k,$(OS_TEST))) -+ifneq (,$(filter m68k,$(TARGET_CPU))) - CPPSRCS := xptcinvoke_netbsd_m68k.cpp xptcstubs_netbsd_m68k.cpp - endif - endif -@@ -286,7 +286,7 @@ endif +@@ -183,7 +183,7 @@ endif # # NetBSD/PPC # -ifneq (,$(filter NetBSDmacppc NetBSDbebox NetBSDofppc NetBSDprep NetBSDamigappc,$(OS_ARCH)$(OS_TEST))) +ifeq ($(OS_ARCH)$(OS_TEST),NetBSDpowerpc) - CPPSRCS := xptcinvoke_ppc_netbsd.cpp xptcstubs_ppc_netbsd.cpp ASFILES := xptcinvoke_asm_ppc_netbsd.s xptcstubs_asm_ppc_netbsd.s endif -@@ -345,6 +345,13 @@ CPPSRCS := xptcinvoke_sparc64_openbsd.c + +@@ -235,6 +235,13 @@ ifneq (,$(filter OpenBSDsparc64 FreeBSDs ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.s endif # diff --git a/www/firefox/patches/patch-media_mtransport_third__party_nICEr_src_stun_addrs.c b/www/firefox/patches/patch-media_mtransport_third__party_nICEr_src_stun_addrs.c index df57454c718..70c3fc2835c 100644 --- a/www/firefox/patches/patch-media_mtransport_third__party_nICEr_src_stun_addrs.c +++ b/www/firefox/patches/patch-media_mtransport_third__party_nICEr_src_stun_addrs.c @@ -1,21 +1,36 @@ -$NetBSD: patch-media_mtransport_third__party_nICEr_src_stun_addrs.c,v 1.2 2013/06/26 11:32:12 ryoon Exp $ +$NetBSD: patch-media_mtransport_third__party_nICEr_src_stun_addrs.c,v 1.3 2013/09/19 12:37:50 ryoon Exp $ ---- media/mtransport/third_party/nICEr/src/stun/addrs.c.orig 2013-06-17 22:13:19.000000000 +0000 +--- media/mtransport/third_party/nICEr/src/stun/addrs.c.orig 2013-09-10 03:43:46.000000000 +0000 +++ media/mtransport/third_party/nICEr/src/stun/addrs.c -@@ -54,11 +54,15 @@ static char *RCSSTRING __UNUSED__="$Id: - #include <linux/sysctl.h> +@@ -55,7 +55,13 @@ static char *RCSSTRING __UNUSED__="$Id: #endif #include <net/if.h> --#ifndef LINUX -+#if defined(__FreeBSD__) + #ifndef LINUX ++#if !defined(__OpenBSD__) && !defined(__NetBSD__) #include <net/if_var.h> - #include <net/if_dl.h> - #include <net/if_types.h> - #include <sys/sockio.h> -+#elif defined(__NetBSD__) ++#endif +#include <net/if_dl.h> +#include <net/if_types.h> +#include <sys/sockio.h> - #else - #include <linux/if.h> - #endif ++#elif defined(__NetBSD__) + #include <net/if_dl.h> + #include <net/if_types.h> + #include <sys/sockio.h> +@@ -80,7 +86,7 @@ static char *RCSSTRING __UNUSED__="$Id: + + + +-#ifdef DARWIN ++#if defined(BSD) || defined(DARWIN) + /* + * Copyright (c) 1983, 1993 + * The Regents of the University of California. All rights reserved. +@@ -695,7 +701,7 @@ nr_stun_get_addrs(nr_transport_addr addr + int _status=0; + int i; + +-#ifdef DARWIN ++#if defined(BSD) || defined(DARWIN) + _status = stun_get_mib_addrs(addrs, maxaddrs, count); + #elif defined(WIN32) + _status = stun_get_win32_addrs(addrs, maxaddrs, count); diff --git a/www/firefox/patches/patch-media_webrtc_trunk_build_build__config.h b/www/firefox/patches/patch-media_webrtc_trunk_build_build__config.h new file mode 100644 index 00000000000..cd0b219886d --- /dev/null +++ b/www/firefox/patches/patch-media_webrtc_trunk_build_build__config.h @@ -0,0 +1,41 @@ +$NetBSD: patch-media_webrtc_trunk_build_build__config.h,v 1.1 2013/09/19 12:37:50 ryoon Exp $ + +--- media/webrtc/trunk/build/build_config.h.orig 2013-09-10 03:43:46.000000000 +0000 ++++ media/webrtc/trunk/build/build_config.h +@@ -37,9 +37,15 @@ + #elif defined(_WIN32) + #define OS_WIN 1 + #define TOOLKIT_VIEWS 1 +-#elif defined(__FreeBSD__) ++#elif defined(__DragonFly__) ++#define OS_DRAGONFLY 1 ++#define TOOLKIT_GTK ++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + #define OS_FREEBSD 1 + #define TOOLKIT_GTK ++#elif defined(__NetBSD__) ++#define OS_NETBSD 1 ++#define TOOLKIT_GTK + #elif defined(__OpenBSD__) + #define OS_OPENBSD 1 + #define TOOLKIT_GTK +@@ -56,15 +62,15 @@ + + // For access to standard BSD features, use OS_BSD instead of a + // more specific macro. +-#if defined(OS_FREEBSD) || defined(OS_OPENBSD) ++#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) \ ++ || defined(OS_NETBSD) || defined(OS_OPENBSD) + #define OS_BSD 1 + #endif + + // For access to standard POSIXish features, use OS_POSIX instead of a + // more specific macro. +-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_FREEBSD) || \ +- defined(OS_OPENBSD) || defined(OS_SOLARIS) || defined(OS_ANDROID) || \ +- defined(OS_NACL) ++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \ ++ defined(OS_SOLARIS) || defined(OS_ANDROID) || defined(OS_NACL) + #define OS_POSIX 1 + #endif + diff --git a/www/firefox/patches/patch-media_webrtc_trunk_third__party_libyuv_libyuv.gyp b/www/firefox/patches/patch-media_webrtc_trunk_third__party_libyuv_libyuv.gyp deleted file mode 100644 index 11e99aa2a21..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_third__party_libyuv_libyuv.gyp +++ /dev/null @@ -1,16 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_third__party_libyuv_libyuv.gyp,v 1.2 2013/06/26 11:32:12 ryoon Exp $ - ---- media/webrtc/trunk/third_party/libyuv/libyuv.gyp.orig 2013-06-17 22:13:19.000000000 +0000 -+++ media/webrtc/trunk/third_party/libyuv/libyuv.gyp -@@ -58,6 +58,11 @@ - }], - ], - 'conditions': [ -+ ['yuv_disable_asm==1', { -+ 'defines': [ -+ 'YUV_DISABLE_ASM', -+ ], -+ }], - ['build_with_mozilla==1', { - 'include_dirs': [ - '$(DEPTH)/dist/include', diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_build_common.gypi b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_build_common.gypi index 93c272ea0d5..5ff449f0d21 100644 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_build_common.gypi +++ b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_build_common.gypi @@ -1,6 +1,6 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_build_common.gypi,v 1.2 2013/06/26 11:32:12 ryoon Exp $ +$NetBSD: patch-media_webrtc_trunk_webrtc_build_common.gypi,v 1.3 2013/09/19 12:37:50 ryoon Exp $ ---- media/webrtc/trunk/webrtc/build/common.gypi.orig 2013-06-17 22:13:20.000000000 +0000 +--- media/webrtc/trunk/webrtc/build/common.gypi.orig 2013-09-10 03:43:47.000000000 +0000 +++ media/webrtc/trunk/webrtc/build/common.gypi @@ -71,9 +71,9 @@ 'enable_data_logging%': 0, @@ -14,34 +14,12 @@ $NetBSD: patch-media_webrtc_trunk_webrtc_build_common.gypi,v 1.2 2013/06/26 11:3 # Enable to use the Mozilla internal settings. 'build_with_mozilla%': 0, -@@ -124,6 +124,11 @@ - # and Java Implementation - 'enable_android_opensl%': 0, +@@ -238,7 +238,7 @@ }], -+ ['OS=="linux" or OS=="solaris" or os_bsd==1', { -+ 'include_v4l2_video_capture%': 1, -+ }, { -+ 'include_v4l2_video_capture%': 0, -+ }], - ['OS=="ios"', { - 'enable_video%': 0, - 'enable_protobuf%': 0, -@@ -215,6 +220,18 @@ - }], + ['OS=="dragonfly" or OS=="netbsd"', { + 'defines': [ +- # doesn't support pthread_condattr_setclock ++ # doesn't support pthread_condattr_setclock, NetBSD 6 supports it. + 'WEBRTC_CLOCK_TYPE_REALTIME', ], }], -+ ['os_bsd==1', { -+ 'defines': [ -+ 'WEBRTC_BSD', -+ 'WEBRTC_THREAD_RR', -+ ], -+ }], -+ ['OS=="dragonfly" or OS=="netbsd"', { -+ 'defines': [ -+ # doesn't support pthread_condattr_setclock -+ 'WEBRTC_CLOCK_TYPE_REALTIME', -+ ], -+ }], - ['OS=="ios"', { - 'defines': [ - 'WEBRTC_MAC', diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio__device_audio__device.gypi b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio__device_audio__device.gypi deleted file mode 100644 index 7bebc998c13..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio__device_audio__device.gypi +++ /dev/null @@ -1,91 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_modules_audio__device_audio__device.gypi,v 1.2 2013/08/07 12:17:54 ryoon Exp $ - ---- media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi.orig 2013-07-30 00:58:52.000000000 +0000 -+++ media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi -@@ -45,11 +45,15 @@ - 'dummy/audio_device_utility_dummy.h', - ], - 'conditions': [ -- ['OS=="linux"', { -+ ['include_alsa_audio==1 or include_pulse_audio==1', { - 'include_dirs': [ - 'linux', - ], -- }], # OS==linux -+ 'defines': [ -+ # avoid pointless rename -+ 'WEBRTC_LINUX', -+ ], -+ }], # include_alsa_audio==1 or include_pulse_audio==1 - ['OS=="ios"', { - 'include_dirs': [ - 'ios', -@@ -78,14 +82,8 @@ - }], - ['include_internal_audio_device==1', { - 'sources': [ -- 'linux/alsasymboltable_linux.cc', -- 'linux/alsasymboltable_linux.h', -- 'linux/audio_device_alsa_linux.cc', -- 'linux/audio_device_alsa_linux.h', - 'linux/audio_device_utility_linux.cc', - 'linux/audio_device_utility_linux.h', -- 'linux/audio_mixer_manager_alsa_linux.cc', -- 'linux/audio_mixer_manager_alsa_linux.h', - 'linux/latebindingsymboltable_linux.cc', - 'linux/latebindingsymboltable_linux.h', - 'ios/audio_device_ios.cc', -@@ -126,28 +124,36 @@ - }, - }], - ['OS=="linux"', { -- 'defines': [ -- 'LINUX_ALSA', -- ], - 'link_settings': { - 'libraries': [ - '-ldl', - ], - }, -- 'conditions': [ -- ['include_pulse_audio==1', { -- 'defines': [ -- 'LINUX_PULSE', -- ], -- 'sources': [ -- 'linux/audio_device_pulse_linux.cc', -- 'linux/audio_device_pulse_linux.h', -- 'linux/audio_mixer_manager_pulse_linux.cc', -- 'linux/audio_mixer_manager_pulse_linux.h', -- 'linux/pulseaudiosymboltable_linux.cc', -- 'linux/pulseaudiosymboltable_linux.h', -- ], -- }], -+ }], -+ ['include_alsa_audio==1', { -+ 'defines': [ -+ 'LINUX_ALSA', -+ ], -+ 'sources': [ -+ 'linux/alsasymboltable_linux.cc', -+ 'linux/alsasymboltable_linux.h', -+ 'linux/audio_device_alsa_linux.cc', -+ 'linux/audio_device_alsa_linux.h', -+ 'linux/audio_mixer_manager_alsa_linux.cc', -+ 'linux/audio_mixer_manager_alsa_linux.h', -+ ], -+ }], -+ ['include_pulse_audio==1', { -+ 'defines': [ -+ 'LINUX_PULSE', -+ ], -+ 'sources': [ -+ 'linux/audio_device_pulse_linux.cc', -+ 'linux/audio_device_pulse_linux.h', -+ 'linux/audio_mixer_manager_pulse_linux.cc', -+ 'linux/audio_mixer_manager_pulse_linux.h', -+ 'linux/pulseaudiosymboltable_linux.cc', -+ 'linux/pulseaudiosymboltable_linux.h', - ], - }], - ['OS=="mac" or OS=="ios"', { diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio__device_audio__device__impl.cc b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio__device_audio__device__impl.cc new file mode 100644 index 00000000000..bae0d588ec8 --- /dev/null +++ b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio__device_audio__device__impl.cc @@ -0,0 +1,71 @@ +$NetBSD: patch-media_webrtc_trunk_webrtc_modules_audio__device_audio__device__impl.cc,v 1.1 2013/09/19 12:37:50 ryoon Exp $ + +--- media/webrtc/trunk/webrtc/modules/audio_device/audio_device_impl.cc.orig 2013-09-10 03:43:47.000000000 +0000 ++++ media/webrtc/trunk/webrtc/modules/audio_device/audio_device_impl.cc +@@ -16,7 +16,9 @@ + #include <assert.h> + #include <string.h> + +-#if defined(_WIN32) ++#if defined(WEBRTC_DUMMY_AUDIO_BUILD) ++// do not include platform specific headers ++#elif defined(_WIN32) + #include "audio_device_utility_win.h" + #include "audio_device_wave_win.h" + #if defined(WEBRTC_WINDOWS_CORE_AUDIO_BUILD) +@@ -32,14 +34,8 @@ + #include <stdlib.h> + #include "audio_device_utility_android.h" + #include "audio_device_jni_android.h" +-#elif defined(WEBRTC_LINUX) ++#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) + #include "audio_device_utility_linux.h" +- #if defined(LINUX_ALSA) +- #include "audio_device_alsa_linux.h" +- #endif +- #if defined(LINUX_PULSE) +- #include "audio_device_pulse_linux.h" +- #endif + #elif defined(WEBRTC_IOS) + #include "audio_device_utility_ios.h" + #include "audio_device_ios.h" +@@ -47,6 +43,12 @@ + #include "audio_device_utility_mac.h" + #include "audio_device_mac.h" + #endif ++#if defined(LINUX_ALSA) ++ #include "audio_device_alsa_linux.h" ++#endif ++#if defined(LINUX_PULSE) ++ #include "audio_device_pulse_linux.h" ++#endif + #include "audio_device_dummy.h" + #include "audio_device_utility_dummy.h" + #include "critical_section_wrapper.h" +@@ -161,7 +163,7 @@ WebRtc_Word32 AudioDeviceModuleImpl::Che + #elif defined(WEBRTC_ANDROID) + platform = kPlatformAndroid; + WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "current platform is ANDROID"); +-#elif defined(WEBRTC_LINUX) ++#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) + platform = kPlatformLinux; + WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "current platform is LINUX"); + #elif defined(WEBRTC_IOS) +@@ -301,7 +303,7 @@ WebRtc_Word32 AudioDeviceModuleImpl::Cre + + // Create the *Linux* implementation of the Audio Device + // +-#elif defined(WEBRTC_LINUX) ++#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) + if ((audioLayer == kLinuxPulseAudio) || (audioLayer == kPlatformDefaultAudio)) + { + #if defined(LINUX_PULSE) +@@ -347,7 +349,7 @@ WebRtc_Word32 AudioDeviceModuleImpl::Cre + // + ptrAudioDeviceUtility = new AudioDeviceUtilityLinux(Id()); + } +-#endif // #if defined(WEBRTC_LINUX) ++#endif // #if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) + + // Create the *iPhone* implementation of the Audio Device + // diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio__device_audio__device__utility.cc b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio__device_audio__device__utility.cc deleted file mode 100644 index 7b9d60cf745..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio__device_audio__device__utility.cc +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_modules_audio__device_audio__device__utility.cc,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- media/webrtc/trunk/webrtc/modules/audio_device/audio_device_utility.cc.orig 2013-05-11 19:19:45.000000000 +0000 -+++ media/webrtc/trunk/webrtc/modules/audio_device/audio_device_utility.cc -@@ -46,7 +46,7 @@ bool AudioDeviceUtility::StringCompare( - - } // namespace webrtc - --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - - // ============================================================================ - // Linux & Mac -@@ -109,6 +109,6 @@ bool AudioDeviceUtility::StringCompare( - - } // namespace webrtc - --#endif // defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#endif // defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - - diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio__device_test_audio__device__test__api.cc b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio__device_test_audio__device__test__api.cc new file mode 100644 index 00000000000..e5c511ca1a9 --- /dev/null +++ b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio__device_test_audio__device__test__api.cc @@ -0,0 +1,31 @@ +$NetBSD: patch-media_webrtc_trunk_webrtc_modules_audio__device_test_audio__device__test__api.cc,v 1.1 2013/09/19 12:37:50 ryoon Exp $ + +--- media/webrtc/trunk/webrtc/modules/audio_device/test/audio_device_test_api.cc.orig 2013-09-10 03:43:47.000000000 +0000 ++++ media/webrtc/trunk/webrtc/modules/audio_device/test/audio_device_test_api.cc +@@ -196,7 +196,7 @@ class AudioDeviceAPITest: public testing + // Create default implementation instance + EXPECT_TRUE((audio_device_ = AudioDeviceModuleImpl::Create( + kId, AudioDeviceModule::kPlatformDefaultAudio)) != NULL); +-#elif defined(WEBRTC_LINUX) ++#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) + EXPECT_TRUE((audio_device_ = AudioDeviceModuleImpl::Create( + kId, AudioDeviceModule::kWindowsWaveAudio)) == NULL); + EXPECT_TRUE((audio_device_ = AudioDeviceModuleImpl::Create( +@@ -1689,7 +1689,7 @@ TEST_F(AudioDeviceAPITest, CPULoad) { + + // TODO(kjellander): Fix flakiness causing failures on Windows. + // TODO(phoglund): Fix flakiness causing failures on Linux. +-#if !defined(_WIN32) && !defined(WEBRTC_LINUX) ++#if !defined(_WIN32) && !defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD) + TEST_F(AudioDeviceAPITest, StartAndStopRawOutputFileRecording) { + // NOTE: this API is better tested in a functional test + CheckInitialPlayoutStates(); +@@ -1758,7 +1758,7 @@ TEST_F(AudioDeviceAPITest, StartAndStopR + // - size of raw_input_not_recording.pcm shall be 0 + // - size of raw_input_not_recording.pcm shall be > 0 + } +-#endif // !WIN32 && !WEBRTC_LINUX ++#endif // !WIN32 && !WEBRTC_LINUX && !defined(WEBRTC_BSD) + + TEST_F(AudioDeviceAPITest, RecordingSampleRate) { + WebRtc_UWord32 sampleRate(0); diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc deleted file mode 100644 index f0a1909bb2d..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc.orig 2013-05-11 19:19:45.000000000 +0000 -+++ media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc -@@ -12,6 +12,7 @@ - - #include <algorithm> - #include <cassert> -+#include <cstdlib> // for abs() - #include <cstring> - #include <iterator> - diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_rtp__rtcp_source_rtp__utility.cc b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_rtp__rtcp_source_rtp__utility.cc deleted file mode 100644 index d81103babb2..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_rtp__rtcp_source_rtp__utility.cc +++ /dev/null @@ -1,49 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_modules_rtp__rtcp_source_rtp__utility.cc,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtp_utility.cc.orig 2013-05-11 19:19:45.000000000 +0000 -+++ media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtp_utility.cc -@@ -18,7 +18,7 @@ - #include <Windows.h> // FILETIME - #include <WinSock.h> // timeval - #include <MMSystem.h> // timeGetTime --#elif ((defined WEBRTC_LINUX) || (defined WEBRTC_MAC)) -+#elif ((defined WEBRTC_LINUX) || (defined WEBRTC_BSD) || (defined WEBRTC_MAC)) - #include <sys/time.h> // gettimeofday - #include <time.h> - #endif -@@ -156,7 +156,7 @@ void get_time(WindowsHelpTimer* help_tim - WindowsHelpTimer* _helpTimer; - }; - --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - - // A clock reading times from the POSIX API. - class UnixSystemClock : public RtpRtcpClock { -@@ -214,7 +214,7 @@ void WindowsSystemClock::CurrentNTP(WebR - frac = (WebRtc_UWord32)dtemp; - } - --#elif ((defined WEBRTC_LINUX) || (defined WEBRTC_MAC)) -+#elif ((defined WEBRTC_LINUX) || (defined WEBRTC_BSD) || (defined WEBRTC_MAC)) - - WebRtc_Word64 UnixSystemClock::GetTimeInMS() { - return TickTime::MillisecondTimestamp(); -@@ -253,7 +253,7 @@ static WindowsHelpTimer global_help_time - RtpRtcpClock* GetSystemClock() { - #if defined(_WIN32) - return new WindowsSystemClock(&global_help_timer); --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - return new UnixSystemClock(); - #else - return NULL; -@@ -330,7 +330,7 @@ bool StringCompare(const char* str1, con - const WebRtc_UWord32 length) { - return (_strnicmp(str1, str2, length) == 0) ? true : false; - } --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - bool StringCompare(const char* str1, const char* str2, - const WebRtc_UWord32 length) { - return (strncasecmp(str1, str2, length) == 0) ? true : false; diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_udp__transport_source_udp__transport__impl.cc b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_udp__transport_source_udp__transport__impl.cc deleted file mode 100644 index a697624c2d3..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_udp__transport_source_udp__transport__impl.cc +++ /dev/null @@ -1,90 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_modules_udp__transport_source_udp__transport__impl.cc,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- media/webrtc/trunk/webrtc/modules/udp_transport/source/udp_transport_impl.cc.orig 2013-05-11 19:19:45.000000000 +0000 -+++ media/webrtc/trunk/webrtc/modules/udp_transport/source/udp_transport_impl.cc -@@ -18,16 +18,16 @@ - #if defined(_WIN32) - #include <winsock2.h> - #include <ws2tcpip.h> --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - #include <arpa/inet.h> - #include <ctype.h> - #include <fcntl.h> - #include <netdb.h> -+#include <sys/socket.h> - #include <net/if.h> - #include <netinet/in.h> - #include <stdlib.h> - #include <sys/ioctl.h> --#include <sys/socket.h> - #include <sys/time.h> - #include <unistd.h> - #ifndef WEBRTC_IOS -@@ -36,9 +36,11 @@ - #endif // defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) - - #if defined(WEBRTC_MAC) --#include <ifaddrs.h> - #include <machine/types.h> - #endif -+#if defined(WEBRTC_BSD) || defined(WEBRTC_MAC) -+#include <ifaddrs.h> -+#endif - #if defined(WEBRTC_LINUX) - #include <linux/netlink.h> - #include <linux/rtnetlink.h> -@@ -51,7 +53,7 @@ - #include "typedefs.h" - #include "udp_socket_manager_wrapper.h" - --#if defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - #define GetLastError() errno - - #define IFRSIZE ((int)(size * sizeof (struct ifreq))) -@@ -61,7 +63,7 @@ - (int)(nlh)->nlmsg_len >= (int)sizeof(struct nlmsghdr) && \ - (int)(nlh)->nlmsg_len <= (len)) - --#endif // defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#endif // defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - - namespace webrtc { - -@@ -2371,7 +2373,7 @@ WebRtc_Word32 UdpTransport::InetPresenta - const char* src, - void* dst) - { --#if defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - const WebRtc_Word32 result = inet_pton(af, src, dst); - return result > 0 ? 0 : -1; - -@@ -2493,7 +2495,7 @@ WebRtc_Word32 UdpTransport::LocalHostAdd - "getaddrinfo failed to find address"); - return -1; - --#elif defined(WEBRTC_MAC) -+#elif defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - struct ifaddrs* ptrIfAddrs = NULL; - struct ifaddrs* ptrIfAddrsStart = NULL; - -@@ -2685,7 +2687,7 @@ WebRtc_Word32 UdpTransport::LocalHostAdd - "gethostbyname failed, error:%d", error); - return -1; - } --#elif (defined(WEBRTC_MAC)) -+#elif (defined(WEBRTC_BSD) || defined(WEBRTC_MAC)) - char localname[255]; - if (gethostname(localname, 255) != -1) - { -@@ -2824,7 +2826,7 @@ WebRtc_Word32 UdpTransport::IPAddress(co - sourcePort = htons(source_port); - return 0; - -- #elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+ #elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - WebRtc_Word32 ipFamily = address._sockaddr_storage.sin_family; - const void* ptrNumericIP = NULL; - diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_utility_source_rtp__dump__impl.cc b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_utility_source_rtp__dump__impl.cc deleted file mode 100644 index 1e7aba3452b..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_utility_source_rtp__dump__impl.cc +++ /dev/null @@ -1,22 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_modules_utility_source_rtp__dump__impl.cc,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- media/webrtc/trunk/webrtc/modules/utility/source/rtp_dump_impl.cc.orig 2013-05-11 19:19:45.000000000 +0000 -+++ media/webrtc/trunk/webrtc/modules/utility/source/rtp_dump_impl.cc -@@ -19,7 +19,7 @@ - #if defined(_WIN32) - #include <Windows.h> - #include <mmsystem.h> --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - #include <string.h> - #include <sys/time.h> - #include <time.h> -@@ -238,7 +238,7 @@ inline WebRtc_UWord32 RtpDumpImpl::GetTi - { - #if defined(_WIN32) - return timeGetTime(); --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - struct timeval tv; - struct timezone tz; - unsigned long val; diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_device__info__impl.cc b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_device__info__impl.cc deleted file mode 100644 index 09efe9d5f26..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_device__info__impl.cc +++ /dev/null @@ -1,31 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_modules_video__capture_device__info__impl.cc,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- media/webrtc/trunk/webrtc/modules/video_capture/device_info_impl.cc.orig 2013-05-11 19:19:45.000000000 +0000 -+++ media/webrtc/trunk/webrtc/modules/video_capture/device_info_impl.cc -@@ -54,7 +54,7 @@ WebRtc_Word32 DeviceInfoImpl::NumberOfCa - if (_lastUsedDeviceNameLength == strlen((char*) deviceUniqueIdUTF8)) - { - // Is it the same device that is asked for again. --#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) -+#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) - if(strncasecmp((char*)_lastUsedDeviceName, - (char*) deviceUniqueIdUTF8, - _lastUsedDeviceNameLength)==0) -@@ -91,7 +91,7 @@ WebRtc_Word32 DeviceInfoImpl::GetCapabil - ReadLockScoped cs(_apiLock); - - if ((_lastUsedDeviceNameLength != strlen((char*) deviceUniqueIdUTF8)) --#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) -+#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) - || (strncasecmp((char*)_lastUsedDeviceName, - (char*) deviceUniqueIdUTF8, - _lastUsedDeviceNameLength)!=0)) -@@ -155,7 +155,7 @@ WebRtc_Word32 DeviceInfoImpl::GetBestMat - - ReadLockScoped cs(_apiLock); - if ((_lastUsedDeviceNameLength != strlen((char*) deviceUniqueIdUTF8)) --#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) -+#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) - || (strncasecmp((char*)_lastUsedDeviceName, - (char*) deviceUniqueIdUTF8, - _lastUsedDeviceNameLength)!=0)) diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_device__info__linux.cc b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_device__info__linux.cc index c49a6bb89d0..f480b84543e 100644 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_device__info__linux.cc +++ b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_device__info__linux.cc @@ -1,18 +1,11 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_device__info__linux.cc,v 1.1 2013/05/23 13:12:13 ryoon Exp $ +$NetBSD: patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_device__info__linux.cc,v 1.2 2013/09/19 12:37:50 ryoon Exp $ ---- media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc.orig 2013-05-11 19:19:45.000000000 +0000 +--- media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc.orig 2013-09-10 03:43:47.000000000 +0000 +++ media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc -@@ -19,12 +19,30 @@ - #include <stdlib.h> - - //v4l includes -+#if defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) -+#include <sys/videoio.h> -+#elif defined(__sun) -+#include <sys/videodev2.h> -+#else +@@ -26,10 +26,30 @@ + #else #include <linux/videodev2.h> -+#endif + #endif +#ifdef HAVE_LIBV4L2 +#include <libv4l2.h> +#endif @@ -20,7 +13,15 @@ $NetBSD: patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_device__in #include "ref_count.h" #include "trace.h" - ++#ifdef HAVE_LIBV4L2 ++#define open v4l2_open ++#define close v4l2_close ++#define dup v4l2_dup ++#define ioctl v4l2_ioctl ++#define mmap v4l2_mmap ++#define munmap v4l2_munmap ++#endif ++ +#ifdef HAVE_LIBV4L2 +#define open v4l2_open +#define close v4l2_close @@ -29,11 +30,10 @@ $NetBSD: patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_device__in +#define mmap v4l2_mmap +#define munmap v4l2_munmap +#endif -+ + namespace webrtc { - namespace videocapturemodule -@@ -130,6 +148,11 @@ WebRtc_Word32 DeviceInfoLinux::GetDevice +@@ -137,6 +157,11 @@ WebRtc_Word32 DeviceInfoLinux::GetDevice memset(deviceNameUTF8, 0, deviceNameLength); memcpy(cameraName, cap.card, sizeof(cap.card)); diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_video__capture__linux.cc b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_video__capture__linux.cc index 46bd089c564..3061ec57cd2 100644 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_video__capture__linux.cc +++ b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_video__capture__linux.cc @@ -1,33 +1,18 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_video__capture__linux.cc,v 1.1 2013/05/23 13:12:13 ryoon Exp $ +$NetBSD: patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_video__capture__linux.cc,v 1.2 2013/09/19 12:37:50 ryoon Exp $ ---- media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc.orig 2013-05-11 19:19:45.000000000 +0000 +--- media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc.orig 2013-09-10 03:43:47.000000000 +0000 +++ media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc -@@ -12,12 +12,23 @@ - #include <unistd.h> - #include <sys/stat.h> - #include <fcntl.h> --#include <linux/videodev2.h> - #include <errno.h> - #include <stdio.h> - #include <sys/mman.h> - #include <string.h> - -+//v4l includes -+#if defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) -+#include <sys/videoio.h> -+#elif defined(__sun) -+#include <sys/videodev2.h> -+#else -+#include <linux/videodev2.h> -+#endif +@@ -25,6 +25,9 @@ + #else + #include <linux/videodev2.h> + #endif +#ifdef HAVE_LIBV4L2 +#include <libv4l2.h> +#endif -+ + #include <new> - #include "ref_count.h" -@@ -26,6 +37,15 @@ +@@ -34,6 +37,15 @@ #include "critical_section_wrapper.h" #include "video_capture_linux.h" diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_video__capture.gypi b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_video__capture.gypi index 4efa9f66844..443bae61535 100644 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_video__capture.gypi +++ b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_video__capture.gypi @@ -1,6 +1,6 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_modules_video__capture_video__capture.gypi,v 1.1 2013/05/23 13:12:13 ryoon Exp $ +$NetBSD: patch-media_webrtc_trunk_webrtc_modules_video__capture_video__capture.gypi,v 1.2 2013/09/19 12:37:50 ryoon Exp $ ---- media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi.orig 2013-05-11 19:19:45.000000000 +0000 +--- media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi.orig 2013-09-10 03:43:47.000000000 +0000 +++ media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi @@ -7,6 +7,9 @@ # be found in the AUTHORS file in the root of the source tree. @@ -12,12 +12,10 @@ $NetBSD: patch-media_webrtc_trunk_webrtc_modules_video__capture_video__capture.g 'targets': [ { 'target_name': 'video_capture_module', -@@ -48,7 +51,17 @@ - ], +@@ -49,6 +52,16 @@ }, { # include_internal_video_capture == 1 'conditions': [ -- ['OS=="linux"', { -+ ['include_v4l2_video_capture==1', { + ['include_v4l2_video_capture==1', { + 'conditions': [ + ['use_libv4l2==1', { + 'defines': [ @@ -31,32 +29,3 @@ $NetBSD: patch-media_webrtc_trunk_webrtc_modules_video__capture_video__capture.g 'include_dirs': [ 'linux', ], -@@ -157,7 +170,7 @@ - 'test/video_capture_main_mac.mm', - ], - 'conditions': [ -- ['OS=="mac" or OS=="linux"', { -+ ['OS!="win" and OS!="android"', { - 'cflags': [ - '-Wno-write-strings', - ], -@@ -165,13 +178,17 @@ - '-lpthread -lm', - ], - }], -- ['OS=="linux"', { -+ ['include_v4l2_video_capture==1', { - 'libraries': [ -- '-lrt', - '-lXext', - '-lX11', - ], - }], -+ ['OS=="linux"', { -+ 'libraries': [ -+ '-lrt', -+ ], -+ }], - ['OS=="mac"', { - 'dependencies': [ - # Link with a special main for mac so we can use the webcam. diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_interface_asm__defines.h b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_interface_asm__defines.h deleted file mode 100644 index 04cf5fe9213..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_interface_asm__defines.h +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_system__wrappers_interface_asm__defines.h,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- media/webrtc/trunk/webrtc/system_wrappers/interface/asm_defines.h.orig 2013-05-11 19:19:46.000000000 +0000 -+++ media/webrtc/trunk/webrtc/system_wrappers/interface/asm_defines.h -@@ -11,7 +11,7 @@ - #ifndef WEBRTC_SYSTEM_WRAPPERS_INTERFACE_ASM_DEFINES_H_ - #define WEBRTC_SYSTEM_WRAPPERS_INTERFACE_ASM_DEFINES_H_ - --#if defined(__linux__) && defined(__ELF__) -+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) - .section .note.GNU-stack,"",%progbits - #endif - diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_interface_tick__util.h b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_interface_tick__util.h deleted file mode 100644 index 83322b8c75b..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_interface_tick__util.h +++ /dev/null @@ -1,67 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_system__wrappers_interface_tick__util.h,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- media/webrtc/trunk/webrtc/system_wrappers/interface/tick_util.h.orig 2013-05-11 19:19:46.000000000 +0000 -+++ media/webrtc/trunk/webrtc/system_wrappers/interface/tick_util.h -@@ -194,7 +194,7 @@ inline WebRtc_Word64 TickTime::QueryOsFo - } - result.ticks_ = now + (num_wrap_time_get_time << 32); - #endif --#elif defined(WEBRTC_LINUX) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) - struct timespec ts; - // TODO(wu): Remove CLOCK_REALTIME implementation. - #ifdef WEBRTC_CLOCK_TYPE_REALTIME -@@ -241,7 +241,7 @@ inline WebRtc_Word64 TickTime::Milliseco - #else - return ticks; - #endif --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - return ticks / 1000000LL; - #else - return ticks / 1000LL; -@@ -258,7 +258,7 @@ inline WebRtc_Word64 TickTime::Microseco - #else - return ticks * 1000LL; - #endif --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - return ticks / 1000LL; - #else - return ticks; -@@ -278,7 +278,7 @@ inline WebRtc_Word64 TickTime::Milliseco - #else - return ms; - #endif --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - return ms * 1000000LL; - #else - return ms * 1000LL; -@@ -294,7 +294,7 @@ inline WebRtc_Word64 TickTime::TicksToMi - #else - return ticks; - #endif --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - return ticks / 1000000LL; - #else - return ticks / 1000LL; -@@ -323,7 +323,7 @@ inline WebRtc_Word64 TickInterval::Milli - // interval_ is in ms - return interval_; - #endif --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - // interval_ is in ns - return interval_ / 1000000; - #else -@@ -342,7 +342,7 @@ inline WebRtc_Word64 TickInterval::Micro - // interval_ is in ms - return interval_ * 1000LL; - #endif --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - // interval_ is in ns - return interval_ / 1000; - #else diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_atomic32__posix.cc b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_atomic32__posix.cc deleted file mode 100644 index 6d669160392..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_atomic32__posix.cc +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_system__wrappers_source_atomic32__posix.cc,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- media/webrtc/trunk/webrtc/system_wrappers/source/atomic32_posix.cc.orig 2013-05-11 19:19:46.000000000 +0000 -+++ media/webrtc/trunk/webrtc/system_wrappers/source/atomic32_posix.cc -@@ -12,7 +12,6 @@ - - #include <assert.h> - #include <inttypes.h> --#include <malloc.h> - - #include "common_types.h" - diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_condition__variable.cc b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_condition__variable.cc index 7787e060f2d..1a2f4b79486 100644 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_condition__variable.cc +++ b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_condition__variable.cc @@ -1,33 +1,13 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_system__wrappers_source_condition__variable.cc,v 1.1 2013/05/23 13:12:13 ryoon Exp $ +$NetBSD: patch-media_webrtc_trunk_webrtc_system__wrappers_source_condition__variable.cc,v 1.2 2013/09/19 12:37:50 ryoon Exp $ ---- media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable.cc.orig 2013-05-11 19:19:46.000000000 +0000 +--- media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable.cc.orig 2013-09-10 03:43:47.000000000 +0000 +++ media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable.cc -@@ -8,14 +8,16 @@ - * be found in the AUTHORS file in the root of the source tree. - */ - -+#include "condition_variable_wrapper.h" -+ - #if defined(_WIN32) - #include <windows.h> - #include "condition_variable_win.h" --#include "condition_variable_wrapper.h" --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) +@@ -16,6 +16,8 @@ + #elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) #include <pthread.h> #include "condition_variable_posix.h" --#include "condition_variable_wrapper.h" +#else +#include <stddef.h> // for NULL #endif namespace webrtc { -@@ -23,7 +25,7 @@ namespace webrtc { - ConditionVariableWrapper* ConditionVariableWrapper::CreateConditionVariable() { - #if defined(_WIN32) - return new ConditionVariableWindows; --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - return ConditionVariablePosix::Create(); - #else - return NULL; diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_condition__variable__posix.cc b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_condition__variable__posix.cc deleted file mode 100644 index 0c4edac72a7..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_condition__variable__posix.cc +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_system__wrappers_source_condition__variable__posix.cc,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable_posix.cc.orig 2013-05-11 19:19:46.000000000 +0000 -+++ media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable_posix.cc -@@ -79,7 +79,7 @@ bool ConditionVariablePosix::SleepCS(Cri - unsigned long max_time_inMS) { - const unsigned long INFINITE = 0xFFFFFFFF; - const int MILLISECONDS_PER_SECOND = 1000; --#ifndef WEBRTC_LINUX -+#if !defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD) - const int MICROSECONDS_PER_MILLISECOND = 1000; - #endif - const int NANOSECONDS_PER_SECOND = 1000000000; diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_cpu.cc b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_cpu.cc deleted file mode 100644 index 39e0ccb1eb9..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_cpu.cc +++ /dev/null @@ -1,22 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_system__wrappers_source_cpu.cc,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- media/webrtc/trunk/webrtc/system_wrappers/source/cpu.cc.orig 2013-05-11 19:19:46.000000000 +0000 -+++ media/webrtc/trunk/webrtc/system_wrappers/source/cpu.cc -@@ -14,7 +14,7 @@ - #include "cpu_win.h" - #elif defined(WEBRTC_MAC) - #include "cpu_mac.h" --#elif defined(WEBRTC_ANDROID) -+#elif defined(WEBRTC_ANDROID) || defined(WEBRTC_BSD) - // Not implemented yet, might be possible to use Linux implementation - #else // defined(WEBRTC_LINUX) - #include "cpu_linux.h" -@@ -26,7 +26,7 @@ CpuWrapper* CpuWrapper::CreateCpu() { - return new CpuWindows(); - #elif defined(WEBRTC_MAC) - return new CpuWrapperMac(); --#elif defined(WEBRTC_ANDROID) -+#elif defined(WEBRTC_ANDROID) || defined(WEBRTC_BSD) - return 0; - #else - return new CpuLinux(); diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_cpu__info.cc b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_cpu__info.cc deleted file mode 100644 index a32bb735dc1..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_cpu__info.cc +++ /dev/null @@ -1,50 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_system__wrappers_source_cpu__info.cc,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc.orig 2013-05-11 19:19:46.000000000 +0000 -+++ media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc -@@ -12,13 +12,15 @@ - - #if defined(_WIN32) - #include <Windows.h> --#elif defined(WEBRTC_MAC) --#include <sys/sysctl.h> -+#elif defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - #include <sys/types.h> -+#include <sys/sysctl.h> - #elif defined(WEBRTC_ANDROID) - // Not implemented yet, might be possible to use Linux implementation --#else // defined(WEBRTC_LINUX) -+#elif defined(WEBRTC_LINUX) - #include <sys/sysinfo.h> -+#else // defined(_SC_NPROCESSORS_ONLN) -+#include <unistd.h> - #endif - - #include "trace.h" -@@ -41,8 +43,15 @@ WebRtc_UWord32 CpuInfo::DetectNumberOfCo - WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, - "Available number of cores:%d", number_of_cores_); - --#elif defined(WEBRTC_MAC) -- int name[] = {CTL_HW, HW_AVAILCPU}; -+#elif defined(WEBRTC_BSD) || defined(WEBRTC_MAC) -+ int name[] = { -+ CTL_HW, -+#ifdef HW_AVAILCPU -+ HW_AVAILCPU, -+#else -+ HW_NCPU, -+#endif -+ }; - int ncpu; - size_t size = sizeof(ncpu); - if (0 == sysctl(name, 2, &ncpu, &size, NULL, 0)) { -@@ -54,6 +63,8 @@ WebRtc_UWord32 CpuInfo::DetectNumberOfCo - "Failed to get number of cores"); - number_of_cores_ = 1; - } -+#elif defined(_SC_NPROCESSORS_ONLN) -+ _numberOfCores = sysconf(_SC_NPROCESSORS_ONLN); - #else - WEBRTC_TRACE(kTraceWarning, kTraceUtility, -1, - "No function to get number of cores"); diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_thread__posix.cc b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_thread__posix.cc index 1cb66ddae48..e31d5383489 100644 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_thread__posix.cc +++ b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_thread__posix.cc @@ -1,75 +1,25 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_system__wrappers_source_thread__posix.cc,v 1.2 2013/06/26 11:32:12 ryoon Exp $ +$NetBSD: patch-media_webrtc_trunk_webrtc_system__wrappers_source_thread__posix.cc,v 1.3 2013/09/19 12:37:50 ryoon Exp $ ---- media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc.orig 2013-06-17 22:13:20.000000000 +0000 +--- media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc.orig 2013-09-10 03:43:47.000000000 +0000 +++ media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc -@@ -59,6 +59,19 @@ - #include <sys/prctl.h> - #endif - -+#if defined(__NetBSD__) -+#include <lwp.h> -+#include <pthread.h> -+#include <sched.h> -+#elif defined(__FreeBSD__) -+#include <sys/param.h> -+#include <sys/thr.h> -+#endif -+ -+#if defined(WEBRTC_BSD) && !defined(__NetBSD__) -+#include <pthread_np.h> -+#endif -+ - #include "webrtc/system_wrappers/interface/critical_section_wrapper.h" - #include "webrtc/system_wrappers/interface/event_wrapper.h" - #include "webrtc/system_wrappers/interface/trace.h" -@@ -141,6 +154,20 @@ uint32_t ThreadWrapper::GetThreadId() { - return static_cast<uint32_t>(syscall(__NR_gettid)); - #elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS) - return pthread_mach_thread_np(pthread_self()); -+#elif defined(__NetBSD__) -+ return _lwp_self(); -+#elif defined(__DragonFly__) -+ return lwp_gettid(); -+#elif defined(__OpenBSD__) -+ return reinterpret_cast<uintptr_t> (pthread_self()); -+#elif defined(__FreeBSD__) -+# if __FreeBSD_version > 900030 -+ return pthread_getthreadid_np(); -+# else -+ long lwpid; -+ thr_self(&lwpid); -+ return lwpid; -+# endif - #else - return reinterpret_cast<uint32_t>(pthread_self()); - #endif -@@ -172,7 +199,7 @@ ThreadPosix::~ThreadPosix() { - delete crit_state_; - } - --#define HAS_THREAD_ID !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC) -+#define HAS_THREAD_ID !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC) && !defined(WEBRTC_BSD) - - bool ThreadPosix::Start(unsigned int& thread_id) - { -@@ -237,21 +264,43 @@ bool ThreadPosix::Start(unsigned int& th +@@ -272,7 +272,7 @@ bool ThreadPosix::Start(unsigned int& th // CPU_ZERO and CPU_SET are not available in NDK r7, so disable // SetAffinity on Android for now. --#if (defined(WEBRTC_LINUX) && (!defined(WEBRTC_ANDROID)) && (!defined(WEBRTC_GONK))) +-#if defined(__FreeBSD__) || (defined(WEBRTC_LINUX) && (!defined(WEBRTC_ANDROID)) && (!defined(WEBRTC_GONK))) +#if defined(__FreeBSD__) || defined(__NetBSD__) || (defined(WEBRTC_LINUX) && (!defined(WEBRTC_ANDROID)) && (!defined(WEBRTC_GONK))) bool ThreadPosix::SetAffinity(const int* processor_numbers, const unsigned int amount_of_processors) { if (!processor_numbers || (amount_of_processors == 0)) { - return false; +@@ -280,20 +280,34 @@ bool ThreadPosix::SetAffinity(const int* } -+#if defined(__FreeBSD__) -+ cpuset_t mask; + #if defined(__FreeBSD__) + cpuset_t mask; +#elif defined(__NetBSD__) + cpuset_t *mask; -+#else + #else cpu_set_t mask; -+#endif + #endif +#if defined(__NetBSD__) + cpuset_zero(mask); +#else @@ -85,27 +35,14 @@ $NetBSD: patch-media_webrtc_trunk_webrtc_system__wrappers_source_thread__posix.c CPU_SET(processor_numbers[processor], &mask); +#endif } --#if defined(WEBRTC_ANDROID) || defined(WEBRTC_GONK) -+#if defined(__FreeBSD__) -+ const int result = pthread_setaffinity_np(thread_, -+ sizeof(mask), -+ &mask); + #if defined(__FreeBSD__) + const int result = pthread_setaffinity_np(thread_, + sizeof(mask), + &mask); +#elif defined(__NetBSD__) + const int result = pthread_setaffinity_np(thread_, + sizeof(mask), + mask); -+#elif defined(WEBRTC_ANDROID) || defined(WEBRTC_GONK) + #elif defined(WEBRTC_ANDROID) || defined(WEBRTC_GONK) // Android. const int result = syscall(__NR_sched_setaffinity, - pid_, -@@ -325,6 +374,10 @@ void ThreadPosix::Run() { - if (set_thread_name_) { - #ifdef WEBRTC_LINUX - prctl(PR_SET_NAME, (unsigned long)name_, 0, 0, 0); -+#elif defined(__NetBSD__) -+ pthread_setname_np(pthread_self(), "%s", (void *)name_); -+#elif defined(WEBRTC_BSD) -+ pthread_set_name_np(pthread_self(), name_); - #endif - WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, - "Thread with name:%s started ", name_); diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_trace__posix.cc b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_trace__posix.cc deleted file mode 100644 index 0330f2319f8..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_system__wrappers_source_trace__posix.cc +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_system__wrappers_source_trace__posix.cc,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- media/webrtc/trunk/webrtc/system_wrappers/source/trace_posix.cc.orig 2013-05-11 19:19:46.000000000 +0000 -+++ media/webrtc/trunk/webrtc/system_wrappers/source/trace_posix.cc -@@ -54,7 +54,7 @@ WebRtc_Word32 TracePosix::AddTime(char* - } - struct tm buffer; - const struct tm* system_time = -- localtime_r(&system_time_high_res.tv_sec, &buffer); -+ localtime_r((const time_t *)(&system_time_high_res.tv_sec), &buffer); - - const WebRtc_UWord32 ms_time = system_time_high_res.tv_usec / 1000; - WebRtc_UWord32 prev_tickCount = 0; diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_typedefs.h b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_typedefs.h deleted file mode 100644 index 65813c26e86..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_typedefs.h +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_typedefs.h,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- media/webrtc/trunk/webrtc/typedefs.h.orig 2013-05-11 19:19:46.000000000 +0000 -+++ media/webrtc/trunk/webrtc/typedefs.h -@@ -21,7 +21,7 @@ - // For access to standard POSIXish features, use WEBRTC_POSIX instead of a - // more specific macro. - #if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) || \ -- defined(WEBRTC_ANDROID) -+ defined(WEBRTC_ANDROID) || defined(WEBRTC_BSD) - #define WEBRTC_POSIX - #endif - diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_video__engine_vie__defines.h b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_video__engine_vie__defines.h deleted file mode 100644 index c5ab01ee68a..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_video__engine_vie__defines.h +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_video__engine_vie__defines.h,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- media/webrtc/trunk/webrtc/video_engine/vie_defines.h.orig 2013-05-11 19:19:46.000000000 +0000 -+++ media/webrtc/trunk/webrtc/video_engine/vie_defines.h -@@ -173,7 +173,7 @@ inline int ChannelId(const int moduleId) - - // Linux specific. - #ifndef WEBRTC_ANDROID --#ifdef WEBRTC_LINUX -+#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) - // Build information macros. - #if defined(_DEBUG) - #define BUILDMODE "d" diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_voice__engine_voe__network__impl.cc b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_voice__engine_voe__network__impl.cc deleted file mode 100644 index 88e91a5694d..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_voice__engine_voe__network__impl.cc +++ /dev/null @@ -1,31 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_voice__engine_voe__network__impl.cc,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- media/webrtc/trunk/webrtc/voice_engine/voe_network_impl.cc.orig 2013-05-11 19:19:46.000000000 +0000 -+++ media/webrtc/trunk/webrtc/voice_engine/voe_network_impl.cc -@@ -472,7 +472,7 @@ int VoENetworkImpl::SetSendTOS(int chann - "SetSendTOS(channel=%d, DSCP=%d, useSetSockopt=%d)", - channel, DSCP, useSetSockopt); - --#if !defined(_WIN32) && !defined(WEBRTC_LINUX) && !defined(WEBRTC_MAC) -+#if !defined(_WIN32) && !defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD) && !defined(WEBRTC_MAC) - _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceWarning, - "SetSendTOS() is not supported on this platform"); - return -1; -@@ -528,7 +528,7 @@ int VoENetworkImpl::SetSendTOS(int chann - "SetSendTOS() external transport is enabled"); - return -1; - } --#if defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - useSetSockopt = true; - WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_shared->instance_id(), -1), - " force useSetSockopt=true since there is no alternative" -@@ -551,7 +551,7 @@ int VoENetworkImpl::GetSendTOS(int chann - WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), - "GetSendTOS(channel=%d)", channel); - --#if !defined(_WIN32) && !defined(WEBRTC_LINUX) && !defined(WEBRTC_MAC) -+#if !defined(_WIN32) && !defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD) && !defined(WEBRTC_MAC) - _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceWarning, - "GetSendTOS() is not supported on this platform"); - return -1; diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_voice__engine_voice__engine__defines.h b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_voice__engine_voice__engine__defines.h deleted file mode 100644 index c49d461a40f..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_voice__engine_voice__engine__defines.h +++ /dev/null @@ -1,38 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_voice__engine_voice__engine__defines.h,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h.orig 2013-05-11 19:19:46.000000000 +0000 -+++ media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h -@@ -414,7 +414,7 @@ namespace webrtc - // *** WEBRTC_MAC *** - // including iPhone - --#ifdef WEBRTC_MAC -+#if defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - - #include <pthread.h> - #include <sys/types.h> -@@ -431,6 +431,7 @@ namespace webrtc - #include <sched.h> - #include <sys/time.h> - #include <time.h> -+#if !defined(WEBRTC_BSD) - #include <AudioUnit/AudioUnit.h> - #if !defined(WEBRTC_IOS) - #include <CoreServices/CoreServices.h> -@@ -439,6 +440,7 @@ namespace webrtc - #include <AudioToolbox/AudioConverter.h> - #include <CoreAudio/HostTime.h> - #endif -+#endif - - #define DWORD unsigned long int - #define WINAPI -@@ -531,7 +533,7 @@ namespace webrtc - - #else - #define IPHONE_NOT_SUPPORTED(stat) --#endif // #ifdef WEBRTC_MAC -+#endif // #if defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - - - diff --git a/www/firefox/patches/patch-media_webrtc_webrtc__config.gypi b/www/firefox/patches/patch-media_webrtc_webrtc__config.gypi deleted file mode 100644 index f16543444ac..00000000000 --- a/www/firefox/patches/patch-media_webrtc_webrtc__config.gypi +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-media_webrtc_webrtc__config.gypi,v 1.2 2013/06/26 11:32:12 ryoon Exp $ - ---- media/webrtc/webrtc_config.gypi.orig 2013-06-17 22:13:21.000000000 +0000 -+++ media/webrtc/webrtc_config.gypi -@@ -14,7 +14,6 @@ - 'include_internal_video_render': 0, - 'clang_use_chrome_plugins': 0, - 'enable_protobuf': 0, -- 'include_pulse_audio': 0, - 'include_tests': 0, - 'enable_android_opensl': 1, - # use_system_lib* still seems to be in use in trunk/build diff --git a/www/firefox/patches/patch-mfbt_Atomics.h b/www/firefox/patches/patch-mfbt_Atomics.h new file mode 100644 index 00000000000..2180a116324 --- /dev/null +++ b/www/firefox/patches/patch-mfbt_Atomics.h @@ -0,0 +1,13 @@ +$NetBSD: patch-mfbt_Atomics.h,v 1.1 2013/09/19 12:37:50 ryoon Exp $ + +--- mfbt/Atomics.h.orig 2013-09-10 03:43:48.000000000 +0000 ++++ mfbt/Atomics.h +@@ -37,7 +37,7 @@ + */ + # if !defined(__linux__) && !defined(__OpenBSD__) && \ + (__cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)) && \ +- __has_include(<atomic>) ++ __has_include_next(<atomic>) + # define MOZ_HAVE_CXX11_ATOMICS + # endif + /* diff --git a/www/firefox/patches/patch-modules_libpref_src_init_all.js b/www/firefox/patches/patch-modules_libpref_src_init_all.js new file mode 100644 index 00000000000..57a3c709c1f --- /dev/null +++ b/www/firefox/patches/patch-modules_libpref_src_init_all.js @@ -0,0 +1,13 @@ +$NetBSD: patch-modules_libpref_src_init_all.js,v 1.1 2013/09/19 12:37:50 ryoon Exp $ + +--- modules/libpref/src/init/all.js.orig 2013-09-10 03:43:49.000000000 +0000 ++++ modules/libpref/src/init/all.js +@@ -188,7 +188,7 @@ pref("media.webm.enabled", true); + pref("media.dash.enabled", false); + #endif + #ifdef MOZ_GSTREAMER +-pref("media.gstreamer.enabled", false); ++pref("media.gstreamer.enabled", true); + #endif + #ifdef MOZ_WEBRTC + pref("media.navigator.enabled", true); diff --git a/www/firefox/patches/patch-netwerk__protocol__websocket__WebSocketChannel.cpp b/www/firefox/patches/patch-netwerk__protocol__websocket__WebSocketChannel.cpp deleted file mode 100644 index e3aeb089c84..00000000000 --- a/www/firefox/patches/patch-netwerk__protocol__websocket__WebSocketChannel.cpp +++ /dev/null @@ -1,42 +0,0 @@ -$NetBSD: patch-netwerk__protocol__websocket__WebSocketChannel.cpp,v 1.2 2013/06/26 11:32:12 ryoon Exp $ - -# HG changeset patch -# User Martin Husemann <martin@netbsd.org> -# Date 1370038996 -7200 -# Node ID 4539a7706881edaedc2189cc0d2d9c7b7abedf1d -# Parent d16914942a9c502dde37dce2a1deb09050218ba8 -Bug 871555: Use memcpy and properly aligned temporary variables instead of pointer casts with unclear alignment r=mcmanus - -diff netwerk/protocol/websocket/WebSocketChannel.cpp netwerk/protocol/websocket/WebSocketChannel.cpp ---- netwerk/protocol/websocket/WebSocketChannel.cpp.orig 2013-06-17 22:13:23.000000000 +0000 -+++ netwerk/protocol/websocket/WebSocketChannel.cpp -@@ -1632,7 +1632,8 @@ WebSocketChannel::PrimeNewOutgoingMessag - // and there isn't an internal error, use that. - if (NS_SUCCEEDED(mStopOnClose)) { - if (mScriptCloseCode) { -- *((uint16_t *)payload) = PR_htons(mScriptCloseCode); -+ uint16_t temp = PR_htons(mScriptCloseCode); -+ memcpy(payload, &temp, 2); - mOutHeader[1] += 2; - mHdrOutToSend = 8; - if (!mScriptCloseReason.IsEmpty()) { -@@ -1651,7 +1652,8 @@ WebSocketChannel::PrimeNewOutgoingMessag - mHdrOutToSend = 6; - } - } else { -- *((uint16_t *)payload) = PR_htons(ResultToCloseCode(mStopOnClose)); -+ uint16_t temp = PR_htons(ResultToCloseCode(mStopOnClose)); -+ memcpy(payload, &temp, 2); - mOutHeader[1] += 2; - mHdrOutToSend = 8; - } -@@ -1739,7 +1741,8 @@ WebSocketChannel::PrimeNewOutgoingMessag - mask = * reinterpret_cast<uint32_t *>(buffer); - NS_Free(buffer); - } while (!mask); -- *(((uint32_t *)payload) - 1) = PR_htonl(mask); -+ uint32_t temp = PR_htonl(mask); -+ memcpy(payload - 4, &temp, 4); - - LOG(("WebSocketChannel::PrimeNewOutgoingMessage() using mask %08x\n", mask)); - diff --git a/www/firefox/patches/patch-netwerk_sctp_src_Makefile.in b/www/firefox/patches/patch-netwerk_sctp_src_Makefile.in deleted file mode 100644 index ac190313978..00000000000 --- a/www/firefox/patches/patch-netwerk_sctp_src_Makefile.in +++ /dev/null @@ -1,23 +0,0 @@ -$NetBSD: patch-netwerk_sctp_src_Makefile.in,v 1.1 2013/05/23 13:12:13 ryoon Exp $ - ---- netwerk/sctp/src/Makefile.in.orig 2013-05-11 19:19:49.000000000 +0000 -+++ netwerk/sctp/src/Makefile.in -@@ -114,11 +114,18 @@ DEFINES += \ - -U__FreeBSD__ \ - $(NULL) - else -+ifeq ($(OS_TARGET),NetBSD) -+DEFINES += \ -+ -D__Userspace_os_NetBSD=1 \ -+ -U__NetBSD__ \ -+ $(NULL) -+else - #error Unsupported platform! - endif - endif - endif - endif -+endif - - include $(topsrcdir)/config/config.mk - include $(topsrcdir)/ipc/chromium/chromium-config.mk diff --git a/www/firefox/patches/patch-netwerk_wifi_Makefile.in b/www/firefox/patches/patch-netwerk_wifi_Makefile.in new file mode 100644 index 00000000000..21f6d19d662 --- /dev/null +++ b/www/firefox/patches/patch-netwerk_wifi_Makefile.in @@ -0,0 +1,13 @@ +$NetBSD: patch-netwerk_wifi_Makefile.in,v 1.1 2013/09/19 12:37:50 ryoon Exp $ + +--- netwerk/wifi/Makefile.in.orig 2013-09-10 03:43:50.000000000 +0000 ++++ netwerk/wifi/Makefile.in +@@ -26,7 +26,7 @@ ifeq ($(OS_ARCH),SunOS) + OS_INCLUDES += $(GLIB_CFLAGS) + endif + +-ifdef MOZ_ENABLE_DBUS ++ifdef NECKO_WIFI_DBUS + OS_INCLUDES += $(MOZ_DBUS_GLIB_CFLAGS) + endif + diff --git a/www/firefox/patches/patch-netwerk_wifi_moz.build b/www/firefox/patches/patch-netwerk_wifi_moz.build new file mode 100644 index 00000000000..3ad0651418c --- /dev/null +++ b/www/firefox/patches/patch-netwerk_wifi_moz.build @@ -0,0 +1,24 @@ +$NetBSD: patch-netwerk_wifi_moz.build,v 1.1 2013/09/19 12:37:50 ryoon Exp $ + +--- netwerk/wifi/moz.build.orig 2013-09-10 03:43:50.000000000 +0000 ++++ netwerk/wifi/moz.build +@@ -31,6 +31,10 @@ if CONFIG['OS_ARCH'] == 'Darwin': + CPP_SOURCES += [ + 'nsWifiScannerMac.cpp', + ] ++elif CONFIG['OS_ARCH'] == 'FreeBSD': ++ CPP_SOURCES += [ ++ 'nsWifiScannerFreeBSD.cpp', ++ ] + elif CONFIG['OS_ARCH'] == 'WINNT': + CPP_SOURCES += [ + 'nsWifiScannerWin.cpp', +@@ -40,7 +44,7 @@ elif CONFIG['OS_ARCH'] == 'SunOS': + 'nsWifiScannerSolaris.cpp', + ] + +-if CONFIG['MOZ_ENABLE_DBUS']: ++if CONFIG['NECKO_WIFI_DBUS']: + CPP_SOURCES += [ + 'nsWifiScannerDBus.cpp', + ] diff --git a/www/firefox/patches/patch-netwerk_wifi_nsWifiScannerFreeBSD.cpp b/www/firefox/patches/patch-netwerk_wifi_nsWifiScannerFreeBSD.cpp new file mode 100644 index 00000000000..2268fedd8d8 --- /dev/null +++ b/www/firefox/patches/patch-netwerk_wifi_nsWifiScannerFreeBSD.cpp @@ -0,0 +1,177 @@ +$NetBSD: patch-netwerk_wifi_nsWifiScannerFreeBSD.cpp,v 1.1 2013/09/19 12:37:50 ryoon Exp $ + +--- netwerk/wifi/nsWifiScannerFreeBSD.cpp.orig 2013-09-14 15:17:47.000000000 +0000 ++++ netwerk/wifi/nsWifiScannerFreeBSD.cpp +@@ -0,0 +1,172 @@ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++// Developed by J.R. Oldroyd <fbsd@opal.com>, December 2012. ++ ++// For FreeBSD we use the getifaddrs(3) to obtain the list of interfaces ++// and then check for those with an 802.11 media type and able to return ++// a list of stations. This is similar to ifconfig(8). ++ ++#include <sys/types.h> ++#include <sys/ioctl.h> ++#include <sys/socket.h> ++#include <net/if.h> ++#include <net/if_media.h> ++#include <net80211/ieee80211_ioctl.h> ++ ++#include <ifaddrs.h> ++#include <string.h> ++#include <unistd.h> ++ ++#include "nsWifiAccessPoint.h" ++ ++using namespace mozilla; ++ ++static nsresult ++FreeBSDGetAccessPointData(nsCOMArray<nsWifiAccessPoint> &accessPoints) ++{ ++ bool res = false; ++ char *dupn = NULL; ++ struct ifaddrs *ifal, *ifa; ++ unsigned len; ++ ++ // get list of interfaces ++ if (getifaddrs(&ifal) < 0) ++ return NS_ERROR_FAILURE; ++ ++ accessPoints.Clear(); ++ ++ // loop through the interfaces ++ for (ifa = ifal; ifa; ifa = ifa->ifa_next) { ++ int s; ++ struct ifreq ifr; ++ struct ifmediareq ifmr; ++ struct ieee80211req i802r; ++ char iscanbuf[32*1024], *vsr; ++ ++ memset(&ifr, 0, sizeof(ifr)); ++ ++ // list can contain duplicates, so ignore those ++ if (dupn != NULL && strcmp(dupn, ifa->ifa_name) == 0) ++ continue; ++ dupn = ifa->ifa_name; ++ ++ // store interface name in socket structure ++ strncpy(ifr.ifr_name, ifa->ifa_name, sizeof(ifr.ifr_name)); ++ ifr.ifr_addr.sa_family = AF_LOCAL; ++ ++ // open socket to interface ++ if ((s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0)) < 0) ++ continue; ++ ++ // clear interface media structure ++ (void) memset(&ifmr, 0, sizeof(ifmr)); ++ (void) strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name)); ++ ++ // get interface media information ++ if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) { ++ close(s); ++ continue; ++ } ++ ++ // check interface is a WiFi interface ++ if (IFM_TYPE(ifmr.ifm_active) != IFM_IEEE80211) { ++ close(s); ++ continue; ++ } ++ ++ // perform WiFi scan ++ (void) memset(&i802r, 0, sizeof(i802r)); ++ (void) strncpy(i802r.i_name, ifa->ifa_name, sizeof(i802r.i_name)); ++ i802r.i_type = IEEE80211_IOC_SCAN_RESULTS; ++ i802r.i_data = iscanbuf; ++ i802r.i_len = sizeof(iscanbuf); ++ if (ioctl(s, SIOCG80211, &i802r) < 0) { ++ close(s); ++ continue; ++ } ++ ++ // close socket ++ close(s); ++ ++ // loop through WiFi networks and build geoloc-lookup structure ++ vsr = (char *) i802r.i_data; ++ len = i802r.i_len; ++ while (len >= sizeof(struct ieee80211req_scan_result)) { ++ struct ieee80211req_scan_result *isr; ++ char *id; ++ int idlen; ++ char ssid[IEEE80211_NWID_LEN+1]; ++ nsWifiAccessPoint *ap; ++ ++ isr = (struct ieee80211req_scan_result *) vsr; ++ ++ // determine size of this entry ++ if (isr->isr_meshid_len) { ++ id = vsr + isr->isr_ie_off + isr->isr_ssid_len; ++ idlen = isr->isr_meshid_len; ++ } ++ else { ++ id = vsr + isr->isr_ie_off; ++ idlen = isr->isr_ssid_len; ++ } ++ ++ // copy network data ++ strncpy(ssid, id, idlen); ++ ssid[idlen] = '\0'; ++ ap = new nsWifiAccessPoint(); ++ ap->setSSID(ssid, strlen(ssid)); ++ ap->setMac(isr->isr_bssid); ++ ap->setSignal(isr->isr_rssi); ++ accessPoints.AppendObject(ap); ++ res = true; ++ ++ // log the data ++ LOG(( "FreeBSD access point: " ++ "SSID: %s, MAC: %02x-%02x-%02x-%02x-%02x-%02x, " ++ "Strength: %d, Channel: %dMHz\n", ++ ssid, isr->isr_bssid[0], isr->isr_bssid[1], isr->isr_bssid[2], ++ isr->isr_bssid[3], isr->isr_bssid[4], isr->isr_bssid[5], ++ isr->isr_rssi, isr->isr_freq)); ++ ++ // increment pointers ++ len -= isr->isr_len; ++ vsr += isr->isr_len; ++ } ++ } ++ ++ freeifaddrs(ifal); ++ ++ return res ? NS_OK : NS_ERROR_FAILURE; ++} ++ ++nsresult ++nsWifiMonitor::DoScan() ++{ ++ // Regularly get the access point data. ++ ++ nsCOMArray<nsWifiAccessPoint> lastAccessPoints; ++ nsCOMArray<nsWifiAccessPoint> accessPoints; ++ ++ do { ++ nsresult rv = FreeBSDGetAccessPointData(accessPoints); ++ if (NS_FAILED(rv)) ++ return rv; ++ ++ bool accessPointsChanged = !AccessPointsEqual(accessPoints, lastAccessPoints); ++ ReplaceArray(lastAccessPoints, accessPoints); ++ ++ rv = CallWifiListeners(lastAccessPoints, accessPointsChanged); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ // wait for some reasonable amount of time. pref? ++ LOG(("waiting on monitor\n")); ++ ++ ReentrantMonitorAutoEnter mon(mReentrantMonitor); ++ mon.Wait(PR_SecondsToInterval(60)); ++ } ++ while (mKeepGoing); ++ ++ return NS_OK; ++} diff --git a/www/firefox/patches/patch-pa b/www/firefox/patches/patch-pa deleted file mode 100644 index 56e0f8892dd..00000000000 --- a/www/firefox/patches/patch-pa +++ /dev/null @@ -1,11 +0,0 @@ -$NetBSD: patch-pa,v 1.2 2013/08/07 12:17:54 ryoon Exp $ - ---- xulrunner/installer/mozilla-js.pc.in.orig 2013-07-30 00:59:18.000000000 +0000 -+++ xulrunner/installer/mozilla-js.pc.in -@@ -6,5 +6,5 @@ Name: JavaScript - Description: The Mozilla JavaScript Library - Version: %MOZILLA_VERSION% - Requires: %NSPR_NAME% >= %NSPR_VERSION% --Libs: -L${sdkdir}/lib %MOZ_JS_LINK% -+Libs: -Wl,-R${prefix}/lib/xulrunner -Wl,-R${prefix}/lib/xulrunner -Wl,-R${prefix}/lib/xulrunner -Wl,-R${prefix}/lib/xulrunner -L${prefix}/lib/xulrunner %MOZ_JS_LINK% - Cflags: -I${includedir} -DXP_UNIX -DJS_THREADSAFE diff --git a/www/firefox/patches/patch-pd b/www/firefox/patches/patch-pd deleted file mode 100644 index faf14d8aab5..00000000000 --- a/www/firefox/patches/patch-pd +++ /dev/null @@ -1,11 +0,0 @@ -$NetBSD: patch-pd,v 1.2 2013/08/07 12:17:54 ryoon Exp $ - ---- xulrunner/installer/mozilla-nss.pc.in.orig 2013-07-30 00:59:18.000000000 +0000 -+++ xulrunner/installer/mozilla-nss.pc.in -@@ -6,5 +6,5 @@ Name: NSS - Description: Mozilla Network Security Services - Version: %MOZILLA_VERSION% - Requires: %NSPR_NAME% >= %NSPR_VERSION% --Libs: -L${sdkdir}/lib -lsmime3 -lssl3 -lnss3 -lnssutil3 -+Libs: -Wl,-R${prefix}/lib/xulrunner -Wl,-R${prefix}/lib/xulrunner -Wl,-R${prefix}/lib/xulrunner -Wl,-R${prefix}/lib/xulrunner -L${prefix}/lib/xulrunner -lsmime3 -lssl3 -lnss3 -lnssutil3 - Cflags: -I${includedir} diff --git a/www/firefox/patches/patch-pg b/www/firefox/patches/patch-pg deleted file mode 100644 index c6745c0a5fa..00000000000 --- a/www/firefox/patches/patch-pg +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-pg,v 1.2 2013/08/07 12:17:54 ryoon Exp $ - ---- xulrunner/installer/mozilla-nspr.pc.in.orig 2013-07-30 00:59:18.000000000 +0000 -+++ xulrunner/installer/mozilla-nspr.pc.in -@@ -5,7 +5,5 @@ includedir=%includedir% - Name: NSPR - Description: The Netscape Portable Runtime - Version: %NSPR_VERSION% --Libs: %FULL_NSPR_LIBS% --Cflags: %FULL_NSPR_CFLAGS% -- -- -+Libs: -Wl,-R${prefix}/lib/xulrunner -Wl,-R${prefix}/lib/xulrunner -Wl,-R${prefix}/lib/xulrunner -Wl,-R${prefix}/lib/xulrunner -L${prefix}/lib/xulrunner -lplds4 -lplc4 -lnspr4 -pthread -+Cflags: -I${includedir} diff --git a/www/firefox/patches/patch-security_manager_ssl_src_JARSignatureVerification.cpp b/www/firefox/patches/patch-security_manager_ssl_src_JARSignatureVerification.cpp new file mode 100644 index 00000000000..1ef179f4d4f --- /dev/null +++ b/www/firefox/patches/patch-security_manager_ssl_src_JARSignatureVerification.cpp @@ -0,0 +1,17 @@ +$NetBSD: patch-security_manager_ssl_src_JARSignatureVerification.cpp,v 1.1 2013/09/19 12:37:50 ryoon Exp $ + +--- security/manager/ssl/src/JARSignatureVerification.cpp.orig 2013-09-10 03:43:51.000000000 +0000 ++++ security/manager/ssl/src/JARSignatureVerification.cpp +@@ -596,9 +596,9 @@ OpenSignedJARFile(nsIFile * aJarFile, + } + + // Verify that the signature file is a valid signature of the SF file +- if (!SEC_PKCS7VerifyDetachedSignatureAtTime(p7_info, certUsageObjectSigner, +- &sfCalculatedDigest.get(), +- HASH_AlgSHA1, false, PR_Now())) { ++ if (!SEC_PKCS7VerifyDetachedSignature(p7_info, certUsageObjectSigner, ++ &sfCalculatedDigest.get(), HASH_AlgSHA1, ++ false)) { + PRErrorCode error = PR_GetError(); + const char * errorName = PR_ErrorToName(error); + PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("Failed to verify detached signature: %s", diff --git a/www/firefox/patches/patch-security_manager_ssl_src_nsNSSComponent.cpp b/www/firefox/patches/patch-security_manager_ssl_src_nsNSSComponent.cpp index 29f25a3572a..7fcd53325a8 100644 --- a/www/firefox/patches/patch-security_manager_ssl_src_nsNSSComponent.cpp +++ b/www/firefox/patches/patch-security_manager_ssl_src_nsNSSComponent.cpp @@ -1,12 +1,12 @@ -$NetBSD: patch-security_manager_ssl_src_nsNSSComponent.cpp,v 1.1 2013/05/23 13:12:13 ryoon Exp $ +$NetBSD: patch-security_manager_ssl_src_nsNSSComponent.cpp,v 1.2 2013/09/19 12:37:50 ryoon Exp $ ---- security/manager/ssl/src/nsNSSComponent.cpp.orig 2013-05-11 19:19:50.000000000 +0000 +--- security/manager/ssl/src/nsNSSComponent.cpp.orig 2013-09-10 03:43:51.000000000 +0000 +++ security/manager/ssl/src/nsNSSComponent.cpp -@@ -72,6 +72,7 @@ +@@ -49,6 +49,7 @@ + #include "nss.h" - #include "pk11func.h" #include "ssl.h" +#define NSS_ENABLE_ECC 1 #include "sslproto.h" #include "secmod.h" - #include "sechash.h" + #include "secmime.h" diff --git a/www/firefox/patches/patch-toolkit_components_osfile_osfile__unix__allthreads.jsm b/www/firefox/patches/patch-toolkit_components_osfile_osfile__unix__allthreads.jsm new file mode 100644 index 00000000000..08fdde21a75 --- /dev/null +++ b/www/firefox/patches/patch-toolkit_components_osfile_osfile__unix__allthreads.jsm @@ -0,0 +1,13 @@ +$NetBSD: patch-toolkit_components_osfile_osfile__unix__allthreads.jsm,v 1.1 2013/09/19 12:37:50 ryoon Exp $ + +--- toolkit/components/osfile/osfile_unix_allthreads.jsm.orig 2013-09-10 03:43:54.000000000 +0000 ++++ toolkit/components/osfile/osfile_unix_allthreads.jsm +@@ -40,7 +40,7 @@ if (typeof Components != "undefined") { + // Open libc + let libc; + let libc_candidates = [ "libSystem.B.dylib", +- "libc.so.6", ++ "libc.so.7", + "libc.so" ]; + for (let i = 0; i < libc_candidates.length; ++i) { + try { diff --git a/www/firefox/patches/patch-toolkit_xre_Makefile.in b/www/firefox/patches/patch-toolkit_xre_Makefile.in new file mode 100644 index 00000000000..780d784010e --- /dev/null +++ b/www/firefox/patches/patch-toolkit_xre_Makefile.in @@ -0,0 +1,10 @@ +$NetBSD: patch-toolkit_xre_Makefile.in,v 1.1 2013/09/19 12:37:50 ryoon Exp $ + +--- toolkit/xre/Makefile.in.orig 2013-09-10 03:43:56.000000000 +0000 ++++ toolkit/xre/Makefile.in +@@ -216,5 +216,3 @@ GARBAGE += platform.ini + libs:: platform.ini + $(INSTALL) $^ $(DIST)/bin + +-install:: +- $(INSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir) diff --git a/www/firefox/patches/patch-xpcom__reflect__xptcall__src__md__unix__xptcstubs_sparc64_openbsd.cpp b/www/firefox/patches/patch-xpcom__reflect__xptcall__src__md__unix__xptcstubs_sparc64_openbsd.cpp deleted file mode 100644 index f51cf95eac6..00000000000 --- a/www/firefox/patches/patch-xpcom__reflect__xptcall__src__md__unix__xptcstubs_sparc64_openbsd.cpp +++ /dev/null @@ -1,23 +0,0 @@ -$NetBSD: patch-xpcom__reflect__xptcall__src__md__unix__xptcstubs_sparc64_openbsd.cpp,v 1.2 2013/06/26 11:32:12 ryoon Exp $ - -# HG changeset patch -# User Martin Husemann <martin@netbsd.org> -# Date 1370038989 -7200 -# Node ID d296fcc8f3dd6254c862cdfd47a5580ee05a94f4 -# Parent 52b02042b27f75acbcb2bd4822bedb00ab680e67 -Bug 867914: Declare SharedStub as returning nsresult in xptcstubs_sparc64_openbsd.cpp. r=landry - -Fixes a build issue on NetBSD/sparc64, no apparent fallout on OpenBSD/sparc64 - -diff xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_openbsd.cpp xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_openbsd.cpp ---- xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_openbsd.cpp.orig 2013-06-17 22:13:29.000000000 +0000 -+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_openbsd.cpp -@@ -83,7 +83,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, - return result; - } - --extern "C" int SharedStub(int, int*); -+extern "C" nsresult SharedStub(int, int*); - - #define STUB_ENTRY(n) \ - nsresult nsXPTCStubBase::Stub##n() \ diff --git a/www/firefox/patches/patch-xpcom_ds_moz.build b/www/firefox/patches/patch-xpcom_ds_moz.build new file mode 100644 index 00000000000..c469e1168b8 --- /dev/null +++ b/www/firefox/patches/patch-xpcom_ds_moz.build @@ -0,0 +1,24 @@ +$NetBSD: patch-xpcom_ds_moz.build,v 1.1 2013/09/19 12:37:50 ryoon Exp $ + +* Honor sFirstTimeStamp and sProcessCreation, fix segfault. + +--- xpcom/ds/moz.build.orig 2013-09-10 03:43:57.000000000 +0000 ++++ xpcom/ds/moz.build +@@ -95,7 +95,6 @@ CPP_SOURCES += [ + 'nsSupportsPrimitives.cpp', + 'nsUnicharBuffer.cpp', + 'nsVariant.cpp', +- 'TimeStamp.cpp', + ] + + if CONFIG['HAVE_CLOCK_MONOTONIC']: +@@ -113,5 +112,9 @@ elif CONFIG['OS_ARCH'] == 'WINNT': + else: + error('No TimeStamp implementation on this platform. Build will not succeed') + ++CPP_SOURCES += [ ++ 'TimeStamp.cpp', ++] ++ + LIBRARY_NAME = 'xpcomds_s' + diff --git a/www/firefox/patches/patch-xpcom_reflect_xptcall_src_md_unix_moz.build b/www/firefox/patches/patch-xpcom_reflect_xptcall_src_md_unix_moz.build new file mode 100644 index 00000000000..c3b2b27ae76 --- /dev/null +++ b/www/firefox/patches/patch-xpcom_reflect_xptcall_src_md_unix_moz.build @@ -0,0 +1,15 @@ +$NetBSD: patch-xpcom_reflect_xptcall_src_md_unix_moz.build,v 1.1 2013/09/19 12:37:50 ryoon Exp $ + +* Support NetBSD/amd64 and DragonFly/amd64. + +--- xpcom/reflect/xptcall/src/md/unix/moz.build.orig 2013-09-10 03:43:57.000000000 +0000 ++++ xpcom/reflect/xptcall/src/md/unix/moz.build +@@ -26,7 +26,7 @@ if CONFIG['OS_ARCH'] in ('NetBSD', 'Open + 'xptcstubs_gcc_x86_unix.cpp' + ] + +-if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD') or \ ++if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD', 'NetBSD', 'DragonFly') or \ + CONFIG['OS_ARCH'].startswith('GNU_'): + if CONFIG['OS_TEST'] == 'x86_64': + CPP_SOURCES += [ |