Import of pkgsrc-2016Q3

This commit is contained in:
2016-11-18 22:39:22 +01:00
committed by sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949747 additions and 377081 deletions
+8
View File
@@ -0,0 +1,8 @@
What is the Tor Browser?
The Tor software protects you by bouncing your communications around
a distributed network of relays run by volunteers all around the
world: it prevents somebody watching your Internet connection from
learning what sites you visit, it prevents the sites you visit from
learning your physical location, and it lets you access sites which
are blocked.
+22
View File
@@ -0,0 +1,22 @@
===========================================================================
$NetBSD: MESSAGE,v 1.1 2016/02/14 07:30:54 ryoon Exp $
This package provides basic Tor Browser.
Be sure to run Tor daemon before your Tor Browser runs.
And you should install following extensions to ensude secure Tor connection.
HTTPS Everywhere
https://addons.mozilla.org/en-US/firefox/addon/https-everywhere/
NoScript Security Suite
https://addons.mozilla.org/en-US/firefox/addon/noscript/
TorButton
https://dist.torproject.org/torbutton/
net/tor provides localhost:9050 socks proxy. However Tor Browser and
TorButton presumes localhost:9150 socks proxy. Be sure to change
port number in TorButton preferences window.
===========================================================================
+97
View File
@@ -0,0 +1,97 @@
# $NetBSD: Makefile,v 1.11 2016/08/17 00:06:45 ryoon Exp $
TORBVER= 5.5.4
DISTNAME= tor-browser-38.7.1esr-5.5-1
PKGNAME= tor-browser-${TORBVER}
PKGREVISION= 5
CATEGORIES= www
MASTER_SITES+= ${MASTER_SITE_LOCAL}
EXTRACT_SUFX= .tar.xz
MAINTAINER= ryoon@NetBSD.org
HOMEPAGE= https://www.torproject.org/projects/torbrowser.html.en
COMMENT= Tor Browser based on Firefox
LICENSE= mpl-1.1
DEPENDS+= tor-[0-9]*:../../net/tor
# Remove hardcoded build directory.
SUBST_CLASSES+= fix-build-dir
SUBST_STAGE.fix-build-dir+= pre-configure
SUBST_FILES.fix-build-dir+= .mozconfig
SUBST_SED.fix-build-dir+= -e 's,mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@,,'
MOZILLA_DIR= # empty
CONFIGURE_ARGS+= --enable-application=browser
CONFIGURE_ARGS+= --disable-tor-browser-update
CONFIGURE_ARGS+= --disable-webrtc
CONFIGURE_ARGS+= --disable-gio
CONFIGURE_ARGS+= --disable-dbus
CONFIGURE_ARGS+= --disable-gnomeui
CONFIGURE_ARGS+= --disable-libnotify
CONFIGURE_ARGS+= --enable-pie
# Avoid build failure from security/manager/ssl/src/nsNSSCallbacks.cpp:601
CFLAGS+= -fpermissive
# workaround for link of libxul.so etc.
LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/tor-browser ${COMPILER_RPATH_FLAG}${PREFIX}/lib
LDFLAGS.SunOS+= -lm
ALL_ENV+= MOZILLA_PKG_NAME=tor-browser
NOT_PAX_MPROTECT_SAFE+= lib/tor-browser/firefox
NOT_PAX_MPROTECT_SAFE+= lib/tor-browser/firefox-bin
# Avoid ld "invalid section index" errors.
BUILDLINK_TRANSFORM.SunOS+= rm:-fdata-sections
BUILDLINK_TRANSFORM.SunOS+= rm:-ffunction-sections
LDFLAGS.DragonFly= -lplc4 -lnspr4
LDFLAGS.FreeBSD= -lplc4 -lnspr4
LDFLAGS.Linux= -lnspr4
.include "../../www/firefox38/mozilla-common.mk"
.include "options.mk"
CHECK_INTERPRETER_SKIP+=lib/firefox-sdk/sdk/bin/header.py
CHECK_INTERPRETER_SKIP+=lib/firefox-sdk/sdk/bin/typelib.py
CHECK_INTERPRETER_SKIP+=lib/firefox-sdk/sdk/bin/xpidl.py
CHECK_INTERPRETER_SKIP+=lib/firefox-sdk/sdk/bin/xpt.py
MOZILLA= tor-browser
MOZILLA_ICON= ${WRKSRC}/${OBJDIR}/dist/firefox/browser/chrome/icons/default/default48.png
MOZILLA_NAME= TorBrowser
SUBST_CLASSES+= sys-dic
SUBST_STAGE.sys-dic= pre-configure
SUBST_MESSAGE.sys-dic= Reference to system hunspell dictionaries.
SUBST_FILES.sys-dic= extensions/spellcheck/hunspell/src/mozHunspell.cpp
SUBST_VARS.sys-dic= PREFIX
pre-configure:
cd ${WRKSRC} && mkdir ${OBJDIR}
cd ${WRKSRC} && autoconf
cd ${WRKSRC}/js/src && autoconf
# XXX Makefile is broken? When libxul is provided from devel/xulrunner,
# XXX please remove this.
mkdir ${WRKSRC}/js/src/.deps
post-build:
${SED} -e 's|@MOZILLA@|${MOZILLA}|g' \
-e 's|@MOZILLA_NAME@|${MOZILLA_NAME}|g' \
-e 's|@FIREFOX_ICON@|${MOZILLA}.png|g' \
< ${FILESDIR}/desktop.in \
> ${WRKDIR}/desktop
INSTALLATION_DIRS+= share/applications share/pixmaps
post-install:
${INSTALL_DATA} ${WRKDIR}/desktop \
${DESTDIR}${PREFIX}/share/applications/${MOZILLA}.desktop
${INSTALL_DATA} ${MOZILLA_ICON} \
${DESTDIR}${PREFIX}/share/pixmaps/${MOZILLA}.png
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
.include "../../mk/bsd.pkg.mk"
File diff suppressed because it is too large Load Diff
+175
View File
@@ -0,0 +1,175 @@
$NetBSD: distinfo,v 1.4 2016/04/04 17:36:34 joerg Exp $
SHA1 (tor-browser-38.7.1esr-5.5-1.tar.xz) = 332d04fc222f9d0778341284736c6da0f61e4607
RMD160 (tor-browser-38.7.1esr-5.5-1.tar.xz) = c57cbdbb0a4a5f0ca8f9963daa4075bbcd754f2e
SHA512 (tor-browser-38.7.1esr-5.5-1.tar.xz) = d2d68de30c58a0d90063ec42ee6c76ea044c5c570471e0a0765dd92057f571f52262e47629381a5b24adad610ee360ab291e3a7dd21bf41fef063c6948f413c8
Size (tor-browser-38.7.1esr-5.5-1.tar.xz) = 150066780 bytes
SHA1 (patch-aa) = e9e8400fa86ae8d6910b49e3a98127122e714f1a
SHA1 (patch-accessible_atk_Platform.cpp) = c2deb81b300de44c4500328589185bbd4b6b02fb
SHA1 (patch-al) = cca5df21d018bb9f428ad26d00718f33afe88ec5
SHA1 (patch-ao) = d904b04bf6b216f02390aa3483c7ef8c5a1297dd
SHA1 (patch-as) = 6630ac63a5b0169c47dbc91bdabf7602e3979a8a
SHA1 (patch-b2g_installer_Makefile.in) = 95eb82774734db093c990919ba669d4666e55df0
SHA1 (patch-b2g_installer_package-manifest.in) = cdb43eece164b43b49a9c0f1a47de4e7db56ed76
SHA1 (patch-bf) = 75c971043e9f693203d6bd670b2c20c4952a7756
SHA1 (patch-bg) = d6c02294765265d9e85cf49c22320d88573c2e25
SHA1 (patch-browser_app_nsBrowserApp.cpp) = b7dd345b88dd03716f725c790364d06475aaf6bb
SHA1 (patch-browser_installer_package-manifest.in) = aee56636fc83ea6441c5303ef0297971b41516d1
SHA1 (patch-build_autoconf_compiler-opts.m4) = ccdc06a2b07b7664f9cb91bcc4fb29052dda8b07
SHA1 (patch-build_autoconf_nss.m4) = 970fcd9aeede2347651c516d5211c4555dd28a4d
SHA1 (patch-build_gyp.mozbuild) = 201715e30e20090e9a9ef54cb981d283c9aabf8f
SHA1 (patch-build_pgo_profileserver.py) = 8666187258e47c037f2065a19a5b38946fdc0f6c
SHA1 (patch-config_Makefile.in) = 0a072de112e0e5cc4b929a7094498fcf003e27b3
SHA1 (patch-config_baseconfig.mk) = 07c295fbfbaeb969b336def32d8924729e332075
SHA1 (patch-config_external_moz.build) = ee5fe1672333a7d71e61a23f3739ffefcca692d5
SHA1 (patch-config_rules.mk) = d7f7060b246092eae3d7a792e43b14e462a37abd
SHA1 (patch-config_stl__wrappers_ios) = 00d723e2f2f252485350ede5833f0bb84c1235c1
SHA1 (patch-config_stl__wrappers_ostream) = 7be7fe36704ffbdc070a113b46b4f391a598206b
SHA1 (patch-config_system-headers) = c9ac68ecbe1ce74e1aa62d792541955c31797f2d
SHA1 (patch-dom_base_moz.build) = 8b59c33958b7037c4c051742c64f1455096ced46
SHA1 (patch-dom_events_MessageEvent.h) = c7caec0955a7cff777ef84599fe9a6eec7c78a66
SHA1 (patch-dom_media_AudioStream.h) = 96b5a1a2b1c930cfcfa77a125d47b6eb93fac1c6
SHA1 (patch-dom_media_gstreamer_GStreamerAllocator.cpp) = 4685a646a76282619d7c42fac43500e0065f067d
SHA1 (patch-dom_media_moz.build) = a89695c9557f59e00b42c60742f27a82de0f77fb
SHA1 (patch-dom_plugins_ipc_PluginModuleChild.cpp) = 6219ce1b3f2893c1d53453fcb5568d081b72e106
SHA1 (patch-dom_plugins_ipc_PluginModuleChild.h) = 0a7f3167e939822013ae6195406657453578453e
SHA1 (patch-dom_plugins_ipc_PluginProcessChild.cpp) = 0d10aa4c913d431fb8fa5f995f6e40cb364f069e
SHA1 (patch-dom_system_OSFileConstants.cpp) = 4fe5d4ecf6116c7163ee6d2322db8b1b783fe5ec
SHA1 (patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp) = 747354373bcaf2c76bdff71677f354d47837704b
SHA1 (patch-gfx_graphite2_src_Bidi.cpp) = 5e80b4a32a47ae44d237fec69ea87bdd612a76ce
SHA1 (patch-gfx_graphite2_src_moz.build) = 1715ac0814dce4004454013b9675517152726a7a
SHA1 (patch-gfx_moz.build) = a98bda4727538f4a0f09a20b84f9dd883edaf7d9
SHA1 (patch-gfx_skia_generate__mozbuild.py) = e0bf45842ae74f896678b1c29d97606165cf5914
SHA1 (patch-gfx_skia_moz.build) = ce83717ec6e386d52af75a0f5592fa866b83b3bc
SHA1 (patch-gfx_thebes_moz.build) = fa468f388322819bfa87681bf0a443fbd16568d1
SHA1 (patch-gfx_ycbcr_moz.build) = 121386ef62ff7425e6f93bc624555199f2ac3485
SHA1 (patch-gfx_ycbcr_yuv__row__arm.S) = f9909ded72762b2c3547dd002707db43745f2b9d
SHA1 (patch-image_decoders_nsJPEGDecoder.cpp) = ec12085f52b3614bc67b797c3a6b36ab5daee9ea
SHA1 (patch-intl_hyphenation_hnjalloc.h) = 5b5ac622ed2dd8711f00be0af59c95ebc86a8a78
SHA1 (patch-intl_unicharutil_util_moz.build) = 1e8eb1f6e66ed80a1689e2205a7d04efe5243d5b
SHA1 (patch-ipc_chromium_Makefile.in) = edd85b79cd3879f7595b932442bb0e93505d5506
SHA1 (patch-ipc_chromium_moz.build) = de12255865e45cfdf0f7dc57ce101be75ac8ad54
SHA1 (patch-ipc_chromium_src_base_atomicops.h) = 24b63a6e51d9ab27f2788ee02f2ffa7e1c36f29a
SHA1 (patch-ipc_chromium_src_base_file__util.h) = 9d6d074b1692c6b4e722bfac8d67c66040a6fa76
SHA1 (patch-ipc_chromium_src_base_file__util__posix.cc) = 18096b89ac3f239a0eb7c1d9c5080c1ac2c73e1b
SHA1 (patch-ipc_chromium_src_base_message__loop.cc) = 16158489773bbcba35e224d30bebace0c93599ae
SHA1 (patch-ipc_chromium_src_base_platform__thread.h) = e6d7ac39a8b2a1b232638f7671e8530acfed0b97
SHA1 (patch-ipc_chromium_src_base_platform__thread__posix.cc) = ff1371ffb84abf2d2adcf25e66502943992d5109
SHA1 (patch-ipc_chromium_src_base_process__util.h) = 4b24c3467866a601d68bb83f44e5fd38fb27188d
SHA1 (patch-ipc_chromium_src_base_process__util__bsd.cc) = efe1c242efded89b7a69a83429bc30843f330367
SHA1 (patch-ipc_chromium_src_base_process__util__posix.cc) = 6b2611cc902f17e726aabcf4fb5fff2c71852408
SHA1 (patch-ipc_chromium_src_base_scoped__nsautorelease__pool.h) = 8c61a35e99e7f54e4b2bf5931c59eb2b7a04127a
SHA1 (patch-ipc_chromium_src_base_sys__info__posix.cc) = 27890c56194e483fc0758ed767ca5795cc5112eb
SHA1 (patch-ipc_chromium_src_base_time__posix.cc) = 337a0b4a5d51d68c7699b79c7591b953ea23ca67
SHA1 (patch-ipc_chromium_src_build_build__config.h) = af5a10df7d8fe9715f0e43cd6be14f8f20c53517
SHA1 (patch-ipc_chromium_src_chrome_common_transport__dib.h) = 7af18973c005d7b144a225bacf41833e059cb400
SHA1 (patch-ipc_glue_GeckoChildProcessHost.cpp) = 45f2f22b4f567ffddd4458f635179b5201e87e64
SHA1 (patch-ipc_glue_ScopedXREEmbed.cpp) = 97c39f25527dac4c22b38ce446ca2cd4cef08fd0
SHA1 (patch-ipc_glue_StringUtil.cpp) = f238adebb5bdf57f7109a781c6f3fb195763f3c0
SHA1 (patch-ipc_glue_moz.build) = 2682ca9de9606e50602a124e287dded2b9f2859b
SHA1 (patch-ipc_ipdl_ipdl_cxx_ast.py) = 047b7012dffdcfc2b07d2d249fb3523e7d4643f8
SHA1 (patch-ipc_ipdl_ipdl_cxx_cgen.py) = d7f7dc85b1ff26c6d7e902f94c0ac09f04497105
SHA1 (patch-ipc_ipdl_ipdl_lower.py) = 2ef9504e462d0e3db16f9b0a6303ea5971b9c2a2
SHA1 (patch-js__src__vm__SPSProfiler.cpp) = 989ba25e4c5308d21d07baa802decce13609a475
SHA1 (patch-js_public_CallArgs.h) = fde9a73b8a694c4c7415848aa25e14ccefe547dd
SHA1 (patch-js_src_Makefile.in) = 77d2e7cb651b9f30ebf6458fd07678416cdecbcc
SHA1 (patch-js_src_asmjs_AsmJSSignalHandlers.cpp) = 976cc3099901d36a70cca4333fca13d5b8885b26
SHA1 (patch-js_src_ctypes_CTypes.h) = 768a084239f92a424c1c7dc9eaaf9be9456ca9f0
SHA1 (patch-js_src_frontend_ParseMaps.cpp) = c00117d79b78904bc50a1d664a8fc0e4e339bfbc
SHA1 (patch-js_src_gc_Statistics.cpp) = 227d047f5befeff2a619e8bec9e98d69a78adf5c
SHA1 (patch-js_src_jit-LIR.cpp) = 6c9b3bb9f2c41f7b101c49375c51418912620a15
SHA1 (patch-js_src_jit_ExecutableAllocator.h) = c2389a7e6521905941270246adf155834703d8a0
SHA1 (patch-js_src_jit_MIR.cpp) = d04ce1c7a55d8e1871472e1078cf591c8ea98588
SHA1 (patch-js_src_jit_arm_Architecture-arm.cpp) = ea58f199dbc11d7fcc04bbc1205d6ecf3a3ac3e0
SHA1 (patch-js_src_jsapi.cpp) = 97aaa4eea1254b675cbfd9cfae92dd614a717f49
SHA1 (patch-js_src_jsdate.cpp) = 0e577aefa24693c7941ead0365c58b2b4b41dc8c
SHA1 (patch-js_src_jskwgen.cpp) = 34d3b92e13366d4b43ff755ad54f392c116d5c59
SHA1 (patch-js_src_jsmath.cpp) = 7d4993ae91e9b5e6820358165603819aefb586f9
SHA1 (patch-js_src_shell_jsoptparse.cpp) = 178415aa652ccbd5278629b5154d20c4d7bfffd0
SHA1 (patch-js_xpconnect_src_XPCConvert.cpp) = 915777e9bb5366be41866cdb6ea0ad2b1c006dde
SHA1 (patch-js_xpconnect_src_xpcprivate.h) = 8a15ff542c9d3fce448d9ec63706f7dfb411d926
SHA1 (patch-media_libcubeb_AUTHORS) = 3db32086f98c2bbe16e9394bb5121d7a95cdb4af
SHA1 (patch-media_libcubeb_src_cubeb.c) = effe8771e42adddb478ecb302352ef003bdd01db
SHA1 (patch-media_libcubeb_src_cubeb__alsa.c) = f8ab0c958e00b2ae52ac73ebcad5bf8a9fe2f2d1
SHA1 (patch-media_libcubeb_src_cubeb__oss.c) = 54e2a210411c7083bc395033fbf519d581bc4a62
SHA1 (patch-media_libcubeb_src_moz.build) = a793f0dd1bd90d9a9a967dbef8da1183cd909b7c
SHA1 (patch-media_libpng_pngpriv.h) = c9cefd1b5dd85fbd0c875c3f9bc108975398fe3a
SHA1 (patch-media_libsoundtouch_src_cpu__detect__x86.cpp) = db61737afa7773e8cbd82976de3a02c917174696
SHA1 (patch-media_libstagefright_frameworks_av_media_libstagefright_foundation_AString.cpp) = b7c21a68f09176100794148aa75eb19829417fed
SHA1 (patch-media_libstagefright_system_core_liblog_fake__log__device.c) = b59809a7292d41bdb352bc425dc46273f1c0c270
SHA1 (patch-media_libstagefright_system_core_liblog_logprint.c) = 56c5590b57caf568e12f8ff7df07daec281855de
SHA1 (patch-media_libtheora_lib_arm_armcpu.c) = 4b215277f9c81154377d401166023c1bf78a3718
SHA1 (patch-media_libtheora_lib_info.c) = cb7628134427aaa4d5824c0e0770c30e5111a933
SHA1 (patch-media_libtheora_moz.build) = 69476f02c0d79929b1d92719706ac68ffd102826
SHA1 (patch-media_libtremor_Makefile.in) = 497d03646caa721bdd129de365aadea8466043af
SHA1 (patch-media_libtremor_moz.build) = 994b04e4c344a91c4b474a752ddc4ca0e2732910
SHA1 (patch-media_libvorbis_Makefile.in) = fd1ce15268eed9c97dd0774398d559cdbed63e53
SHA1 (patch-media_libvorbis_lib_vorbis_info.c) = 1d85195a5553202b0c38dc8dec6db1f4f0513e5f
SHA1 (patch-media_libvorbis_moz.build) = 927f7848305eb2341c9efa96800d30b4a1b8eaa4
SHA1 (patch-media_libyuv_include_libyuv_scale__row.h) = 503b6f2065e9d548a1f01f7158d65874f4886c78
SHA1 (patch-media_mtransport_third__party_nICEr_src_util_mbslen.c) = 087e8788c72b96d2059ca82ce4282d78aed546da
SHA1 (patch-media_mtransport_third__party_nrappkit_src_port_generic_include_sys_queue.h) = de7055f891387f96f8fd32366c7189d480354e9e
SHA1 (patch-media_webrtc_signaling_test_moz.build) = 2de45866c1c41f8a186586264fad3be90e30ba3b
SHA1 (patch-media_webrtc_trunk_webrtc_build_common.gypi) = 4ff5796e15d9aa6adb8495d6f2e5a7f0445a0fac
SHA1 (patch-media_webrtc_trunk_webrtc_modules_audio__coding_codecs_opus_opus.gypi) = e47f1c64c0455f1b31011bf90346645a4ce38e52
SHA1 (patch-media_webrtc_trunk_webrtc_modules_audio__coding_neteq_neteq.gypi) = 54c05a12758c377b0f80143048280a7738e7038d
SHA1 (patch-media_webrtc_trunk_webrtc_modules_desktop__capture_screen__capturer.cc) = 53481a80b410afe962146f08eafe8ff38ac6a241
SHA1 (patch-media_webrtc_trunk_webrtc_modules_desktop__capture_screen__capturer.h) = b972e59204760eb885a9a0432ec977f604208a53
SHA1 (patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_device__info__linux.cc) = 9ff1dcf200feaf67bf576f07beb612e0ec91d7d1
SHA1 (patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_video__capture__linux.cc) = ffc1d956e826a0005b76285596ba24a2f4a3806c
SHA1 (patch-media_webrtc_trunk_webrtc_modules_video__capture_video__capture.gypi) = 4a293e0d788a3a3acfbbf4cf19a6f9a7235b83d0
SHA1 (patch-media_webrtc_trunk_webrtc_system__wrappers_source_spreadsortlib_spreadsort.hpp) = c09f0d234f70d48403b3b12866647c4cbc752396
SHA1 (patch-memory_build_mozjemalloc__compat.c) = e43a0f593a524db1b325e0b6141f2630d63b9a5c
SHA1 (patch-memory_jemalloc_Makefile.in) = 772e996c8da254f952d0f3a0c9325a177c838543
SHA1 (patch-memory_jemalloc_src_configure) = d1e27220b223266f7a7d362dca1621012f8d9d7f
SHA1 (patch-memory_mozalloc_mozalloc__abort.cpp) = 44cb29dac1e8032c3f58149227bfe5ad94e8edb9
SHA1 (patch-memory_volatile_VolatileBufferOSX.cpp) = ebea8a615443206376cb4264ed43b5c74e029b7d
SHA1 (patch-mfbt_Alignment.h) = 9ebc9892fd11eba7105974979b54f4f8759b7749
SHA1 (patch-mfbt_Attributes.h) = b3f54a35476e99ba3191ee99feafc86de21d8334
SHA1 (patch-mfbt_Poison.cpp) = f502581db96b3e5eca25a9aa9035f436e9167503
SHA1 (patch-mobile_android_installer_Makefile.in) = 3d6b7ea3fc6249f2f8ebc88f15f34495a0ef41d6
SHA1 (patch-mobile_android_installer_package-manifest.in) = 5826a6585e76eecad46e8c8bf3a9c4ded61b5748
SHA1 (patch-modules_libjar_nsZipArchive.cpp) = 6aff0f8ed42575d8ca36a524e12e9a1f7351004a
SHA1 (patch-netwerk_base_nsNetUtil.h) = e80f40b048e4628876ceb1a5ca90f7b07862d9ab
SHA1 (patch-netwerk_dns_moz.build) = 447ea9652f67cb5e48ea14a725c4cf45647eec6b
SHA1 (patch-netwerk_protocol_http_Http2Session.cpp) = 40f4a64657ea2dd0ddc6434cafcd181763ac31b6
SHA1 (patch-pb) = 97c9b2e4cefd524dc6ba825f71c3da2a761aa1f4
SHA1 (patch-pc) = 8b2baa88f0983a2fef4f801cf6b1ae425f6c813a
SHA1 (patch-rc) = affa634564e798184bbe50ba7c491d691a4a8994
SHA1 (patch-security_certverifier_OCSPRequestor.cpp) = 3db71730f36ce5396c7a927981654de0d01482e2
SHA1 (patch-security_manager_ssl_src_nsNSSCallbacks.cpp) = a3f18dc7851c91768504600f1f73746d4da5ad60
SHA1 (patch-security_manager_ssl_src_nsNSSCallbacks.h) = 82c74f042502a286d0128aa67afb3b1583a03b11
SHA1 (patch-security_manager_ssl_src_nsNSSComponent.cpp) = 28d216fb8dcb5968c1ff657578b4caf814c146ac
SHA1 (patch-toolkit_components_osfile_modules_osfile__unix__back.jsm) = 6b926ccd793391ad7bd7101635f4b3eefe3db130
SHA1 (patch-toolkit_components_osfile_modules_osfile__unix__front.jsm) = f5adba2137f2d7fd4d4a6a1e8ef8625866513890
SHA1 (patch-toolkit_library_moz.build) = 625d78e64959f78a5d0b8148749bb43a0abcbcf7
SHA1 (patch-toolkit_xre_nsAppRunner.cpp) = f335d64cb0e1d248fd2c41a167ee1874218e7db6
SHA1 (patch-toolkit_xre_nsEmbedFunctions.cpp) = 6ee6fba04a3ecc6596f8aed67f752a1075901fa8
SHA1 (patch-toolkit_xre_nsXREDirProvider.cpp) = b0e2eb1359fb30e5e5134ae76e56c98fd3d43e8f
SHA1 (patch-webapprt_moz.build) = 177468d5e12c49db1ad5376f0f3df34fa9df070c
SHA1 (patch-widget_gtk_gtk2drawing.c) = dd63fd368a86aef1b9568ae625904ffd9542a874
SHA1 (patch-widget_gtk_gtk3drawing.c) = 7224a3ef02ef98b6013ffeafcf6819c726bacbe6
SHA1 (patch-widget_gtk_gtkdrawing.h) = ca582ba4f09c4a31600dcb630a7997ed5db7a7b4
SHA1 (patch-widget_gtk_nsNativeThemeGTK.cpp) = 959ddb6501d2b3bff94ca3ff5fbdbfe8ce71879c
SHA1 (patch-xpcom_base_nsStackWalk.cpp) = 8fb5eb1f1e548eda7151175d350eee9ec38b17b3
SHA1 (patch-xpcom_base_nscore.h) = f4fe66cc9e714a2101a4d1287359d1c300574438
SHA1 (patch-xpcom_build_PoisonIOInterposer.h) = b0a53ec580bf5c2277d19618c1240a447575ae68
SHA1 (patch-xpcom_build_XPCOMInit.cpp) = 31a3e1b22b992d677a77d1e75ef52eb18d84abf7
SHA1 (patch-xpcom_components_Module.h) = 7aebeb9550a4fec51c08cd678f101e836f594352
SHA1 (patch-xpcom_glue_standalone_nsXPCOMGlue.cpp) = a6ef7f490d52037d2a72d3d52d834a182a29eccb
SHA1 (patch-xpcom_io_nsAppFileLocationProvider.cpp) = 7d3648b5fd91a12dd61f71ae144462e36e6061db
SHA1 (patch-xpcom_reflect_xptcall_md_unix_Makefile.in) = 1e4d71a06b34556fa9339f97b75a065539baa511
SHA1 (patch-xpcom_reflect_xptcall_md_unix_moz.build) = 2e6fbc64d78a3f035c6f9db9fffd0f1097420b58
SHA1 (patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__arm__netbsd.cpp) = 493d1433ae72bbd0c65ab3f51de43fb864a6f58d
SHA1 (patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__asm__mips.S) = f310105510bb5fa6c6de122ebdebbfa18423d8d3
SHA1 (patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__asm__ppc__netbsd.s) = 8e367d4d0baf24714ee80449fc8d6849ff08ca1c
SHA1 (patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__gcc__x86__unix.cpp) = 8cb72e1bc9a38e3f123539d7bb2aca6793f2b574
SHA1 (patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__netbsd__m68k.cpp) = b6dc5d54eeaa908d914116429e61f4b65a6a5f8e
SHA1 (patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__ppc__netbsd.cpp) = 71a33723a557a6153405f6baec8404b25f841608
SHA1 (patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__sparc64__netbsd.cpp) = 0792c2c626d906e71c5183994cb32bf8cdb3e239
SHA1 (patch-xpcom_reflect_xptcall_md_unix_xptcstubs__arm__netbsd.cpp) = 3a902eb9a23b3b5737f3c8cb5f96a5ad9a98a189
SHA1 (patch-xpcom_reflect_xptcall_md_unix_xptcstubs__asm__mips.S) = 79a4686d368132aff804f217baa685b2e06bc396
SHA1 (patch-xpcom_reflect_xptcall_md_unix_xptcstubs__asm__sparc64__netbsd.s) = 522bc237bc90d85c98b61a467a431fddd91d8c3c
SHA1 (patch-xpcom_reflect_xptcall_md_unix_xptcstubs__gcc__x86__unix.cpp) = d246f0695eb43d43bfd5571297945a4b7a88f72c
SHA1 (patch-xpcom_reflect_xptcall_md_unix_xptcstubs__netbsd__m68k.cpp) = 75db49c9cb6bf2993afba82b731d80389d866212
SHA1 (patch-xulrunner_installer_Makefile.in) = 9d32ff87d0962c0406ed38de995c0350dd372e49
+191
View File
@@ -0,0 +1,191 @@
[Desktop Entry]
Encoding=UTF-8
Name=@MOZILLA_NAME@ Web Browser
Name[am]=
Name[ar]=
Name[az]=@MOZILLA_NAME@ Veb Səyyahı
Name[be]=
Name[bg]=Интернет браузър @MOZILLA_NAME@
Name[bn]=
Name[bs]=@MOZILLA_NAME@ web preglednik
Name[ca]=Navegador web @MOZILLA_NAME@
Name[cs]=Prohlížeč WWW @MOZILLA_NAME@
Name[cy]=Y Porwr Gwe @MOZILLA_NAME@
Name[da]=@MOZILLA_NAME@ - internetsurfning
Name[de]=@MOZILLA_NAME@ Webbrowser
Name[el]=Περιηγητής Διαδικτύου @MOZILLA_NAME@
Name[en_CA]=@MOZILLA_NAME@ Web Browser
Name[en_GB]=@MOZILLA_NAME@ Web Browser
Name[es]=Navegador Web @MOZILLA_NAME@
Name[et]=@MOZILLA_NAME@ veebibrauser
Name[eu]=@MOZILLA_NAME@ web arakatzailea
Name[fi]=@MOZILLA_NAME@, WWW-selain
Name[fr]=Navigateur Web @MOZILLA_NAME@
Name[ga]=Brabhsálaí Lín @MOZILLA_NAME@
Name[gu]=એપીફની વૅબ બ્રાઉઝર
Name[he]=דפדפן @MOZILLA_NAME@
Name[hi]=
Name[hr]=@MOZILLA_NAME@ Web preglednik
Name[hu]=@MOZILLA_NAME@ webböngésző
Name[id]=Web Browser @MOZILLA_NAME@
Name[it]=Browser web @MOZILLA_NAME@
Name[ja]=@MOZILLA_NAME@ ウェブ・ブラウザ
Name[ko]=@MOZILLA_NAME@ 웹 브라우저
Name[li]=@MOZILLA_NAME@ Web Browser
Name[lt]=@MOZILLA_NAME@ web naršyklė
Name[mk]=@MOZILLA_NAME@ веб прелистувач
Name[ml]=എപ്പിഫാനി വെബ്ബ് ബ്രൌസ‌ര്
Name[mn]=@MOZILLA_NAME@ веб хөтөч
Name[ms]=Pelungsur Web @MOZILLA_NAME@
Name[nb]=@MOZILLA_NAME@ nettleser
Name[nl]=@MOZILLA_NAME@ Webbrowser
Name[nn]=@MOZILLA_NAME@ nettlesar
Name[no]=@MOZILLA_NAME@ nettleser
Name[pa]=ਏਪੀਫਾਨੀ ਵੈੱਬ ਬਰਾਊਜ਼ਰ
Name[pl]=Przeglądarka WWW @MOZILLA_NAME@
Name[pt]=Navegador Web @MOZILLA_NAME@
Name[pt_BR]=Navegador Web @MOZILLA_NAME@
Name[ro]=Navigatorul @MOZILLA_NAME@
Name[ru]=Веб-браузер @MOZILLA_NAME@
Name[sk]=
Name[sl]=Spletni brskalnik @MOZILLA_NAME@
Name[sq]=@MOZILLA_NAME@ - Shfletuesi Web
Name[sr]=
Name[sr@Latn]=Veb čitač Spoznaja
Name[sv]=Webbläsaren @MOZILLA_NAME@
Name[ta]=எபிபனி வலை உலாவி
Name[tk]=@MOZILLA_NAME@ Web Ahtarçisi
Name[tr]=@MOZILLA_NAME@ Web Tarayıcı
Name[uk]=Переглядач web @MOZILLA_NAME@
Name[vi]=Trình Duyệt Web @MOZILLA_NAME@
Name[wa]=Betchteu waibe epiphany
Name[zh_CN]=@MOZILLA_NAME@ Web 浏览器
Name[zh_TW]=@MOZILLA_NAME@ 網頁瀏覽器
GenericName=Web Browser
GenericName[ar]=متصفّح الانترنت
GenericName[az]=Veb Səyyahı
GenericName[be]=Вандроўнік па павуціньню
GenericName[bg]=Браузър
GenericName[bn]=ওয়েব ব্রাউজার
GenericName[bs]=Web preglednik
GenericName[ca]=Navegador web
GenericName[cs]=Prohlížeč WWW
GenericName[cy]=Porwr Gwe
GenericName[da]=Internetsurfning
GenericName[de]=Webbrowser
GenericName[el]=Περιηγητής Ιστοσελίδων
GenericName[en_CA]=Web Browser
GenericName[en_GB]=Web Browser
GenericName[es]=Navegador web
GenericName[et]=Veebilehitseja
GenericName[eu]=Web arakatzailea
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web @MOZILLA_NAME@
GenericName[ga]=Brabhsálaí Lín
GenericName[gu]=વેબ બ્રાઉઝર
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=वेब ब्राउज़र
GenericName[hr]=Web preglednik
GenericName[hu]=Webböngésző
GenericName[id]=Browser Web
GenericName[it]=Browser web
GenericName[ja]=GNOME ウェブ・ブラウザ
GenericName[ko]=웹 브라우저
GenericName[li]=Wèb Browser
GenericName[lt]=Web naršyklė
GenericName[mk]=Веб прелистувач
GenericName[mn]=Веб хөтөч
GenericName[ms]=Pelungsur Web
GenericName[nb]=Nettleser
GenericName[nl]=Web-browser
GenericName[nn]=Nettlesar
GenericName[no]=Nettleser
GenericName[pa]=ਵੈਬ ਬਰਾਊਜ਼
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[ro]=Navigator Internet
GenericName[ru]=Веб-браузер
GenericName[sk]=WWW prehliadač
GenericName[sl]=Spletni brskalnik
GenericName[sq]=Shfletuesi Web
GenericName[sr]=Веб читач
GenericName[sr@Latn]=Veb čitač
GenericName[sv]=Webbläsare
GenericName[ta]=வலை உலாவி
GenericName[th]=เว็บบราวเซอร์
GenericName[tk]=Web Ahtarçysy
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Переглядач web-сторінок
GenericName[vi]=Trình duyệt Web
GenericName[wa]=Betchteu waibe
GenericName[zh_CN]=Web 浏览器
GenericName[zh_TW]=網頁瀏覽器
Comment=Browse the web
Comment[ar]=تصفح الانترنت
Comment[az]=Vebi gəzin
Comment[be]=Вандраваць па павуціньню
Comment[bg]=Сърфиране в интернет
Comment[bn]=ওয়েব ব্রাউজ করুন
Comment[bs]=Pregledaj na internetu
Comment[ca]=Navegueu per la web
Comment[cs]=Prohlížet WWW
Comment[cy]=Pori'r we
Comment[da]=Surf på internettet
Comment[de]=Im Web surfen
Comment[el]=Περιήγηση στον παγκόσμιο ιστό
Comment[en_CA]=Browse the web
Comment[en_GB]=Browse the web
Comment[es]=Navegar por la web
Comment[et]=Sirvi veebi
Comment[eu]=Arakatu web-a
Comment[fi]=Selaa WWW:tä
Comment[fr]=Naviguer sur Internet
Comment[ga]=Brabhsáil an Líon
Comment[gu]=વેબમાં શોધો
Comment[he]=גלוש ברשת
Comment[hi]=वेब ब्राउज़ करें
Comment[hr]=Pregledaj Web
Comment[hu]=A világháló böngészése
Comment[id]=Jelajah web
Comment[it]=Esplora il web
Comment[ja]=ウェブを閲覧します
Comment[ko]=웹을 돌아 다닙니다
Comment[li]=Blajere op internet
Comment[lt]=Naršyti internete
Comment[mk]=Прелистувајте на веб
Comment[ml]=വലക്കെട്ട് തിരയുക
Comment[mn]=Веб броузе хийх
Comment[ms]=Layari web
Comment[nb]=Surf på nettet
Comment[nl]=Websurfen
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pa]=ਵੈਬ ਬਰਾਊਜ਼
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegar na web
Comment[pt_BR]=Navegar na web
Comment[ro]=Navigare Internet
Comment[ru]=Веб-браузер
Comment[sk]=Prehliadať internet
Comment[sl]=Brskaj po spletu
Comment[sq]=Eksploro web-in
Comment[sr]=Прегледај веб
Comment[sr@Latn]=Pregledaj veb
Comment[sv]=Surfa på nätet
Comment[ta]=வலையில் உலாவு
Comment[th]=ใช้งานเว็บบราวเซอร์ @MOZILLA_NAME@
Comment[tk]=Webi Ahtar
Comment[tr]=Web'e Gözat
Comment[uk]=Програма перегляду web-сторінок
Comment[vi]=Duyệt web
Comment[wa]=Naivyî avå les waibes
Comment[zh_CN]=浏览 Web
Comment[zh_TW]=瀏覽網頁
Exec=@MOZILLA@ %u
Icon=@FIREFOX_ICON@
StartupNotify=false
Terminal=false
Type=Application
Categories=Application;Network;
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;
+13
View File
@@ -0,0 +1,13 @@
# $NetBSD: hacks.mk,v 1.1 2016/02/14 07:30:54 ryoon Exp $
.if !defined(XULRUNNER_HACKS_MK)
XULRUNNER_HACKS_MK= defined
.include "../../mk/bsd.fast.prefs.mk"
.include "../../mk/compiler.mk"
.if !empty(PKGSRC_COMPILER:Mclang)
CXXFLAGS+= -Wno-return-type-c-linkage
.endif
.endif # XULRUNNER_HACKS_MK
+57
View File
@@ -0,0 +1,57 @@
# $NetBSD: options.mk,v 1.2 2016/02/26 09:41:07 jperkin Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.tor-browser
PKG_SUPPORTED_OPTIONS+= alsa debug debug-info mozilla-jemalloc pulseaudio
PLIST_VARS+= debug
PKG_SUGGESTED_OPTIONS.Linux+= alsa mozilla-jemalloc
PKG_SUGGESTED_OPTIONS.*+= pulseaudio
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Malsa)
CONFIGURE_ARGS+= --enable-alsa
.include "../../audio/alsa-lib/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-alsa
.endif
.if !empty(PKG_OPTIONS:Mmozilla-jemalloc)
PLIST.jemalloc= yes
CONFIGURE_ARGS+= --enable-jemalloc
.else
CONFIGURE_ARGS+= --disable-jemalloc
.endif
.include "../../mk/compiler.mk"
.if !empty(PKGSRC_COMPILER:Mgcc)
.if ${CC_VERSION:S/gcc-//:S/.//g} >= 480
# Modern gcc does not run any "tracking" passes when compiling with -O0,
# which makes the generated debug info mostly useless. So explicitly
# request them.
O0TRACKING=-fvar-tracking-assignments -fvar-tracking
.endif
.endif
.if !empty(PKG_OPTIONS:Mdebug)
CONFIGURE_ARGS+= --enable-debug="-g -O0 ${O0TRACKING}" --enable-debug-symbols --disable-optimize
CONFIGURE_ARGS+= --disable-install-strip
PLIST.debug= yes
.else
.if !empty(PKG_OPTIONS:Mdebug-info)
CONFIGURE_ARGS+= --enable-debug-symbols
.else
CONFIGURE_ARGS+= --disable-debug-symbols
.endif
CONFIGURE_ARGS+= --disable-debug
CONFIGURE_ARGS+= --enable-optimize=-O2
CONFIGURE_ARGS+= --enable-install-strip
.endif
.if !empty(PKG_OPTIONS:Mpulseaudio)
.include "../../audio/pulseaudio/buildlink3.mk"
CONFIGURE_ARGS+= --enable-pulseaudio
.else
CONFIGURE_ARGS+= --disable-pulseaudio
.endif
# XXX end
+428
View File
@@ -0,0 +1,428 @@
$NetBSD: patch-aa,v 1.1 2016/02/14 07:30:54 ryoon Exp $
* The profiler does not support Darwin/PPC so don't try to enable it
on that platform.
* Cocoa gamepad backend can only be used if the toolkit is cocoa too.
* The preprocessor macro XP_MACOSX is misused everywhere. They tend to
say "#if defined(XP_MACOSX)" to actually mean
"#if defined(MOZ_WIDGET_COCOA)". It's okay to equate XP_MACOSX with
XP_DARWIN but equating it with MOZ_WIDGET_COCOA is just wrong. As a
result, cairo-gtk2 build on Darwin is completely broken and needs
heavy patching. Ideally they should be fixed individually but that
will be an extremely hard work, so don't define XP_MACOSX for now.
--- configure.in.orig 2015-05-04 00:43:23.000000000 +0000
+++ configure.in
@@ -1794,7 +1794,13 @@ Linux)
MOZ_ENABLE_PROFILER_SPS=
esac
;;
-WINNT|Darwin) ;;
+WINNT|Darwin)
+ case "${CPU_ARCH}" in
+ x86 | x86_64) ;;
+ *)
+ MOZ_ENABLE_PROFILER_SPS=
+ esac
+ ;;
*)
MOZ_ENABLE_PROFILER_SPS=
;;
@@ -1898,7 +1904,7 @@ case "$host" in
;;
*-darwin*)
- HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11"
+ HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"'
HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
;;
@@ -2022,7 +2028,6 @@ case "$target" in
AC_DEFINE(XP_DARWIN)
_PLATFORM_DEFAULT_TOOLKIT='cairo-uikit'
else
- AC_DEFINE(XP_MACOSX)
AC_DEFINE(XP_DARWIN)
_PLATFORM_DEFAULT_TOOLKIT='cairo-cocoa'
# The ExceptionHandling framework is needed for Objective-C exception
@@ -2641,8 +2646,7 @@ MOZ_CXX11
AC_LANG_C
-dnl Check for .hidden assembler directive and visibility attribute.
-dnl Borrowed from glibc configure.in
+dnl Setup default hidden visibility and wrapped system headers.
dnl ===============================================================
if test "$GNU_CC" -a "$OS_TARGET" != WINNT; then
AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
@@ -3663,6 +3667,14 @@ if test -n "$YASM"; then
_YASM_BUILD=` echo ${YASM_VERSION} | $AWK -F\. '{ print $4 }'`
fi
+if test -n "${LIBXUL_SDK_DIR}"; then
+ AC_MSG_WARN([pkgsrc: LIBXUL_SDK_DIR is set; assuming we want nss and nspr from xulrunner.])
+ NSPR_CFLAGS="-I${prefix}/include/xulrunner/unstable `pkg-config --cflags nspr`"
+ NSPR_LIBS="`pkg-config --libs nspr`"
+ NSS_CFLAGS="`pkg-config --cflags nss`"
+ NSS_LIBS="`pkg-config --libs nss`"
+fi
+
if test -z "$SKIP_LIBRARY_CHECKS"; then
dnl system JPEG support
dnl ========================================================
@@ -3690,11 +3702,7 @@ if test "$MOZ_NATIVE_JPEG" = 1; then
#include <jpeglib.h> ],
[ #if JPEG_LIB_VERSION < $MOZJPEG
#error "Insufficient JPEG library version ($MOZJPEG required)."
- #endif
- #ifndef JCS_EXTENSIONS
- #error "libjpeg-turbo JCS_EXTENSIONS required"
- #endif
- ],
+ #endif ],
MOZ_NATIVE_JPEG=1,
AC_MSG_ERROR([Insufficient JPEG library version for --with-system-jpeg]))
fi
@@ -4392,6 +4400,10 @@ cairo-gonk)
esac
+if test "$MOZ_WIDGET_TOOLKIT" = "cocoa"; then
+ AC_DEFINE(XP_MACOSX)
+fi
+
AC_SUBST(MOZ_PDF_PRINTING)
if test "$MOZ_PDF_PRINTING"; then
PDF_SURFACE_FEATURE="#define CAIRO_HAS_PDF_SURFACE 1"
@@ -4408,7 +4420,7 @@ fi
if test "$COMPILE_ENVIRONMENT"; then
if test "$MOZ_ENABLE_GTK3"; then
- PKG_CHECK_MODULES(MOZ_GTK3, gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 atk-bridge-2.0 $GDK_PACKAGES)
+ PKG_CHECK_MODULES(MOZ_GTK3, gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES)
MOZ_GTK3_CFLAGS="-I${_topsrcdir}/widget/gtk/compat-gtk3 $MOZ_GTK3_CFLAGS"
dnl Contrary to MOZ_GTK2_LIBS, MOZ_GTK3_LIBS needs to be literally added to TK_LIBS instead
dnl of a make reference because of how TK_LIBS is mangled in toolkit/library/moz.build
@@ -5149,6 +5161,9 @@ if test -n "$MOZ_WEBRTC"; then
MOZ_VPX=1
MOZ_VPX_ERROR_CONCEALMENT=1
+ dnl with libv4l2 we can support more cameras
+ PKG_CHECK_MODULES(MOZ_LIBV4L2, libv4l2)
+
dnl enable once Signaling lands
MOZ_WEBRTC_SIGNALING=1
AC_DEFINE(MOZ_WEBRTC_SIGNALING)
@@ -5252,6 +5267,157 @@ if test "${ac_cv_c_attribute_aligned}" !
fi
dnl ========================================================
+dnl Check for libogg
+dnl ========================================================
+
+MOZ_ARG_WITH_BOOL(system-ogg,
+[ --with-system-ogg Use system libogg (located with pkgconfig)],
+MOZ_NATIVE_OGG=1,
+MOZ_NATIVE_OGG=)
+
+if test -n "$MOZ_NATIVE_OGG"; then
+ PKG_CHECK_MODULES(MOZ_OGG, ogg >= 1.2.1)
+
+ _SAVE_LIBS=$LIBS
+ LIBS="$LIBS $MOZ_OGG_LIBS"
+ AC_CHECK_FUNC(ogg_set_mem_functions, [],
+ [AC_DEFINE(MOZ_OGG_NO_MEM_REPORTING)])
+ LIBS=$_SAVE_LIBS
+fi
+
+AC_SUBST(MOZ_NATIVE_OGG)
+
+dnl ========================================================
+dnl Check for libvorbis
+dnl ========================================================
+
+MOZ_ARG_WITH_BOOL(system-vorbis,
+[ --with-system-vorbis Use system libvorbis (located with pkgconfig)],
+MOZ_NATIVE_VORBIS=1,
+MOZ_NATIVE_VORBIS=)
+
+if test -n "$MOZ_NATIVE_VORBIS"; then
+ PKG_CHECK_MODULES(MOZ_VORBIS, vorbis vorbisenc >= 1.3.5)
+fi
+
+AC_SUBST(MOZ_NATIVE_VORBIS)
+
+dnl ========================================================
+dnl Check for integer-only libvorbis aka tremor
+dnl ========================================================
+
+MOZ_ARG_WITH_BOOL(system-tremor,
+[ --with-system-tremor Use system libtremor (located with pkgconfig)],
+MOZ_NATIVE_TREMOR=1,
+MOZ_NATIVE_TREMOR=)
+
+if test -n "$MOZ_NATIVE_TREMOR"; then
+ PKG_CHECK_MODULES(MOZ_TREMOR, vorbisidec >= 1.2.1)
+fi
+
+AC_SUBST(MOZ_NATIVE_TREMOR)
+
+dnl ========================================================
+dnl Check for libcelt
+dnl ========================================================
+
+MOZ_ARG_WITH_BOOL(system-celt,
+[ --with-system-celt Use system libcelt (located with pkgconfig)],
+MOZ_NATIVE_CELT=1,
+MOZ_NATIVE_CELT=)
+
+if test -n "$MOZ_NATIVE_CELT"; then
+ PKG_CHECK_MODULES(MOZ_CELT, celt)
+else
+ MOZ_CELT_CFLAGS='-I$(topsrcdir)/media/libopus'
+fi
+
+AC_SUBST(MOZ_NATIVE_CELT)
+
+dnl ========================================================
+dnl Check for libopus
+dnl ========================================================
+
+MOZ_ARG_WITH_BOOL(system-opus,
+[ --with-system-opus Use system libopus (located with pkgconfig)],
+MOZ_NATIVE_OPUS=1,
+MOZ_NATIVE_OPUS=)
+
+if test -n "$MOZ_NATIVE_OPUS"; then
+ PKG_CHECK_MODULES(MOZ_OPUS, opus >= 1.1)
+else
+ MOZ_OPUS_CFLAGS='-I$(topsrcdir)/media/libopus/include'
+fi
+
+AC_SUBST(MOZ_NATIVE_OPUS)
+
+dnl ========================================================
+dnl Check for libtheora
+dnl ========================================================
+
+MOZ_ARG_WITH_BOOL(system-theora,
+[ --with-system-theora Use system libtheora (located with pkgconfig)],
+MOZ_NATIVE_THEORA=1,
+MOZ_NATIVE_THEORA=)
+
+if test -n "$MOZ_NATIVE_THEORA"; then
+ PKG_CHECK_MODULES(MOZ_THEORA, theora >= 1.2)
+fi
+
+AC_SUBST(MOZ_NATIVE_THEORA)
+
+dnl ========================================================
+dnl Check for libspeex resampler
+dnl ========================================================
+
+MOZ_ARG_WITH_BOOL(system-speex,
+[ --with-system-speex Use system libspeex (located with pkgconfig)],
+MOZ_NATIVE_SPEEX=1,
+MOZ_NATIVE_SPEEX=)
+
+if test -n "$MOZ_NATIVE_SPEEX"; then
+ PKG_CHECK_MODULES(MOZ_SPEEX, speexdsp >= 1.2)
+fi
+
+AC_SUBST(MOZ_NATIVE_SPEEX)
+
+dnl ========================================================
+dnl Check for libsoundtouch
+dnl ========================================================
+
+MOZ_ARG_WITH_BOOL(system-soundtouch,
+[ --with-system-soundtouch Use system libsoundtouch (located with pkgconfig)],
+MOZ_NATIVE_SOUNDTOUCH=1,
+MOZ_NATIVE_SOUNDTOUCH=)
+
+if test -n "$MOZ_NATIVE_SOUNDTOUCH"; then
+ PKG_CHECK_MODULES(MOZ_SOUNDTOUCH, soundtouch >= 1.8.0)
+
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ _SAVE_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS $MOZ_SOUNDTOUCH_CFLAGS"
+ AC_CACHE_CHECK(for soundtouch sample type,
+ ac_cv_soundtouch_sample_type,
+ [AC_TRY_COMPILE([#include <SoundTouch.h>
+ #ifndef SOUNDTOUCH_INTEGER_SAMPLES
+ #error soundtouch expects float samples
+ #endif],
+ [],
+ [ac_cv_soundtouch_sample_type=short],
+ [ac_cv_soundtouch_sample_type=float])])
+ CXXFLAGS=$_SAVE_CXXFLAGS
+ AC_LANG_RESTORE
+
+ if test \( -n "$MOZ_SAMPLE_TYPE_S16" -a "$ac_cv_soundtouch_sample_type" != short \) \
+ -o \( -n "$MOZ_SAMPLE_TYPE_FLOAT32" -a "$ac_cv_soundtouch_sample_type" != float \) ; then
+ AC_MSG_ERROR([SoundTouch library is built with incompatible sample type. Either rebuild the library with/without --enable-integer-samples, chase default Mozilla sample type or remove --with-system-soundtouch.])
+ fi
+fi
+
+AC_SUBST(MOZ_NATIVE_SOUNDTOUCH)
+
+dnl ========================================================
dnl = Disable VP8 decoder support
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(webm,
@@ -5606,6 +5772,67 @@ fi
AC_SUBST(MOZ_WEBM_ENCODER)
dnl ==================================
+dnl = Check OSS availability
+dnl ==================================
+
+dnl If using Linux, Solaris or BSDs, ensure that OSS is available
+case "$OS_TARGET" in
+Linux|SunOS|DragonFly|FreeBSD|NetBSD|GNU/kFreeBSD)
+ MOZ_OSS=1
+ ;;
+esac
+
+MOZ_ARG_WITH_STRING(oss,
+[ --with-oss[=PFX] Enable OpenSoundSystem support [installed at prefix PFX]],
+ OSSPREFIX=$withval)
+
+if test -n "$OSSPREFIX"; then
+ if test "$OSSPREFIX" != "no"; then
+ MOZ_OSS=1
+ else
+ MOZ_OSS=
+ fi
+fi
+
+_SAVE_CFLAGS=$CFLAGS
+_SAVE_LIBS=$LIBS
+if test -n "$MOZ_OSS"; then
+ dnl Prefer 4Front implementation
+ AC_MSG_CHECKING([MOZ_OSS_CFLAGS])
+ if test "$OSSPREFIX" != "yes"; then
+ oss_conf=${OSSPREFIX%/usr}/etc/oss.conf
+ if test -f "$oss_conf"; then
+ . "$oss_conf"
+ else
+ OSSLIBDIR=$OSSPREFIX/lib/oss
+ fi
+ if test -d "$OSSLIBDIR"; then
+ MOZ_OSS_CFLAGS="$MOZ_OSS_CFLAGS -I$OSSLIBDIR/include"
+ fi
+ fi
+ AC_MSG_RESULT([$MOZ_OSS_CFLAGS])
+
+ CFLAGS="$CFLAGS $MOZ_OSS_CFLAGS"
+ MOZ_CHECK_HEADERS(sys/soundcard.h soundcard.h)
+
+ if test "$ac_cv_header_sys_soundcard_h" != "yes" -a \
+ "$ac_cv_header_soundcard_h" != "yes"; then
+ AC_MSG_ERROR([Need OSS for Ogg, Wave or WebM decoding on $OS_TARGET. Disable with --disable-ogg --disable-wave --disable-webm.])
+ fi
+
+ dnl Assume NetBSD implementation over SunAudio
+ AC_CHECK_LIB(ossaudio, _oss_ioctl,
+ [AC_DEFINE_UNQUOTED(CUBEB_OSS_DEFAULT_OUTPUT, "/dev/sound")
+ MOZ_OSS_LIBS="$MOZ_OSS_LIBS -lossaudio"])
+fi
+CFLAGS=$_SAVE_CFLAGS
+LIBS=$_SAVE_LIBS
+
+AC_SUBST(MOZ_OSS)
+AC_SUBST_LIST(MOZ_OSS_CFLAGS)
+AC_SUBST_LIST(MOZ_OSS_LIBS)
+
+dnl ==================================
dnl = Check alsa availability on Linux
dnl ==================================
@@ -5619,12 +5846,23 @@ MOZ_ARG_ENABLE_BOOL(alsa,
MOZ_ALSA=1,
MOZ_ALSA=)
+MOZ_ARG_DISABLE_BOOL(alsa-dlopen,
+[ --disable-alsa-dlopen Disable runtime linking of libasound.so],
+ DISABLE_LIBASOUND_DLOPEN=1,
+ DISABLE_LIBASOUND_DLOPEN=)
+
if test -n "$MOZ_ALSA"; then
PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
[echo "$MOZ_ALSA_PKG_ERRORS"
AC_MSG_ERROR([Need alsa for audio output on Linux. (On Ubuntu, you might try installing the package libasound2-dev.)])])
fi
+if test -n "$DISABLE_LIBASOUND_DLOPEN"; then
+ AC_DEFINE(DISABLE_LIBASOUND_DLOPEN)
+else
+ MOZ_ALSA_LIBS=
+fi
+
AC_SUBST(MOZ_ALSA)
dnl ========================================================
@@ -6046,7 +6284,9 @@ MOZ_ARG_DISABLE_BOOL(gamepad,
if test "$MOZ_GAMEPAD"; then
case "$OS_TARGET" in
Darwin)
- MOZ_GAMEPAD_BACKEND=cocoa
+ if test "$MOZ_WIDGET_TOOLKIT" = "cocoa"; then
+ MOZ_GAMEPAD_BACKEND=cocoa
+ fi
;;
WINNT)
MOZ_GAMEPAD_BACKEND=windows
@@ -8066,6 +8306,49 @@ if test "$USE_FC_FREETYPE"; then
fi
dnl ========================================================
+dnl Check for harfbuzz
+dnl ========================================================
+
+MOZ_ARG_WITH_BOOL(system-harfbuzz,
+[ --with-system-harfbuzz Use system harfbuzz (located with pkgconfig)],
+MOZ_NATIVE_HARFBUZZ=1,
+MOZ_NATIVE_HARFBUZZ=)
+
+if test -n "$MOZ_NATIVE_HARFBUZZ"; then
+ PKG_CHECK_MODULES(MOZ_HARFBUZZ, harfbuzz >= 0.9.34)
+fi
+
+AC_SUBST(MOZ_NATIVE_HARFBUZZ)
+
+dnl ========================================================
+dnl Check for graphite2
+dnl ========================================================
+
+MOZ_ARG_WITH_BOOL(system-graphite2,
+[ --with-system-graphite2 Use system graphite2 (located with pkgconfig)],
+MOZ_NATIVE_GRAPHITE2=1,
+MOZ_NATIVE_GRAPHITE2=)
+
+if test -n "$MOZ_NATIVE_GRAPHITE2"; then
+ PKG_CHECK_MODULES(MOZ_GRAPHITE2, graphite2)
+
+ dnl graphite2.pc has bogus version, check manually
+ AC_TRY_COMPILE([ #include <graphite2/Font.h>
+ #define GR2_VERSION_REQUIRE(major,minor,bugfix) \
+ ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \
+ * 100 + GR2_VERSION_BUGFIX >= \
+ (major) * 10000 + (minor) * 100 + (bugfix) )
+ ], [
+ #if !GR2_VERSION_REQUIRE(1,2,4)
+ #error "Insufficient graphite2 version."
+ #endif
+ ], [],
+ [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])])
+fi
+
+AC_SUBST(MOZ_NATIVE_GRAPHITE2)
+
+dnl ========================================================
dnl Check for pixman and cairo
dnl ========================================================
@@ -0,0 +1,98 @@
$NetBSD: patch-accessible_atk_Platform.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- accessible/atk/Platform.cpp.orig 2015-05-04 00:43:17.000000000 +0000
+++ accessible/atk/Platform.cpp
@@ -18,8 +18,9 @@
#include <dbus/dbus.h>
#endif
#include <gtk/gtk.h>
+
#if (MOZ_WIDGET_GTK == 3)
-#include <atk-bridge.h>
+extern "C" __attribute__((weak,visibility("default"))) int atk_bridge_adaptor_init(int*, char **[]);
#endif
using namespace mozilla;
@@ -46,7 +47,6 @@ static gulong sToplevel_hide_hook = 0;
GType g_atk_hyperlink_impl_type = G_TYPE_INVALID;
-#if (MOZ_WIDGET_GTK == 2)
struct GnomeAccessibilityModule
{
const char *libName;
@@ -67,11 +67,13 @@ static GnomeAccessibilityModule sAtkBrid
"gnome_accessibility_module_shutdown", nullptr
};
+#if (MOZ_WIDGET_GTK == 2)
static GnomeAccessibilityModule sGail = {
"libgail.so", nullptr,
"gnome_accessibility_module_init", nullptr,
"gnome_accessibility_module_shutdown", nullptr
};
+#endif
static nsresult
LoadGtkModule(GnomeAccessibilityModule& aModule)
@@ -98,7 +100,11 @@ LoadGtkModule(GnomeAccessibilityModule&
else
subLen = loc2 - loc1;
nsAutoCString sub(Substring(libPath, loc1, subLen));
+#if (MOZ_WIDGET_GTK == 2)
sub.AppendLiteral("/gtk-2.0/modules/");
+#else
+ sub.AppendLiteral("/gtk-3.0/modules/");
+#endif
sub.Append(aModule.libName);
aModule.lib = PR_LoadLibrary(sub.get());
if (aModule.lib)
@@ -123,7 +129,6 @@ LoadGtkModule(GnomeAccessibilityModule&
}
return NS_OK;
}
-#endif // (MOZ_WIDGET_GTK == 2)
void
a11y::PlatformInit()
@@ -175,14 +180,17 @@ a11y::PlatformInit()
// Init atk-bridge now
PR_SetEnv("NO_AT_BRIDGE=0");
-#if (MOZ_WIDGET_GTK == 2)
- rv = LoadGtkModule(sAtkBridge);
- if (NS_SUCCEEDED(rv)) {
- (*sAtkBridge.init)();
- }
-#else
- atk_bridge_adaptor_init(nullptr, nullptr);
+#if (MOZ_WIDGET_GTK == 3)
+ if (atk_bridge_adaptor_init) {
+ atk_bridge_adaptor_init(nullptr, nullptr);
+ } else
#endif
+ {
+ nsresult rv = LoadGtkModule(sAtkBridge);
+ if (NS_SUCCEEDED(rv)) {
+ (*sAtkBridge.init)();
+ }
+ }
if (!sToplevel_event_hook_added) {
sToplevel_event_hook_added = true;
@@ -210,7 +218,6 @@ a11y::PlatformShutdown()
sToplevel_hide_hook);
}
-#if (MOZ_WIDGET_GTK == 2)
if (sAtkBridge.lib) {
// Do not shutdown/unload atk-bridge,
// an exit function registered will take care of it
@@ -221,6 +228,7 @@ a11y::PlatformShutdown()
sAtkBridge.init = nullptr;
sAtkBridge.shutdown = nullptr;
}
+#if (MOZ_WIDGET_GTK == 2)
if (sGail.lib) {
// Do not shutdown gail because
// 1) Maybe it's not init-ed by us. e.g. GtkEmbed
+16
View File
@@ -0,0 +1,16 @@
$NetBSD: patch-al,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- storage/src/mozStorageConnection.cpp.orig 2014-04-18 02:04:20.000000000 +0000
+++ storage/src/mozStorageConnection.cpp
@@ -584,6 +584,11 @@ Connection::initialize(nsIFile *aDatabas
mDatabaseFile = aDatabaseFile;
+ // XXX tnn: the configure script demands that sqlite3 is compiled with
+ // SECURE_DELETE on by default. sqlite3 in pkgsrc does not have that,
+ // so instead we enable secure_delete manually here.
+ (void)ExecuteSimpleSQL(NS_LITERAL_CSTRING("PRAGMA secure_delete = 1;"));
+
return NS_OK;
}
+15
View File
@@ -0,0 +1,15 @@
$NetBSD: patch-ao,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- toolkit/mozapps/installer/packager.mk.orig 2015-06-24 21:28:03.000000000 +0000
+++ toolkit/mozapps/installer/packager.mk
@@ -122,8 +122,8 @@ endif
(cd $(DESTDIR)$(installdir) && tar -xf -)
$(NSINSTALL) -D $(DESTDIR)$(bindir)
$(RM) -f $(DESTDIR)$(bindir)/$(MOZ_APP_NAME)
- ln -s $(installdir)/$(MOZ_APP_NAME) $(DESTDIR)$(bindir)
-ifdef INSTALL_SDK # Here comes the hard part
+ ln -s $(installdir)/$(MOZ_APP_NAME) $(DESTDIR)$(bindir)/$(MOZILLA_PKG_NAME)
+ifeq ($(MOZ_APP_NAME),xulrunner)
$(NSINSTALL) -D $(DESTDIR)$(includedir)
(cd $(DIST)/include && $(TAR) $(TAR_CREATE_FLAGS) - .) | \
(cd $(DESTDIR)$(includedir) && tar -xf -)
+42
View File
@@ -0,0 +1,42 @@
$NetBSD: patch-as,v 1.1 2016/02/14 07:30:54 ryoon Exp $
Treat DragonFly like FreeBSD.
--- js/src/configure.in.orig 2015-01-23 05:59:58.000000000 +0000
+++ js/src/configure.in 2015-02-16 11:09:33.000000000 +0000
@@ -2180,8 +2180,7 @@
MOZ_CXX11
-dnl Check for .hidden assembler directive and visibility attribute.
-dnl Borrowed from glibc configure.in
+dnl Setup default hidden visibility and wrapped system headers.
dnl ===============================================================
if test "$GNU_CC" -a "$OS_TARGET" != WINNT; then
AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
@@ -3095,7 +3094,7 @@
*-darwin*)
AC_DEFINE(MOZ_MEMORY_DARWIN)
;;
- *-*freebsd*)
+ *-*freebsd*|*-*dragonfly*)
AC_DEFINE(MOZ_MEMORY_BSD)
;;
*-android*|*-linuxandroid*)
@@ -3989,6 +3988,16 @@
dnl ========================================================
dnl JavaScript shell
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
MALLOC_HEADERS="malloc.h malloc_np.h malloc/malloc.h sys/malloc.h"
MALLOC_H=
@@ -0,0 +1,15 @@
$NetBSD: patch-b2g_installer_Makefile.in,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- b2g/installer/Makefile.in.orig 2015-02-17 21:40:34.000000000 +0000
+++ b2g/installer/Makefile.in
@@ -79,6 +79,10 @@ ifneq (,$(filter rtsp,$(NECKO_PROTOCOLS)
DEFINES += -DMOZ_RTSP
endif
+ifdef MOZ_DEBUG
+DEFINES += -DMOZ_DEBUG=1
+endif
+
ifdef GKMEDIAS_SHARED_LIBRARY
DEFINES += -DGKMEDIAS_SHARED_LIBRARY
endif
@@ -0,0 +1,13 @@
$NetBSD: patch-b2g_installer_package-manifest.in,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- b2g/installer/package-manifest.in.orig 2015-02-17 21:40:34.000000000 +0000
+++ b2g/installer/package-manifest.in
@@ -609,7 +609,7 @@
@BINPATH@/components/EngineeringModeAPI.js
@BINPATH@/components/EngineeringModeService.js
-#ifdef MOZ_DEBUG
+#if defined(ENABLE_TESTS) && defined(MOZ_DEBUG)
@BINPATH@/components/TestInterfaceJS.js
@BINPATH@/components/TestInterfaceJS.manifest
#endif
+13
View File
@@ -0,0 +1,13 @@
$NetBSD: patch-bf,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- js/src/jsnativestack.cpp.orig 2013-09-10 03:43:36.000000000 +0000
+++ js/src/jsnativestack.cpp
@@ -114,7 +114,7 @@ js::GetNativeStackBaseImpl()
pthread_attr_init(&sattr);
# if defined(__OpenBSD__)
stack_t ss;
-# elif defined(PTHREAD_NP_H) || defined(_PTHREAD_NP_H_) || defined(NETBSD)
+# elif defined(PTHREAD_NP_H) || defined(_PTHREAD_NP_H_) || defined(__DragonFly__) || defined(NETBSD) || defined(__NetBSD__) /* XXX tnn not sure why NETBSD isn't defined, it looks like it should be ... */
/* e.g. on FreeBSD 4.8 or newer, neundorf@kde.org */
pthread_attr_get_np(thread, &sattr);
# else
+24
View File
@@ -0,0 +1,24 @@
$NetBSD: patch-bg,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- storage/src/SQLiteMutex.h.orig 2013-10-25 22:27:40.000000000 +0000
+++ storage/src/SQLiteMutex.h
@@ -108,15 +108,19 @@ public:
void assertCurrentThreadOwns()
{
NS_ASSERTION(mMutex, "No mutex associated with this wrapper!");
+#if 0
NS_ASSERTION(sqlite3_mutex_held(mMutex),
"Mutex is not held, but we expect it to be!");
+#endif
}
void assertNotCurrentThreadOwns()
{
NS_ASSERTION(mMutex, "No mutex associated with this wrapper!");
+#if 0
NS_ASSERTION(sqlite3_mutex_notheld(mMutex),
"Mutex is held, but we expect it to not be!");
+#endif
}
#endif // ifndef DEBUG
@@ -0,0 +1,36 @@
$NetBSD: patch-browser_app_nsBrowserApp.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
* Replace XP_MACOSX with XP_DARWIN as the former is not defined when
the toolkit is not cocoa.
--- browser/app/nsBrowserApp.cpp.orig 2015-05-04 00:43:18.000000000 +0000
+++ browser/app/nsBrowserApp.cpp
@@ -18,8 +18,10 @@
#include <unistd.h>
#endif
-#ifdef XP_MACOSX
+#ifdef XP_DARWIN
#include <mach/mach_time.h>
+#endif
+#ifdef MOZ_WIDGET_COCOA
#include "MacQuirks.h"
#endif
@@ -459,7 +461,7 @@ TimeStamp_Now()
}
return sGetTickCount64() * freq.QuadPart;
-#elif defined(XP_MACOSX)
+#elif defined(XP_DARWIN)
return mach_absolute_time();
#elif defined(HAVE_CLOCK_MONOTONIC)
struct timespec ts;
@@ -606,6 +608,7 @@ int main(int argc, char* argv[])
TriggerQuirks();
#endif
+ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
int gotCounters;
#if defined(XP_UNIX)
struct rusage initialRUsage;
@@ -0,0 +1,24 @@
$NetBSD: patch-browser_installer_package-manifest.in,v 1.1 2016/02/14 07:30:54 ryoon Exp $
Limit SPARC bits to just SPARC (untested, but fixes x86).
--- browser/installer/package-manifest.in.orig 2015-02-17 21:40:38.000000000 +0000
+++ browser/installer/package-manifest.in
@@ -609,7 +609,7 @@
@RESPATH@/components/MozKeyboard.js
@RESPATH@/components/InputMethod.manifest
-#ifdef MOZ_DEBUG
+#if defined(ENABLE_TESTS) && defined(MOZ_DEBUG)
@RESPATH@/components/TestInterfaceJS.js
@RESPATH@/components/TestInterfaceJS.manifest
#endif
@@ -788,7 +788,7 @@
#endif
; for Solaris SPARC
-#ifdef SOLARIS
+#if defined(SOLARIS) && defined(SPARC)
bin/libfreebl_32fpu_3.so
bin/libfreebl_32int_3.so
bin/libfreebl_32int64_3.so
@@ -0,0 +1,22 @@
$NetBSD: patch-build_autoconf_compiler-opts.m4,v 1.1 2016/02/14 07:30:54 ryoon Exp $
It's true Clang is required if we use the cocoa toolkit, but we don't
do that anyway. GCC is perfectly working as long as we use cairo-gtk2.
--- build/autoconf/compiler-opts.m4.orig 2014-05-06 22:55:14.000000000 +0000
+++ build/autoconf/compiler-opts.m4
@@ -53,14 +53,6 @@ case "$target" in
if test -z "$CXX"; then
MOZ_PATH_PROGS(CXX, clang++)
fi
- IS_GCC=$($CC -v 2>&1 | grep gcc)
- if test -n "$IS_GCC"
- then
- echo gcc is known to be broken on OS X, please use clang.
- echo see http://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions/Mac_OS_X_Prerequisites
- echo for more information.
- exit 1
- fi
;;
esac
fi
@@ -0,0 +1,46 @@
$NetBSD: patch-build_autoconf_nss.m4,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- build/autoconf/nss.m4.orig 2015-04-29 21:11:43.000000000 +0000
+++ build/autoconf/nss.m4
@@ -22,18 +22,18 @@ AC_ARG_WITH(nss-exec-prefix,
if test -n "$nss_config_exec_prefix"; then
nss_config_args="$nss_config_args --exec-prefix=$nss_config_exec_prefix"
if test -z "$NSS_CONFIG"; then
- NSS_CONFIG=$nss_config_exec_prefix/bin/nss-config
+ NSS_CONFIG=$nss_config_exec_prefix/bin/pkg-config
fi
fi
if test -n "$nss_config_prefix"; then
nss_config_args="$nss_config_args --prefix=$nss_config_prefix"
if test -z "$NSS_CONFIG"; then
- NSS_CONFIG=$nss_config_prefix/bin/nss-config
+ NSS_CONFIG=$nss_config_prefix/bin/pkg-config
fi
fi
unset ac_cv_path_NSS_CONFIG
- AC_PATH_PROG(NSS_CONFIG, nss-config, no)
+ AC_PATH_PROG(NSS_CONFIG, pkg-config, no)
min_nss_version=ifelse([$1], ,3.0.0,$1)
AC_MSG_CHECKING(for NSS - version >= $min_nss_version)
@@ -41,14 +41,14 @@ AC_ARG_WITH(nss-exec-prefix,
if test "$NSS_CONFIG" = "no"; then
no_nss="yes"
else
- NSS_CFLAGS=`$NSS_CONFIG $nss_config_args --cflags`
- NSS_LIBS=`$NSS_CONFIG $nss_config_args --libs`
+ NSS_CFLAGS=`$NSS_CONFIG $nss_config_args nss --cflags`
+ NSS_LIBS=`$NSS_CONFIG $nss_config_args nss --libs`
- nss_config_major_version=`$NSS_CONFIG $nss_config_args --version | \
+ nss_config_major_version=`$NSS_CONFIG $nss_config_args nss --modversion | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\(\.\([[0-9]]*\)\)\{0,1\}/\1/'`
- nss_config_minor_version=`$NSS_CONFIG $nss_config_args --version | \
+ nss_config_minor_version=`$NSS_CONFIG $nss_config_args nss --modversion | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\(\.\([[0-9]]*\)\)\{0,1\}/\2/'`
- nss_config_micro_version=`$NSS_CONFIG $nss_config_args --version | \
+ nss_config_micro_version=`$NSS_CONFIG $nss_config_args nss --modversion | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\(\.\([[0-9]]*\)\)\{0,1\}/\4/'`
if test -z "$nss_config_micro_version"; then
nss_config_micro_version="0"
@@ -0,0 +1,42 @@
$NetBSD: patch-build_gyp.mozbuild,v 1.1 2016/02/14 07:30:54 ryoon Exp $
Hunk #2:
On Darwin, don't assume iOS just because the toolkit is not
cocoa. Ideally there should be an AC_SUBST just like 'ARM_ARCH' but
nothing exists currently.
Hunk #3:
MacOS X SDK version should be able to configure with
./configure --enable-macos-target=VER
--- build/gyp.mozbuild.orig 2015-01-23 05:59:58.000000000 +0000
+++ build/gyp.mozbuild
@@ -12,6 +12,7 @@ gyp_vars = {
'have_ethtool_cmd_speed_hi': 1 if CONFIG['MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI'] else 0,
'include_alsa_audio': 1 if CONFIG['MOZ_ALSA'] else 0,
'include_pulse_audio': 1 if CONFIG['MOZ_PULSEAUDIO'] else 0,
+ 'use_libv4l2': 1 if CONFIG['MOZ_LIBV4L2_LIBS'] else 0,
# basic stuff for everything
'include_internal_video_render': 0,
'clang_use_chrome_plugins': 0,
@@ -85,7 +86,7 @@ flavors = {
'WINNT': 'win',
'Android': 'linux' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' else 'android',
'Linux': 'linux',
- 'Darwin': 'mac' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' else 'ios',
+ 'Darwin': 'ios' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cairo-uikit' else 'mac',
'SunOS': 'solaris',
'GNU/kFreeBSD': 'freebsd',
'DragonFly': 'dragonfly',
@@ -120,5 +121,11 @@ if CONFIG['INTEL_ARCHITECTURE']:
if not CONFIG['HAVE_TOOLCHAIN_SUPPORT_MSSSE3'] or not CONFIG['HAVE_TOOLCHAIN_SUPPORT_MSSE4_1']:
gyp_vars['yuv_disable_asm'] = 1
+# MacOS X SDK version should be able to configure with ./configure
+# --enable-macos-target=VER
+if CONFIG['MACOSX_DEPLOYMENT_TARGET']:
+ gyp_vars['mac_sdk_min'] = CONFIG['MACOSX_DEPLOYMENT_TARGET']
+ gyp_vars['mac_deployment_target'] = CONFIG['MACOSX_DEPLOYMENT_TARGET']
+
if CONFIG['MACOS_SDK_DIR']:
gyp_vars['mac_sdk_path'] = CONFIG['MACOS_SDK_DIR']
@@ -0,0 +1,13 @@
$NetBSD: patch-build_pgo_profileserver.py,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- build/pgo/profileserver.py.orig 2014-03-15 05:19:09.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,
@@ -0,0 +1,21 @@
$NetBSD: patch-config_Makefile.in,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- config/Makefile.in.orig 2015-05-04 00:43:23.000000000 +0000
+++ config/Makefile.in
@@ -77,6 +77,16 @@ export:: $(export-preqs)
-DMOZ_NATIVE_LIBEVENT=$(MOZ_NATIVE_LIBEVENT) \
-DMOZ_NATIVE_LIBVPX=$(MOZ_NATIVE_LIBVPX) \
-DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \
+ -DMOZ_NATIVE_GRAPHITE2=$(MOZ_NATIVE_GRAPHITE2) \
+ -DMOZ_NATIVE_HARFBUZZ=$(MOZ_NATIVE_HARFBUZZ) \
+ -DMOZ_NATIVE_OGG=$(MOZ_NATIVE_OGG) \
+ -DMOZ_NATIVE_THEORA=$(MOZ_NATIVE_THEORA) \
+ -DMOZ_NATIVE_VORBIS=$(MOZ_NATIVE_VORBIS) \
+ -DMOZ_NATIVE_TREMOR=$(MOZ_NATIVE_TREMOR) \
+ -DMOZ_NATIVE_CELT=$(MOZ_NATIVE_CELT) \
+ -DMOZ_NATIVE_OPUS=$(MOZ_NATIVE_OPUS) \
+ -DMOZ_NATIVE_SPEEX=$(MOZ_NATIVE_SPEEX) \
+ -DMOZ_NATIVE_SOUNDTOUCH=$(MOZ_NATIVE_SOUNDTOUCH) \
$(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
$(INSTALL) system_wrappers $(DIST)
@@ -0,0 +1,19 @@
$NetBSD: patch-config_baseconfig.mk,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- config/baseconfig.mk.orig 2014-04-18 02:02:39.000000000 +0000
+++ config/baseconfig.mk
@@ -2,10 +2,10 @@
# directly in python/mozbuild/mozbuild/base.py for gmake validation.
# We thus use INCLUDED_AUTOCONF_MK to enable/disable some parts depending
# whether a normal build is happening or whether the check is running.
-includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
+includedir := $(includedir)/${MOZILLA_PKG_NAME}
+idldir = $(datadir)/idl/${MOZILLA_PKG_NAME}
+installdir = $(libdir)/${MOZILLA_PKG_NAME}
+sdkdir = $(libdir)/${MOZILLA_PKG_NAME}
ifndef TOP_DIST
TOP_DIST = dist
endif
@@ -0,0 +1,48 @@
$NetBSD: patch-config_external_moz.build,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- config/external/moz.build.orig 2015-05-04 00:43:23.000000000 +0000
+++ config/external/moz.build
@@ -19,10 +19,19 @@ if CONFIG['MOZ_UPDATER']:
# There's no "native brotli" yet, but probably in the future...
external_dirs += ['modules/brotli']
-if CONFIG['MOZ_VORBIS']:
+if not CONFIG['MOZ_NATIVE_OGG']:
+ external_dirs += ['media/libogg']
+
+if not CONFIG['MOZ_NATIVE_CELT'] or not CONFIG['MOZ_NATIVE_OPUS']:
+ external_dirs += ['media/libopus']
+
+if not CONFIG['MOZ_NATIVE_THEORA']:
+ external_dirs += ['media/libtheora']
+
+if CONFIG['MOZ_VORBIS'] and not CONFIG['MOZ_NATIVE_VORBIS']:
external_dirs += ['media/libvorbis']
-if CONFIG['MOZ_TREMOR']:
+if CONFIG['MOZ_TREMOR'] and not CONFIG['MOZ_NATIVE_TREMOR']:
external_dirs += ['media/libtremor']
if CONFIG['MOZ_WEBM']:
@@ -37,15 +46,16 @@ if CONFIG['MOZ_VPX'] and not CONFIG['MOZ
if not CONFIG['MOZ_NATIVE_PNG']:
external_dirs += ['media/libpng']
+if not CONFIG['MOZ_NATIVE_SPEEX']:
+ external_dirs += ['media/libspeex_resampler']
+
+if not CONFIG['MOZ_NATIVE_SOUNDTOUCH']:
+ external_dirs += ['media/libsoundtouch']
+
external_dirs += [
'media/kiss_fft',
'media/libcubeb',
- 'media/libogg',
- 'media/libopus',
- 'media/libtheora',
- 'media/libspeex_resampler',
'media/libstagefright',
- 'media/libsoundtouch',
]
DIRS += ['../../' + i for i in external_dirs]
@@ -0,0 +1,12 @@
$NetBSD: patch-config_rules.mk,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- config/rules.mk.orig 2015-02-17 21:40:40.000000000 +0000
+++ config/rules.mk
@@ -765,6 +765,7 @@ endif
ifdef DTRACE_PROBE_OBJ
EXTRA_DEPS += $(DTRACE_PROBE_OBJ)
OBJS += $(DTRACE_PROBE_OBJ)
+EXCLUDED_OBJS += $(DTRACE_PROBE_OBJ)
endif
$(filter %.$(LIB_SUFFIX),$(LIBRARY)): $(OBJS) $(STATIC_LIBS_DEPS) $(filter %.$(LIB_SUFFIX),$(EXTRA_LIBS)) $(EXTRA_DEPS) $(GLOBAL_DEPS)
@@ -0,0 +1,8 @@
$NetBSD: patch-config_stl__wrappers_ios,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- config/stl_wrappers/ios.orig 2013-05-13 18:23:07.000000000 +0000
+++ config/stl_wrappers/ios
@@ -0,0 +1,3 @@
+#pragma GCC visibility push(default)
+#include_next <ios>
+#pragma GCC visibility pop
@@ -0,0 +1,8 @@
$NetBSD: patch-config_stl__wrappers_ostream,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- config/stl_wrappers/ostream.orig 2013-05-13 18:22:40.000000000 +0000
+++ config/stl_wrappers/ostream
@@ -0,0 +1,3 @@
+#pragma GCC visibility push(default)
+#include_next <ostream>
+#pragma GCC visibility pop
@@ -0,0 +1,96 @@
$NetBSD: patch-config_system-headers,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- config/system-headers.orig 2015-12-14 23:36:05.000000000 +0000
+++ config/system-headers
@@ -189,7 +189,6 @@ asm/signal.h
ASRegistry.h
assert.h
atk/atk.h
-atk-bridge.h
atlcom.h
atlconv.h
atlctl.cpp
@@ -638,6 +637,7 @@ libgnomevfs/gnome-vfs-mime-handlers.h
libgnomevfs/gnome-vfs-mime-utils.h
libgnomevfs/gnome-vfs-ops.h
libgnomevfs/gnome-vfs-standard-callbacks.h
+libv4l2.h
lib$routines.h
limits
limits.h
@@ -732,6 +732,7 @@ mapiutil.h
mapix.h
Math64.h
math.h
+complex
mbstring.h
#ifdef ANDROID
media/AudioEffect.h
@@ -1268,7 +1269,6 @@ X11/Xlocale.h
X11/Xos.h
X11/Xutil.h
zmouse.h
-soundtouch/SoundTouch.h
#if MOZ_NATIVE_PNG==1
png.h
#endif
@@ -1330,10 +1330,13 @@ vorbis/codec.h
theora/theoradec.h
tremor/ivorbiscodec.h
speex/speex_resampler.h
+soundtouch/SoundTouch.h
ogg/ogg.h
ogg/os_types.h
nestegg/nestegg.h
cubeb/cubeb.h
+speex/speex_resampler.h
+soundtouch/SoundTouch.h
#endif
gst/gst.h
gst/app/gstappsink.h
@@ -1362,3 +1365,45 @@ unicode/utypes.h
#endif
libutil.h
unwind.h
+#if MOZ_NATIVE_GRAPHITE2==1
+graphite2/Font.h
+graphite2/Log.h
+graphite2/Segment.h
+graphite2/Types.h
+#endif
+#if MOZ_NATIVE_HARFBUZZ==1
+harfbuzz/hb-ot.h
+harfbuzz/hb.h
+#endif
+#if MOZ_NATIVE_OGG==1
+ogg/ogg.h
+ogg/os_types.h
+#endif
+#if MOZ_NATIVE_THEORA==1
+theora/theoradec.h
+#endif
+#if MOZ_NATIVE_VORBIS==1
+vorbis/codec.h
+vorbis/vorbisenc.h
+#endif
+#if MOZ_NATIVE_TREMOR==1
+tremor/ivorbiscodec.h
+#endif
+#if MOZ_NATIVE_CELT==1
+celt.h
+celt_header.h
+celt/celt.h
+celt/celt_header.h
+#endif
+#if MOZ_NATIVE_OPUS==1
+opus.h
+opus_multistream.h
+opus/opus.h
+opus/opus_multistream.h
+#endif
+#if MOZ_NATIVE_SPEEX==1
+speex/speex_resampler.h
+#endif
+#if MOZ_NATIVE_SOUNDTOUCH==1
+soundtouch/SoundTouch.h
+#endif
@@ -0,0 +1,14 @@
$NetBSD: patch-dom_base_moz.build,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- dom/base/moz.build.orig 2015-02-17 21:40:41.000000000 +0000
+++ dom/base/moz.build
@@ -361,6 +361,9 @@ if CONFIG['INTEL_ARCHITECTURE']:
SOURCES += ['nsTextFragmentSSE2.cpp']
SOURCES['nsTextFragmentSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
+ SOURCES['nsContentUtils.cpp'].flags += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
EXTRA_COMPONENTS += [
'ConsoleAPI.manifest',
'ConsoleAPIStorage.js',
@@ -0,0 +1,14 @@
$NetBSD: patch-dom_events_MessageEvent.h,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- dom/events/MessageEvent.h.orig 2015-11-19 13:56:48.000000000 +0000
+++ dom/events/MessageEvent.h
@@ -15,9 +15,6 @@ namespace mozilla {
namespace dom {
struct MessageEventInit;
-class MessagePort;
-class MessagePortBase;
-class MessagePortList;
class OwningWindowProxyOrMessagePort;
/**
@@ -0,0 +1,13 @@
$NetBSD: patch-dom_media_AudioStream.h,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- dom/media/AudioStream.h.orig 2015-02-17 21:40:44.000000000 +0000
+++ dom/media/AudioStream.h
@@ -17,7 +17,7 @@
#include "CubebUtils.h"
namespace soundtouch {
-class SoundTouch;
+class MOZ_IMPORT_API SoundTouch;
}
namespace mozilla {
@@ -0,0 +1,12 @@
$NetBSD: patch-dom_media_gstreamer_GStreamerAllocator.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- dom/media/gstreamer/GStreamerAllocator.cpp.orig 2015-02-17 21:40:44.000000000 +0000
+++ dom/media/gstreamer/GStreamerAllocator.cpp
@@ -51,7 +51,6 @@ typedef struct
#pragma GCC diagnostic ignored "-Wunused-function"
G_DEFINE_TYPE(MozGfxMemoryAllocator, moz_gfx_memory_allocator, GST_TYPE_ALLOCATOR);
G_DEFINE_TYPE(MozGfxBufferPool, moz_gfx_buffer_pool, GST_TYPE_VIDEO_BUFFER_POOL);
-#pragma GCC diagnostic pop
void
moz_gfx_memory_reset(MozGfxMemory *mem)
@@ -0,0 +1,32 @@
$NetBSD: patch-dom_media_moz.build,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- dom/media/moz.build.orig 2015-03-27 02:20:26.000000000 +0000
+++ dom/media/moz.build
@@ -276,6 +276,27 @@ if CONFIG['ANDROID_VERSION'] > '15':
CFLAGS += CONFIG['GSTREAMER_CFLAGS']
CXXFLAGS += CONFIG['GSTREAMER_CFLAGS']
+if CONFIG['MOZ_NATIVE_OGG']:
+ CXXFLAGS += CONFIG['MOZ_OGG_CFLAGS']
+
+if CONFIG['MOZ_NATIVE_THEORA']:
+ CXXFLAGS += CONFIG['MOZ_THEORA_CFLAGS']
+
+if CONFIG['MOZ_NATIVE_VORBIS']:
+ CXXFLAGS += CONFIG['MOZ_VORBIS_CFLAGS']
+
+if CONFIG['MOZ_NATIVE_TREMOR']:
+ CXXFLAGS += CONFIG['MOZ_TREMOR_CFLAGS']
+
+if CONFIG['MOZ_NATIVE_OPUS']:
+ CXXFLAGS += CONFIG['MOZ_OPUS_CFLAGS']
+
+if CONFIG['MOZ_NATIVE_SPEEX']:
+ CXXFLAGS += CONFIG['MOZ_SPEEX_CFLAGS']
+
+if CONFIG['MOZ_NATIVE_SOUNDTOUCH']:
+ CXXFLAGS += CONFIG['MOZ_SOUNDTOUCH_CFLAGS']
+
include('/ipc/chromium/chromium-config.mozbuild')
# Suppress some GCC warnings being treated as errors:
@@ -0,0 +1,31 @@
$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- dom/plugins/ipc/PluginModuleChild.cpp.orig 2015-03-27 02:20:27.000000000 +0000
+++ dom/plugins/ipc/PluginModuleChild.cpp
@@ -320,7 +320,7 @@ PluginModuleChild::InitForChrome(const s
// TODO: use PluginPRLibrary here
-#if defined(OS_LINUX) || defined(OS_BSD)
+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
mShutdownFunc =
(NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown");
@@ -1882,7 +1882,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin
AssertPluginThread();
MOZ_ASSERT(mIsChrome);
-#if defined(OS_LINUX) || defined(OS_BSD)
+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
return true;
#elif defined(OS_WIN) || defined(OS_MACOSX)
*_retval = mGetEntryPointsFunc(&mFunctions);
@@ -1927,7 +1927,7 @@ PluginModuleChild::DoNP_Initialize(const
#endif
NPError result;
-#if defined(OS_LINUX) || defined(OS_BSD)
+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
result = mInitializeFunc(&sBrowserFuncs, &mFunctions);
#elif defined(OS_WIN) || defined(OS_MACOSX)
result = mInitializeFunc(&sBrowserFuncs);
@@ -0,0 +1,13 @@
$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.h,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- dom/plugins/ipc/PluginModuleChild.h.orig 2013-05-11 19:19:27.000000000 +0000
+++ dom/plugins/ipc/PluginModuleChild.h
@@ -325,7 +325,7 @@ private:
// we get this from the plugin
NP_PLUGINSHUTDOWN mShutdownFunc;
-#if defined(OS_LINUX) || defined(OS_BSD)
+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
NP_PLUGINUNIXINIT mInitializeFunc;
#elif defined(OS_WIN) || defined(OS_MACOSX)
NP_PLUGININIT mInitializeFunc;
@@ -0,0 +1,16 @@
$NetBSD: patch-dom_plugins_ipc_PluginProcessChild.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
Just because OS_ARCH is Darwin does not mean
libplugin_child_interpose.dylib is used.
--- dom/plugins/ipc/PluginProcessChild.cpp.orig 2015-02-17 21:40:45.000000000 +0000
+++ dom/plugins/ipc/PluginProcessChild.cpp
@@ -56,7 +56,7 @@ PluginProcessChild::Init()
{
nsDebugImpl::SetMultiprocessMode("NPAPI");
-#if defined(XP_MACOSX)
+#if defined(MOZ_WIDGET_COCOA)
// Remove the trigger for "dyld interposing" that we added in
// GeckoChildProcessHost::PerformAsyncLaunchInternal(), in the host
// process just before we were launched. Dyld interposing will still
@@ -0,0 +1,64 @@
$NetBSD: patch-dom_system_OSFileConstants.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
* NetBSD 5 does not support posix_spawn(3)
* Replace XP_MACOSX with XP_DARWIN as the former is not defined when
the toolkit is not cocoa.
--- dom/system/OSFileConstants.cpp.orig 2014-07-17 01:45:12.000000000 +0000
+++ dom/system/OSFileConstants.cpp 2014-08-19 17:41:25.000000000 +0000
@@ -9,6 +9,10 @@
#include "prsystem.h"
+#if defined(__NetBSD__)
+#include <sys/param.h>
+#endif
+
#if defined(XP_UNIX)
#include "unistd.h"
#include "dirent.h"
@@ -18,7 +22,9 @@
#define statvfs statfs
#else
#include "sys/statvfs.h"
+#if !(defined(__NetBSD__) && (__NetBSD_Version__ < 600000000))
#include <spawn.h>
+#endif // !NetBSD 5.*
#endif // defined(ANDROID)
#endif // defined(XP_UNIX)
@@ -26,9 +32,9 @@
#include <linux/fadvise.h>
#endif // defined(XP_LINUX)
-#if defined(XP_MACOSX)
+#if defined(XP_DARWIN)
#include "copyfile.h"
-#endif // defined(XP_MACOSX)
+#endif // defined(XP_DARWIN)
#if defined(XP_WIN)
#include <windows.h>
@@ -564,10 +570,10 @@
// The size of |fsblkcnt_t|.
{ "OSFILE_SIZEOF_FSBLKCNT_T", INT_TO_JSVAL(sizeof (fsblkcnt_t)) },
-#if !defined(ANDROID)
+#if !defined(ANDROID) && !(defined(__NetBSD__) && (__NetBSD_Version__ < 600000000))
// The size of |posix_spawn_file_actions_t|.
{ "OSFILE_SIZEOF_POSIX_SPAWN_FILE_ACTIONS_T", INT_TO_JSVAL(sizeof (posix_spawn_file_actions_t)) },
-#endif // !defined(ANDROID)
+#endif // !defined(ANDROID) && NetBSD 5.*
// Defining |dirent|.
// Size
@@ -627,7 +633,7 @@
{ "OSFILE_SIZEOF_STATVFS", INT_TO_JSVAL(sizeof (struct statvfs)) },
- { "OSFILE_OFFSETOF_STATVFS_F_BSIZE", INT_TO_JSVAL(offsetof (struct statvfs, f_bsize)) },
+ { "OSFILE_OFFSETOF_STATVFS_F_FRSIZE", INT_TO_JSVAL(offsetof (struct statvfs, f_frsize)) },
{ "OSFILE_OFFSETOF_STATVFS_F_BAVAIL", INT_TO_JSVAL(offsetof (struct statvfs, f_bavail)) },
#endif // defined(XP_UNIX)
@@ -0,0 +1,21 @@
$NetBSD: patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
Load system hunspell dictionaries.
--- extensions/spellcheck/hunspell/src/mozHunspell.cpp.orig 2015-05-04 00:43:34.000000000 +0000
+++ extensions/spellcheck/hunspell/src/mozHunspell.cpp
@@ -400,6 +400,14 @@ mozHunspell::LoadDictionaryList(bool aNo
}
}
+ // load system hunspell dictionaries
+ nsCOMPtr<nsIFile> hunDir;
+ NS_NewNativeLocalFile(NS_LITERAL_CSTRING("@PREFIX@/share/hunspell"),
+ true, getter_AddRefs(hunDir));
+ if (hunDir) {
+ LoadDictionariesFromDir(hunDir);
+ }
+
// find dictionaries from extensions requiring restart
nsCOMPtr<nsISimpleEnumerator> dictDirs;
rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY_LIST,
@@ -0,0 +1,16 @@
$NetBSD: patch-gfx_graphite2_src_Bidi.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- gfx/graphite2/src/Bidi.cpp.orig 2013-05-11 19:19:30.000000000 +0000
+++ gfx/graphite2/src/Bidi.cpp
@@ -30,6 +30,11 @@ of the License or (at your option) any l
using namespace graphite2;
+#ifdef __sun
+#undef CS
+#undef ES
+#endif
+
enum DirCode { // Hungarian: dirc
Unk = -1,
N = 0, // other neutrals (default) - ON
@@ -0,0 +1,15 @@
$NetBSD: patch-gfx_graphite2_src_moz.build,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- gfx/graphite2/src/moz.build.orig 2016-01-31 20:42:26.674057599 +0000
+++ gfx/graphite2/src/moz.build
@@ -60,10 +60,6 @@ MSVC_ENABLE_PGO = True
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
NO_VISIBILITY_FLAGS = True
DEFINES['GRAPHITE2_EXPORTING'] = True
-else:
- # tell graphite2 not to export symbols, we'll be linking it directly with
- # thebes
- DEFINES['GRAPHITE2_STATIC'] = True
FINAL_LIBRARY = 'gkmedias'
@@ -0,0 +1,26 @@
$NetBSD: patch-gfx_moz.build,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- gfx/moz.build.orig 2014-03-15 05:19:16.000000000 +0000
+++ gfx/moz.build
@@ -7,6 +7,12 @@
if CONFIG['MOZ_TREE_CAIRO']:
DIRS += ['cairo']
+if not CONFIG['MOZ_NATIVE_GRAPHITE2']:
+ DIRS += ['graphite2/src' ]
+
+if not CONFIG['MOZ_NATIVE_HARFBUZZ']:
+ DIRS += ['harfbuzz/src']
+
DIRS += [
'2d',
'ycbcr',
@@ -15,8 +21,6 @@ DIRS += [
'qcms',
'gl',
'layers',
- 'graphite2/src',
- 'harfbuzz/src',
'ots/src',
'thebes',
'ipc',
@@ -0,0 +1,14 @@
$NetBSD: patch-gfx_skia_generate__mozbuild.py,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- gfx/skia/generate_mozbuild.py.orig 2014-11-21 03:37:30.000000000 +0000
+++ gfx/skia/generate_mozbuild.py
@@ -140,6 +140,9 @@ if CONFIG['GNU_CXX']:
if not CONFIG['CLANG_CXX']:
CXXFLAGS += ['-Wno-logical-op']
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk', 'qt'):
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
@@ -0,0 +1,14 @@
$NetBSD: patch-gfx_skia_moz.build,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- gfx/skia/moz.build.orig 2014-11-21 03:37:30.000000000 +0000
+++ gfx/skia/moz.build
@@ -968,6 +968,9 @@ if CONFIG['GNU_CXX']:
if not CONFIG['CLANG_CXX']:
CXXFLAGS += ['-Wno-logical-op']
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk', 'qt'):
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
@@ -0,0 +1,25 @@
$NetBSD: patch-gfx_thebes_moz.build,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- gfx/thebes/moz.build.orig 2015-12-14 23:35:58.000000000 +0000
+++ gfx/thebes/moz.build
@@ -287,6 +287,12 @@ CXXFLAGS += CONFIG['TK_CFLAGS']
CFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
CFLAGS += CONFIG['TK_CFLAGS']
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
+if CONFIG['MOZ_NATIVE_GRAPHITE2']:
+ CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS']
+
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gonk', 'qt'):
CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
@@ -298,7 +304,5 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'andr
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'qt'):
CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
-DEFINES['GRAPHITE2_STATIC'] = True
-
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
DEFINES['OTS_DLL'] = True
@@ -0,0 +1,13 @@
$NetBSD: patch-gfx_ycbcr_moz.build,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- gfx/ycbcr/moz.build.orig 2014-11-26 12:30:03.000000000 +0000
+++ gfx/ycbcr/moz.build
@@ -63,7 +63,7 @@ else:
if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['HAVE_ARM_NEON']:
SOURCES += [
- 'yuv_row_arm.s',
+ 'yuv_row_arm.S',
]
SOURCES += [
'yuv_convert_arm.cpp',
@@ -0,0 +1,317 @@
$NetBSD: patch-gfx_ycbcr_yuv__row__arm.S,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- gfx/ycbcr/yuv_row_arm.S.orig 2014-12-01 14:53:14.000000000 +0000
+++ gfx/ycbcr/yuv_row_arm.S
@@ -0,0 +1,312 @@
+/* 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/. */
+
+#if defined(__ARM_EABI__) && !defined(__ARM_DWARF_EH__)
+#define UNWIND
+#else
+#define UNWIND @
+#endif
+
+ .arch armv7-a
+ .fpu neon
+/* Allow to build on targets not supporting neon, and force the object file
+ * target to avoid bumping the final binary target */
+ .object_arch armv4t
+ .text
+ .align
+
+ .balign 64
+YCbCr42xToRGB565_DITHER03_CONSTS_NEON:
+ .short -14240
+ .short -14240+384
+ .short 8672
+ .short 8672+192
+ .short -17696
+ .short -17696+384
+ .byte 102
+ .byte 25
+ .byte 52
+ .byte 129
+YCbCr42xToRGB565_DITHER12_CONSTS_NEON:
+ .short -14240+128
+ .short -14240+256
+ .short 8672+64
+ .short 8672+128
+ .short -17696+128
+ .short -17696+256
+ .byte 102
+ .byte 25
+ .byte 52
+ .byte 129
+YCbCr42xToRGB565_DITHER21_CONSTS_NEON:
+ .short -14240+256
+ .short -14240+128
+ .short 8672+128
+ .short 8672+64
+ .short -17696+256
+ .short -17696+128
+ .byte 102
+ .byte 25
+ .byte 52
+ .byte 129
+YCbCr42xToRGB565_DITHER30_CONSTS_NEON:
+ .short -14240+384
+ .short -14240
+ .short 8672+192
+ .short 8672
+ .short -17696+384
+ .short -17696
+ .byte 102
+ .byte 25
+ .byte 52
+ .byte 129
+
+@ void ScaleYCbCr42xToRGB565_BilinearY_Row_NEON(
+@ yuv2rgb565_row_scale_bilinear_ctx *ctx, int dither);
+@
+@ ctx = {
+@ uint16_t *rgb_row; /*r0*/
+@ const uint8_t *y_row; /*r1*/
+@ const uint8_t *u_row; /*r2*/
+@ const uint8_t *v_row; /*r3*/
+@ int y_yweight; /*r4*/
+@ int y_pitch; /*r5*/
+@ int width; /*r6*/
+@ int source_x0_q16; /*r7*/
+@ int source_dx_q16; /*r8*/
+@ int source_uv_xoffs_q16; /*r9*/
+@ };
+ .global ScaleYCbCr42xToRGB565_BilinearY_Row_NEON
+ .type ScaleYCbCr42xToRGB565_BilinearY_Row_NEON, %function
+ .balign 64
+ .cfi_startproc
+ UNWIND .fnstart
+ScaleYCbCr42xToRGB565_BilinearY_Row_NEON:
+ STMFD r13!,{r4-r9,r14} @ 8 words.
+ ADR r14,YCbCr42xToRGB565_DITHER03_CONSTS_NEON
+ VPUSH {Q4-Q7} @ 16 words.
+ ADD r14,r14,r1, LSL #4 @ Select the dither table to use
+ LDMIA r0, {r0-r9}
+ @ Set up image index registers.
+ ADD r12,r8, r8
+ VMOV.I32 D16,#0 @ Q8 = < 2| 2| 0| 0>*source_dx_q16
+ VDUP.32 D17,r12
+ ADD r12,r12,r12
+ VTRN.32 D16,D17 @ Q2 = < 2| 0| 2| 0>*source_dx_q16
+ VDUP.32 D19,r12 @ Q9 = < 4| 4| ?| ?>*source_dx_q16
+ ADD r12,r12,r12
+ VDUP.32 Q0, r7 @ Q0 = < 1| 1| 1| 1>*source_x0_q16
+ VADD.I32 D17,D17,D19 @ Q8 = < 6| 4| 2| 0>*source_dx_q16
+ CMP r8, #0 @ If source_dx_q16 is negative...
+ VDUP.32 Q9, r12 @ Q9 = < 8| 8| 8| 8>*source_dx_q16
+ ADDLT r7, r7, r8, LSL #4 @ Make r7 point to the end of the block
+ VADD.I32 Q0, Q0, Q8 @ Q0 = < 6| 4| 2| 0>*source_dx_q16+source_x0_q16
+ SUBLT r7, r7, r8 @ (i.e., the lowest address we'll use)
+ VADD.I32 Q1, Q0, Q9 @ Q1 = <14|12|10| 8>*source_dx_q16+source_x0_q16
+ VDUP.I32 Q9, r8 @ Q8 = < 1| 1| 1| 1>*source_dx_q16
+ VADD.I32 Q2, Q0, Q9 @ Q2 = < 7| 5| 3| 1>*source_dx_q16+source_x0_q16
+ VADD.I32 Q3, Q1, Q9 @ Q3 = <15|13|11| 9>*source_dx_q16+source_x0_q16
+ VLD1.64 {D30,D31},[r14,:128] @ Load some constants
+ VMOV.I8 D28,#52
+ VMOV.I8 D29,#129
+ @ The basic idea here is to do aligned loads of a block of data and then
+ @ index into it using VTBL to extract the data from the source X
+ @ coordinate corresponding to each destination pixel.
+ @ This is significantly less code and significantly fewer cycles than doing
+ @ a series of single-lane loads, but it means that the X step between
+ @ pixels must be limited to 2.0 or less, otherwise we couldn't guarantee
+ @ that we could read 8 pixels from a single aligned 32-byte block of data.
+ @ Q0...Q3 contain the 16.16 fixed-point X coordinates of each pixel,
+ @ separated into even pixels and odd pixels to make extracting offsets and
+ @ weights easier.
+ @ We then pull out two bytes from the middle of each coordinate: the top
+ @ byte corresponds to the integer part of the X coordinate, and the bottom
+ @ byte corresponds to the weight to use for bilinear blending.
+ @ These are separated out into different registers with VTRN.
+ @ Then by subtracting the integer X coordinate of the first pixel in the
+ @ data block we loaded, we produce an index register suitable for use by
+ @ VTBL.
+s42xbily_neon_loop:
+ @ Load the Y' data.
+ MOV r12,r7, ASR #16
+ VRSHRN.S32 D16,Q0, #8
+ AND r12,r12,#~15 @ Read 16-byte aligned blocks
+ VDUP.I8 D20,r12
+ ADD r12,r1, r12 @ r12 = y_row+(source_x&~7)
+ VRSHRN.S32 D17,Q1, #8
+ PLD [r12,#64]
+ VLD1.64 {D8, D9, D10,D11},[r12,:128],r5 @ Load Y' top row
+ ADD r14,r7, r8, LSL #3
+ VRSHRN.S32 D18,Q2, #8
+ MOV r14,r14,ASR #16
+ VRSHRN.S32 D19,Q3, #8
+ AND r14,r14,#~15 @ Read 16-byte aligned blocks
+ VLD1.64 {D12,D13,D14,D15},[r12,:128] @ Load Y' bottom row
+ PLD [r12,#64]
+ VDUP.I8 D21,r14
+ ADD r14,r1, r14 @ r14 = y_row+(source_x&~7)
+ VMOV.I8 Q13,#1
+ PLD [r14,#64]
+ VTRN.8 Q8, Q9 @ Q8 = <wFwEwDwCwBwAw9w8w7w6w5w4w3w2w1w0>
+ @ Q9 = <xFxExDxCxBxAx9x8x7x6x5x4x3x2x1x0>
+ VSUB.S8 Q9, Q9, Q10 @ Make offsets relative to the data we loaded.
+ @ First 8 Y' pixels
+ VTBL.8 D20,{D8, D9, D10,D11},D18 @ Index top row at source_x
+ VTBL.8 D24,{D12,D13,D14,D15},D18 @ Index bottom row at source_x
+ VADD.S8 Q13,Q9, Q13 @ Add 1 to source_x
+ VTBL.8 D22,{D8, D9, D10,D11},D26 @ Index top row at source_x+1
+ VTBL.8 D26,{D12,D13,D14,D15},D26 @ Index bottom row at source_x+1
+ @ Next 8 Y' pixels
+ VLD1.64 {D8, D9, D10,D11},[r14,:128],r5 @ Load Y' top row
+ VLD1.64 {D12,D13,D14,D15},[r14,:128] @ Load Y' bottom row
+ PLD [r14,#64]
+ VTBL.8 D21,{D8, D9, D10,D11},D19 @ Index top row at source_x
+ VTBL.8 D25,{D12,D13,D14,D15},D19 @ Index bottom row at source_x
+ VTBL.8 D23,{D8, D9, D10,D11},D27 @ Index top row at source_x+1
+ VTBL.8 D27,{D12,D13,D14,D15},D27 @ Index bottom row at source_x+1
+ @ Blend Y'.
+ VDUP.I16 Q9, r4 @ Load the y weights.
+ VSUBL.U8 Q4, D24,D20 @ Q5:Q4 = c-a
+ VSUBL.U8 Q5, D25,D21
+ VSUBL.U8 Q6, D26,D22 @ Q7:Q6 = d-b
+ VSUBL.U8 Q7, D27,D23
+ VMUL.S16 Q4, Q4, Q9 @ Q5:Q4 = (c-a)*yweight
+ VMUL.S16 Q5, Q5, Q9
+ VMUL.S16 Q6, Q6, Q9 @ Q7:Q6 = (d-b)*yweight
+ VMUL.S16 Q7, Q7, Q9
+ VMOVL.U8 Q12,D16 @ Promote the x weights to 16 bits.
+ VMOVL.U8 Q13,D17 @ Sadly, there's no VMULW.
+ VRSHRN.S16 D8, Q4, #8 @ Q4 = (c-a)*yweight+128>>8
+ VRSHRN.S16 D9, Q5, #8
+ VRSHRN.S16 D12,Q6, #8 @ Q6 = (d-b)*yweight+128>>8
+ VRSHRN.S16 D13,Q7, #8
+ VADD.I8 Q10,Q10,Q4 @ Q10 = a+((c-a)*yweight+128>>8)
+ VADD.I8 Q11,Q11,Q6 @ Q11 = b+((d-b)*yweight+128>>8)
+ VSUBL.U8 Q4, D22,D20 @ Q5:Q4 = b-a
+ VSUBL.U8 Q5, D23,D21
+ VMUL.S16 Q4, Q4, Q12 @ Q5:Q4 = (b-a)*xweight
+ VMUL.S16 Q5, Q5, Q13
+ VRSHRN.S16 D8, Q4, #8 @ Q4 = (b-a)*xweight+128>>8
+ ADD r12,r7, r9
+ VRSHRN.S16 D9, Q5, #8
+ MOV r12,r12,ASR #17
+ VADD.I8 Q8, Q10,Q4 @ Q8 = a+((b-a)*xweight+128>>8)
+ @ Start extracting the chroma x coordinates, and load Cb and Cr.
+ AND r12,r12,#~15 @ Read 16-byte aligned blocks
+ VDUP.I32 Q9, r9 @ Q9 = source_uv_xoffs_q16 x 4
+ ADD r14,r2, r12
+ VADD.I32 Q10,Q0, Q9
+ VLD1.64 {D8, D9, D10,D11},[r14,:128] @ Load Cb
+ PLD [r14,#64]
+ VADD.I32 Q11,Q1, Q9
+ ADD r14,r3, r12
+ VADD.I32 Q12,Q2, Q9
+ VLD1.64 {D12,D13,D14,D15},[r14,:128] @ Load Cr
+ PLD [r14,#64]
+ VADD.I32 Q13,Q3, Q9
+ VRSHRN.S32 D20,Q10,#9 @ Q10 = <xEwExCwCxAwAx8w8x6w6x4w4x2w2x0w0>
+ VRSHRN.S32 D21,Q11,#9
+ VDUP.I8 Q9, r12
+ VRSHRN.S32 D22,Q12,#9 @ Q11 = <xFwFxDwDxBwBx9w9x7w7x5w5x3w3x1w1>
+ VRSHRN.S32 D23,Q13,#9
+ @ We don't actually need the x weights, but we get them for free.
+ @ Free ALU slot
+ VTRN.8 Q10,Q11 @ Q10 = <wFwEwDwCwBwAw9w8w7w6w5w4w3w2w1w0>
+ @ Free ALU slot @ Q11 = <xFxExDxCxBxAx9x8x7x6x5x4x3x2x1x0>
+ VSUB.S8 Q11,Q11,Q9 @ Make offsets relative to the data we loaded.
+ VTBL.8 D18,{D8, D9, D10,D11},D22 @ Index Cb at source_x
+ VMOV.I8 D24,#74
+ VTBL.8 D19,{D8, D9, D10,D11},D23
+ VMOV.I8 D26,#102
+ VTBL.8 D20,{D12,D13,D14,D15},D22 @ Index Cr at source_x
+ VMOV.I8 D27,#25
+ VTBL.8 D21,{D12,D13,D14,D15},D23
+ @ We now have Y' in Q8, Cb in Q9, and Cr in Q10
+ @ We use VDUP to expand constants, because it's a permute instruction, so
+ @ it can dual issue on the A8.
+ SUBS r6, r6, #16 @ width -= 16
+ VMULL.U8 Q4, D16,D24 @ Q5:Q4 = Y'*74
+ VDUP.32 Q6, D30[1] @ Q7:Q6 = bias_G
+ VMULL.U8 Q5, D17,D24
+ VDUP.32 Q7, D30[1]
+ VMLSL.U8 Q6, D18,D27 @ Q7:Q6 = -25*Cb+bias_G
+ VDUP.32 Q11,D30[0] @ Q12:Q11 = bias_R
+ VMLSL.U8 Q7, D19,D27
+ VDUP.32 Q12,D30[0]
+ VMLAL.U8 Q11,D20,D26 @ Q12:Q11 = 102*Cr+bias_R
+ VDUP.32 Q8, D31[0] @ Q13:Q8 = bias_B
+ VMLAL.U8 Q12,D21,D26
+ VDUP.32 Q13,D31[0]
+ VMLAL.U8 Q8, D18,D29 @ Q13:Q8 = 129*Cb+bias_B
+ VMLAL.U8 Q13,D19,D29
+ VMLSL.U8 Q6, D20,D28 @ Q7:Q6 = -25*Cb-52*Cr+bias_G
+ VMLSL.U8 Q7, D21,D28
+ VADD.S16 Q11,Q4, Q11 @ Q12:Q11 = 74*Y'+102*Cr+bias_R
+ VADD.S16 Q12,Q5, Q12
+ VQADD.S16 Q8, Q4, Q8 @ Q13:Q8 = 74*Y'+129*Cr+bias_B
+ VQADD.S16 Q13,Q5, Q13
+ VADD.S16 Q6, Q4, Q6 @ Q7:Q6 = 74*Y'-25*Cb-52*Cr+bias_G
+ VADD.S16 Q7, Q5, Q7
+ @ Push each value to the top of its word and saturate it.
+ VQSHLU.S16 Q11,Q11,#2
+ VQSHLU.S16 Q12,Q12,#2
+ VQSHLU.S16 Q6, Q6, #2
+ VQSHLU.S16 Q7, Q7, #2
+ VQSHLU.S16 Q8, Q8, #2
+ VQSHLU.S16 Q13,Q13,#2
+ @ Merge G and B into R.
+ VSRI.U16 Q11,Q6, #5
+ VSRI.U16 Q12,Q7, #5
+ VSRI.U16 Q11,Q8, #11
+ MOV r14,r8, LSL #4
+ VSRI.U16 Q12,Q13,#11
+ BLT s42xbily_neon_tail
+ VDUP.I32 Q13,r14
+ @ Store the result.
+ VST1.16 {D22,D23,D24,D25},[r0]!
+ BEQ s42xbily_neon_done
+ @ Advance the x coordinates.
+ VADD.I32 Q0, Q0, Q13
+ VADD.I32 Q1, Q1, Q13
+ ADD r7, r14
+ VADD.I32 Q2, Q2, Q13
+ VADD.I32 Q3, Q3, Q13
+ B s42xbily_neon_loop
+s42xbily_neon_tail:
+ @ We have between 1 and 15 pixels left to write.
+ @ -r6 == the number of pixels we need to skip writing.
+ @ Adjust r0 to point to the last one we need to write, because we're going
+ @ to write them in reverse order.
+ ADD r0, r0, r6, LSL #1
+ MOV r14,#-2
+ ADD r0, r0, #30
+ @ Skip past the ones we don't need to write.
+ SUB PC, PC, r6, LSL #2
+ ORR r0, r0, r0
+ VST1.16 {D25[3]},[r0,:16],r14
+ VST1.16 {D25[2]},[r0,:16],r14
+ VST1.16 {D25[1]},[r0,:16],r14
+ VST1.16 {D25[0]},[r0,:16],r14
+ VST1.16 {D24[3]},[r0,:16],r14
+ VST1.16 {D24[2]},[r0,:16],r14
+ VST1.16 {D24[1]},[r0,:16],r14
+ VST1.16 {D24[0]},[r0,:16],r14
+ VST1.16 {D23[3]},[r0,:16],r14
+ VST1.16 {D23[2]},[r0,:16],r14
+ VST1.16 {D23[1]},[r0,:16],r14
+ VST1.16 {D23[0]},[r0,:16],r14
+ VST1.16 {D22[3]},[r0,:16],r14
+ VST1.16 {D22[2]},[r0,:16],r14
+ VST1.16 {D22[1]},[r0,:16],r14
+ VST1.16 {D22[0]},[r0,:16]
+s42xbily_neon_done:
+ VPOP {Q4-Q7} @ 16 words.
+ LDMFD r13!,{r4-r9,PC} @ 8 words.
+ UNWIND .fnend
+ .cfi_endproc
+ .size ScaleYCbCr42xToRGB565_BilinearY_Row_NEON, .-ScaleYCbCr42xToRGB565_BilinearY_Row_NEON
+
+#if defined(__ELF__)&&(defined(__linux__) || defined(__NetBSD__))
+ .section .note.GNU-stack,"",%progbits
+#endif
@@ -0,0 +1,363 @@
$NetBSD: patch-image_decoders_nsJPEGDecoder.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- image/decoders/nsJPEGDecoder.cpp.orig 2015-05-04 00:43:19.000000000 +0000
+++ image/decoders/nsJPEGDecoder.cpp
@@ -23,13 +23,28 @@
extern "C" {
#include "iccjpeg.h"
-}
+#ifdef JCS_EXTENSIONS
#if MOZ_BIG_ENDIAN
#define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_XRGB
#else
#define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_BGRX
#endif
+#else
+/* Colorspace conversion (copied from jpegint.h) */
+struct jpeg_color_deconverter {
+ JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
+ JMETHOD(void, color_convert, (j_decompress_ptr cinfo,
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows));
+};
+
+METHODDEF(void)
+ycc_rgb_convert_argb (j_decompress_ptr cinfo,
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
+#endif
+}
static void cmyk_convert_rgb(JSAMPROW row, JDIMENSION width);
@@ -373,6 +388,7 @@ nsJPEGDecoder::WriteInternal(const char*
case JCS_GRAYSCALE:
case JCS_RGB:
case JCS_YCbCr:
+#ifdef JCS_EXTENSIONS
// if we're not color managing we can decode directly to
// MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB
if (mCMSMode != eCMSMode_All) {
@@ -381,6 +397,9 @@ nsJPEGDecoder::WriteInternal(const char*
} else {
mInfo.out_color_space = JCS_RGB;
}
+#else
+ mInfo.out_color_space = JCS_RGB;
+#endif
break;
case JCS_CMYK:
case JCS_YCCK:
@@ -450,6 +469,15 @@ nsJPEGDecoder::WriteInternal(const char*
return; // I/O suspension
}
+#ifndef JCS_EXTENSIONS
+ /* Force to use our YCbCr to Packed RGB converter when possible */
+ if (!mTransform && (mCMSMode != eCMSMode_All) &&
+ mInfo.jpeg_color_space == JCS_YCbCr && mInfo.out_color_space == JCS_RGB) {
+ /* Special case for the most common case: transform from YCbCr direct into packed ARGB */
+ mInfo.out_color_components = 4; /* Packed ARGB pixels are always 4 bytes...*/
+ mInfo.cconvert->color_convert = ycc_rgb_convert_argb;
+ }
+#endif
// If this is a progressive JPEG ...
mState = mInfo.buffered_image ?
@@ -632,7 +660,11 @@ nsJPEGDecoder::OutputScanlines(bool* sus
MOZ_ASSERT(imageRow, "Should have a row buffer here");
+#ifdef JCS_EXTENSIONS
if (mInfo.out_color_space == MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB) {
+#else
+ if (mInfo.cconvert->color_convert == ycc_rgb_convert_argb) {
+#endif
// Special case: scanline will be directly converted into packed ARGB
if (jpeg_read_scanlines(&mInfo, (JSAMPARRAY)&imageRow, 1) != 1) {
*suspend = true; // suspend
@@ -959,6 +991,282 @@ term_source (j_decompress_ptr jd)
} // namespace mozilla
+#ifndef JCS_EXTENSIONS
+/**************** YCbCr -> Cairo's RGB24/ARGB32 conversion: most common case **************/
+
+/*
+ * YCbCr is defined per CCIR 601-1, except that Cb and Cr are
+ * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5.
+ * The conversion equations to be implemented are therefore
+ * R = Y + 1.40200 * Cr
+ * G = Y - 0.34414 * Cb - 0.71414 * Cr
+ * B = Y + 1.77200 * Cb
+ * where Cb and Cr represent the incoming values less CENTERJSAMPLE.
+ * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.)
+ *
+ * To avoid floating-point arithmetic, we represent the fractional constants
+ * as integers scaled up by 2^16 (about 4 digits precision); we have to divide
+ * the products by 2^16, with appropriate rounding, to get the correct answer.
+ * Notice that Y, being an integral input, does not contribute any fraction
+ * so it need not participate in the rounding.
+ *
+ * For even more speed, we avoid doing any multiplications in the inner loop
+ * by precalculating the constants times Cb and Cr for all possible values.
+ * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table);
+ * for 12-bit samples it is still acceptable. It's not very reasonable for
+ * 16-bit samples, but if you want lossless storage you shouldn't be changing
+ * colorspace anyway.
+ * The Cr=>R and Cb=>B values can be rounded to integers in advance; the
+ * values for the G calculation are left scaled up, since we must add them
+ * together before rounding.
+ */
+
+#define SCALEBITS 16 /* speediest right-shift on some machines */
+
+/* Use static tables for color processing. */
+/* Four tables, each 256 entries of 4 bytes totals 4K which is not bad... */
+
+const int Cr_r_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
+ -0xb3, -0xb2, -0xb1, -0xaf, -0xae, -0xac,
+ -0xab, -0xaa, -0xa8, -0xa7, -0xa5, -0xa4,
+ -0xa3, -0xa1, -0xa0, -0x9e, -0x9d, -0x9c,
+ -0x9a, -0x99, -0x97, -0x96, -0x95, -0x93,
+ -0x92, -0x90, -0x8f, -0x8e, -0x8c, -0x8b,
+ -0x89, -0x88, -0x87, -0x85, -0x84, -0x82,
+ -0x81, -0x80, -0x7e, -0x7d, -0x7b, -0x7a,
+ -0x79, -0x77, -0x76, -0x74, -0x73, -0x72,
+ -0x70, -0x6f, -0x6d, -0x6c, -0x6b, -0x69,
+ -0x68, -0x66, -0x65, -0x64, -0x62, -0x61,
+ -0x5f, -0x5e, -0x5d, -0x5b, -0x5a, -0x58,
+ -0x57, -0x56, -0x54, -0x53, -0x51, -0x50,
+ -0x4f, -0x4d, -0x4c, -0x4a, -0x49, -0x48,
+ -0x46, -0x45, -0x43, -0x42, -0x40, -0x3f,
+ -0x3e, -0x3c, -0x3b, -0x39, -0x38, -0x37,
+ -0x35, -0x34, -0x32, -0x31, -0x30, -0x2e,
+ -0x2d, -0x2b, -0x2a, -0x29, -0x27, -0x26,
+ -0x24, -0x23, -0x22, -0x20, -0x1f, -0x1d,
+ -0x1c, -0x1b, -0x19, -0x18, -0x16, -0x15,
+ -0x14, -0x12, -0x11, -0x0f, -0x0e, -0x0d,
+ -0x0b, -0x0a, -0x08, -0x07, -0x06, -0x04,
+ -0x03, -0x01, 0x00, 0x01, 0x03, 0x04,
+ 0x06, 0x07, 0x08, 0x0a, 0x0b, 0x0d,
+ 0x0e, 0x0f, 0x11, 0x12, 0x14, 0x15,
+ 0x16, 0x18, 0x19, 0x1b, 0x1c, 0x1d,
+ 0x1f, 0x20, 0x22, 0x23, 0x24, 0x26,
+ 0x27, 0x29, 0x2a, 0x2b, 0x2d, 0x2e,
+ 0x30, 0x31, 0x32, 0x34, 0x35, 0x37,
+ 0x38, 0x39, 0x3b, 0x3c, 0x3e, 0x3f,
+ 0x40, 0x42, 0x43, 0x45, 0x46, 0x48,
+ 0x49, 0x4a, 0x4c, 0x4d, 0x4f, 0x50,
+ 0x51, 0x53, 0x54, 0x56, 0x57, 0x58,
+ 0x5a, 0x5b, 0x5d, 0x5e, 0x5f, 0x61,
+ 0x62, 0x64, 0x65, 0x66, 0x68, 0x69,
+ 0x6b, 0x6c, 0x6d, 0x6f, 0x70, 0x72,
+ 0x73, 0x74, 0x76, 0x77, 0x79, 0x7a,
+ 0x7b, 0x7d, 0x7e, 0x80, 0x81, 0x82,
+ 0x84, 0x85, 0x87, 0x88, 0x89, 0x8b,
+ 0x8c, 0x8e, 0x8f, 0x90, 0x92, 0x93,
+ 0x95, 0x96, 0x97, 0x99, 0x9a, 0x9c,
+ 0x9d, 0x9e, 0xa0, 0xa1, 0xa3, 0xa4,
+ 0xa5, 0xa7, 0xa8, 0xaa, 0xab, 0xac,
+ 0xae, 0xaf, 0xb1, 0xb2,
+ };
+
+const int Cb_b_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
+ -0xe3, -0xe1, -0xdf, -0xde, -0xdc, -0xda,
+ -0xd8, -0xd6, -0xd5, -0xd3, -0xd1, -0xcf,
+ -0xce, -0xcc, -0xca, -0xc8, -0xc6, -0xc5,
+ -0xc3, -0xc1, -0xbf, -0xbe, -0xbc, -0xba,
+ -0xb8, -0xb7, -0xb5, -0xb3, -0xb1, -0xaf,
+ -0xae, -0xac, -0xaa, -0xa8, -0xa7, -0xa5,
+ -0xa3, -0xa1, -0x9f, -0x9e, -0x9c, -0x9a,
+ -0x98, -0x97, -0x95, -0x93, -0x91, -0x90,
+ -0x8e, -0x8c, -0x8a, -0x88, -0x87, -0x85,
+ -0x83, -0x81, -0x80, -0x7e, -0x7c, -0x7a,
+ -0x78, -0x77, -0x75, -0x73, -0x71, -0x70,
+ -0x6e, -0x6c, -0x6a, -0x69, -0x67, -0x65,
+ -0x63, -0x61, -0x60, -0x5e, -0x5c, -0x5a,
+ -0x59, -0x57, -0x55, -0x53, -0x52, -0x50,
+ -0x4e, -0x4c, -0x4a, -0x49, -0x47, -0x45,
+ -0x43, -0x42, -0x40, -0x3e, -0x3c, -0x3a,
+ -0x39, -0x37, -0x35, -0x33, -0x32, -0x30,
+ -0x2e, -0x2c, -0x2b, -0x29, -0x27, -0x25,
+ -0x23, -0x22, -0x20, -0x1e, -0x1c, -0x1b,
+ -0x19, -0x17, -0x15, -0x13, -0x12, -0x10,
+ -0x0e, -0x0c, -0x0b, -0x09, -0x07, -0x05,
+ -0x04, -0x02, 0x00, 0x02, 0x04, 0x05,
+ 0x07, 0x09, 0x0b, 0x0c, 0x0e, 0x10,
+ 0x12, 0x13, 0x15, 0x17, 0x19, 0x1b,
+ 0x1c, 0x1e, 0x20, 0x22, 0x23, 0x25,
+ 0x27, 0x29, 0x2b, 0x2c, 0x2e, 0x30,
+ 0x32, 0x33, 0x35, 0x37, 0x39, 0x3a,
+ 0x3c, 0x3e, 0x40, 0x42, 0x43, 0x45,
+ 0x47, 0x49, 0x4a, 0x4c, 0x4e, 0x50,
+ 0x52, 0x53, 0x55, 0x57, 0x59, 0x5a,
+ 0x5c, 0x5e, 0x60, 0x61, 0x63, 0x65,
+ 0x67, 0x69, 0x6a, 0x6c, 0x6e, 0x70,
+ 0x71, 0x73, 0x75, 0x77, 0x78, 0x7a,
+ 0x7c, 0x7e, 0x80, 0x81, 0x83, 0x85,
+ 0x87, 0x88, 0x8a, 0x8c, 0x8e, 0x90,
+ 0x91, 0x93, 0x95, 0x97, 0x98, 0x9a,
+ 0x9c, 0x9e, 0x9f, 0xa1, 0xa3, 0xa5,
+ 0xa7, 0xa8, 0xaa, 0xac, 0xae, 0xaf,
+ 0xb1, 0xb3, 0xb5, 0xb7, 0xb8, 0xba,
+ 0xbc, 0xbe, 0xbf, 0xc1, 0xc3, 0xc5,
+ 0xc6, 0xc8, 0xca, 0xcc, 0xce, 0xcf,
+ 0xd1, 0xd3, 0xd5, 0xd6, 0xd8, 0xda,
+ 0xdc, 0xde, 0xdf, 0xe1,
+ };
+
+const int Cr_g_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
+ 0x5b6900, 0x5ab22e, 0x59fb5c, 0x59448a, 0x588db8, 0x57d6e6,
+ 0x572014, 0x566942, 0x55b270, 0x54fb9e, 0x5444cc, 0x538dfa,
+ 0x52d728, 0x522056, 0x516984, 0x50b2b2, 0x4ffbe0, 0x4f450e,
+ 0x4e8e3c, 0x4dd76a, 0x4d2098, 0x4c69c6, 0x4bb2f4, 0x4afc22,
+ 0x4a4550, 0x498e7e, 0x48d7ac, 0x4820da, 0x476a08, 0x46b336,
+ 0x45fc64, 0x454592, 0x448ec0, 0x43d7ee, 0x43211c, 0x426a4a,
+ 0x41b378, 0x40fca6, 0x4045d4, 0x3f8f02, 0x3ed830, 0x3e215e,
+ 0x3d6a8c, 0x3cb3ba, 0x3bfce8, 0x3b4616, 0x3a8f44, 0x39d872,
+ 0x3921a0, 0x386ace, 0x37b3fc, 0x36fd2a, 0x364658, 0x358f86,
+ 0x34d8b4, 0x3421e2, 0x336b10, 0x32b43e, 0x31fd6c, 0x31469a,
+ 0x308fc8, 0x2fd8f6, 0x2f2224, 0x2e6b52, 0x2db480, 0x2cfdae,
+ 0x2c46dc, 0x2b900a, 0x2ad938, 0x2a2266, 0x296b94, 0x28b4c2,
+ 0x27fdf0, 0x27471e, 0x26904c, 0x25d97a, 0x2522a8, 0x246bd6,
+ 0x23b504, 0x22fe32, 0x224760, 0x21908e, 0x20d9bc, 0x2022ea,
+ 0x1f6c18, 0x1eb546, 0x1dfe74, 0x1d47a2, 0x1c90d0, 0x1bd9fe,
+ 0x1b232c, 0x1a6c5a, 0x19b588, 0x18feb6, 0x1847e4, 0x179112,
+ 0x16da40, 0x16236e, 0x156c9c, 0x14b5ca, 0x13fef8, 0x134826,
+ 0x129154, 0x11da82, 0x1123b0, 0x106cde, 0x0fb60c, 0x0eff3a,
+ 0x0e4868, 0x0d9196, 0x0cdac4, 0x0c23f2, 0x0b6d20, 0x0ab64e,
+ 0x09ff7c, 0x0948aa, 0x0891d8, 0x07db06, 0x072434, 0x066d62,
+ 0x05b690, 0x04ffbe, 0x0448ec, 0x03921a, 0x02db48, 0x022476,
+ 0x016da4, 0x00b6d2, 0x000000, -0x00b6d2, -0x016da4, -0x022476,
+ -0x02db48, -0x03921a, -0x0448ec, -0x04ffbe, -0x05b690, -0x066d62,
+ -0x072434, -0x07db06, -0x0891d8, -0x0948aa, -0x09ff7c, -0x0ab64e,
+ -0x0b6d20, -0x0c23f2, -0x0cdac4, -0x0d9196, -0x0e4868, -0x0eff3a,
+ -0x0fb60c, -0x106cde, -0x1123b0, -0x11da82, -0x129154, -0x134826,
+ -0x13fef8, -0x14b5ca, -0x156c9c, -0x16236e, -0x16da40, -0x179112,
+ -0x1847e4, -0x18feb6, -0x19b588, -0x1a6c5a, -0x1b232c, -0x1bd9fe,
+ -0x1c90d0, -0x1d47a2, -0x1dfe74, -0x1eb546, -0x1f6c18, -0x2022ea,
+ -0x20d9bc, -0x21908e, -0x224760, -0x22fe32, -0x23b504, -0x246bd6,
+ -0x2522a8, -0x25d97a, -0x26904c, -0x27471e, -0x27fdf0, -0x28b4c2,
+ -0x296b94, -0x2a2266, -0x2ad938, -0x2b900a, -0x2c46dc, -0x2cfdae,
+ -0x2db480, -0x2e6b52, -0x2f2224, -0x2fd8f6, -0x308fc8, -0x31469a,
+ -0x31fd6c, -0x32b43e, -0x336b10, -0x3421e2, -0x34d8b4, -0x358f86,
+ -0x364658, -0x36fd2a, -0x37b3fc, -0x386ace, -0x3921a0, -0x39d872,
+ -0x3a8f44, -0x3b4616, -0x3bfce8, -0x3cb3ba, -0x3d6a8c, -0x3e215e,
+ -0x3ed830, -0x3f8f02, -0x4045d4, -0x40fca6, -0x41b378, -0x426a4a,
+ -0x43211c, -0x43d7ee, -0x448ec0, -0x454592, -0x45fc64, -0x46b336,
+ -0x476a08, -0x4820da, -0x48d7ac, -0x498e7e, -0x4a4550, -0x4afc22,
+ -0x4bb2f4, -0x4c69c6, -0x4d2098, -0x4dd76a, -0x4e8e3c, -0x4f450e,
+ -0x4ffbe0, -0x50b2b2, -0x516984, -0x522056, -0x52d728, -0x538dfa,
+ -0x5444cc, -0x54fb9e, -0x55b270, -0x566942, -0x572014, -0x57d6e6,
+ -0x588db8, -0x59448a, -0x59fb5c, -0x5ab22e,
+ };
+
+const int Cb_g_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
+ 0x2c8d00, 0x2c34e6, 0x2bdccc, 0x2b84b2, 0x2b2c98, 0x2ad47e,
+ 0x2a7c64, 0x2a244a, 0x29cc30, 0x297416, 0x291bfc, 0x28c3e2,
+ 0x286bc8, 0x2813ae, 0x27bb94, 0x27637a, 0x270b60, 0x26b346,
+ 0x265b2c, 0x260312, 0x25aaf8, 0x2552de, 0x24fac4, 0x24a2aa,
+ 0x244a90, 0x23f276, 0x239a5c, 0x234242, 0x22ea28, 0x22920e,
+ 0x2239f4, 0x21e1da, 0x2189c0, 0x2131a6, 0x20d98c, 0x208172,
+ 0x202958, 0x1fd13e, 0x1f7924, 0x1f210a, 0x1ec8f0, 0x1e70d6,
+ 0x1e18bc, 0x1dc0a2, 0x1d6888, 0x1d106e, 0x1cb854, 0x1c603a,
+ 0x1c0820, 0x1bb006, 0x1b57ec, 0x1affd2, 0x1aa7b8, 0x1a4f9e,
+ 0x19f784, 0x199f6a, 0x194750, 0x18ef36, 0x18971c, 0x183f02,
+ 0x17e6e8, 0x178ece, 0x1736b4, 0x16de9a, 0x168680, 0x162e66,
+ 0x15d64c, 0x157e32, 0x152618, 0x14cdfe, 0x1475e4, 0x141dca,
+ 0x13c5b0, 0x136d96, 0x13157c, 0x12bd62, 0x126548, 0x120d2e,
+ 0x11b514, 0x115cfa, 0x1104e0, 0x10acc6, 0x1054ac, 0x0ffc92,
+ 0x0fa478, 0x0f4c5e, 0x0ef444, 0x0e9c2a, 0x0e4410, 0x0debf6,
+ 0x0d93dc, 0x0d3bc2, 0x0ce3a8, 0x0c8b8e, 0x0c3374, 0x0bdb5a,
+ 0x0b8340, 0x0b2b26, 0x0ad30c, 0x0a7af2, 0x0a22d8, 0x09cabe,
+ 0x0972a4, 0x091a8a, 0x08c270, 0x086a56, 0x08123c, 0x07ba22,
+ 0x076208, 0x0709ee, 0x06b1d4, 0x0659ba, 0x0601a0, 0x05a986,
+ 0x05516c, 0x04f952, 0x04a138, 0x04491e, 0x03f104, 0x0398ea,
+ 0x0340d0, 0x02e8b6, 0x02909c, 0x023882, 0x01e068, 0x01884e,
+ 0x013034, 0x00d81a, 0x008000, 0x0027e6, -0x003034, -0x00884e,
+ -0x00e068, -0x013882, -0x01909c, -0x01e8b6, -0x0240d0, -0x0298ea,
+ -0x02f104, -0x03491e, -0x03a138, -0x03f952, -0x04516c, -0x04a986,
+ -0x0501a0, -0x0559ba, -0x05b1d4, -0x0609ee, -0x066208, -0x06ba22,
+ -0x07123c, -0x076a56, -0x07c270, -0x081a8a, -0x0872a4, -0x08cabe,
+ -0x0922d8, -0x097af2, -0x09d30c, -0x0a2b26, -0x0a8340, -0x0adb5a,
+ -0x0b3374, -0x0b8b8e, -0x0be3a8, -0x0c3bc2, -0x0c93dc, -0x0cebf6,
+ -0x0d4410, -0x0d9c2a, -0x0df444, -0x0e4c5e, -0x0ea478, -0x0efc92,
+ -0x0f54ac, -0x0facc6, -0x1004e0, -0x105cfa, -0x10b514, -0x110d2e,
+ -0x116548, -0x11bd62, -0x12157c, -0x126d96, -0x12c5b0, -0x131dca,
+ -0x1375e4, -0x13cdfe, -0x142618, -0x147e32, -0x14d64c, -0x152e66,
+ -0x158680, -0x15de9a, -0x1636b4, -0x168ece, -0x16e6e8, -0x173f02,
+ -0x17971c, -0x17ef36, -0x184750, -0x189f6a, -0x18f784, -0x194f9e,
+ -0x19a7b8, -0x19ffd2, -0x1a57ec, -0x1ab006, -0x1b0820, -0x1b603a,
+ -0x1bb854, -0x1c106e, -0x1c6888, -0x1cc0a2, -0x1d18bc, -0x1d70d6,
+ -0x1dc8f0, -0x1e210a, -0x1e7924, -0x1ed13e, -0x1f2958, -0x1f8172,
+ -0x1fd98c, -0x2031a6, -0x2089c0, -0x20e1da, -0x2139f4, -0x21920e,
+ -0x21ea28, -0x224242, -0x229a5c, -0x22f276, -0x234a90, -0x23a2aa,
+ -0x23fac4, -0x2452de, -0x24aaf8, -0x250312, -0x255b2c, -0x25b346,
+ -0x260b60, -0x26637a, -0x26bb94, -0x2713ae, -0x276bc8, -0x27c3e2,
+ -0x281bfc, -0x287416, -0x28cc30, -0x29244a, -0x297c64, -0x29d47e,
+ -0x2a2c98, -0x2a84b2, -0x2adccc, -0x2b34e6,
+ };
+
+
+/* We assume that right shift corresponds to signed division by 2 with
+ * rounding towards minus infinity. This is correct for typical "arithmetic
+ * shift" instructions that shift in copies of the sign bit. But some
+ * C compilers implement >> with an unsigned shift. For these machines you
+ * must define RIGHT_SHIFT_IS_UNSIGNED.
+ * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity.
+ * It is only applied with constant shift counts. SHIFT_TEMPS must be
+ * included in the variables of any routine using RIGHT_SHIFT.
+ */
+
+#ifdef RIGHT_SHIFT_IS_UNSIGNED
+#define SHIFT_TEMPS INT32 shift_temp;
+#define RIGHT_SHIFT(x,shft) \
+ ((shift_temp = (x)) < 0 ? \
+ (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \
+ (shift_temp >> (shft)))
+#else
+#define SHIFT_TEMPS
+#define RIGHT_SHIFT(x,shft) ((x) >> (shft))
+#endif
+
+
+METHODDEF(void)
+ycc_rgb_convert_argb (j_decompress_ptr cinfo,
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows)
+{
+ JDIMENSION num_cols = cinfo->output_width;
+ JSAMPLE * range_limit = cinfo->sample_range_limit;
+
+ SHIFT_TEMPS
+
+ /* This is used if we don't have SSE2 */
+
+ while (--num_rows >= 0) {
+ JSAMPROW inptr0 = input_buf[0][input_row];
+ JSAMPROW inptr1 = input_buf[1][input_row];
+ JSAMPROW inptr2 = input_buf[2][input_row];
+ input_row++;
+ uint32_t *outptr = (uint32_t *) *output_buf++;
+ for (JDIMENSION col = 0; col < num_cols; col++) {
+ int y = GETJSAMPLE(inptr0[col]);
+ int cb = GETJSAMPLE(inptr1[col]);
+ int cr = GETJSAMPLE(inptr2[col]);
+ JSAMPLE * range_limit_y = range_limit + y;
+ /* Range-limiting is essential due to noise introduced by DCT losses. */
+ outptr[col] = 0xFF000000 |
+ ( range_limit_y[Cr_r_tab[cr]] << 16 ) |
+ ( range_limit_y[((int) RIGHT_SHIFT(Cb_g_tab[cb] + Cr_g_tab[cr], SCALEBITS))] << 8 ) |
+ ( range_limit_y[Cb_b_tab[cb]] );
+ }
+ }
+}
+#endif
+
+
///*************** Inverted CMYK -> RGB conversion *************************
/// Input is (Inverted) CMYK stored as 4 bytes per pixel.
/// Output is RGB stored as 3 bytes per pixel.
@@ -0,0 +1,14 @@
$NetBSD: patch-intl_hyphenation_hnjalloc.h,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- intl/hyphenation/hnjalloc.h.orig 2014-11-21 03:37:31.000000000 +0000
+++ intl/hyphenation/hnjalloc.h
@@ -24,6 +24,9 @@
*/
#include <stdio.h> /* ensure stdio.h is loaded before our macros */
+#ifdef __sun
+#include <wchar.h>
+#endif
#undef FILE
#define FILE hnjFile
@@ -0,0 +1,13 @@
$NetBSD: patch-intl_unicharutil_util_moz.build,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- intl/unicharutil/util/moz.build.orig 2015-03-27 02:20:20.000000000 +0000
+++ intl/unicharutil/util/moz.build
@@ -38,5 +38,8 @@ if CONFIG['_MSC_VER']:
if CONFIG['ENABLE_INTL_API']:
CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
if CONFIG['GNU_CXX']:
FAIL_ON_WARNINGS = True
@@ -0,0 +1,13 @@
$NetBSD: patch-ipc_chromium_Makefile.in,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- ipc/chromium/Makefile.in.orig 2014-05-29 23:30:52.000000000 +0000
+++ ipc/chromium/Makefile.in
@@ -28,6 +28,8 @@ include $(topsrcdir)/config/rules.mk
ifdef MOZ_NATIVE_LIBEVENT # {
+OS_CPPFLAGS += $(filter %/compat, $(MOZ_LIBEVENT_CFLAGS))
+
export-preqs = \
$(call mkdir_deps,$(CURDIR)/third_party/libevent) \
$(NULL)
@@ -0,0 +1,18 @@
$NetBSD: patch-ipc_chromium_moz.build,v 1.1 2016/02/14 07:30:54 ryoon Exp $
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
--- ipc/chromium/moz.build.orig 2014-05-06 22:55:41.000000000 +0000
+++ ipc/chromium/moz.build
@@ -19,7 +19,10 @@ if CONFIG['OS_ARCH'] == 'WINNT':
else:
os_posix = 1
if CONFIG['OS_ARCH'] == 'Darwin':
- os_macosx = 1
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+ os_macosx = 1
+ else:
+ os_bsd = 1
elif CONFIG['OS_ARCH'] == 'DragonFly':
os_dragonfly = 1
os_bsd = 1
@@ -0,0 +1,15 @@
$NetBSD: patch-ipc_chromium_src_base_atomicops.h,v 1.1 2016/02/14 07:30:54 ryoon Exp $
* Avoid invalid cast errors under NetBSD/evbearmv7hf-el.
--- ipc/chromium/src/base/atomicops.h.orig 2014-11-13 22:49:59.000000000 +0000
+++ ipc/chromium/src/base/atomicops.h
@@ -45,7 +45,7 @@ typedef int64_t Atomic64;
// Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or
// Atomic64 routines below, depending on your architecture.
-#ifdef OS_OPENBSD
+#if defined(OS_OPENBSD) || (defined(OS_NETBSD) && defined(ARCH_CPU_ARM_FAMILY))
#ifdef ARCH_CPU_64_BITS
typedef Atomic64 AtomicWord;
#else
@@ -0,0 +1,14 @@
$NetBSD: patch-ipc_chromium_src_base_file__util.h,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- ipc/chromium/src/base/file_util.h.orig 2013-12-05 16:07:35.000000000 +0000
+++ ipc/chromium/src/base/file_util.h
@@ -16,7 +16,9 @@
#include <sys/stat.h>
#elif defined(OS_POSIX)
#include <sys/types.h>
+#if !defined(OS_SOLARIS)
#include <fts.h>
+#endif
#include <sys/stat.h>
#endif
@@ -0,0 +1,51 @@
$NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.1 2016/02/14 07:30:54 ryoon Exp $
* Just because OS_ARCH is Darwin does not mean MacOS X specific
implementation should be used.
--- ipc/chromium/src/base/file_util_posix.cc.orig 2014-05-06 22:55:41.000000000 +0000
+++ ipc/chromium/src/base/file_util_posix.cc
@@ -8,7 +8,7 @@
#include <errno.h>
#include <fcntl.h>
#include <fnmatch.h>
-#ifndef ANDROID
+#if !defined(ANDROID) && !defined(OS_SOLARIS)
#include <fts.h>
#endif
#include <libgen.h>
@@ -67,7 +67,7 @@ bool Delete(const FilePath& path, bool r
if (!recursive)
return (rmdir(path_str) == 0);
-#ifdef ANDROID
+#if defined(ANDROID) || defined(OS_SOLARIS)
// XXX Need ftsless impl for bionic
return false;
#else
@@ -140,7 +140,7 @@ bool CopyDirectory(const FilePath& from_
return false;
}
-#ifdef ANDROID
+#if defined(ANDROID) || defined(OS_SOLARIS)
// XXX Need ftsless impl for bionic
return false;
#else
@@ -435,7 +435,7 @@ bool SetCurrentDirectory(const FilePath&
return !ret;
}
-#if !defined(OS_MACOSX)
+#if !defined(MOZ_WIDGET_COCOA)
bool GetTempDir(FilePath* path) {
const char* tmp = getenv("TMPDIR");
if (tmp)
@@ -499,6 +499,6 @@ bool CopyFile(const FilePath& from_path,
return result;
}
-#endif // !defined(OS_MACOSX)
+#endif // !defined(MOZ_WIDGET_COCOA)
} // namespace file_util
@@ -0,0 +1,40 @@
$NetBSD: patch-ipc_chromium_src_base_message__loop.cc,v 1.1 2016/02/14 07:30:54 ryoon Exp $
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
--- ipc/chromium/src/base/message_loop.cc.orig 2014-05-29 23:30:52.000000000 +0000
+++ ipc/chromium/src/base/message_loop.cc
@@ -14,20 +14,18 @@
#include "base/string_util.h"
#include "base/thread_local.h"
-#if defined(OS_MACOSX)
+#if defined(MOZ_WIDGET_COCOA)
#include "base/message_pump_mac.h"
#endif
#if defined(OS_POSIX)
#include "base/message_pump_libevent.h"
#endif
-#if defined(OS_LINUX) || defined(OS_BSD)
#if defined(MOZ_WIDGET_GTK)
#include "base/message_pump_glib.h"
#endif
#ifdef MOZ_WIDGET_QT
#include "base/message_pump_qt.h"
#endif
-#endif
#ifdef ANDROID
#include "base/message_pump_android.h"
#endif
@@ -135,9 +133,9 @@ MessageLoop::MessageLoop(Type type)
}
#elif defined(OS_POSIX)
if (type_ == TYPE_UI) {
-#if defined(OS_MACOSX)
+#if defined(MOZ_WIDGET_COCOA)
pump_ = base::MessagePumpMac::Create();
-#elif defined(OS_LINUX) || defined(OS_BSD)
+#elif defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_QT)
pump_ = new base::MessagePumpForUI();
#endif // OS_LINUX
} else if (type_ == TYPE_IO) {
@@ -0,0 +1,14 @@
$NetBSD: patch-ipc_chromium_src_base_platform__thread.h,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- 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) || defined(__GLIBC__)
#include <unistd.h>
typedef pid_t PlatformThreadId;
+#elif defined(OS_SOLARIS)
+#include <sys/lwp.h>
+typedef lwpid_t PlatformThreadId;
#elif defined(OS_BSD)
#include <sys/types.h>
typedef lwpid_t PlatformThreadId;
@@ -0,0 +1,92 @@
$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.1 2016/02/14 07:30:54 ryoon Exp $
* Just because OS_ARCH is Darwin does not mean MacOS X specific
kludges are needed.
--- ipc/chromium/src/base/platform_thread_posix.cc.orig 2014-05-06 22:55:41.000000000 +0000
+++ ipc/chromium/src/base/platform_thread_posix.cc
@@ -9,8 +9,12 @@
#if defined(OS_MACOSX)
#include <mach/mach.h>
+#include <dlfcn.h>
+#include <string>
#elif defined(OS_NETBSD)
+_Pragma("GCC visibility push(default)")
#include <lwp.h>
+_Pragma("GCC visibility pop")
#elif defined(OS_LINUX)
#include <sys/syscall.h>
#include <sys/prctl.h>
@@ -19,15 +23,13 @@
#include <sys/thr.h>
#endif
-#if !defined(OS_MACOSX)
#include <unistd.h>
-#endif
#if defined(OS_BSD) && !defined(OS_NETBSD) && !defined(__GLIBC__)
#include <pthread_np.h>
#endif
-#if defined(OS_MACOSX)
+#if defined(MOZ_WIDGET_COCOA)
namespace base {
void InitThreading();
} // namespace
@@ -91,7 +93,7 @@ void PlatformThread::Sleep(int duration_
sleep_time = remaining;
}
-#ifndef OS_MACOSX
+#ifndef MOZ_WIDGET_COCOA
// Mac is implemented in platform_thread_mac.mm.
// static
@@ -114,19 +116,41 @@ void PlatformThread::SetName(const char*
pthread_setname_np(pthread_self(), "%s", (void *)name);
#elif defined(OS_BSD) && !defined(__GLIBC__)
pthread_set_name_np(pthread_self(), name);
-#else
+#elif defined(OS_MACOSX)
+ // Copied from platform_thread_mac.mm
+
+ // pthread_setname_np is only available in 10.6 or later, so test
+ // for it at runtime.
+ int (*dynamic_pthread_setname_np)(const char*);
+ *reinterpret_cast<void**>(&dynamic_pthread_setname_np) =
+ dlsym(RTLD_DEFAULT, "pthread_setname_np");
+ if (!dynamic_pthread_setname_np)
+ return;
+
+ // Mac OS X does not expose the length limit of the name, so
+ // hardcode it.
+ const int kMaxNameLength = 63;
+ std::string shortened_name = std::string(name).substr(0, kMaxNameLength);
+ // pthread_setname() fails (harmlessly) in the sandbox, ignore when it does.
+ // See http://crbug.com/47058
+
+ // The name parameter is copied thus it's safe to release it after calling.
+ // Checked against the bionic implementation in bionic/libc/bionic/pthread.c
+ dynamic_pthread_setname_np(shortened_name.c_str());
+#elif !defined(OS_SOLARIS)
+ prctl(PR_SET_NAME, reinterpret_cast<uintptr_t>(name), 0, 0, 0);
#endif
}
-#endif // !OS_MACOSX
+#endif // !MOZ_WIDGET_COCOA
namespace {
bool CreateThread(size_t stack_size, bool joinable,
PlatformThread::Delegate* delegate,
PlatformThreadHandle* thread_handle) {
-#if defined(OS_MACOSX)
+#if defined(MOZ_WIDGET_COCOA)
base::InitThreading();
-#endif // OS_MACOSX
+#endif // MOZ_WIDGET_COCOA
bool success = false;
pthread_attr_t attributes;
@@ -0,0 +1,14 @@
$NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- ipc/chromium/src/base/process_util.h.orig 2015-01-09 04:38:16.000000000 +0000
+++ ipc/chromium/src/base/process_util.h
@@ -41,6 +41,9 @@
typedef PROCESSENTRY32 ProcessEntry;
typedef IO_COUNTERS IoCounters;
#elif defined(OS_POSIX)
+#ifndef NAME_MAX
+#define NAME_MAX _POSIX_NAME_MAX
+#endif
// TODO(port): we should not rely on a Win32 structure.
struct ProcessEntry {
int pid;
@@ -0,0 +1,17 @@
$NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.1 2016/02/14 07:30:54 ryoon Exp $
Darwin does not provide kvm_getprocs(3). The code for OS_MACOSX is
simply copied from process_util_mac.mm
--- ipc/chromium/src/base/process_util_bsd.cc.orig 2014-10-11 09:06:28.000000000 +0000
+++ ipc/chromium/src/base/process_util_bsd.cc
@@ -9,6 +9,9 @@
#include <sys/wait.h>
#include <fcntl.h>
+#if defined(OS_BSD)
+#include <kvm.h>
+#endif
#include <unistd.h>
#include <string>
@@ -0,0 +1,22 @@
$NetBSD: patch-ipc_chromium_src_base_process__util__posix.cc,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- ipc/chromium/src/base/process_util_posix.cc.orig 2013-05-11 19:19:32.000000000 +0000
+++ ipc/chromium/src/base/process_util_posix.cc
@@ -110,7 +110,7 @@ void CloseSuperfluousFds(const base::Inj
#if defined(ANDROID)
static const rlim_t kSystemDefaultMaxFds = 1024;
static const char kFDDir[] = "/proc/self/fd";
-#elif defined(OS_LINUX)
+#elif defined(OS_LINUX) || defined(OS_SOLARIS)
static const rlim_t kSystemDefaultMaxFds = 8192;
static const char kFDDir[] = "/proc/self/fd";
#elif defined(OS_MACOSX)
@@ -202,7 +202,7 @@ void CloseSuperfluousFds(const base::Inj
// TODO(agl): Remove this function. It's fundamentally broken for multithreaded
// apps.
void SetAllFDsToCloseOnExec() {
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_SOLARIS)
const char fd_dir[] = "/proc/self/fd";
#elif defined(OS_MACOSX) || defined(OS_BSD)
const char fd_dir[] = "/dev/fd";
@@ -0,0 +1,45 @@
$NetBSD: patch-ipc_chromium_src_base_scoped__nsautorelease__pool.h,v 1.1 2016/02/14 07:30:54 ryoon Exp $
Just because OS_ARCH is Darwin does not mean ScopedNSAutoreleasePool
is needed.
--- ipc/chromium/src/base/scoped_nsautorelease_pool.h.orig 2014-05-06 22:55:41.000000000 +0000
+++ ipc/chromium/src/base/scoped_nsautorelease_pool.h
@@ -7,13 +7,13 @@
#include "base/basictypes.h"
-#if defined(OS_MACOSX)
+#if defined(MOZ_WIDGET_COCOA)
#if defined(__OBJC__)
@class NSAutoreleasePool;
#else // __OBJC__
class NSAutoreleasePool;
#endif // __OBJC__
-#endif // OS_MACOSX
+#endif // MOZ_WIDGET_COCOA
namespace base {
@@ -27,10 +27,10 @@ namespace base {
// ugly #ifdefs.
class ScopedNSAutoreleasePool {
public:
-#if !defined(OS_MACOSX)
+#if !defined(MOZ_WIDGET_COCOA)
ScopedNSAutoreleasePool() {}
void Recycle() { }
-#else // OS_MACOSX
+#else // MOZ_WIDGET_COCOA
ScopedNSAutoreleasePool();
~ScopedNSAutoreleasePool();
@@ -41,7 +41,7 @@ class ScopedNSAutoreleasePool {
void Recycle();
private:
NSAutoreleasePool* autorelease_pool_;
-#endif // OS_MACOSX
+#endif // MOZ_WIDGET_COCOA
private:
DISALLOW_COPY_AND_ASSIGN(ScopedNSAutoreleasePool);
@@ -0,0 +1,28 @@
$NetBSD: patch-ipc_chromium_src_base_sys__info__posix.cc,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- ipc/chromium/src/base/sys_info_posix.cc.orig 2014-04-18 02:03:04.000000000 +0000
+++ ipc/chromium/src/base/sys_info_posix.cc
@@ -119,7 +119,11 @@ std::wstring SysInfo::GetEnvVar(const wc
// static
std::string SysInfo::OperatingSystemName() {
+#ifdef OS_SOLARIS
+ struct utsname info;
+#else
utsname info;
+#endif
if (uname(&info) < 0) {
NOTREACHED();
return "";
@@ -129,7 +133,11 @@ std::string SysInfo::OperatingSystemName
// static
std::string SysInfo::OperatingSystemVersion() {
+#ifdef OS_SOLARIS
+ struct utsname info;
+#else
utsname info;
+#endif
if (uname(&info) < 0) {
NOTREACHED();
return "";
@@ -0,0 +1,15 @@
$NetBSD: patch-ipc_chromium_src_base_time__posix.cc,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- ipc/chromium/src/base/time_posix.cc.orig 2013-05-11 19:19:32.000000000 +0000
+++ ipc/chromium/src/base/time_posix.cc
@@ -65,8 +65,10 @@ Time Time::FromExploded(bool is_local, c
timestruct.tm_wday = exploded.day_of_week; // mktime/timegm ignore this
timestruct.tm_yday = 0; // mktime/timegm ignore this
timestruct.tm_isdst = -1; // attempt to figure it out
+#ifndef OS_SOLARIS
timestruct.tm_gmtoff = 0; // not a POSIX field, so mktime/timegm ignore
timestruct.tm_zone = NULL; // not a POSIX field, so mktime/timegm ignore
+#endif
time_t seconds;
#ifdef ANDROID
@@ -0,0 +1,22 @@
$NetBSD: patch-ipc_chromium_src_build_build__config.h,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- ipc/chromium/src/build/build_config.h.orig 2013-05-11 19:19:32.000000000 +0000
+++ ipc/chromium/src/build/build_config.h
@@ -27,6 +27,8 @@
#define OS_NETBSD 1
#elif defined(__OpenBSD__)
#define OS_OPENBSD 1
+#elif defined(__sun)
+#define OS_SOLARIS 1
#elif defined(_WIN32)
#define OS_WIN 1
#else
@@ -42,7 +44,7 @@
// For access to standard POSIX features, use OS_POSIX instead of a more
// specific macro.
-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
#define OS_POSIX 1
#endif
@@ -0,0 +1,13 @@
$NetBSD: patch-ipc_chromium_src_chrome_common_transport__dib.h,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- ipc/chromium/src/chrome/common/transport_dib.h.orig 2013-05-11 19:19:32.000000000 +0000
+++ ipc/chromium/src/chrome/common/transport_dib.h
@@ -70,7 +70,7 @@ class TransportDIB {
typedef base::SharedMemoryHandle Handle;
// On Mac, the inode number of the backing file is used as an id.
typedef base::SharedMemoryId Id;
-#elif defined(OS_LINUX)
+#elif defined(OS_LINUX) || defined(OS_SOLARIS)
typedef int Handle; // These two ints are SysV IPC shared memory keys
typedef int Id;
#endif
@@ -0,0 +1,48 @@
$NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
* Just because OS_ARCH is Darwin does not mean MacOS X specific
kludges are needed.
--- ipc/glue/GeckoChildProcessHost.cpp.orig 2015-01-09 04:38:16.000000000 +0000
+++ ipc/glue/GeckoChildProcessHost.cpp
@@ -4,7 +4,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+#if defined(__NetBSD__)
+_Pragma("GCC visibility push(default)")
+#endif
#include "GeckoChildProcessHost.h"
+#if defined(__NetBSD__)
+_Pragma("GCC visibility pop")
+#endif
#include "base/command_line.h"
#include "base/string_util.h"
@@ -533,7 +539,7 @@ GeckoChildProcessHost::PerformAsyncLaunc
// and passing wstrings from one config to the other is unsafe. So
// we split the logic here.
-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) || defined(OS_SOLARIS)
base::environment_map newEnvVars;
ChildPrivileges privs = mPrivileges;
if (privs == base::PRIVILEGES_DEFAULT) {
@@ -672,7 +678,7 @@ GeckoChildProcessHost::PerformAsyncLaunc
childArgv.push_back(pidstring);
#if defined(MOZ_CRASHREPORTER)
-# if defined(OS_LINUX) || defined(OS_BSD)
+# if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
int childCrashFd, childCrashRemapFd;
if (!CrashReporter::CreateNotificationPipeForChild(
&childCrashFd, &childCrashRemapFd))
@@ -705,7 +711,7 @@ GeckoChildProcessHost::PerformAsyncLaunc
childArgv.push_back(childProcessType);
base::LaunchApp(childArgv, mFileMap,
-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) || defined(OS_SOLARIS)
newEnvVars, privs,
#endif
false, &process, arch);
@@ -0,0 +1,16 @@
$NetBSD: patch-ipc_glue_ScopedXREEmbed.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
Walking out of [subprocess].app/Contents/MacOS would only be needed if
we were using the cocoa toolkit.
--- ipc/glue/ScopedXREEmbed.cpp.orig 2014-05-06 22:55:41.000000000 +0000
+++ ipc/glue/ScopedXREEmbed.cpp
@@ -66,7 +66,7 @@ ScopedXREEmbed::Start()
localFile = do_QueryInterface(parent);
NS_ENSURE_TRUE_VOID(localFile);
-#ifdef OS_MACOSX
+#ifdef MOZ_WIDGET_COCOA
if (XRE_GetProcessType() == GeckoProcessType_Content) {
// We're an XPCOM-using subprocess. Walk out of
// [subprocess].app/Contents/MacOS to the real GRE dir.
@@ -0,0 +1,24 @@
$NetBSD: patch-ipc_glue_StringUtil.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
Just because OS_ARCH is Darwin does not mean
sys_string_conversions_mac.mm can be used.
--- ipc/glue/StringUtil.cpp.orig 2014-05-06 22:55:41.000000000 +0000
+++ ipc/glue/StringUtil.cpp
@@ -64,14 +64,14 @@ namespace base {
// converters, and implementing the one that doesn't exist for OS X
// and Windows.
-#if !defined(OS_MACOSX) && !defined(OS_WIN)
+#if !defined(MOZ_WIDGET_COCOA) && !defined(OS_WIN)
std::string SysWideToUTF8(const std::wstring& wide) {
// FIXME/cjones: do this with iconv
return GhettoStringConvert<std::wstring, std::string>(wide);
}
#endif
-#if !defined(OS_MACOSX) && !defined(OS_WIN)
+#if !defined(MOZ_WIDGET_COCOA) && !defined(OS_WIN)
std::wstring SysUTF8ToWide(const StringPiece& utf8) {
// FIXME/cjones: do this with iconv
return GhettoStringConvert<StringPiece, std::wstring>(utf8);
@@ -0,0 +1,15 @@
$NetBSD: patch-ipc_glue_moz.build,v 1.1 2016/02/14 07:30:54 ryoon Exp $
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
--- ipc/glue/moz.build.orig 2015-01-29 12:45:33.000000000 +0000
+++ ipc/glue/moz.build
@@ -87,7 +87,7 @@ elif CONFIG['OS_ARCH'] in ('DragonFly',
UNIFIED_SOURCES += [
'ProcessUtils_bsd.cpp'
]
-elif CONFIG['OS_ARCH'] in ('Darwin'):
+elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
UNIFIED_SOURCES += [
'ProcessUtils_mac.mm'
]
@@ -0,0 +1,25 @@
$NetBSD: patch-ipc_ipdl_ipdl_cxx_ast.py,v 1.1 2016/02/14 07:30:54 ryoon Exp $
Part of https://bugzilla.mozilla.org/show_bug.cgi?id=1026499:
Make sure storage provided for attributes is properly aligned
in the generated C++ code.
--- ipc/ipdl/ipdl/cxx/ast.py.orig 2014-07-17 01:45:18.000000000 +0000
+++ ipc/ipdl/ipdl/cxx/ast.py
@@ -336,12 +336,13 @@ Type.VOID = Type('void')
Type.VOIDPTR = Type('void', ptr=1)
class TypeArray(Node):
- def __init__(self, basetype, nmemb):
- '''the type |basetype DECLNAME[nmemb]|. |nmemb| is an Expr'''
+ def __init__(self, basetype, nmemb, alignType):
+ '''the type |basetype DECLNAME[nmemb]|. |nmemb| is an Expr, |alignType| is a type'''
self.basetype = basetype
self.nmemb = nmemb
+ self.alignType = alignType
def __deepcopy__(self, memo):
- return TypeArray(deepcopy(self.basetype, memo), nmemb)
+ return TypeArray(deepcopy(self.basetype, memo), nmemb, alignType)
class TypeEnum(Node):
def __init__(self, name=None):
@@ -0,0 +1,27 @@
$NetBSD: patch-ipc_ipdl_ipdl_cxx_cgen.py,v 1.1 2016/02/14 07:30:54 ryoon Exp $
Part of https://bugzilla.mozilla.org/show_bug.cgi?id=1026499:
Make sure storage provided for attributes is properly aligned
in the generated C++ code.
--- ipc/ipdl/ipdl/cxx/cgen.py.orig 2014-07-17 01:45:18.000000000 +0000
+++ ipc/ipdl/ipdl/cxx/cgen.py
@@ -101,6 +101,7 @@ class CxxCodeGen(CodePrinter, Visitor):
def visitDecl(self, d):
# C-syntax arrays make code generation much more annoying
if isinstance(d.type, TypeArray):
+ self.write('MOZ_ALIGNED_DECL(')
d.type.basetype.accept(self)
else:
d.type.accept(self)
@@ -111,7 +112,9 @@ class CxxCodeGen(CodePrinter, Visitor):
if isinstance(d.type, TypeArray):
self.write('[')
d.type.nmemb.accept(self)
- self.write(']')
+ self.write('], MOZ_ALIGNOF(')
+ d.type.alignType.accept(self)
+ self.write('))')
def visitParam(self, p):
self.visitDecl(p)
@@ -0,0 +1,17 @@
$NetBSD: patch-ipc_ipdl_ipdl_lower.py,v 1.1 2016/02/14 07:30:54 ryoon Exp $
Part of https://bugzilla.mozilla.org/show_bug.cgi?id=1026499:
Make sure storage provided for attributes is properly aligned
in the generated C++ code.
--- ipc/ipdl/ipdl/lower.py.orig 2014-07-17 01:45:18.000000000 +0000
+++ ipc/ipdl/ipdl/lower.py
@@ -768,7 +768,7 @@ IPDL union type."""
if self.recursive:
return self.ptrToType()
else:
- return TypeArray(Type('char'), ExprSizeof(self.internalType()))
+ return TypeArray(Type('char'), ExprSizeof(self.internalType()), self.internalType())
def unionValue(self):
# NB: knows that Union's storage C union is named |mValue|
@@ -0,0 +1,17 @@
$NetBSD: patch-js__src__vm__SPSProfiler.cpp,v 1.1 2016/02/14 07:30:54 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 2014-04-18 02:03:21.000000000 +0000
+++ js/src/vm/SPSProfiler.cpp
@@ -4,6 +4,8 @@
* 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/. */
+#include "jscntxtinlines.h"
+
#include "vm/SPSProfiler.h"
#include "mozilla/DebugOnly.h"
@@ -0,0 +1,13 @@
$NetBSD: patch-js_public_CallArgs.h,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- js/public/CallArgs.h.orig 2015-04-29 21:11:43.000000000 +0000
+++ js/public/CallArgs.h
@@ -344,7 +344,7 @@ class MOZ_STACK_CLASS CallArgs : public
* Returns true if there are at least |required| arguments passed in. If
* false, it reports an error message on the context.
*/
- bool requireAtLeast(JSContext* cx, const char* fnname, unsigned required);
+ JS_PUBLIC_API(bool) requireAtLeast(JSContext* cx, const char* fnname, unsigned required);
};
@@ -0,0 +1,14 @@
$NetBSD: patch-js_src_Makefile.in,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- js/src/Makefile.in.orig 2015-02-17 21:40:38.000000000 +0000
+++ js/src/Makefile.in
@@ -16,9 +16,6 @@ TOPLEVEL_BUILD := 1
run_for_side_effects := $(shell echo 'MAKE: $(MAKE)')
-DIST_INSTALL = 1
-NO_EXPAND_LIBS = 1
-
ifdef JS_HAS_CTYPES
ifdef MOZ_NATIVE_FFI
LOCAL_INCLUDES = $(MOZ_FFI_CFLAGS)
@@ -0,0 +1,22 @@
$NetBSD: patch-js_src_asmjs_AsmJSSignalHandlers.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
Increase portability for non-x86 Darwin by not hardwiring
x86_THREAD_STATE.
--- js/src/asmjs/AsmJSSignalHandlers.cpp.orig 2015-05-04 00:43:23.000000000 +0000
+++ js/src/asmjs/AsmJSSignalHandlers.cpp
@@ -637,10 +637,11 @@ HandleMachException(JSRuntime* rt, const
mach_port_t rtThread = request.body.thread.name;
// Read out the JSRuntime thread's register state.
- x86_thread_state_t state;
- unsigned int count = x86_THREAD_STATE_COUNT;
+ moz_platform_thread_state_t state;
+ thread_state_flavor_t flavor = MOZ_PLATFORM_THREAD_STATE_FLAVOR;
+ mach_msg_type_number_t count = MOZ_PLATFORM_THREAD_STATE_COUNT;
kern_return_t kret;
- kret = thread_get_state(rtThread, x86_THREAD_STATE, (thread_state_t)&state, &count);
+ kret = thread_get_state(rtThread, flavor, (thread_state_t)&state, &count);
if (kret != KERN_SUCCESS)
return false;
@@ -0,0 +1,28 @@
$NetBSD: patch-js_src_ctypes_CTypes.h,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- js/src/ctypes/CTypes.h.orig 2014-02-12 21:29:02.000000000 +0000
+++ js/src/ctypes/CTypes.h
@@ -14,6 +14,23 @@
#include "js/Vector.h"
#include "vm/String.h"
+#if defined(__NetBSD__)
+#include <stdint.h>
+/* XXX why do we have those funky __ #defines in stdint.h? */
+#warning this is a retarded workaround
+#define uint8_t uint8_t
+#define uint16_t uint16_t
+#define uint32_t uint32_t
+#define uint64_t uint64_t
+#define int8_t int8_t
+#define int16_t int16_t
+#define int32_t int32_t
+#define int64_t int64_t
+#define intptr_t intptr_t
+#define uintptr_t uintptr_t
+#define off_t off_t
+#endif
+
namespace js {
namespace ctypes {
@@ -0,0 +1,12 @@
$NetBSD: patch-js_src_frontend_ParseMaps.cpp,v 1.1 2016/02/14 07:30:54 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>;
@@ -0,0 +1,15 @@
$NetBSD: patch-js_src_gc_Statistics.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- js/src/gc/Statistics.cpp.orig 2015-02-05 11:52:40.000000000 +0000
+++ js/src/gc/Statistics.cpp 2015-02-05 11:52:28.000000000 +0000
@@ -221,8 +221,8 @@
while (*c) {
if (*c == ' ' || *c == '\t')
p('_');
- else if (isupper(*c))
- p(tolower(*c));
+ else if (isupper((unsigned char)*c))
+ p(tolower((unsigned char)*c));
else if (*c == '+')
p("added_");
else if (*c == '-')
@@ -0,0 +1,13 @@
$NetBSD: patch-js_src_jit-LIR.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- js/src/jit/LIR.cpp.orig 2015-05-04 00:43:27.000000000 +0000
+++ js/src/jit/LIR.cpp
@@ -323,7 +323,7 @@ LNode::printName(FILE* fp, Opcode op)
const char* name = names[op];
size_t len = strlen(name);
for (size_t i = 0; i < len; i++)
- fprintf(fp, "%c", tolower(name[i]));
+ fprintf(fp, "%c", tolower(((unsigned char)name[i])));
}
void
@@ -0,0 +1,16 @@
$NetBSD: patch-js_src_jit_ExecutableAllocator.h,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- js/src/jit/ExecutableAllocator.h.orig 2015-05-04 00:43:27.000000000 +0000
+++ js/src/jit/ExecutableAllocator.h
@@ -419,6 +419,11 @@ class ExecutableAllocator {
{
__clear_cache(code, reinterpret_cast<char*>(code) + size);
}
+#elif defined(JS_CODEGEN_ARM) && (defined(__FreeBSD__) || defined(__NetBSD__))
+ static void cacheFlush(void* code, size_t size)
+ {
+ __clear_cache(code, reinterpret_cast<char*>(code) + size);
+ }
#elif defined(JS_CODEGEN_ARM) && (defined(__linux__) || defined(ANDROID)) && defined(__GNUC__)
static void cacheFlush(void* code, size_t size)
{
@@ -0,0 +1,13 @@
$NetBSD: patch-js_src_jit_MIR.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- js/src/jit/MIR.cpp.orig 2015-05-04 00:43:27.000000000 +0000
+++ js/src/jit/MIR.cpp
@@ -71,7 +71,7 @@ MDefinition::PrintOpcodeName(FILE* fp, M
const char* name = names[op];
size_t len = strlen(name);
for (size_t i = 0; i < len; i++)
- fprintf(fp, "%c", tolower(name[i]));
+ fprintf(fp, "%c", tolower(((unsigned char)name[i])));
}
const Value&
@@ -0,0 +1,13 @@
$NetBSD: patch-js_src_jit_arm_Architecture-arm.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- js/src/jit/arm/Architecture-arm.cpp.orig 2015-05-04 00:43:27.000000000 +0000
+++ js/src/jit/arm/Architecture-arm.cpp
@@ -16,7 +16,7 @@
#include "jit/arm/Assembler-arm.h"
#include "jit/RegisterSets.h"
-#if !defined(__linux__) || defined(ANDROID) || defined(JS_ARM_SIMULATOR)
+#if !defined(__linux__) || defined(ANDROID) || defined(JS_ARM_SIMULATOR) || defined(__NetBSD__)
// The Android NDK and B2G do not include the hwcap.h kernel header, and it is not
// defined when building the simulator, so inline the header defines we need.
# define HWCAP_VFP (1 << 6)
@@ -0,0 +1,13 @@
$NetBSD: patch-js_src_jsapi.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- js/src/jsapi.cpp.orig 2015-04-29 21:11:46.000000000 +0000
+++ js/src/jsapi.cpp
@@ -115,7 +115,7 @@ using js::frontend::Parser;
#define JS_ADDRESSOF_VA_LIST(ap) (&(ap))
#endif
-bool
+JS_PUBLIC_API(bool)
JS::CallArgs::requireAtLeast(JSContext* cx, const char* fnname, unsigned required) {
if (length() < required) {
char numArgsStr[40];
@@ -0,0 +1,20 @@
$NetBSD: patch-js_src_jsdate.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- js/src/jsdate.cpp.orig 2015-02-17 21:40:42.000000000 +0000
+++ js/src/jsdate.cpp
@@ -2651,11 +2651,11 @@ ToLocaleFormatHelper(JSContext *cx, Hand
if (strcmp(format, "%x") == 0 && result_len >= 6 &&
/* Format %x means use OS settings, which may have 2-digit yr, so
hack end of 3/11/22 or 11.03.22 or 11Mar22 to use 4-digit yr...*/
- !isdigit(buf[result_len - 3]) &&
- isdigit(buf[result_len - 2]) && isdigit(buf[result_len - 1]) &&
+ !isdigit(((unsigned char)buf[result_len - 3])) &&
+ isdigit(((unsigned char)buf[result_len - 2])) && isdigit(((unsigned char)buf[result_len - 1])) &&
/* ...but not if starts with 4-digit year, like 2022/3/11. */
- !(isdigit(buf[0]) && isdigit(buf[1]) &&
- isdigit(buf[2]) && isdigit(buf[3]))) {
+ !(isdigit(((unsigned char)buf[0])) && isdigit(((unsigned char)buf[1])) &&
+ isdigit(((unsigned char)buf[2])) && isdigit(((unsigned char)buf[3])))) {
double localtime = obj->as<DateObject>().cachedLocalTime(&cx->runtime()->dateTimeInfo);
int year = IsNaN(localtime) ? 0 : (int) YearFromTime(localtime);
JS_snprintf(buf + (result_len - 2), (sizeof buf) - (result_len - 2),
@@ -0,0 +1,13 @@
$NetBSD: patch-js_src_jskwgen.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- js/src/jskwgen.cpp.orig 2015-01-23 06:00:01.000000000 +0000
+++ js/src/jskwgen.cpp 2015-02-05 11:42:30.000000000 +0000
@@ -181,7 +181,7 @@
*s++ = '\\';
break;
default:
- if (!isprint(c)) {
+ if (!isprint(((unsigned char)c))) {
*s++ = '\\';
*s++ = (char)('0' + (0x3 & (((unsigned char)c) >> 6)));
*s++ = (char)('0' + (0x7 & (((unsigned char)c) >> 3)));
@@ -0,0 +1,13 @@
$NetBSD: patch-js_src_jsmath.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- js/src/jsmath.cpp.orig 2013-09-10 03:43:36.000000000 +0000
+++ js/src/jsmath.cpp
@@ -244,7 +244,7 @@ js::ecmaAtan2(double y, double x)
}
#endif
-#if defined(SOLARIS) && defined(__GNUC__)
+#if defined(notSOLARIS) && defined(__GNUC__)
if (y == 0) {
if (IsNegativeZero(x))
return js_copysign(M_PI, y);
@@ -0,0 +1,13 @@
$NetBSD: patch-js_src_shell_jsoptparse.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- js/src/shell/jsoptparse.cpp.orig 2015-05-04 00:43:27.000000000 +0000
+++ js/src/shell/jsoptparse.cpp
@@ -90,7 +90,7 @@ PrintParagraph(const char* text, unsigne
printf("%*s", startColno, "");
while (*it != '\0') {
- MOZ_ASSERT(!isspace(*it));
+ MOZ_ASSERT(!isspace((unsigned char)*it));
/* Delimit the current token. */
const char* limit = it;
@@ -0,0 +1,16 @@
$NetBSD: patch-js_xpconnect_src_XPCConvert.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
Suggested workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=1147837
Avoids a crash on big endian 64 bit architectures.
--- js/xpconnect/src/XPCConvert.cpp.orig 2015-03-21 04:42:37.000000000 +0100
+++ js/xpconnect/src/XPCConvert.cpp 2015-03-30 13:49:16.000000000 +0200
@@ -134,7 +134,7 @@
d.setNumber(*static_cast<const float*>(s));
return true;
case nsXPTType::T_DOUBLE:
- d.setNumber(*static_cast<const double*>(s));
+ d.setNumber(CanonicalizeNaN(*static_cast<const double*>(s)));
return true;
case nsXPTType::T_BOOL :
d.setBoolean(*static_cast<const bool*>(s));
@@ -0,0 +1,17 @@
$NetBSD: patch-js_xpconnect_src_xpcprivate.h,v 1.1 2016/02/14 07:30:54 ryoon Exp $
From commit log 1.1:
Instantiate WeakMapPtr explicitly to get the right visibility with
clang.
--- js/xpconnect/src/xpcprivate.h.orig 2015-01-23 06:00:06.000000000 +0000
+++ js/xpconnect/src/xpcprivate.h
@@ -1016,6 +1016,8 @@ static inline bool IS_PROTO_CLASS(const
/***************************************************************************/
// XPCWrappedNativeScope is one-to-one with a JS global object.
+extern template class JS_PUBLIC_API(JS::WeakMapPtr)<JSObject*, JSObject*>;
+
class nsIAddonInterposition;
class nsXPCComponentsBase;
class XPCWrappedNativeScope : public PRCList
@@ -0,0 +1,9 @@
$NetBSD: patch-media_libcubeb_AUTHORS,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- media/libcubeb/AUTHORS.orig 2014-10-11 09:06:39.000000000 +0000
+++ media/libcubeb/AUTHORS
@@ -4,3 +4,4 @@ Michael Wu <mwu@mozilla.com>
Paul Adenot <paul@paul.cx>
David Richards <drichards@mozilla.com>
Sebastien Alaiwan <sebastien.alaiwan@gmail.com>
+Evgeniy Vodolazskiy <waterlaz@gmail.com>
@@ -0,0 +1,24 @@
$NetBSD: patch-media_libcubeb_src_cubeb.c,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- media/libcubeb/src/cubeb.c.orig 2014-10-11 09:06:39.000000000 +0000
+++ media/libcubeb/src/cubeb.c
@@ -54,6 +54,9 @@ int opensl_init(cubeb ** context, char c
#if defined(USE_AUDIOTRACK)
int audiotrack_init(cubeb ** context, char const * context_name);
#endif
+#if defined(USE_OSS)
+int oss_init(cubeb ** context, char const * context_name);
+#endif
int
validate_stream_params(cubeb_stream_params stream_params)
@@ -120,6 +123,9 @@ cubeb_init(cubeb ** context, char const
#if defined(USE_AUDIOTRACK)
audiotrack_init,
#endif
+#if defined(USE_OSS)
+ oss_init,
+#endif
};
int i;
@@ -0,0 +1,673 @@
$NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- media/libcubeb/src/cubeb_alsa.c.orig 2015-05-08 16:55:17.000000000 +0000
+++ media/libcubeb/src/cubeb_alsa.c 2015-05-14 15:22:34.000000000 +0000
@@ -7,12 +7,18 @@
#undef NDEBUG
#define _DEFAULT_SOURCE
#define _BSD_SOURCE
+#if defined(__NetBSD__)
+#define _NETBSD_SOURCE
+#endif
#define _XOPEN_SOURCE 500
#include <pthread.h>
#include <sys/time.h>
#include <assert.h>
#include <limits.h>
+#include <dlfcn.h>
#include <poll.h>
+#include <stdlib.h>
+#include <stdio.h>
#include <unistd.h>
#include <alsa/asoundlib.h>
#include "cubeb/cubeb.h"
@@ -25,6 +31,51 @@
#define ALSA_PA_PLUGIN "ALSA <-> PulseAudio PCM I/O Plugin"
+#ifdef DISABLE_LIBASOUND_DLOPEN
+#define WRAP(x) x
+#else
+#define WRAP(x) cubeb_##x
+#define MAKE_TYPEDEF(x) static typeof(x) * cubeb_##x
+MAKE_TYPEDEF(snd_config);
+MAKE_TYPEDEF(snd_config_add);
+MAKE_TYPEDEF(snd_config_copy);
+MAKE_TYPEDEF(snd_config_delete);
+MAKE_TYPEDEF(snd_config_get_id);
+MAKE_TYPEDEF(snd_config_get_string);
+MAKE_TYPEDEF(snd_config_imake_integer);
+MAKE_TYPEDEF(snd_config_search);
+MAKE_TYPEDEF(snd_config_search_definition);
+MAKE_TYPEDEF(snd_lib_error_set_handler);
+MAKE_TYPEDEF(snd_pcm_avail_update);
+MAKE_TYPEDEF(snd_pcm_close);
+MAKE_TYPEDEF(snd_pcm_delay);
+MAKE_TYPEDEF(snd_pcm_drain);
+MAKE_TYPEDEF(snd_pcm_forward);
+MAKE_TYPEDEF(snd_pcm_frames_to_bytes);
+MAKE_TYPEDEF(snd_pcm_get_params);
+/* snd_pcm_hw_params_alloca is actually a macro */
+/* MAKE_TYPEDEF(snd_pcm_hw_params_alloca); */
+MAKE_TYPEDEF(snd_pcm_hw_params_sizeof);
+#define snd_pcm_hw_params_sizeof cubeb_snd_pcm_hw_params_sizeof
+MAKE_TYPEDEF(snd_pcm_hw_params_any);
+MAKE_TYPEDEF(snd_pcm_hw_params_get_channels_max);
+MAKE_TYPEDEF(snd_pcm_hw_params_get_rate);
+MAKE_TYPEDEF(snd_pcm_hw_params_set_rate_near);
+MAKE_TYPEDEF(snd_pcm_nonblock);
+MAKE_TYPEDEF(snd_pcm_open);
+MAKE_TYPEDEF(snd_pcm_open_lconf);
+MAKE_TYPEDEF(snd_pcm_pause);
+MAKE_TYPEDEF(snd_pcm_poll_descriptors);
+MAKE_TYPEDEF(snd_pcm_poll_descriptors_count);
+MAKE_TYPEDEF(snd_pcm_poll_descriptors_revents);
+MAKE_TYPEDEF(snd_pcm_recover);
+MAKE_TYPEDEF(snd_pcm_set_params);
+MAKE_TYPEDEF(snd_pcm_state);
+MAKE_TYPEDEF(snd_pcm_writei);
+
+#undef MAKE_TYPEDEF
+#endif
+
/* ALSA is not thread-safe. snd_pcm_t instances are individually protected
by the owning cubeb_stream's mutex. snd_pcm_t creation and destruction
is not thread-safe until ALSA 1.0.24 (see alsa-lib.git commit 91c9c8f1),
@@ -65,6 +116,8 @@
workaround is not required. */
snd_config_t * local_config;
int is_pa;
+
+ void * libasound;
};
enum stream_state {
@@ -258,32 +311,35 @@
long got;
void * p;
int draining;
+ unsigned pipefailures, againfailures;
draining = 0;
pthread_mutex_lock(&stm->mutex);
- r = snd_pcm_poll_descriptors_revents(stm->pcm, stm->fds, stm->nfds, &revents);
- if (r < 0 || revents != POLLOUT) {
- /* This should be a stream error; it makes no sense for poll(2) to wake
- for this stream and then have the stream report that it's not ready.
- Unfortunately, this does happen, so just bail out and try again. */
- pthread_mutex_unlock(&stm->mutex);
- return RUNNING;
- }
-
- avail = snd_pcm_avail_update(stm->pcm);
- if (avail == -EPIPE) {
- snd_pcm_recover(stm->pcm, avail, 1);
- avail = snd_pcm_avail_update(stm->pcm);
- }
+ for (pipefailures = 0;;) {
+ r = WRAP(snd_pcm_poll_descriptors_revents)(stm->pcm, stm->fds, stm->nfds, &revents);
+ if (r < 0 || revents != POLLOUT ||
+ (avail = WRAP(snd_pcm_avail_update)(stm->pcm)) == 0) {
+ /* This should be a stream error; it makes no sense for poll(2) to wake
+ for this stream and then have the stream report that it's not ready.
+ Unfortunately, this does happen, so just bail out and try again. */
+ pthread_mutex_unlock(&stm->mutex);
+ return RUNNING;
+ }
- /* Failed to recover from an xrun, this stream must be broken. */
- if (avail < 0) {
- pthread_mutex_unlock(&stm->mutex);
- stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
- return ERROR;
+ if (avail > 0)
+ break;
+ if (pipefailures++ > 11) {
+ fprintf(stderr, "%s: repeated failures from snd_pcm_avail_update, "
+ "giving up\n", __func__);
+ pthread_mutex_unlock(&stm->mutex);
+ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
+ return ERROR;
+ }
+ WRAP(snd_pcm_recover)(stm->pcm, avail, 1);
}
+ pipefailures = againfailures = 0;
/* This should never happen. */
if ((unsigned int) avail > stm->buffer_size) {
@@ -294,8 +350,8 @@
available to write. If avail is still zero here, the stream must be in
a funky state, so recover and try again. */
if (avail == 0) {
- snd_pcm_recover(stm->pcm, -EPIPE, 1);
- avail = snd_pcm_avail_update(stm->pcm);
+ WRAP(snd_pcm_recover)(stm->pcm, -EPIPE, 1);
+ avail = WRAP(snd_pcm_avail_update)(stm->pcm);
if (avail <= 0) {
pthread_mutex_unlock(&stm->mutex);
stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
@@ -303,7 +359,7 @@
}
}
- p = calloc(1, snd_pcm_frames_to_bytes(stm->pcm, avail));
+ p = calloc(1, WRAP(snd_pcm_frames_to_bytes)(stm->pcm, avail));
assert(p);
pthread_mutex_unlock(&stm->mutex);
@@ -312,10 +368,11 @@
if (got < 0) {
pthread_mutex_unlock(&stm->mutex);
stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
+ free(p);
return ERROR;
}
if (got > 0) {
- snd_pcm_sframes_t wrote;
+ snd_pcm_sframes_t wrote, towrite = got;
if (stm->params.format == CUBEB_SAMPLE_FLOAT32NE) {
float * b = (float *) p;
@@ -328,14 +385,64 @@
b[i] *= stm->volume;
}
}
- wrote = snd_pcm_writei(stm->pcm, p, got);
- if (wrote == -EPIPE) {
- snd_pcm_recover(stm->pcm, wrote, 1);
- wrote = snd_pcm_writei(stm->pcm, p, got);
- }
- assert(wrote >= 0 && wrote == got);
- stm->write_position += wrote;
- gettimeofday(&stm->last_activity, NULL);
+ for (;;) {
+ wrote = WRAP(snd_pcm_writei)(stm->pcm, p,
+ towrite > avail ? avail : towrite);
+ switch(wrote) {
+ case -EPIPE:
+ if (pipefailures++ > 3) {
+ fprintf(stderr, "%s: Too many underflows, giving up\n", __func__);
+ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
+ pthread_mutex_unlock(&stm->mutex);
+ free(p);
+ return ERROR;
+ }
+ WRAP(snd_pcm_recover)(stm->pcm, wrote, 1);
+ continue;
+ case -EAGAIN:
+ if (againfailures++ > 3) {
+ fprintf(stderr, "%s: Too many -EAGAIN errors from snd_pcm_writei, "
+ "giving up\n", __func__);
+ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
+ pthread_mutex_unlock(&stm->mutex);
+ free(p);
+ return ERROR;
+ }
+ continue;
+#if defined(EBADFD)
+ case -EBADFD:
+ fprintf(stderr, "%s: snc_pcm_writei returned -%s, giving up\n",
+ __func__, "EBADFD");
+ free(p);
+ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
+ pthread_mutex_unlock(&stm->mutex);
+ return ERROR;
+#endif
+ }
+ if (wrote < 0) {
+ fprintf(stderr, "%s: snc_pcm_writei returned unexpected error %lld, "
+ "giving up\n", __func__, (long long)wrote);
+ free(p);
+ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
+ pthread_mutex_unlock(&stm->mutex);
+ return ERROR;
+ }
+ pipefailures = againfailures = 0;
+ stm->write_position += wrote;
+ gettimeofday(&stm->last_activity, NULL);
+ if (wrote > towrite) {
+ fprintf(stderr, "%s: snc_pcm_writei wrote %lld frames, which was more "
+ "than we requested (%lld). This should not happen, giving up\n",
+ __func__, (long long)wrote, (long long)towrite);
+ free(p);
+ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
+ pthread_mutex_unlock(&stm->mutex);
+ return ERROR;
+ }
+ if (towrite == wrote)
+ break;
+ towrite -= wrote;
+ }
}
if (got != avail) {
long buffer_fill = stm->buffer_size - (avail - got);
@@ -343,7 +450,7 @@
/* Fill the remaining buffer with silence to guarantee one full period
has been written. */
- snd_pcm_writei(stm->pcm, (char *) p + got, avail - got);
+ WRAP(snd_pcm_writei)(stm->pcm, (char *) p + got, avail - got);
set_timeout(&stm->drain_timeout, buffer_time * 1000);
@@ -454,26 +561,26 @@
slave_def = NULL;
- r = snd_config_search(root_pcm, "slave", &slave_pcm);
+ r = WRAP(snd_config_search)(root_pcm, "slave", &slave_pcm);
if (r < 0) {
return NULL;
}
- r = snd_config_get_string(slave_pcm, &string);
+ r = WRAP(snd_config_get_string)(slave_pcm, &string);
if (r >= 0) {
- r = snd_config_search_definition(lconf, "pcm_slave", string, &slave_def);
+ r = WRAP(snd_config_search_definition)(lconf, "pcm_slave", string, &slave_def);
if (r < 0) {
return NULL;
}
}
do {
- r = snd_config_search(slave_def ? slave_def : slave_pcm, "pcm", &pcm);
+ r = WRAP(snd_config_search)(slave_def ? slave_def : slave_pcm, "pcm", &pcm);
if (r < 0) {
break;
}
- r = snd_config_get_string(slave_def ? slave_def : slave_pcm, &string);
+ r = WRAP(snd_config_get_string)(slave_def ? slave_def : slave_pcm, &string);
if (r < 0) {
break;
}
@@ -482,7 +589,7 @@
if (r < 0 || r > (int) sizeof(node_name)) {
break;
}
- r = snd_config_search(lconf, node_name, &pcm);
+ r = WRAP(snd_config_search)(lconf, node_name, &pcm);
if (r < 0) {
break;
}
@@ -491,7 +598,7 @@
} while (0);
if (slave_def) {
- snd_config_delete(slave_def);
+ WRAP(snd_config_delete)(slave_def);
}
return NULL;
@@ -514,22 +621,22 @@
lconf = NULL;
- if (snd_config == NULL) {
+ if (*WRAP(snd_config) == NULL) {
return NULL;
}
- r = snd_config_copy(&lconf, snd_config);
+ r = WRAP(snd_config_copy)(&lconf, *WRAP(snd_config));
if (r < 0) {
return NULL;
}
do {
- r = snd_config_search_definition(lconf, "pcm", pcm_name, &pcm_node);
+ r = WRAP(snd_config_search_definition)(lconf, "pcm", pcm_name, &pcm_node);
if (r < 0) {
break;
}
- r = snd_config_get_id(pcm_node, &string);
+ r = WRAP(snd_config_get_id)(pcm_node, &string);
if (r < 0) {
break;
}
@@ -538,7 +645,7 @@
if (r < 0 || r > (int) sizeof(node_name)) {
break;
}
- r = snd_config_search(lconf, node_name, &pcm_node);
+ r = WRAP(snd_config_search)(lconf, node_name, &pcm_node);
if (r < 0) {
break;
}
@@ -549,12 +656,12 @@
}
/* Fetch the PCM node's type, and bail out if it's not the PulseAudio plugin. */
- r = snd_config_search(pcm_node, "type", &node);
+ r = WRAP(snd_config_search)(pcm_node, "type", &node);
if (r < 0) {
break;
}
- r = snd_config_get_string(node, &string);
+ r = WRAP(snd_config_get_string)(node, &string);
if (r < 0) {
break;
}
@@ -565,18 +672,18 @@
/* Don't clobber an explicit existing handle_underrun value, set it only
if it doesn't already exist. */
- r = snd_config_search(pcm_node, "handle_underrun", &node);
+ r = WRAP(snd_config_search)(pcm_node, "handle_underrun", &node);
if (r != -ENOENT) {
break;
}
/* Disable pcm_pulse's asynchronous underrun handling. */
- r = snd_config_imake_integer(&node, "handle_underrun", 0);
+ r = WRAP(snd_config_imake_integer)(&node, "handle_underrun", 0);
if (r < 0) {
break;
}
- r = snd_config_add(pcm_node, node);
+ r = WRAP(snd_config_add)(pcm_node, node);
if (r < 0) {
break;
}
@@ -584,7 +691,7 @@
return lconf;
} while (0);
- snd_config_delete(lconf);
+ WRAP(snd_config_delete)(lconf);
return NULL;
}
@@ -596,9 +703,9 @@
pthread_mutex_lock(&cubeb_alsa_mutex);
if (local_config) {
- r = snd_pcm_open_lconf(pcm, CUBEB_ALSA_PCM_NAME, stream, SND_PCM_NONBLOCK, local_config);
+ r = WRAP(snd_pcm_open_lconf)(pcm, CUBEB_ALSA_PCM_NAME, stream, SND_PCM_NONBLOCK, local_config);
} else {
- r = snd_pcm_open(pcm, CUBEB_ALSA_PCM_NAME, stream, SND_PCM_NONBLOCK);
+ r = WRAP(snd_pcm_open)(pcm, CUBEB_ALSA_PCM_NAME, stream, SND_PCM_NONBLOCK);
}
pthread_mutex_unlock(&cubeb_alsa_mutex);
@@ -611,7 +718,7 @@
int r;
pthread_mutex_lock(&cubeb_alsa_mutex);
- r = snd_pcm_close(pcm);
+ r = WRAP(snd_pcm_close)(pcm);
pthread_mutex_unlock(&cubeb_alsa_mutex);
return r;
@@ -668,12 +775,65 @@
pthread_attr_t attr;
snd_pcm_t * dummy;
+ void * libasound = NULL;
+
+#ifndef DISABLE_LIBASOUND_DLOPEN
+ libasound = dlopen("libasound.so", RTLD_LAZY);
+ if (!libasound) {
+ return CUBEB_ERROR;
+ }
+
+#define LOAD(x) do { \
+ cubeb_##x = dlsym(libasound, #x); \
+ if (!cubeb_##x) { \
+ dlclose(libasound); \
+ return CUBEB_ERROR; \
+ } \
+ } while(0)
+
+ LOAD(snd_config);
+ LOAD(snd_config_add);
+ LOAD(snd_config_copy);
+ LOAD(snd_config_delete);
+ LOAD(snd_config_get_id);
+ LOAD(snd_config_get_string);
+ LOAD(snd_config_imake_integer);
+ LOAD(snd_config_search);
+ LOAD(snd_config_search_definition);
+ LOAD(snd_lib_error_set_handler);
+ LOAD(snd_pcm_avail_update);
+ LOAD(snd_pcm_close);
+ LOAD(snd_pcm_delay);
+ LOAD(snd_pcm_drain);
+ LOAD(snd_pcm_frames_to_bytes);
+ LOAD(snd_pcm_get_params);
+ /* snd_pcm_hw_params_alloca is actually a macro */
+ /* LOAD(snd_pcm_hw_params_alloca); */
+ LOAD(snd_pcm_hw_params_sizeof);
+ LOAD(snd_pcm_hw_params_any);
+ LOAD(snd_pcm_hw_params_get_channels_max);
+ LOAD(snd_pcm_hw_params_get_rate);
+ LOAD(snd_pcm_hw_params_set_rate_near);
+ LOAD(snd_pcm_nonblock);
+ LOAD(snd_pcm_open);
+ LOAD(snd_pcm_open_lconf);
+ LOAD(snd_pcm_pause);
+ LOAD(snd_pcm_poll_descriptors);
+ LOAD(snd_pcm_poll_descriptors_count);
+ LOAD(snd_pcm_poll_descriptors_revents);
+ LOAD(snd_pcm_recover);
+ LOAD(snd_pcm_set_params);
+ LOAD(snd_pcm_state);
+ LOAD(snd_pcm_writei);
+
+#undef LOAD
+#endif
assert(context);
*context = NULL;
pthread_mutex_lock(&cubeb_alsa_mutex);
if (!cubeb_alsa_error_handler_set) {
- snd_lib_error_set_handler(silent_error_handler);
+ WRAP(snd_lib_error_set_handler)(silent_error_handler);
cubeb_alsa_error_handler_set = 1;
}
pthread_mutex_unlock(&cubeb_alsa_mutex);
@@ -681,6 +841,8 @@
ctx = calloc(1, sizeof(*ctx));
assert(ctx);
+ ctx->libasound = libasound;
+
ctx->ops = &alsa_ops;
r = pthread_mutex_init(&ctx->mutex, NULL);
@@ -730,7 +892,7 @@
config fails with EINVAL, the PA PCM is too old for this workaround. */
if (r == -EINVAL) {
pthread_mutex_lock(&cubeb_alsa_mutex);
- snd_config_delete(ctx->local_config);
+ WRAP(snd_config_delete)(ctx->local_config);
pthread_mutex_unlock(&cubeb_alsa_mutex);
ctx->local_config = NULL;
} else if (r >= 0) {
@@ -769,9 +931,13 @@
pthread_mutex_destroy(&ctx->mutex);
free(ctx->fds);
+ if (ctx->libasound) {
+ dlclose(ctx->libasound);
+ }
+
if (ctx->local_config) {
pthread_mutex_lock(&cubeb_alsa_mutex);
- snd_config_delete(ctx->local_config);
+ WRAP(snd_config_delete)(ctx->local_config);
pthread_mutex_unlock(&cubeb_alsa_mutex);
}
@@ -839,7 +1005,7 @@
return CUBEB_ERROR;
}
- r = snd_pcm_nonblock(stm->pcm, 1);
+ r = WRAP(snd_pcm_nonblock)(stm->pcm, 1);
assert(r == 0);
/* Ugly hack: the PA ALSA plugin allows buffer configurations that can't
@@ -849,23 +1015,23 @@
latency = latency < 500 ? 500 : latency;
}
- r = snd_pcm_set_params(stm->pcm, format, SND_PCM_ACCESS_RW_INTERLEAVED,
- stm->params.channels, stm->params.rate, 1,
- latency * 1000);
+ r = WRAP(snd_pcm_set_params)(stm->pcm, format, SND_PCM_ACCESS_RW_INTERLEAVED,
+ stm->params.channels, stm->params.rate, 1,
+ latency * 1000);
if (r < 0) {
alsa_stream_destroy(stm);
return CUBEB_ERROR_INVALID_FORMAT;
}
- r = snd_pcm_get_params(stm->pcm, &stm->buffer_size, &stm->period_size);
+ r = WRAP(snd_pcm_get_params)(stm->pcm, &stm->buffer_size, &stm->period_size);
assert(r == 0);
- stm->nfds = snd_pcm_poll_descriptors_count(stm->pcm);
+ stm->nfds = WRAP(snd_pcm_poll_descriptors_count)(stm->pcm);
assert(stm->nfds > 0);
stm->saved_fds = calloc(stm->nfds, sizeof(struct pollfd));
assert(stm->saved_fds);
- r = snd_pcm_poll_descriptors(stm->pcm, stm->saved_fds, stm->nfds);
+ r = WRAP(snd_pcm_poll_descriptors)(stm->pcm, stm->saved_fds, stm->nfds);
assert((nfds_t) r == stm->nfds);
r = pthread_cond_init(&stm->cond, NULL);
@@ -896,7 +1062,7 @@
pthread_mutex_lock(&stm->mutex);
if (stm->pcm) {
if (stm->state == DRAINING) {
- snd_pcm_drain(stm->pcm);
+ WRAP(snd_pcm_drain)(stm->pcm);
}
alsa_locked_pcm_close(stm->pcm);
stm->pcm = NULL;
@@ -906,7 +1072,10 @@
pthread_mutex_destroy(&stm->mutex);
r = pthread_cond_destroy(&stm->cond);
- assert(r == 0);
+ if (r != 0) { /* XXX stopgap until someone figures out the real reason */
+ fprintf(stderr,"alsa_stream_destroy: pthread_cond_destroy failed: %s",
+ strerror(r));
+ }
alsa_unregister_stream(stm);
@@ -938,12 +1107,12 @@
return CUBEB_ERROR;
}
- r = snd_pcm_hw_params_any(stm->pcm, hw_params);
+ r = WRAP(snd_pcm_hw_params_any)(stm->pcm, hw_params);
if (r < 0) {
return CUBEB_ERROR;
}
- r = snd_pcm_hw_params_get_channels_max(hw_params, max_channels);
+ r = WRAP(snd_pcm_hw_params_get_channels_max)(hw_params, max_channels);
if (r < 0) {
return CUBEB_ERROR;
}
@@ -963,34 +1132,34 @@
/* get a pcm, disabling resampling, so we get a rate the
* hardware/dmix/pulse/etc. supports. */
- r = snd_pcm_open(&pcm, "default", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0);
+ r = WRAP(snd_pcm_open)(&pcm, "default", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0);
if (r < 0) {
return CUBEB_ERROR;
}
- r = snd_pcm_hw_params_any(pcm, hw_params);
+ r = WRAP(snd_pcm_hw_params_any)(pcm, hw_params);
if (r < 0) {
- snd_pcm_close(pcm);
+ WRAP(snd_pcm_close)(pcm);
return CUBEB_ERROR;
}
- r = snd_pcm_hw_params_get_rate(hw_params, rate, &dir);
+ r = WRAP(snd_pcm_hw_params_get_rate)(hw_params, rate, &dir);
if (r >= 0) {
/* There is a default rate: use it. */
- snd_pcm_close(pcm);
+ WRAP(snd_pcm_close)(pcm);
return CUBEB_OK;
}
/* Use a common rate, alsa may adjust it based on hw/etc. capabilities. */
*rate = 44100;
- r = snd_pcm_hw_params_set_rate_near(pcm, hw_params, rate, NULL);
+ r = WRAP(snd_pcm_hw_params_set_rate_near)(pcm, hw_params, rate, NULL);
if (r < 0) {
- snd_pcm_close(pcm);
+ WRAP(snd_pcm_close)(pcm);
return CUBEB_ERROR;
}
- snd_pcm_close(pcm);
+ WRAP(snd_pcm_close)(pcm);
return CUBEB_OK;
}
@@ -1014,7 +1183,7 @@
ctx = stm->context;
pthread_mutex_lock(&stm->mutex);
- snd_pcm_pause(stm->pcm, 0);
+ WRAP(snd_pcm_pause)(stm->pcm, 0);
gettimeofday(&stm->last_activity, NULL);
pthread_mutex_unlock(&stm->mutex);
@@ -1048,7 +1217,7 @@
pthread_mutex_unlock(&ctx->mutex);
pthread_mutex_lock(&stm->mutex);
- snd_pcm_pause(stm->pcm, 1);
+ WRAP(snd_pcm_pause)(stm->pcm, 1);
pthread_mutex_unlock(&stm->mutex);
return CUBEB_OK;
@@ -1064,14 +1233,17 @@
pthread_mutex_lock(&stm->mutex);
delay = -1;
- if (snd_pcm_state(stm->pcm) != SND_PCM_STATE_RUNNING ||
- snd_pcm_delay(stm->pcm, &delay) != 0) {
+ if (WRAP(snd_pcm_state)(stm->pcm) != SND_PCM_STATE_RUNNING ||
+ WRAP(snd_pcm_delay)(stm->pcm, &delay) != 0) {
*position = stm->last_position;
pthread_mutex_unlock(&stm->mutex);
return CUBEB_OK;
}
- assert(delay >= 0);
+ if (delay < 0) {
+ WRAP(snd_pcm_forward)(stm->pcm, -delay);
+ delay = 0;
+ }
*position = 0;
if (stm->write_position >= (snd_pcm_uframes_t) delay) {
@@ -1090,7 +1262,7 @@
snd_pcm_sframes_t delay;
/* This function returns the delay in frames until a frame written using
snd_pcm_writei is sent to the DAC. The DAC delay should be < 1ms anyways. */
- if (snd_pcm_delay(stm->pcm, &delay)) {
+ if (WRAP(snd_pcm_delay)(stm->pcm, &delay)) {
return CUBEB_ERROR;
}
@@ -0,0 +1,407 @@
$NetBSD: patch-media_libcubeb_src_cubeb__oss.c,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- media/libcubeb/src/cubeb_oss.c.orig 2015-02-20 05:47:26.000000000 +0000
+++ media/libcubeb/src/cubeb_oss.c
@@ -0,0 +1,402 @@
+/*
+ * Copyright © 2014 Mozilla Foundation
+ *
+ * This program is made available under an ISC-style license. See the
+ * accompanying file LICENSE for details.
+ */
+#if defined(HAVE_SYS_SOUNDCARD_H)
+#include <sys/soundcard.h>
+#else
+#include <soundcard.h>
+#endif
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <errno.h>
+#include <pthread.h>
+#include <stdio.h>
+
+#include "cubeb/cubeb.h"
+#include "cubeb-internal.h"
+
+#ifndef CUBEB_OSS_DEFAULT_OUTPUT
+#define CUBEB_OSS_DEFAULT_OUTPUT "/dev/dsp"
+#endif
+
+#define OSS_BUFFER_SIZE 1024
+
+struct cubeb {
+ struct cubeb_ops const * ops;
+};
+
+struct cubeb_stream {
+ cubeb * context;
+
+ cubeb_data_callback data_callback;
+ cubeb_state_callback state_callback;
+ void * user_ptr;
+ float volume;
+ float panning;
+
+ pthread_mutex_t state_mutex;
+ pthread_cond_t state_cond;
+
+ int running;
+ int stopped;
+ int floating;
+
+ /* These two vars are needed to support old versions of OSS */
+ unsigned int position_bytes;
+ unsigned int last_position_bytes;
+
+ uint64_t written_frags; /* The number of fragments written to /dev/dsp */
+ uint64_t missed_frags; /* fragments output with stopped stream */
+
+ cubeb_stream_params params;
+ int fd;
+ pthread_t th;
+};
+
+static struct cubeb_ops const oss_ops;
+
+int oss_init(cubeb ** context, char const * context_name)
+{
+ cubeb* ctx = (cubeb*)malloc(sizeof(cubeb));
+ ctx->ops = &oss_ops;
+ *context = ctx;
+ return CUBEB_OK;
+}
+
+static void oss_destroy(cubeb *ctx)
+{
+ free(ctx);
+}
+
+static char const * oss_get_backend_id(cubeb * context)
+{
+ static char oss_name[] = "oss";
+ return oss_name;
+}
+
+static int oss_get_max_channel_count(cubeb * ctx, uint32_t * max_channels)
+{
+ *max_channels = 2; /* Let's support only stereo for now */
+ return CUBEB_OK;
+}
+
+static int oss_get_min_latency(cubeb * context, cubeb_stream_params params,
+ uint32_t * latency_ms)
+{
+ /* 40ms is a big enough number to work ok */
+ *latency_ms = 40;
+ return CUBEB_OK;
+}
+
+static int oss_get_preferred_sample_rate(cubeb *context, uint32_t * rate)
+{
+ /* 48000 seems a prefered choice for most audio devices
+ * and a good choice for OSS */
+ *rate = 48000;
+ return CUBEB_OK;
+}
+
+static void run_state_callback(cubeb_stream *stream, cubeb_state state)
+{
+ if (stream->state_callback) {
+ stream->state_callback(stream, stream->user_ptr, state);
+ }
+}
+
+static long run_data_callback(cubeb_stream *stream, void *buffer, long nframes)
+{
+ long got = 0;
+ pthread_mutex_lock(&stream->state_mutex);
+ if (stream->data_callback && stream->running && !stream->stopped) {
+ pthread_mutex_unlock(&stream->state_mutex);
+ got = stream->data_callback(stream, stream->user_ptr, buffer, nframes);
+ } else {
+ pthread_mutex_unlock(&stream->state_mutex);
+ }
+ return got;
+}
+
+static void apply_volume(int16_t* buffer, unsigned int n,
+ float volume, float panning)
+{
+ float left = volume;
+ float right = volume;
+ unsigned int i;
+ int pan[2];
+ if (panning<0) {
+ right *= (1+panning);
+ } else {
+ left *= (1-panning);
+ }
+ pan[0] = 128.0*left;
+ pan[1] = 128.0*right;
+ for(i=0; i<n; i++){
+ buffer[i] = ((int)buffer[i])*pan[i%2]/128;
+ }
+}
+
+static void *writer(void *stm)
+{
+ cubeb_stream* stream = (cubeb_stream*)stm;
+ int16_t buffer[OSS_BUFFER_SIZE];
+ float f_buffer[OSS_BUFFER_SIZE];
+ int got;
+ unsigned long i;
+ while (stream->running) {
+ pthread_mutex_lock(&stream->state_mutex);
+ if (stream->stopped) {
+ pthread_mutex_unlock(&stream->state_mutex);
+ run_state_callback(stream, CUBEB_STATE_STOPPED);
+ pthread_mutex_lock(&stream->state_mutex);
+ while (stream->stopped) {
+ pthread_cond_wait(&stream->state_cond, &stream->state_mutex);
+ }
+ pthread_mutex_unlock(&stream->state_mutex);
+ run_state_callback(stream, CUBEB_STATE_STARTED);
+ continue;
+ }
+ pthread_mutex_unlock(&stream->state_mutex);
+ if (stream->floating) {
+ got = run_data_callback(stream, f_buffer,
+ OSS_BUFFER_SIZE/stream->params.channels);
+ for (i=0; i<((unsigned long)got)*stream->params.channels; i++) {
+ buffer[i] = f_buffer[i]*32767.0;
+ }
+ } else {
+ got = run_data_callback(stream, buffer,
+ OSS_BUFFER_SIZE/stream->params.channels);
+ }
+ apply_volume(buffer, got*stream->params.channels,
+ stream->volume, stream->panning);
+ if (got<0) {
+ run_state_callback(stream, CUBEB_STATE_ERROR);
+ break;
+ }
+ if (!got) {
+ run_state_callback(stream, CUBEB_STATE_DRAINED);
+ }
+ if (got) {
+ size_t i = 0;
+ size_t s = got*stream->params.channels*sizeof(int16_t);
+ while (i < s) {
+ ssize_t n = write(stream->fd, ((char*)buffer) + i, s - i);
+ if (n<=0) {
+ run_state_callback(stream, CUBEB_STATE_ERROR);
+ break;
+ }
+ i+=n;
+ }
+ stream->written_frags+=got;
+ }
+ }
+ return NULL;
+}
+
+static void oss_try_set_latency(cubeb_stream* stream, unsigned int latency)
+{
+ unsigned int latency_bytes, n_frag;
+ int frag;
+ /* fragment size of 1024 is a good choice with good chances to be accepted */
+ unsigned int frag_size=1024;
+ unsigned int frag_log=10; /* 2^frag_log = frag_size */
+ latency_bytes =
+ latency*stream->params.rate*stream->params.channels*sizeof(uint16_t)/1000;
+ n_frag = latency_bytes>>frag_log;
+ frag = (n_frag<<16) | frag_log;
+ /* Even if this fails we wish to continue, not checking for errors */
+ ioctl(stream->fd, SNDCTL_DSP_SETFRAGMENT, &frag);
+}
+
+static int oss_stream_init(cubeb * context, cubeb_stream ** stm,
+ char const * stream_name,
+ cubeb_stream_params stream_params,
+ unsigned int latency,
+ cubeb_data_callback data_callback,
+ cubeb_state_callback state_callback, void * user_ptr)
+{
+ cubeb_stream* stream = (cubeb_stream*)malloc(sizeof(cubeb_stream));
+ stream->context = context;
+ stream->data_callback = data_callback;
+ stream->state_callback = state_callback;
+ stream->user_ptr = user_ptr;
+
+ if ((stream->fd = open(CUBEB_OSS_DEFAULT_OUTPUT, O_WRONLY)) == -1) {
+ free(stream);
+ return CUBEB_ERROR;
+ }
+#define SET(what, to) do { unsigned int i = to; \
+ int j = ioctl(stream->fd, what, &i); \
+ if (j == -1 || i != to) { \
+ close(stream->fd); \
+ free(stream); \
+ return CUBEB_ERROR_INVALID_FORMAT; } } while (0)
+
+ stream->params = stream_params;
+ stream->volume = 1.0;
+ stream->panning = 0.0;
+
+ oss_try_set_latency(stream, latency);
+
+ stream->floating = 0;
+ SET(SNDCTL_DSP_CHANNELS, stream_params.channels);
+ SET(SNDCTL_DSP_SPEED, stream_params.rate);
+ switch (stream_params.format) {
+ case CUBEB_SAMPLE_S16LE:
+ SET(SNDCTL_DSP_SETFMT, AFMT_S16_LE);
+ break;
+ case CUBEB_SAMPLE_S16BE:
+ SET(SNDCTL_DSP_SETFMT, AFMT_S16_BE);
+ break;
+ case CUBEB_SAMPLE_FLOAT32LE:
+ SET(SNDCTL_DSP_SETFMT, AFMT_S16_NE);
+ stream->floating = 1;
+ break;
+ default:
+ close(stream->fd);
+ free(stream);
+ return CUBEB_ERROR;
+ }
+
+
+ pthread_mutex_init(&stream->state_mutex, NULL);
+ pthread_cond_init(&stream->state_cond, NULL);
+
+ stream->running = 1;
+ stream->stopped = 1;
+ stream->position_bytes = 0;
+ stream->last_position_bytes = 0;
+ stream->written_frags = 0;
+ stream->missed_frags = 0;
+
+ pthread_create(&stream->th, NULL, writer, (void*)stream);
+
+ *stm = stream;
+
+ return CUBEB_OK;
+}
+
+static void oss_stream_destroy(cubeb_stream * stream)
+{
+ pthread_mutex_lock(&stream->state_mutex);
+
+ stream->running = 0;
+ stream->stopped = 0;
+ pthread_cond_signal(&stream->state_cond);
+
+ pthread_mutex_unlock(&stream->state_mutex);
+
+ pthread_join(stream->th, NULL);
+
+ pthread_mutex_destroy(&stream->state_mutex);
+ pthread_cond_destroy(&stream->state_cond);
+ close(stream->fd);
+ free(stream);
+}
+
+static int oss_stream_get_latency(cubeb_stream * stream, uint32_t * latency)
+{
+ if (ioctl(stream->fd, SNDCTL_DSP_GETODELAY, latency)==-1) {
+ return CUBEB_ERROR;
+ }
+ /* Convert latency from bytes to frames */
+ *latency /= stream->params.channels*sizeof(int16_t);
+ return CUBEB_OK;
+}
+
+
+static int oss_stream_current_optr(cubeb_stream * stream, uint64_t * position)
+{
+ count_info ci;
+ /* Unfortunately, this ioctl is only available in OSS 4.x */
+#ifdef SNDCTL_DSP_CURRENT_OPTR
+ oss_count_t count;
+ if (ioctl(stream->fd, SNDCTL_DSP_CURRENT_OPTR, &count) != -1) {
+ *position = count.samples;// + count.fifo_samples;
+ return CUBEB_OK;
+ }
+#endif
+ /* Fall back to this ioctl in case the previous one fails */
+ if (ioctl(stream->fd, SNDCTL_DSP_GETOPTR, &ci) == -1) {
+ return CUBEB_ERROR;
+ }
+ /* ci.bytes is only 32 bit and will start to wrap after arithmetic overflow */
+ stream->position_bytes += ci.bytes - stream->last_position_bytes;
+ stream->last_position_bytes = ci.bytes;
+ *position = stream->position_bytes/stream->params.channels/sizeof(int16_t);
+ return CUBEB_OK;
+}
+
+static int oss_stream_get_position(cubeb_stream * stream, uint64_t * position)
+{
+ if ( oss_stream_current_optr(stream, position) == CUBEB_OK ){
+ *position -= stream->missed_frags;
+ return CUBEB_OK;
+ }
+ /* If no correct method to get position works we resort to this */
+ *position = stream->written_frags;
+ return CUBEB_OK;
+}
+
+
+static int oss_stream_start(cubeb_stream * stream)
+{
+ pthread_mutex_lock(&stream->state_mutex);
+ if (stream->stopped) {
+ uint64_t ptr;
+ oss_stream_current_optr(stream, &ptr);
+ stream->missed_frags = ptr - stream->written_frags;
+ stream->stopped = 0;
+ pthread_cond_signal(&stream->state_cond);
+ }
+ pthread_mutex_unlock(&stream->state_mutex);
+ return CUBEB_OK;
+}
+
+static int oss_stream_stop(cubeb_stream * stream)
+{
+ pthread_mutex_lock(&stream->state_mutex);
+ stream->stopped = 1;
+ pthread_mutex_unlock(&stream->state_mutex);
+ return CUBEB_OK;
+}
+
+int oss_stream_set_panning(cubeb_stream * stream, float panning)
+{
+ if (stream->params.channels == 2) {
+ stream->panning=panning;
+ }
+ return CUBEB_OK;
+}
+
+int oss_stream_set_volume(cubeb_stream * stream, float volume)
+{
+ stream->volume=volume;
+ return CUBEB_OK;
+}
+
+static struct cubeb_ops const oss_ops = {
+ .init = oss_init,
+ .get_backend_id = oss_get_backend_id,
+ .get_max_channel_count = oss_get_max_channel_count,
+ .get_min_latency = oss_get_min_latency,
+ .get_preferred_sample_rate = oss_get_preferred_sample_rate,
+ .destroy = oss_destroy,
+ .stream_init = oss_stream_init,
+ .stream_destroy = oss_stream_destroy,
+ .stream_start = oss_stream_start,
+ .stream_stop = oss_stream_stop,
+ .stream_get_position = oss_stream_get_position,
+ .stream_get_latency = oss_stream_get_latency,
+ .stream_set_volume = oss_stream_set_volume,
+ .stream_set_panning = oss_stream_set_panning,
+ .stream_get_current_device = NULL,
+ .stream_device_destroy = NULL,
+ .stream_register_device_changed_callback = NULL
+};
@@ -0,0 +1,48 @@
$NetBSD: patch-media_libcubeb_src_moz.build,v 1.1 2016/02/14 07:30:54 ryoon Exp $
Don't assume cocoa toolkit just because OS_TARGET is Darwin.
--- media/libcubeb/src/moz.build.orig 2014-11-21 03:37:42.000000000 +0000
+++ media/libcubeb/src/moz.build
@@ -17,6 +17,12 @@ if CONFIG['MOZ_ALSA']:
]
DEFINES['USE_ALSA'] = True
+if CONFIG['MOZ_OSS']:
+ SOURCES += [
+ 'cubeb_oss.c',
+ ]
+ DEFINES['USE_OSS'] = True
+
if CONFIG['MOZ_PULSEAUDIO']:
SOURCES += [
'cubeb_pulse.c',
@@ -31,7 +37,7 @@ if CONFIG['OS_ARCH'] == 'OpenBSD':
]
DEFINES['USE_SNDIO'] = True
-if CONFIG['OS_TARGET'] == 'Darwin':
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
SOURCES += [
'cubeb_audiounit.c',
'cubeb_osx_run_loop.c'
@@ -65,6 +71,9 @@ if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
FINAL_LIBRARY = 'gkmedias'
+if CONFIG['MOZ_NATIVE_SPEEX']:
+ SOURCES['cubeb_resampler.cpp'].flags += CONFIG['MOZ_SPEEX_CFLAGS']
+
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
CFLAGS += [
'-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
@@ -73,7 +82,9 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk
]
]
+CFLAGS += CONFIG['MOZ_OSS_CFLAGS']
FAIL_ON_WARNINGS = True
+CFLAGS += CONFIG['MOZ_OSS_CFLAGS']
CFLAGS += CONFIG['MOZ_ALSA_CFLAGS']
CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS']
@@ -0,0 +1,12 @@
$NetBSD: patch-media_libpng_pngpriv.h,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- media/libpng/pngpriv.h.orig 2014-02-12 21:29:13.000000000 +0000
+++ media/libpng/pngpriv.h
@@ -38,6 +38,7 @@
* still required (as of 2011-05-02.)
*/
#define _POSIX_SOURCE 1 /* Just the POSIX 1003.1 and C89 APIs */
+#define _XOPEN_SOURCE 600
#ifndef PNG_VERSION_INFO_ONLY
/* Standard library headers not required by png.h: */
@@ -0,0 +1,15 @@
$NetBSD: patch-media_libsoundtouch_src_cpu__detect__x86.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- media/libsoundtouch/src/cpu_detect_x86.cpp.orig 2014-04-18 02:03:48.000000000 +0000
+++ media/libsoundtouch/src/cpu_detect_x86.cpp
@@ -130,7 +130,9 @@ uint detectCPUextensions(void)
#endif
return res & ~_dwDisabledISA;
-
+#elif defined(__GNUC__)
+ // No cpuid.h --> no cpuid support
+ return 0;
#else
/// One of these is true:
@@ -0,0 +1,22 @@
$NetBSD: patch-media_libstagefright_frameworks_av_media_libstagefright_foundation_AString.cpp,v 1.1 2016/02/14 07:30:54 ryoon Exp $
--- media/libstagefright/frameworks/av/media/libstagefright/foundation/AString.cpp.orig 2015-02-23 07:39:35.000000000 +0000
+++ media/libstagefright/frameworks/av/media/libstagefright/foundation/AString.cpp
@@ -23,6 +23,17 @@
#include "ADebug.h"
#include "AString.h"
+#ifdef __FreeBSD__
+# include <osreldate.h>
+# if __FreeBSD_version < 900506
+# undef tolower
+# endif
+#endif
+
+#if defined(__NetBSD__) && defined(tolower)
+#undef tolower
+#endif
+
namespace stagefright {
// static

Some files were not shown because too many files have changed in this diff Show More