tor-browser: update to 8.5.

This is based on a git checkout from a couple days ago; not completely
sure about the version number.

The Makefile now contains a short how-to for updating this package.

Many thanks for the www/firefox60 patches!

Use at your own risk!
Survives basic browsing and check.torproject.org claims it connects via tor.

Changes: too many to document.
This commit is contained in:
wiz 2019-02-25 15:32:23 +00:00
parent e65d918fa9
commit 7474c8534e
169 changed files with 2808 additions and 6243 deletions

View file

@ -1,30 +1,40 @@
# $NetBSD: Makefile,v 1.36 2019/02/23 18:58:48 wiz Exp $
# $NetBSD: Makefile,v 1.37 2019/02/25 15:32:23 wiz Exp $
TORBVER= 6.0.8
DISTNAME= v6.0.8-esr45.6.0
PKGNAME= tor-browser-${TORBVER}
PKGREVISION= 19
DISTNAME= tor-browser-60.5.1esr-8.5-1-build2
PKGNAME= tor-browser-8.5
CATEGORIES= www
# Use OpenBSD distfile
#MASTER_SITES= ${MASTER_SITE_OPENBSD:=distfiles/tor-browser/}
# DISTFILE manually packaged from git checkout
MAINTAINER= ryoon@NetBSD.org
HOMEPAGE= https://www.torproject.org/projects/torbrowser.html.en
COMMENT= Tor Browser based on Firefox
LICENSE= mpl-1.1
# A name of OpenBSD Ports distfile does not have 'tor-browser' inside.
DIST_SUBDIR= tor-browser
EXTRACT_USING= bsdtar
WRKSRC= ${WRKDIR}/${DISTNAME:S/v/torb-/}
WRKSRC= ${WRKDIR}/tor-browser
DEPENDS+= tor-[0-9]*:../../net/tor
# How to update this package:
#
# make a tarball:
# git clone https://git.torproject.org/tor-browser.git
# cd tor-browser
# git fetch --tags
# git tag -l
# (choose a tag, here tor-browser-60.5.1esr-8.5-1-build2)
# git checkout tor-browser-60.5.1esr-8.5-1-build2
# cd ..
# tar -cvzf tor-browser-60.5.1esr-8.5-1-build2.tar.gz --exclude .git tor-browser
#
# replace all patches with the one from the correspoding www/firefox${ESR_RELEASE}
# BUT keep patch-xpcom_io_TorFileUtils.cpp!
# make the patches apply
#
# when packaged up, read MESSAGE and test by visiting https://check.torproject.org
# Remove hardcoded build directory.
SUBST_CLASSES+= fix-build-dir
SUBST_STAGE.fix-build-dir+= pre-configure
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@,,'
@ -32,17 +42,7 @@ MOZILLA_DIR= # empty
.include "../../mk/bsd.prefs.mk"
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
.if ${OPSYS} != "SunOS"
CONFIGURE_ARGS+= --enable-pie
.endif
CONFIGURE_ARGS+= --enable-tor-data-in-home-dir
CONFIGURE_ARGS+= --enable-tor-browser-data-outside-app-dir
CFLAGS+= -DTOR_BROWSER_DATA_IN_HOME_DIR=1
CFLAGS+= -DTOR_BROWSER_DATA_OUTSIDE_APP_DIR=1
CFLAGS+= -fPIC
@ -51,23 +51,23 @@ CFLAGS+= -fPIC
CFLAGS+= -fpermissive
# workaround for link of libxul.so etc.
LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/tor-browser ${COMPILER_RPATH_FLAG}${PREFIX}/lib
LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/${PKGBASE}
LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib
LDFLAGS.DragonFly+= -lplc4 -lnspr4
LDFLAGS.FreeBSD+= -lplc4 -lnspr4
LDFLAGS.Linux+= -lnspr4
LDFLAGS.SunOS+= -lm
ALL_ENV+= MOZILLA_PKG_NAME=tor-browser
ALL_ENV+= MOZ_APP_NAME=${PKGBASE}
NOT_PAX_MPROTECT_SAFE+= lib/tor-browser/firefox
NOT_PAX_MPROTECT_SAFE+= lib/tor-browser/firefox-bin
NOT_PAX_MPROTECT_SAFE+= lib/${PKGBASE}/tor-browser
NOT_PAX_MPROTECT_SAFE+= lib/${PKGBASE}/tor-browser-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/firefox45/mozilla-common.mk"
.include "../../www/firefox60/mozilla-common.mk"
.include "options.mk"
CHECK_INTERPRETER_SKIP+=lib/firefox-sdk/sdk/bin/header.py
@ -75,15 +75,11 @@ 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
CHECK_WRKREF_SKIP+= lib/${PKGBASE}/chrome/toolkit/content/global/buildconfig.html
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
MOZILLA= ${PKGBASE}
MOZILLA_ICON= ${WRKSRC}/browser/branding/official/default48.png
MOZILLA_NAME= TorBrowser
post-extract:
mv ${WRKSRC}/gfx/ycbcr/yuv_row_arm.s ${WRKSRC}/gfx/ycbcr/yuv_row_arm.S
@ -91,6 +87,7 @@ post-extract:
pre-configure:
cd ${WRKSRC} && mkdir ${OBJDIR}
cd ${WRKSRC} && autoconf
cd ${WRKSRC}/${OBJDIR} && touch old-configure.vars
cd ${WRKSRC}/js/src && autoconf
post-build:
@ -102,10 +99,15 @@ post-build:
INSTALLATION_DIRS+= share/applications share/pixmaps
post-install:
${ECHO} '#! /bin/sh' > ${DESTDIR}${PREFIX}/bin/${MOZILLA}
${ECHO} '${PREFIX}/lib/tor-browser/tor-browser-bin "$$@"' >> \
${DESTDIR}${PREFIX}/bin/${MOZILLA}
${CHMOD} 755 ${DESTDIR}${PREFIX}/bin/${MOZILLA}
${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 "../../sysutils/dbus-glib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

File diff suppressed because it is too large Load diff

View file

@ -1,147 +1,48 @@
$NetBSD: distinfo,v 1.5 2017/01/22 12:27:21 ryoon Exp $
$NetBSD: distinfo,v 1.6 2019/02/25 15:32:23 wiz Exp $
SHA1 (tor-browser/v6.0.8-esr45.6.0.tar.gz) = c0ece77e3965ec8d0e467ef82af1c4489cf556e6
RMD160 (tor-browser/v6.0.8-esr45.6.0.tar.gz) = 5a2f87d766c9ef36035f33e1de5ea2df4aac44d2
SHA512 (tor-browser/v6.0.8-esr45.6.0.tar.gz) = 21d47fa1288b55eb2b7b491d6790f55311322175c75cbcc0dc234daf0bd1ac77eccf9ebea0326fa40754e446da11045b8f759603dd9e19cd66195d59cfde7347
Size (tor-browser/v6.0.8-esr45.6.0.tar.gz) = 256614669 bytes
SHA1 (patch-aa) = 68d9a1e69706ff4089cac06902791fc1889d0ff5
SHA1 (patch-ao) = f4244b8e3d89743cb97395913e8916f7121c172e
SHA1 (patch-as) = d5d7f8250a9cd462f25d529c2a79c59a1bba9db2
SHA1 (patch-bf) = 75c971043e9f693203d6bd670b2c20c4952a7756
SHA1 (patch-browser_installer_package-manifest.in) = 7c4f1822cd78a5ed465b954f4b62514c64ad7b84
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) = b8e8d46be72d381f7b95b62b9c0778e98954a888
SHA1 (patch-config_external_moz.build) = fa4f350b077f5c4a1d7a07d123c635bd9c7f1f75
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) = a87a47454da13791bd0158ba6c8431164c1fb1b4
SHA1 (patch-config_system__wrappers_unwind.h) = b3bdac0710179b9c8f8eabd824216d0114504491
SHA1 (patch-dom_base_DOMRequest.cpp) = b934991e8ad03c3785e4c7d197b42f697571ec09
SHA1 (patch-dom_base_moz.build) = 8b59c33958b7037c4c051742c64f1455096ced46
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) = 78d66c5ef615e5464a1003bcc817388102333200
SHA1 (patch-extensions_spellcheck_hunspell_glue_mozHunspell.cpp) = 376a4197f665ede1c27be19ac2618533655a63f1
SHA1 (patch-gfx_cairo_libpixman_src_pixman-arm-neon-asm.S) = 0379bef956f8abf2da2e059389149e133527faab
SHA1 (patch-gfx_gl_GLContextProviderGLX.cpp) = 2cc997cab71a84c1f50a791693519a0626564426
SHA1 (patch-gfx_graphite2_src_Bidi.cpp) = 5e80b4a32a47ae44d237fec69ea87bdd612a76ce
SHA1 (patch-gfx_moz.build) = a98bda4727538f4a0f09a20b84f9dd883edaf7d9
SHA1 (patch-gfx_skia_generate__mozbuild.py) = 68d690afd9092f11e17b7ec7db0987e8b6778cc5
SHA1 (patch-gfx_skia_moz.build) = 019f502ee236c67ab3cba8c0e31591899c2c857c
SHA1 (patch-gfx_skia_skia_src_core_SkUtilsArm.cpp) = 80283dd702be199ec7d038f4b2bb3385e0c4b482
SHA1 (patch-gfx_skia_skia_src_opts_SkBitmapProcState__opts__arm.cpp) = 99fad319f00a72754f3596791f353b8ab1359d2b
SHA1 (patch-gfx_skia_skia_src_opts_memset.arm.S) = a7ecacb40b482b2713ec71af197528bbe4bea00d
SHA1 (patch-gfx_thebes_moz.build) = bbc67642604042c8d63e6de1a02d2c62fcf16d83
SHA1 (patch-gfx_ycbcr_moz.build) = 121386ef62ff7425e6f93bc624555199f2ac3485
SHA1 (patch-gfx_ycbcr_yuv__row__arm.S) = dc136475637d808055e710a17b16899380b59068
SHA1 (patch-image_decoders_nsJPEGDecoder.cpp) = 522c46732d44be15411d39e16c89bc848d5c6f7a
SHA1 (patch-intl_hyphenation_glue_hnjalloc.h) = 4d5e1ff0b7b7da4755fb1dbab1fd671478c0335c
SHA1 (patch-ipc_chromium_src_base_atomicops.h) = 24b63a6e51d9ab27f2788ee02f2ffa7e1c36f29a
SHA1 (patch-ipc_chromium_src_base_file__util__posix.cc) = 70772ab2a474b7d3d15cf401c636ca843cfe2034
SHA1 (patch-ipc_chromium_src_base_message__loop.cc) = 16158489773bbcba35e224d30bebace0c93599ae
SHA1 (patch-ipc_chromium_src_base_message__pump__libevent.cc) = 2c5ce6290760e0435365dac788d283f9bb78acd9
SHA1 (patch-ipc_chromium_src_base_platform__thread.h) = e6d7ac39a8b2a1b232638f7671e8530acfed0b97
SHA1 (patch-ipc_chromium_src_base_platform__thread__posix.cc) = 6c98bbecde21b8571c71477f351488d9a3da45f3
SHA1 (patch-ipc_chromium_src_base_process__util.h) = 4b24c3467866a601d68bb83f44e5fd38fb27188d
SHA1 (patch-ipc_chromium_src_base_process__util__bsd.cc) = 9ffe81c7c4485bef53c4e0846b1d4499f4b5b23c
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) = 927f1f700c917f6f6b531aa4c10aba0fdd181195
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_StringUtil.cpp) = f238adebb5bdf57f7109a781c6f3fb195763f3c0
SHA1 (patch-ipc_glue_moz.build) = 5c3f99ede7ab2d8ad58e92b31576971de87cb528
SHA1 (patch-js__src__vm__SPSProfiler.cpp) = 989ba25e4c5308d21d07baa802decce13609a475
SHA1 (patch-js_src_ctypes_CTypes.h) = 768a084239f92a424c1c7dc9eaaf9be9456ca9f0
SHA1 (patch-js_src_frontend_ParseMaps.cpp) = c00117d79b78904bc50a1d664a8fc0e4e339bfbc
SHA1 (patch-js_src_jit-LIR.cpp) = 6e678d6886724dd346b8ca58ef903bd00dc8f5da
SHA1 (patch-js_src_jit_MIR.cpp) = 32586fb4437b48c62ef3dd8267f4b1796196230b
SHA1 (patch-js_src_jit_arm_Architecture-arm.cpp) = d734bea22d803f5f1019fd817cd3993da29a422b
SHA1 (patch-js_src_jsdate.cpp) = 4e15badd1d9a08462a851aa2a8c47fd1e137626b
SHA1 (patch-js_src_jskwgen.cpp) = 34d3b92e13366d4b43ff755ad54f392c116d5c59
SHA1 (patch-js_src_jsmath.cpp) = 7d4993ae91e9b5e6820358165603819aefb586f9
SHA1 (patch-js_src_shell_jsoptparse.cpp) = 2502ae2b4e6103788c2a888b6cb19cedf9d2976f
SHA1 (patch-js_xpconnect_src_XPCConvert.cpp) = 915777e9bb5366be41866cdb6ea0ad2b1c006dde
SHA1 (patch-js_xpconnect_src_xpcprivate.h) = 8a15ff542c9d3fce448d9ec63706f7dfb411d926
SHA1 (patch-media_libcubeb_src_cubeb.c) = 5c2a9adef2c3b8fe40490ac8062ae77d182b5e59
SHA1 (patch-media_libcubeb_src_cubeb__alsa.c) = 7394a73b1624ea525885aed524357bbd1a19138b
SHA1 (patch-media_libcubeb_src_cubeb__oss.c) = 54e2a210411c7083bc395033fbf519d581bc4a62
SHA1 (patch-media_libcubeb_src_moz.build) = 3ed7f6e8caf8cca718cd8dcb120bc401cd9a82ef
SHA1 (patch-media_libpng_pngpriv.h) = c9cefd1b5dd85fbd0c875c3f9bc108975398fe3a
SHA1 (patch-media_libsoundtouch_src_cpu__detect__x86.cpp) = db61737afa7773e8cbd82976de3a02c917174696
SHA1 (patch-media_libstagefright_frameworks_av_include_media_stagefright_foundation_AString.h) = b280f691dbe67b6de592dcd04baf33c6cf480cc8
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) = 4d03d454e13bda8321198aeb957aaabcfb4c6512
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) = 2e6f125ae50125a1fff7197e42f3a61b92e0fcfc
SHA1 (patch-media_mtransport_third__party_nrappkit_src_port_generic_include_sys_queue.h) = de7055f891387f96f8fd32366c7189d480354e9e
SHA1 (patch-media_openmax__dl_dl_api_armCOMM__s.h) = 1ce4fe73581ea53f03858f97ce7d7214bcbb5f51
SHA1 (patch-media_webrtc_signaling_test_common.build) = febf2033154d64208632524732c4ef26e9247267
SHA1 (patch-media_webrtc_trunk_webrtc_build_common.gypi) = 4ff5796e15d9aa6adb8495d6f2e5a7f0445a0fac
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) = ee3d3421a4cec22dbd94b5a22e7b877e356a7d9c
SHA1 (patch-media_webrtc_trunk_webrtc_modules_video__capture_video__capture.gypi) = 0bc751e73456dec547567797ef4b9199e7220f23
SHA1 (patch-media_webrtc_trunk_webrtc_system__wrappers_source_spreadsortlib_spreadsort.hpp) = 7c08c0586874bcb69a9005e8661b853f8664db4c
SHA1 (patch-memory_build_mozjemalloc__compat.c) = c27c745fd6e0bbb120ef34d8a984937d5f2e1319
SHA1 (patch-memory_mozalloc_mozalloc__abort.cpp) = f61a8ef233963d5d9639a4ce68e8584bc7d7c1b2
SHA1 (patch-memory_volatile_VolatileBufferOSX.cpp) = ebea8a615443206376cb4264ed43b5c74e029b7d
SHA1 (patch-mfbt_Attributes.h) = bf3378667704d7c9194b00024bb51ed23fd92286
SHA1 (patch-mfbt_Poison.cpp) = f502581db96b3e5eca25a9aa9035f436e9167503
SHA1 (patch-modules_libjar_nsZipArchive.cpp) = 6aff0f8ed42575d8ca36a524e12e9a1f7351004a
SHA1 (patch-modules_libpref_init_all.js) = fc47d4133490d3da79217864028f5a86023a632f
SHA1 (patch-mozglue_build_arm.cpp) = e89e9ff5a26fb11b55df29a0b29d1cd6f35e46e6
SHA1 (patch-mozglue_build_arm.h) = e303e53d1931b28aab68346c7f6caac4402d16f1
SHA1 (patch-netwerk_dns_moz.build) = 6bf4691cf81d5f6fc1b392a4fac4368615e18faa
SHA1 (patch-netwerk_protocol_http_Http2Session.cpp) = 7322fbf185aaf00c6caf9d6c5ceaa2600d188d47
SHA1 (patch-pb) = 97c9b2e4cefd524dc6ba825f71c3da2a761aa1f4
SHA1 (patch-pc) = 8b2baa88f0983a2fef4f801cf6b1ae425f6c813a
SHA1 (patch-rc) = 3bc75b2005bb1a371231846ea605bcf55251db57
SHA1 (patch-storage_SQLiteMutex.h) = 9552e325e4e6e0f611a83a5eea2617e04236616f
SHA1 (patch-toolkit_components_protobuf_src_google_protobuf_stubs_atomicops.h) = 4b664bb6ac2c23e8bfddd406bf76e288548e8910
SHA1 (patch-toolkit_components_protobuf_src_google_protobuf_stubs_platform__macros.h) = 3b0973c96eadb7bff91eab211d3c159a9b22fa9c
SHA1 (patch-toolkit_library_moz.build) = 625d78e64959f78a5d0b8148749bb43a0abcbcf7
SHA1 (patch-toolkit_xre_glxtest.cpp) = cf048491778610454b914400e53072afedd96e7b
SHA1 (patch-toolkit_xre_nsAppRunner.cpp) = f335d64cb0e1d248fd2c41a167ee1874218e7db6
SHA1 (patch-toolkit_xre_nsEmbedFunctions.cpp) = 6ee6fba04a3ecc6596f8aed67f752a1075901fa8
SHA1 (patch-webapprt_moz.build) = 177468d5e12c49db1ad5376f0f3df34fa9df070c
SHA1 (patch-xpcom_base_nscore.h) = f4fe66cc9e714a2101a4d1287359d1c300574438
SHA1 (patch-xpcom_build_PoisonIOInterposer.h) = b0a53ec580bf5c2277d19618c1240a447575ae68
SHA1 (patch-xpcom_components_Module.h) = 35c5d831b0f916be4cbed18f904ab561dde72ab0
SHA1 (patch-xpcom_io_TorFileUtils.cpp) = c646c26b60c38f5bacbf277021ab72ebb85728be
SHA1 (patch-xpcom_reflect_xptcall_md_unix_Makefile.in) = 6083e298140357bc5f2fa018885fed42eecb1ac4
SHA1 (patch-xpcom_reflect_xptcall_md_unix_moz.build) = 4717f2a285200ccb5f580e12ffd73c51ae9e9c00
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 (tor-browser-60.5.1esr-8.5-1-build2.tar.gz) = fa8bea5f006a4a024240c7332ac8cc622320c002
RMD160 (tor-browser-60.5.1esr-8.5-1-build2.tar.gz) = 17d4dda39fcee5e305b1c3a40938369c677bfa07
SHA512 (tor-browser-60.5.1esr-8.5-1-build2.tar.gz) = 33f17c35a6effe152317056bdab9a00f07da278db6caee65422b5fa28c205ff901da4dbe7ca6ac99cf4122fd568fbb6921402826773f6972ff9f9d91f00bb5f4
Size (tor-browser-60.5.1esr-8.5-1-build2.tar.gz) = 388485413 bytes
SHA1 (patch-.mozconfig) = 3377e91db2560d79503e9a9dd69011f5a84b6994
SHA1 (patch-aa) = fdabcc9b055f6439fdbda9b38ab7cec08ff3e231
SHA1 (patch-browser_app_profile_firefox.js) = 9a43095d94f83f315b9a3ce4a7b0a4301e9c40e6
SHA1 (patch-build_moz.configure_old.configure) = 1df6867eaf73a350fbe8fcd5bd34e1fcab09d707
SHA1 (patch-build_moz.configure_rust.configure) = 2818454ba4df3cbd85174edc4828206b3bf0a82b
SHA1 (patch-dom_fetch_FetchConsumer.cpp) = 784a1e236cd7927726f13a50b72218ded142cc53
SHA1 (patch-dom_media_CubebUtils.cpp) = b9ef14e863f7eb5fb8e3caf3813dc28dea66ff7a
SHA1 (patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp) = f1d0adae2873545818072adb4e8599267bc4e6c5
SHA1 (patch-gfx_webrender_src_query.rs) = 6434b0fc1d6441ddb555a2a3b199564b488ec336
SHA1 (patch-image_decoders_nsJPEGDecoder.cpp) = 4a1b34bd0036ebd7bfd22a4cc71034c0d40bbeb8
SHA1 (patch-ipc_chromium_src_base_lock__impl__posix.cc) = 16e37fe54ba1d8d233f6b04dbd06e248305d7f6e
SHA1 (patch-ipc_chromium_src_base_message__pump__libevent.cc) = 2f7fce38e1c68bb39e30f0fe4fa5c5e58809dcd0
SHA1 (patch-ipc_chromium_src_base_platform__thread__posix.cc) = ee1e2d1c83d3c6e5d845031c4b20e9d79de5532e
SHA1 (patch-ipc_glue_CrossProcessSemaphore.h) = 778a569887d8ad082abc2fa2fe89a0a943e84d64
SHA1 (patch-ipc_glue_CrossProcessSemaphore__posix.cpp) = 5b3bde8ff281f444b82a2094bd3ba82974d40cc7
SHA1 (patch-ipc_glue_GeckoChildProcessHost.cpp) = 260c29bacd8bf265951b7a412f850bf2b292c836
SHA1 (patch-js_src_gc_Memory.cpp) = b69e841d3e4edfd50c387e374e63186721c24cc7
SHA1 (patch-js_src_threading_posix_Thread.cpp) = 47e612a676e614fd6dd43b8a3140218a3fbdc7fa
SHA1 (patch-js_src_util_NativeStack.cpp) = 3da5b544b28434a4b1e13e9a5ec47fb6ac7149c7
SHA1 (patch-js_src_wasm_WasmSignalHandlers.cpp) = c2a4f0bf52bbd95ca66319f65662840f2411d080
SHA1 (patch-media_libcubeb_gtest_moz.build) = 921a001726cda9e9782df5e59ae02b19d76ef47e
SHA1 (patch-media_libcubeb_src_cubeb.c) = 1b1b8d57eb710cad13518ded79a0ddee2681881b
SHA1 (patch-media_libcubeb_src_cubeb__alsa.c) = 3ee36f58bb525767c7d2b9e814ba4ccaa4868717
SHA1 (patch-media_libcubeb_src_cubeb__oss.c) = ccd7ad6f09977dab358632107cfd9078b4649f99
SHA1 (patch-media_libcubeb_src_moz.build) = f243068c8908dcb16434221edef8c65db3bb0c83
SHA1 (patch-media_libcubeb_update.sh) = 3a322de06bbe9aafba9da349954ef022bd094992
SHA1 (patch-media_libpng_pngpriv.h) = c8084332560017cd7c9b519b61d125fa28af0dbc
SHA1 (patch-media_libyuv_libyuv_source_mjpeg__decoder.cc) = 8a264c439fa4749cd7c5acf96e1ae3f9bae0a886
SHA1 (patch-media_webrtc_trunk_webrtc_modules_audio__device_linux_audio__device__alsa__linux.cc) = 91e8ce496c1f4dbbd0a463d83cb033afd1de3f49
SHA1 (patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_device__info__linux.cc) = 0141dd1372c13ea1fce6e2f5ffb65e0cb0f3a13e
SHA1 (patch-media_webrtc_trunk_webrtc_modules_video__capture_linux_video__capture__linux.cc) = a69bc7b7096b410582e725f9dbec57fee90d6686
SHA1 (patch-modules_pdfium_update.sh) = b0bf091325c9322c54880de067871354cd689038
SHA1 (patch-servo_components_style_build__gecko.rs) = fca2260a70b496fc010f165ff4d68788b7e28632
SHA1 (patch-toolkit_components_terminator_nsTerminator.cpp) = 5b6d2e5c9f685d32894898d3ef3aec09a1a1e5ce
SHA1 (patch-toolkit_library_moz.build) = ecb6125e996d5496335c58ecd3433ad3214f29f0
SHA1 (patch-toolkit_moz.configure) = 40ee147cc1d2c62dd6c83b3f67ce9e61f758ea57
SHA1 (patch-toolkit_mozapps_installer_packager.mk) = 6f557fb732f0b9dabf059ffac0400d3db4e79e47
SHA1 (patch-toolkit_xre_glxtest.cpp) = 6e7e7717e2ecf28860e87261e046ef180eac0807
SHA1 (patch-xpcom_base_nscore.h) = fef62ceffed0896db1c41972fd96d5dd36b7de37
SHA1 (patch-xpcom_build_BinaryPath.h) = df4735f7e9ead61b1f98e057c0b679caf174f4c8
SHA1 (patch-xpcom_io_TorFileUtils.cpp) = c23d867b5a97a4c169198831b816b1bcef8dc630
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

View file

@ -0,0 +1,17 @@
$NetBSD: patch-.mozconfig,v 1.1 2019/02/25 15:32:24 wiz Exp $
Disable update outside of pkgsrc infrastructure, and allow config in $HOME.
--- .mozconfig.orig 2019-02-24 20:07:18.325907978 +0000
+++ .mozconfig
@@ -13,7 +13,9 @@ ac_add_options --enable-official-brandin
# Let's support GTK3 for ESR60
ac_add_options --enable-default-toolkit=cairo-gtk3
-ac_add_options --enable-tor-browser-update
+ac_add_options --enable-tor-browser-data-outside-app-dir
+
+ac_add_options --disable-tor-browser-update
ac_add_options --enable-signmar
ac_add_options --enable-verify-mar

View file

@ -1,50 +1,12 @@
$NetBSD: patch-aa,v 1.2 2017/01/22 12:27:21 ryoon Exp $
$NetBSD: patch-aa,v 1.3 2019/02/25 15:32:24 wiz Exp $
--- configure.in.orig 2017-01-22 03:59:19.858941700 +0000
+++ configure.in
@@ -1746,7 +1746,7 @@ fi
dnl ========================================================
dnl SPS Profiler
dnl ========================================================
-MOZ_ENABLE_PROFILER_SPS=1
+MOZ_ENABLE_PROFILER_SPS=
case "${OS_TARGET}" in
Android)
@@ -1996,7 +1996,6 @@ case "$target" in
_PLATFORM_DEFAULT_TOOLKIT='cairo-uikit'
direct_nspr_config=1
else
- AC_DEFINE(XP_MACOSX)
AC_DEFINE(XP_DARWIN)
_PLATFORM_DEFAULT_TOOLKIT='cairo-cocoa'
# The ExceptionHandling framework is needed for Objective-C exception
@@ -2574,8 +2573,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)
@@ -3467,6 +3465,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 ========================================================
@@ -3494,11 +3500,7 @@ if test "$MOZ_NATIVE_JPEG" = 1; then
* Disable libjpeg-turbo check
* Add system libraries option
* Add OSS audio support
--- old-configure.in.orig 2018-05-03 16:58:31.000000000 +0000
+++ old-configure.in
@@ -1804,11 +1804,7 @@ if test "$MOZ_SYSTEM_JPEG" = 1; then
#include <jpeglib.h> ],
[ #if JPEG_LIB_VERSION < $MOZJPEG
#error "Insufficient JPEG library version ($MOZJPEG required)."
@ -54,174 +16,10 @@ $NetBSD: patch-aa,v 1.2 2017/01/22 12:27:21 ryoon Exp $
- #endif
- ],
+ #endif ],
MOZ_NATIVE_JPEG=1,
MOZ_SYSTEM_JPEG=1,
AC_MSG_ERROR([Insufficient JPEG library version for --with-system-jpeg]))
fi
@@ -4255,6 +4257,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"
@@ -5013,6 +5019,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)
@@ -5156,6 +5165,142 @@ 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 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,
@@ -5558,6 +5703,67 @@ fi
@@ -2596,6 +2592,67 @@ AC_DEFINE(MOZ_WEBM_ENCODER)
AC_SUBST(MOZ_WEBM_ENCODER)
dnl ==================================
@ -230,7 +28,7 @@ $NetBSD: patch-aa,v 1.2 2017/01/22 12:27:21 ryoon Exp $
+
+dnl If using Linux, Solaris or BSDs, ensure that OSS is available
+case "$OS_TARGET" in
+Linux|SunOS|DragonFly|FreeBSD|GNU/kFreeBSD)
+Linux|SunOS|DragonFly|FreeBSD|NetBSD|GNU/kFreeBSD)
+ MOZ_OSS=1
+ ;;
+esac
@ -253,7 +51,7 @@ $NetBSD: patch-aa,v 1.2 2017/01/22 12:27:21 ryoon Exp $
+ dnl Prefer 4Front implementation
+ AC_MSG_CHECKING([MOZ_OSS_CFLAGS])
+ if test "$OSSPREFIX" != "yes"; then
+ oss_conf=${OSSPREFIX}/etc/oss.conf
+ oss_conf=${OSSPREFIX%/usr}/etc/oss.conf
+ if test -f "$oss_conf"; then
+ . "$oss_conf"
+ else
@ -270,7 +68,7 @@ $NetBSD: patch-aa,v 1.2 2017/01/22 12:27:21 ryoon Exp $
+
+ 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.])
+ AC_MSG_ERROR([Need OSS for Ogg, Wave or WebM decoding on $OS_TARGET. Disable with --without-oss.])
+ fi
+
+ dnl Assume NetBSD implementation over SunAudio
@ -289,101 +87,3 @@ $NetBSD: patch-aa,v 1.2 2017/01/22 12:27:21 ryoon Exp $
dnl = Check alsa availability on Linux
dnl ==================================
@@ -5571,12 +5777,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 ========================================================
@@ -6539,12 +6756,23 @@ if test -n "$TOR_BROWSER_UPDATE"; then
AC_DEFINE(TOR_BROWSER_UPDATE)
fi
+MOZ_ARG_ENABLE_BOOL(tor-browser-data-in-home-dir,
+[ --enable-tor-browser-data-in-home-dir
+ Enable Tor Browser data in home dir],
+ TOR_BROWSER_DATA_IN_HOME_DIR=1,
+ TOR_BROWSER_DATA_IN_HOME_DIR= )
+
MOZ_ARG_ENABLE_BOOL(tor-browser-data-outside-app-dir,
[ --enable-tor-browser-data-outside-app-dir
Enable Tor Browser data outside of app directory],
TOR_BROWSER_DATA_OUTSIDE_APP_DIR=1,
TOR_BROWSER_DATA_OUTSIDE_APP_DIR= )
+if test -n "$TOR_BROWSER_DATA_IN_HOME_DIR"; then
+ TOR_BROWSER_DATA_OUTSIDE_APP_DIR=1
+ AC_DEFINE(TOR_BROWSER_DATA_IN_HOME_DIR)
+fi
+
if test -n "$TOR_BROWSER_DATA_OUTSIDE_APP_DIR"; then
AC_DEFINE(TOR_BROWSER_DATA_OUTSIDE_APP_DIR)
fi
@@ -8170,6 +8398,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 ========================================================

View file

@ -1,17 +0,0 @@
$NetBSD: patch-ao,v 1.2 2017/01/22 12:27:21 ryoon Exp $
--- toolkit/mozapps/installer/packager.mk.orig 2016-04-20 21:33:09.000000000 +0000
+++ toolkit/mozapps/installer/packager.mk
@@ -131,9 +131,9 @@ endif
(cd $(DIST)/$(MOZ_PKG_DIR) && $(TAR) --exclude=precomplete $(TAR_CREATE_FLAGS) - .) | \
(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
+ $(RM) -f $(DESTDIR)$(bindir)/$(MOZILLA_PKG_NAME)
+ 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 -)

View file

@ -1,42 +0,0 @@
$NetBSD: patch-as,v 1.2 2017/01/22 12:27:21 ryoon Exp $
Treat DragonFly like FreeBSD.
--- js/src/configure.in.orig 2016-01-23 23:23:39.000000000 +0000
+++ js/src/configure.in
@@ -2123,8 +2123,7 @@ AC_LANG_CPLUSPLUS
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)
@@ -2960,7 +2959,7 @@ if test "$MOZ_MEMORY"; then
*-darwin*)
AC_DEFINE(MOZ_MEMORY_DARWIN)
;;
- *-*freebsd*)
+ *-*freebsd*|*-*dragonfly*)
AC_DEFINE(MOZ_MEMORY_BSD)
;;
*-android*|*-linuxandroid*)
@@ -3808,6 +3807,16 @@ MOZ_SUBCONFIGURE_ICU()
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
MOZ_CHECK_ALLOCATOR

View file

@ -1,13 +0,0 @@
$NetBSD: patch-bf,v 1.2 2017/01/22 12:27:22 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

View file

@ -0,0 +1,14 @@
$NetBSD: patch-browser_app_profile_firefox.js,v 1.1 2019/02/25 15:32:24 wiz Exp $
--- browser/app/profile/firefox.js.orig 2018-05-16 05:38:23.000000000 +0000
+++ browser/app/profile/firefox.js
@@ -1747,3 +1747,9 @@ pref("app.shield.optoutstudies.enabled",
#else
pref("app.shield.optoutstudies.enabled", false);
#endif
+
+// Select UI locale from LANG/LC_MESSAGE environmental variables
+pref("intl.locale.requested", "");
+
+// Disable multiprocess window support. Workaround for PR 53273.
+pref("browser.tabs.remote.autostart", false);

View file

@ -1,24 +0,0 @@
$NetBSD: patch-browser_installer_package-manifest.in,v 1.2 2017/01/22 12:27:22 ryoon Exp $
Limit SPARC bits to just SPARC (untested, but fixes x86).
--- browser/installer/package-manifest.in.orig 2015-10-22 22:30:28.000000000 +0000
+++ browser/installer/package-manifest.in
@@ -620,7 +620,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
@RESPATH@/components/TestInterfaceJSMaplike.js
@@ -822,7 +822,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

View file

@ -1,22 +0,0 @@
$NetBSD: patch-build_autoconf_compiler-opts.m4,v 1.2 2017/01/22 12:27:22 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

View file

@ -1,46 +0,0 @@
$NetBSD: patch-build_autoconf_nss.m4,v 1.2 2017/01/22 12:27:22 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"

View file

@ -1,42 +0,0 @@
$NetBSD: patch-build_gyp.mozbuild,v 1.2 2017/01/22 12:27:22 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']

View file

@ -0,0 +1,12 @@
$NetBSD: patch-build_moz.configure_old.configure,v 1.1 2019/02/25 15:32:24 wiz Exp $
--- build/moz.configure/old.configure.orig 2018-05-03 16:58:26.000000000 +0000
+++ build/moz.configure/old.configure
@@ -262,6 +262,7 @@ def old_configure_options(*options):
'--with-nspr-prefix',
'--with-nss-exec-prefix',
'--with-nss-prefix',
+ '--with-oss',
'--with-pthreads',
'--with-qemu-exe',
'--with-sixgill',

View file

@ -0,0 +1,15 @@
$NetBSD: patch-build_moz.configure_rust.configure,v 1.1 2019/02/25 15:32:24 wiz Exp $
* Fix configure with Rust 1.29.0
--- build/moz.configure/rust.configure.orig 2018-09-03 06:30:53.000000000 +0000
+++ build/moz.configure/rust.configure
@@ -119,6 +119,8 @@ def rust_supported_targets(rustc):
ambiguous = set()
per_raw_os = {}
for t in out:
+ if t == 'aarch64-fuchsia' or t == 'x86_64-fuchsia':
+ t = t.replace('-', '--')
t = split_triplet(t, allow_unknown=True)
key = (t.cpu, t.endianness, t.os)
if key in per_os:

View file

@ -1,13 +0,0 @@
$NetBSD: patch-build_pgo_profileserver.py,v 1.2 2017/01/22 12:27:22 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,

View file

@ -1,21 +0,0 @@
$NetBSD: patch-config_Makefile.in,v 1.2 2017/01/22 12:27:22 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)

View file

@ -1,19 +0,0 @@
$NetBSD: patch-config_baseconfig.mk,v 1.2 2017/01/22 12:27:22 ryoon Exp $
--- config/baseconfig.mk.orig 2016-02-25 23:01:53.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}
ifeq (.,$(DEPTH))
DIST = dist
else

View file

@ -1,36 +0,0 @@
$NetBSD: patch-config_external_moz.build,v 1.2 2017/01/22 12:27:22 ryoon Exp $
--- config/external/moz.build.orig 2015-08-24 21:53:10.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']:
@@ -49,9 +58,6 @@ if CONFIG['MOZ_WEBSPEECH_POCKETSPHINX']:
external_dirs += [
'media/kiss_fft',
'media/libcubeb',
- 'media/libogg',
- 'media/libopus',
- 'media/libtheora',
'media/libspeex_resampler',
'media/libstagefright',
'media/libsoundtouch',

View file

@ -1,12 +0,0 @@
$NetBSD: patch-config_rules.mk,v 1.2 2017/01/22 12:27:22 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)

View file

@ -1,8 +0,0 @@
$NetBSD: patch-config_stl__wrappers_ios,v 1.2 2017/01/22 12:27:22 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

View file

@ -1,8 +0,0 @@
$NetBSD: patch-config_stl__wrappers_ostream,v 1.2 2017/01/22 12:27:22 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

View file

@ -1,90 +0,0 @@
$NetBSD: patch-config_system-headers,v 1.2 2017/01/22 12:27:22 ryoon Exp $
--- config/system-headers.orig 2016-01-15 01:01:40.000000000 +0000
+++ config/system-headers
@@ -627,6 +627,7 @@ libgnome/libgnome.h
libgnomeui/gnome-icon-lookup.h
libgnomeui/gnome-icon-theme.h
libgnomeui/gnome-ui-init.h
+libv4l2.h
lib$routines.h
limits
limits.h
@@ -721,6 +722,7 @@ mapiutil.h
mapix.h
Math64.h
math.h
+complex
mbstring.h
#ifdef ANDROID
media/AudioEffect.h
@@ -1313,6 +1315,25 @@ vpx/vp8cx.h
vpx/vp8dx.h
vpx_mem/vpx_mem.h
#endif
+#ifdef GKMEDIAS_SHARED_LIBRARY
+vpx/vpx_codec.h
+vpx/vpx_decoder.h
+vpx/vpx_encoder.h
+vpx/vp8cx.h
+vpx/vp8dx.h
+vpx_mem/vpx_mem.h
+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
gst/app/gstappsrc.h
@@ -1343,3 +1364,43 @@ unicode/utypes.h
#endif
libutil.h
unwind.h
+#if MOZ_NATIVE_GRAPHITE2==1
+graphite2/Font.h
+graphite2/Segment.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

View file

@ -1,9 +0,0 @@
$NetBSD: patch-config_system__wrappers_unwind.h,v 1.1 2017/01/22 12:27:22 ryoon Exp $
--- config/system_wrappers/unwind.h.orig 2013-05-13 19:56:18.000000000 +0000
+++ config/system_wrappers/unwind.h
@@ -0,0 +1,4 @@
+#pragma GCC system_header
+#pragma GCC visibility push(default)
+#include_next <unwind.h>
+#pragma GCC visibility pop

View file

@ -1,12 +0,0 @@
$NetBSD: patch-dom_base_DOMRequest.cpp,v 1.1 2017/01/22 12:27:22 ryoon Exp $
--- dom/base/DOMRequest.cpp.orig 2015-09-17 22:13:30.000000000 +0000
+++ dom/base/DOMRequest.cpp
@@ -19,7 +19,6 @@ using mozilla::dom::DOMError;
using mozilla::dom::DOMRequest;
using mozilla::dom::DOMRequestService;
using mozilla::dom::DOMCursor;
-using mozilla::dom::Promise;
using mozilla::dom::AutoJSAPI;
DOMRequest::DOMRequest(nsPIDOMWindow* aWindow)

View file

@ -1,14 +0,0 @@
$NetBSD: patch-dom_base_moz.build,v 1.2 2017/01/22 12:27:22 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',

View file

@ -0,0 +1,13 @@
$NetBSD: patch-dom_fetch_FetchConsumer.cpp,v 1.1 2019/02/25 15:32:24 wiz Exp $
--- dom/fetch/FetchConsumer.cpp.orig 2019-02-23 20:00:40.000000000 +0000
+++ dom/fetch/FetchConsumer.cpp
@@ -560,7 +560,7 @@ void FetchBodyConsumer<Derived>::Continu
RefPtr<FetchBodyConsumer<Derived>> self = this;
auto autoReleaseObject =
- mozilla::MakeScopeExit([&] { self->ReleaseObject(); });
+ mozilla::MakeScopeExit([self] { self->ReleaseObject(); });
if (aShuttingDown) {
// If shutting down, we don't want to resolve any promise.

View file

@ -0,0 +1,13 @@
$NetBSD: patch-dom_media_CubebUtils.cpp,v 1.1 2019/02/25 15:32:24 wiz Exp $
--- dom/media/CubebUtils.cpp.orig 2019-02-23 20:00:40.000000000 +0000
+++ dom/media/CubebUtils.cpp
@@ -143,7 +143,7 @@ const char kBrandBundleURL[] = "chrome:/
const char* AUDIOSTREAM_BACKEND_ID_STR[] = {
"jack", "pulse", "alsa", "audiounit", "audioqueue", "wasapi",
- "winmm", "directsound", "sndio", "opensl", "audiotrack", "kai"};
+ "winmm", "directsound", "sndio", "opensl", "audiotrack", "kai", "oss"};
/* Index for failures to create an audio stream the first time. */
const int CUBEB_BACKEND_INIT_FAILURE_FIRST =
ArrayLength(AUDIOSTREAM_BACKEND_ID_STR);

View file

@ -1,12 +0,0 @@
$NetBSD: patch-dom_media_gstreamer_GStreamerAllocator.cpp,v 1.2 2017/01/22 12:27:22 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)

View file

@ -1,32 +0,0 @@
$NetBSD: patch-dom_media_moz.build,v 1.2 2017/01/22 12:27:22 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:

View file

@ -1,31 +0,0 @@
$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.2 2017/01/22 12:27:22 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);

View file

@ -1,13 +0,0 @@
$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.h,v 1.2 2017/01/22 12:27:22 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;

View file

@ -1,16 +0,0 @@
$NetBSD: patch-dom_plugins_ipc_PluginProcessChild.cpp,v 1.2 2017/01/22 12:27:22 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

View file

@ -1,51 +0,0 @@
$NetBSD: patch-dom_system_OSFileConstants.cpp,v 1.2 2017/01/22 12:27:22 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 2015-10-22 22:30:38.000000000 +0000
+++ dom/system/OSFileConstants.cpp
@@ -11,6 +11,10 @@
#include "prsystem.h"
+#if defined(__NetBSD__)
+#include <sys/param.h>
+#endif
+
#if defined(XP_UNIX)
#include "unistd.h"
#include "dirent.h"
@@ -20,7 +24,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)
@@ -28,9 +34,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>
@@ -590,7 +596,7 @@ static const dom::ConstantSpec gLibcProp
// The size of |fsblkcnt_t|.
{ "OSFILE_SIZEOF_FSBLKCNT_T", JS::Int32Value(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", JS::Int32Value(sizeof (posix_spawn_file_actions_t)) },
#endif // !defined(ANDROID)

View file

@ -1,19 +0,0 @@
$NetBSD: patch-extensions_spellcheck_hunspell_glue_mozHunspell.cpp,v 1.1 2017/01/22 12:27:22 ryoon Exp $
--- extensions/spellcheck/hunspell/glue/mozHunspell.cpp.orig 2015-12-04 00:37:13.000000000 +0000
+++ extensions/spellcheck/hunspell/glue/mozHunspell.cpp
@@ -392,6 +392,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,

View file

@ -0,0 +1,15 @@
$NetBSD: patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp,v 1.1 2019/02/25 15:32:24 wiz Exp $
Fix build where _LITTLE_ENDIAN is not an integer.
--- gfx/angle/checkout/src/common/third_party/smhasher/src/PMurHash.cpp.orig 2018-06-05 19:47:29.000000000 +0000
+++ gfx/angle/checkout/src/common/third_party/smhasher/src/PMurHash.cpp
@@ -91,7 +91,7 @@ on big endian machines, or a byte-by-byt
/* gcc 'may' define __LITTLE_ENDIAN__ or __BIG_ENDIAN__ to 1 (Note the trailing __),
* or even _LITTLE_ENDIAN or _BIG_ENDIAN (Note the single _ prefix) */
#if !defined(__BYTE_ORDER)
- #if defined(__LITTLE_ENDIAN__) && __LITTLE_ENDIAN__==1 || defined(_LITTLE_ENDIAN) && _LITTLE_ENDIAN==1
+ #if defined(__LITTLE_ENDIAN__) && __LITTLE_ENDIAN__-0==1 || defined(_LITTLE_ENDIAN) && _LITTLE_ENDIAN-0==1
#define __BYTE_ORDER __LITTLE_ENDIAN
#elif defined(__BIG_ENDIAN__) && __BIG_ENDIAN__==1 || defined(_BIG_ENDIAN) && _BIG_ENDIAN==1
#define __BYTE_ORDER __BIG_ENDIAN

View file

@ -1,37 +0,0 @@
$NetBSD: patch-gfx_cairo_libpixman_src_pixman-arm-neon-asm.S,v 1.1 2017/01/22 12:27:22 ryoon Exp $
--- gfx/cairo/libpixman/src/pixman-arm-neon-asm.S.orig 2015-09-29 21:45:08.000000000 +0000
+++ gfx/cairo/libpixman/src/pixman-arm-neon-asm.S
@@ -34,6 +34,12 @@
* - pixman_composite_over_n_8_0565_asm_neon
*/
+#if defined(__ARM_EABI__) && !defined(__ARM_DWARF_EH__)
+#define UNWIND
+#else
+#define UNWIND @
+#endif
+
/* Prevent the stack from becoming executable for no reason... */
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
@@ -3141,7 +3147,8 @@ pixman_asm_function fname
TMP4 .req r9
STRIDE .req r2
- .fnstart
+ .cfi_startproc
+ UNWIND .fnstart
mov ip, sp
.save {r4, r5, r6, r7, r8, r9}
push {r4, r5, r6, r7, r8, r9}
@@ -3244,7 +3251,8 @@ pixman_asm_function fname
.endif
pop {r4, r5, r6, r7, r8, r9}
bx lr
- .fnend
+ UNWIND .fnend
+ .cfi_endproc
.unreq OUT
.unreq TOP

View file

@ -1,16 +0,0 @@
$NetBSD: patch-gfx_gl_GLContextProviderGLX.cpp,v 1.1 2017/01/22 12:27:22 ryoon Exp $
Fix libGL.so filename on NetBSD,
see https://bugzilla.mozilla.org/show_bug.cgi?id=1180498
--- gfx/gl/GLContextProviderGLX.cpp.orig 2015-07-01 00:58:10.000000000 +0200
+++ gfx/gl/GLContextProviderGLX.cpp 2015-07-04 21:13:15.000000000 +0200
@@ -82,7 +82,7 @@
// see e.g. bug 608526: it is intrinsically interesting to know whether we have dynamically linked to libGL.so.1
// because at least the NVIDIA implementation requires an executable stack, which causes mprotect calls,
// which trigger glibc bug http://sourceware.org/bugzilla/show_bug.cgi?id=12225
-#ifdef __OpenBSD__
+#if defined(__OpenBSD__) || defined(__NetBSD__)
libGLfilename = "libGL.so";
#else
libGLfilename = "libGL.so.1";

View file

@ -1,16 +0,0 @@
$NetBSD: patch-gfx_graphite2_src_Bidi.cpp,v 1.2 2017/01/22 12:27:22 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

View file

@ -1,26 +0,0 @@
$NetBSD: patch-gfx_moz.build,v 1.2 2017/01/22 12:27:22 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',

View file

@ -1,17 +0,0 @@
$NetBSD: patch-gfx_skia_generate__mozbuild.py,v 1.2 2017/01/22 12:27:22 ryoon Exp $
--- gfx/skia/generate_mozbuild.py.orig 2015-10-22 22:30:23.000000000 +0000
+++ gfx/skia/generate_mozbuild.py
@@ -147,6 +147,12 @@ if CONFIG['GNU_CXX']:
if CONFIG['CPU_ARCH'] == 'arm':
SOURCES['skia/src/opts/SkBlitRow_opts_arm.cpp'].flags += ['-fomit-frame-pointer']
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
+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']

View file

@ -1,17 +0,0 @@
$NetBSD: patch-gfx_skia_moz.build,v 1.2 2017/01/22 12:27:22 ryoon Exp $
--- gfx/skia/moz.build.orig 2015-10-22 22:30:23.000000000 +0000
+++ gfx/skia/moz.build
@@ -675,6 +675,12 @@ if CONFIG['GNU_CXX']:
if CONFIG['CPU_ARCH'] == 'arm':
SOURCES['skia/src/opts/SkBlitRow_opts_arm.cpp'].flags += ['-fomit-frame-pointer']
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
+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']

View file

@ -1,45 +0,0 @@
$NetBSD: patch-gfx_skia_skia_src_core_SkUtilsArm.cpp,v 1.1 2017/01/22 12:27:22 ryoon Exp $
--- gfx/skia/skia/src/core/SkUtilsArm.cpp.orig 2015-10-22 22:30:24.000000000 +0000
+++ gfx/skia/skia/src/core/SkUtilsArm.cpp
@@ -16,6 +16,10 @@
#include <string.h>
#include <pthread.h>
+#if defined(__NetBSD__)
+#include <sys/sysctl.h>
+#endif
+
// Set USE_ANDROID_NDK_CPU_FEATURES to use the Android NDK's
// cpu-features helper library to detect NEON at runtime. See
// http://crbug.com/164154 to see why this is needed in Chromium
@@ -47,6 +51,11 @@
# endif
#endif
+#if !defined(TEMP_FAILURE_RETRY)
+ // TEMP_FAILURE_RETRY is glibc specific
+# define TEMP_FAILURE_RETRY
+#endif
+
// A function used to determine at runtime if the target CPU supports
// the ARM NEON instruction set. This implementation is Linux-specific.
static bool sk_cpu_arm_check_neon(void) {
@@ -82,6 +91,17 @@ static bool sk_cpu_arm_check_neon(void)
result = (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0;
+#elif defined(__NetBSD__)
+
+ size_t len;
+ int flag;
+ len = sizeof(flag);
+ if (sysctlbyname("machdep.neon_present", &flag, &len, NULL, 0) == 0) {
+ result = flag != 0;
+ } else {
+ result = false;
+ }
+
#else // USE_ANDROID_NDK_CPU_FEATURES
// There is no user-accessible CPUID instruction on ARM that we can use.

View file

@ -1,28 +0,0 @@
$NetBSD: patch-gfx_skia_skia_src_opts_SkBitmapProcState__opts__arm.cpp,v 1.1 2017/01/22 12:27:22 ryoon Exp $
--- gfx/skia/skia/src/opts/SkBitmapProcState_opts_arm.cpp.orig 2015-10-22 22:30:24.000000000 +0000
+++ gfx/skia/skia/src/opts/SkBitmapProcState_opts_arm.cpp
@@ -97,7 +97,11 @@ void SI8_D16_nofilter_DX_arm(const SkBit
"2: \n\t"
: [xx] "+r" (xx), [count8] "+r" (count8), [colors] "+r" (colors)
: [table] "r" (table), [srcAddr] "r" (srcAddr)
+#if defined(__NetBSD__)
+ : "memory", "cc", "r4", "r5", "r6", "r7", "r8", "r9", "r10"
+#else
: "memory", "cc", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11"
+#endif
);
for (i = (count & 7); i > 0; --i) {
@@ -181,7 +185,11 @@ void SI8_opaque_D32_nofilter_DX_arm(cons
"4: \n\t" // exit
: [xx] "+r" (xx), [count] "+r" (count), [colors] "+r" (colors)
: [table] "r" (table), [srcAddr] "r" (srcAddr)
+#if defined(__NetBSD__)
+ : "memory", "cc", "r4", "r5", "r6", "r7", "r8", "r9", "r10"
+#else
: "memory", "cc", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11"
+#endif
);
}

View file

@ -1,49 +0,0 @@
$NetBSD: patch-gfx_skia_skia_src_opts_memset.arm.S,v 1.1 2017/01/22 12:27:22 ryoon Exp $
--- gfx/skia/skia/src/opts/memset.arm.S.orig 2015-10-22 22:30:24.000000000 +0000
+++ gfx/skia/skia/src/opts/memset.arm.S
@@ -13,6 +13,12 @@
* to aid future maintenance.
*/
+#if defined(__ARM_EABI__) && !defined(__ARM_DWARF_EH__)
+#define UNWIND
+#else
+#define UNWIND @
+#endif
+
.text
.align 4
.syntax unified
@@ -30,7 +36,8 @@
*
*/
arm_memset16:
- .fnstart
+ .cfi_startproc
+ UNWIND .fnstart
push {lr}
/* if count is equal to zero then abort */
@@ -51,10 +58,12 @@ arm_memset16:
/* Now jump into the main loop below. */
b .Lwork_32
- .fnend
+ UNWIND .fnend
+ .cfi_endproc
arm_memset32:
- .fnstart
+ .cfi_startproc
+ UNWIND .fnstart
push {lr}
/* if count is equal to zero then abort */
@@ -108,4 +117,5 @@ arm_memset32:
.Lfinish:
pop {pc}
- .fnend
+ UNWIND .fnend
+ .cfi_endproc

View file

@ -1,25 +0,0 @@
$NetBSD: patch-gfx_thebes_moz.build,v 1.2 2017/01/22 12:27:22 ryoon Exp $
--- gfx/thebes/moz.build.orig 2016-01-23 23:23:35.000000000 +0000
+++ gfx/thebes/moz.build
@@ -291,6 +291,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']
@@ -304,7 +310,5 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk
LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
-DEFINES['GRAPHITE2_STATIC'] = True
-
if CONFIG['OS_ARCH'] == 'WINNT':
del DEFINES['UNICODE']

View file

@ -0,0 +1,25 @@
$NetBSD: patch-gfx_webrender_src_query.rs,v 1.1 2019/02/25 15:32:24 wiz Exp $
--- gfx/webrender/src/query.rs.orig 2018-05-03 16:58:27.000000000 +0000
+++ gfx/webrender/src/query.rs
@@ -274,17 +274,20 @@ pub struct GpuMarker {
impl GpuMarker {
fn new(gl: &Rc<gl::Gl>, message: &str) -> Self {
+#[cfg(not(target_arch = "x86"))]
gl.push_group_marker_ext(message);
GpuMarker { gl: Rc::clone(gl) }
}
fn fire(gl: &Rc<gl::Gl>, message: &str) {
+#[cfg(not(target_arch = "x86"))]
gl.insert_event_marker_ext(message);
}
}
impl Drop for GpuMarker {
fn drop(&mut self) {
+#[cfg(not(target_arch = "x86"))]
self.gl.pop_group_marker_ext();
}
}

View file

@ -1,13 +0,0 @@
$NetBSD: patch-gfx_ycbcr_moz.build,v 1.2 2017/01/22 12:27:22 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',

View file

@ -1,40 +0,0 @@
$NetBSD: patch-gfx_ycbcr_yuv__row__arm.S,v 1.2 2017/01/22 12:27:22 ryoon Exp $
--- gfx/ycbcr/yuv_row_arm.S.orig 2016-04-20 21:32:52.000000000 +0000
+++ gfx/ycbcr/yuv_row_arm.S
@@ -2,6 +2,12 @@
* 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
@@ -74,7 +80,8 @@ YCbCr42xToRGB565_DITHER30_CONSTS_NEON:
.global ScaleYCbCr42xToRGB565_BilinearY_Row_NEON
.type ScaleYCbCr42xToRGB565_BilinearY_Row_NEON, %function
.balign 64
- .fnstart
+ .cfi_startproc
+ UNWIND .fnstart
ScaleYCbCr42xToRGB565_BilinearY_Row_NEON:
STMFD r13!,{r4-r9,r14} @ 8 words.
ADR r14,YCbCr42xToRGB565_DITHER03_CONSTS_NEON
@@ -296,9 +303,10 @@ s42xbily_neon_tail:
s42xbily_neon_done:
VPOP {Q4-Q7} @ 16 words.
LDMFD r13!,{r4-r9,PC} @ 8 words.
- .fnend
+ UNWIND .fnend
+ .cfi_endproc
.size ScaleYCbCr42xToRGB565_BilinearY_Row_NEON, .-ScaleYCbCr42xToRGB565_BilinearY_Row_NEON
-#if defined(__ELF__)&&defined(__linux__)
+#if defined(__ELF__)&&(defined(__linux__) || defined(__NetBSD__))
.section .note.GNU-stack,"",%progbits
#endif

View file

@ -1,8 +1,11 @@
$NetBSD: patch-image_decoders_nsJPEGDecoder.cpp,v 1.2 2017/01/22 12:27:22 ryoon Exp $
$NetBSD: patch-image_decoders_nsJPEGDecoder.cpp,v 1.3 2019/02/25 15:32:24 wiz Exp $
--- image/decoders/nsJPEGDecoder.cpp.orig 2015-08-07 15:54:06.000000000 +0000
Partially revert https://bugzilla.mozilla.org/show_bug.cgi?id=791305
to allow building against jpeg (not jpeg-turbo).
--- image/decoders/nsJPEGDecoder.cpp.orig 2019-02-23 20:00:48.000000000 +0000
+++ image/decoders/nsJPEGDecoder.cpp
@@ -23,13 +23,28 @@
@@ -29,13 +29,28 @@
extern "C" {
#include "iccjpeg.h"
@ -32,28 +35,28 @@ $NetBSD: patch-image_decoders_nsJPEGDecoder.cpp,v 1.2 2017/01/22 12:27:22 ryoon
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:
@@ -339,6 +354,7 @@ LexerTransition<nsJPEGDecoder::State> ns
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 {
// if we're not color managing we can decode directly to
// MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB
if (mCMSMode != eCMSMode_All) {
@@ -347,6 +363,9 @@ LexerTransition<nsJPEGDecoder::State> ns
} else {
mInfo.out_color_space = JCS_RGB;
}
}
+#else
+ mInfo.out_color_space = JCS_RGB;
+ mInfo.out_color_space = JCS_RGB;
+#endif
break;
case JCS_CMYK:
case JCS_YCCK:
@@ -448,6 +467,16 @@ nsJPEGDecoder::WriteInternal(const char*
return; // I/O suspension
}
break;
case JCS_CMYK:
case JCS_YCCK:
@@ -442,6 +461,16 @@ LexerTransition<nsJPEGDecoder::State> ns
("} (I/O suspension after OutputScanlines() - SEQUENTIAL)"));
return Transition::ContinueUnbuffered(
State::JPEG_DATA); // I/O suspension
+#ifndef JCS_EXTENSIONS
+ /* Force to use our YCbCr to Packed RGB converter when possible */
+ if (!mTransform && (mCMSMode != eCMSMode_All) &&
@ -64,24 +67,24 @@ $NetBSD: patch-image_decoders_nsJPEGDecoder.cpp,v 1.2 2017/01/22 12:27:22 ryoon
+ }
+#endif
+
// If this is a progressive JPEG ...
mState = mInfo.buffered_image ?
JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL;
@@ -629,7 +658,11 @@ nsJPEGDecoder::OutputScanlines(bool* sus
}
MOZ_ASSERT(imageRow, "Should have a row buffer here");
// If we've completed image output ...
@@ -620,7 +649,11 @@ void nsJPEGDecoder::OutputScanlines(bool
MOZ_ASSERT(imageRow, "Should have a row buffer here");
+#ifdef JCS_EXTENSIONS
if (mInfo.out_color_space == MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB) {
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
@@ -953,6 +986,282 @@ term_source (j_decompress_ptr jd)
} // namespace image
} // namespace mozilla
+ 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
@@ -943,6 +976,282 @@ term_source(j_decompress_ptr jd) {
} // namespace image
} // namespace mozilla
+#ifndef JCS_EXTENSIONS
+/**************** YCbCr -> Cairo's RGB24/ARGB32 conversion: most common case **************/

View file

@ -1,14 +0,0 @@
$NetBSD: patch-intl_hyphenation_glue_hnjalloc.h,v 1.1 2017/01/22 12:27:22 ryoon Exp $
--- intl/hyphenation/glue/hnjalloc.h.orig 2015-12-04 00:36:54.000000000 +0000
+++ intl/hyphenation/glue/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

View file

@ -1,15 +0,0 @@
$NetBSD: patch-ipc_chromium_src_base_atomicops.h,v 1.2 2017/01/22 12:27:22 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

View file

@ -1,24 +0,0 @@
$NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.2 2017/01/22 12:27:22 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 2015-08-07 15:54:10.000000000 +0000
+++ ipc/chromium/src/base/file_util_posix.cc
@@ -266,7 +266,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)
@@ -330,6 +330,6 @@ bool CopyFile(const FilePath& from_path,
return result;
}
-#endif // !defined(OS_MACOSX)
+#endif // !defined(MOZ_WIDGET_COCOA)
} // namespace file_util

View file

@ -0,0 +1,15 @@
$NetBSD: patch-ipc_chromium_src_base_lock__impl__posix.cc,v 1.1 2019/02/25 15:32:24 wiz Exp $
- Fix build on NetBSD 7.1 (which doesn't have PTHREAD_PRIO_INHERIT)
--- ipc/chromium/src/base/lock_impl_posix.cc.orig 2017-06-05 20:45:20.000000000 +0000
+++ ipc/chromium/src/base/lock_impl_posix.cc
@@ -20,7 +20,7 @@ namespace internal {
// Lock::PriorityInheritanceAvailable still must be checked as the code may
// compile but the underlying platform still may not correctly support priority
// inheritance locks.
-#if defined(OS_NACL) || defined(OS_ANDROID)
+#if defined(OS_NACL) || defined(OS_ANDROID) || (defined(__NetBSD__) && !defined(PTHREAD_PRIO_INHERIT))
#define PRIORITY_INHERITANCE_LOCKS_POSSIBLE() 0
#else
#define PRIORITY_INHERITANCE_LOCKS_POSSIBLE() 1

View file

@ -1,40 +0,0 @@
$NetBSD: patch-ipc_chromium_src_base_message__loop.cc,v 1.2 2017/01/22 12:27:22 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) {

View file

@ -1,21 +1,21 @@
$NetBSD: patch-ipc_chromium_src_base_message__pump__libevent.cc,v 1.1 2017/01/22 12:27:22 ryoon Exp $
$NetBSD: patch-ipc_chromium_src_base_message__pump__libevent.cc,v 1.2 2019/02/25 15:32:24 wiz Exp $
Allow older libevent
--- ipc/chromium/src/base/message_pump_libevent.cc.orig 2016-01-23 23:23:38.000000000 +0000
--- ipc/chromium/src/base/message_pump_libevent.cc.orig 2019-02-23 20:00:48.000000000 +0000
+++ ipc/chromium/src/base/message_pump_libevent.cc
@@ -20,6 +20,7 @@
@@ -22,6 +22,7 @@
// This macro checks that the _EVENT_SIZEOF_* constants defined in
// ipc/chromiume/src/third_party/<platform>/event2/event-config.h are correct.
+#if 0
#define CHECK_EVENT_SIZEOF(TYPE, type) \
static_assert(_EVENT_SIZEOF_##TYPE == sizeof(type), \
"bad _EVENT_SIZEOF_"#TYPE);
@@ -30,6 +31,7 @@ CHECK_EVENT_SIZEOF(PTHREAD_T, pthread_t)
CHECK_EVENT_SIZEOF(SHORT, short);
CHECK_EVENT_SIZEOF(SIZE_T, size_t);
CHECK_EVENT_SIZEOF(VOID_P, void*);
#if defined(_EVENT_SIZEOF_SHORT)
#define CHECK_EVENT_SIZEOF(TYPE, type) \
static_assert(_EVENT_SIZEOF_##TYPE == sizeof(type), \
@@ -41,6 +42,7 @@ CHECK_EVENT_SIZEOF(PTHREAD_T, pthread_t)
CHECK_EVENT_SIZEOF(SHORT, short);
CHECK_EVENT_SIZEOF(SIZE_T, size_t);
CHECK_EVENT_SIZEOF(VOID_P, void*);
+#endif
// Lifecycle of struct event

View file

@ -1,14 +0,0 @@
$NetBSD: patch-ipc_chromium_src_base_platform__thread.h,v 1.2 2017/01/22 12:27:22 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;

View file

@ -1,16 +1,13 @@
$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.2 2017/01/22 12:27:22 ryoon Exp $
$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.3 2019/02/25 15:32:24 wiz Exp $
* Just because OS_ARCH is Darwin does not mean MacOS X specific
kludges are needed.
* Support NetBSD
* Support Solaris (we can't rely on pthread_setname_np so ignore it).
--- ipc/chromium/src/base/platform_thread_posix.cc.orig 2016-02-25 23:01:54.000000000 +0000
--- ipc/chromium/src/base/platform_thread_posix.cc.orig 2019-02-23 20:00:48.000000000 +0000
+++ ipc/chromium/src/base/platform_thread_posix.cc
@@ -9,22 +9,24 @@
@@ -12,7 +12,9 @@
#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>
@ -18,73 +15,12 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.2 2017/01/22
#elif defined(OS_LINUX)
#include <sys/syscall.h>
#include <sys/prctl.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
@@ -82,7 +84,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
@@ -105,19 +107,41 @@ void PlatformThread::SetName(const char*
pthread_setname_np(pthread_self(), "%s", (void *)name);
@@ -100,7 +102,7 @@ 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);
-#elif defined(OS_SOLARIS)
+#elif defined(notOS_SOLARIS)
pthread_setname_np(pthread_self(), name);
#else
#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;

View file

@ -1,14 +0,0 @@
$NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.2 2017/01/22 12:27:22 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;

View file

@ -1,18 +0,0 @@
$NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.2 2017/01/22 12:27:22 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 2016-02-25 23:01:54.000000000 +0000
+++ ipc/chromium/src/base/process_util_bsd.cc
@@ -10,6 +10,10 @@
#include <spawn.h>
#include <sys/wait.h>
+#if defined(OS_BSD)
+#include <kvm.h>
+#endif
+
#include <string>
#include "base/eintr_wrapper.h"

View file

@ -1,22 +0,0 @@
$NetBSD: patch-ipc_chromium_src_base_process__util__posix.cc,v 1.2 2017/01/22 12:27:22 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";

View file

@ -1,45 +0,0 @@
$NetBSD: patch-ipc_chromium_src_base_scoped__nsautorelease__pool.h,v 1.2 2017/01/22 12:27:22 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);

View file

@ -1,16 +0,0 @@
$NetBSD: patch-ipc_chromium_src_base_sys__info__posix.cc,v 1.2 2017/01/22 12:27:22 ryoon Exp $
--- ipc/chromium/src/base/sys_info_posix.cc.orig 2016-01-15 01:01:44.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 "";

View file

@ -1,15 +0,0 @@
$NetBSD: patch-ipc_chromium_src_base_time__posix.cc,v 1.2 2017/01/22 12:27:22 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

View file

@ -1,22 +0,0 @@
$NetBSD: patch-ipc_chromium_src_build_build__config.h,v 1.2 2017/01/22 12:27:22 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

View file

@ -1,13 +0,0 @@
$NetBSD: patch-ipc_chromium_src_chrome_common_transport__dib.h,v 1.2 2017/01/22 12:27:22 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

View file

@ -0,0 +1,21 @@
$NetBSD: patch-ipc_glue_CrossProcessSemaphore.h,v 1.1 2019/02/25 15:32:24 wiz Exp $
- avoid use of sem_t on NetBSD
http://mail-index.netbsd.org/pkgsrc-bugs/2017/06/23/msg062225.html
--- ipc/glue/CrossProcessSemaphore.h.orig 2017-06-05 20:45:20.000000000 +0000
+++ ipc/glue/CrossProcessSemaphore.h
@@ -91,7 +91,13 @@ private:
HANDLE mSemaphore;
#elif !defined(OS_MACOSX)
RefPtr<mozilla::ipc::SharedMemoryBasic> mSharedBuffer;
+#if defined(__NetBSD__)
+ pthread_mutex_t* mMutex;
+ pthread_cond_t* mNotZero;
+ uint32_t* mValue;
+#else
sem_t* mSemaphore;
+#endif
mozilla::Atomic<int32_t>* mRefCount;
#endif
};

View file

@ -0,0 +1,190 @@
$NetBSD: patch-ipc_glue_CrossProcessSemaphore__posix.cpp,v 1.1 2019/02/25 15:32:24 wiz Exp $
- avoid use of sem_t on NetBSD
http://mail-index.netbsd.org/pkgsrc-bugs/2017/06/23/msg062225.html
--- ipc/glue/CrossProcessSemaphore_posix.cpp.orig 2019-02-23 20:00:48.000000000 +0000
+++ ipc/glue/CrossProcessSemaphore_posix.cpp
@@ -9,6 +9,11 @@
#include "nsDebug.h"
#include "nsISupportsImpl.h"
#include <errno.h>
+#if defined(__NetBSD__)
+#include <iostream>
+#include <unistd.h>
+#include <limits>
+#endif
static const uint64_t kNsPerMs = 1000000;
static const uint64_t kNsPerSec = 1000000000;
@@ -16,7 +21,13 @@ static const uint64_t kNsPerSec = 100000
namespace {
struct SemaphoreData {
+#if defined(__NetBSD__)
+ pthread_mutex_t mMutex;
+ pthread_cond_t mNotZero;
+ uint32_t mValue;
+#else
sem_t mSemaphore;
+#endif
mozilla::Atomic<int32_t> mRefCount;
uint32_t mInitialValue;
};
@@ -42,13 +53,27 @@ namespace mozilla {
return nullptr;
}
+#if defined(__NetBSD__)
+ data->mValue = aInitialValue;
+ if (pthread_mutex_init(&data->mMutex, NULL) ||
+ pthread_cond_init(&data->mNotZero, NULL) ) {
+ return nullptr;
+ }
+#else
if (sem_init(&data->mSemaphore, 1, aInitialValue)) {
return nullptr;
}
+#endif
CrossProcessSemaphore* sem = new CrossProcessSemaphore;
sem->mSharedBuffer = sharedBuffer;
+#if defined(__NetBSD__)
+ sem->mMutex = &data->mMutex;
+ sem->mNotZero = &data->mNotZero;
+ sem->mValue = &data->mValue;
+#else
sem->mSemaphore = &data->mSemaphore;
+#endif
sem->mRefCount = &data->mRefCount;
*sem->mRefCount = 1;
@@ -83,23 +108,44 @@ namespace mozilla {
int32_t oldCount = data->mRefCount++;
if (oldCount == 0) {
+#if defined(__NetBSD__)
+ if (pthread_mutex_init(&data->mMutex, NULL) ||
+ pthread_cond_init(&data->mNotZero, NULL) ) {
+ data->mRefCount--;
+ return nullptr;
+ }
+#else
// The other side has already let go of their CrossProcessSemaphore, so now
// mSemaphore is garbage. We need to re-initialize it.
if (sem_init(&data->mSemaphore, 1, data->mInitialValue)) {
data->mRefCount--;
return nullptr;
}
+#endif
}
CrossProcessSemaphore* sem = new CrossProcessSemaphore;
sem->mSharedBuffer = sharedBuffer;
+#if defined(__NetBSD__)
+ sem->mMutex = &data->mMutex;
+ sem->mNotZero = &data->mNotZero;
+ sem->mValue = &data->mValue;
+#else
sem->mSemaphore = &data->mSemaphore;
+#endif
sem->mRefCount = &data->mRefCount;
return sem;
}
CrossProcessSemaphore::CrossProcessSemaphore()
- : mSemaphore(nullptr), mRefCount(nullptr) {
+#if defined(__NetBSD__)
+ : mMutex (nullptr)
+ , mNotZero (nullptr)
+ , mValue (nullptr)
+#else
+ : mSemaphore(nullptr)
+#endif
+ , mRefCount(nullptr) {
MOZ_COUNT_CTOR(CrossProcessSemaphore);
}
@@ -108,16 +154,57 @@ CrossProcessSemaphore::~CrossProcessSema
if (oldCount == 0) {
// Nothing can be done if the destroy fails so ignore return code.
+#if defined(__NetBSD__)
+ (void)pthread_cond_destroy(mNotZero);
+ (void)pthread_mutex_destroy(mMutex);
+#else
Unused << sem_destroy(mSemaphore);
+#endif
}
MOZ_COUNT_DTOR(CrossProcessSemaphore);
}
+#if defined(__NetBSD__)
+static struct timespec
+makeAbsTime(const Maybe<TimeDuration>& aWaitTime) {
+ struct timespec ts;
+ if (aWaitTime.isSome()) {
+ clock_gettime(CLOCK_REALTIME, &ts);
+ ts.tv_nsec += (kNsPerMs * aWaitTime->ToMilliseconds());
+ ts.tv_sec += ts.tv_nsec / kNsPerSec;
+ ts.tv_nsec %= kNsPerSec;
+ }
+ else {
+ ts.tv_sec = std::numeric_limits<time_t>::max();
+ ts.tv_nsec = 0;
+ }
+ return ts;
+}
+#endif
+
bool CrossProcessSemaphore::Wait(const Maybe<TimeDuration>& aWaitTime) {
MOZ_ASSERT(*mRefCount > 0,
"Attempting to wait on a semaphore with zero ref count");
int ret;
+#if defined(__NetBSD__)
+ struct timespec ts = makeAbsTime(aWaitTime);
+
+ ret = pthread_mutex_lock(mMutex);
+
+ if (ret == 0) {
+ while (ret == 0 && mValue == 0) {
+ ret = pthread_cond_timedwait(mNotZero, mMutex, &ts);
+ while (ret == -1 && errno == EINTR) {
+ ret = pthread_cond_timedwait(mNotZero, mMutex, &ts);
+ }
+ }
+ if (ret == 0) {
+ --(*mValue);
+ }
+ pthread_mutex_unlock(mMutex);
+ }
+#else
if (aWaitTime.isSome()) {
struct timespec ts;
if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {
@@ -134,13 +221,24 @@ bool CrossProcessSemaphore::Wait(const M
while ((ret = sem_wait(mSemaphore)) == -1 && errno == EINTR) {
}
}
+#endif
return ret == 0;
}
void CrossProcessSemaphore::Signal() {
MOZ_ASSERT(*mRefCount > 0,
"Attempting to signal a semaphore with zero ref count");
+#if defined(__NetBSD__)
+ int ret;
+ ret = pthread_mutex_lock(mMutex);
+ if (ret == 0) {
+ ++(*mValue);
+ pthread_cond_signal(mNotZero);
+ pthread_mutex_unlock(mMutex);
+ }
+#else
sem_post(mSemaphore);
+#endif
}
CrossProcessSemaphoreHandle CrossProcessSemaphore::ShareToProcess(

View file

@ -1,9 +1,9 @@
$NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.2 2017/01/22 12:27:22 ryoon Exp $
$NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.3 2019/02/25 15:32:24 wiz Exp $
* Just because OS_ARCH is Darwin does not mean MacOS X specific
kludges are needed.
* Support Solaris
* Fix NetBSD linking
--- ipc/glue/GeckoChildProcessHost.cpp.orig 2015-01-09 04:38:16.000000000 +0000
--- ipc/glue/GeckoChildProcessHost.cpp.orig 2017-07-31 16:20:47.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
@ -19,30 +19,3 @@ $NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.2 2017/01/22 12:27:22 ryoo
#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);

View file

@ -1,24 +0,0 @@
$NetBSD: patch-ipc_glue_StringUtil.cpp,v 1.2 2017/01/22 12:27:22 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);

View file

@ -1,15 +0,0 @@
$NetBSD: patch-ipc_glue_moz.build,v 1.2 2017/01/22 12:27:22 ryoon Exp $
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
--- ipc/glue/moz.build.orig 2015-06-18 20:55:28.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'] == 'Darwin':
+elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
UNIFIED_SOURCES += [
'ProcessUtils_mac.mm'
]

View file

@ -1,17 +0,0 @@
$NetBSD: patch-js__src__vm__SPSProfiler.cpp,v 1.2 2017/01/22 12:27:22 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"

View file

@ -1,28 +0,0 @@
$NetBSD: patch-js_src_ctypes_CTypes.h,v 1.2 2017/01/22 12:27:22 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 {

View file

@ -1,12 +0,0 @@
$NetBSD: patch-js_src_frontend_ParseMaps.cpp,v 1.2 2017/01/22 12:27:22 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>;

View file

@ -0,0 +1,23 @@
$NetBSD: patch-js_src_gc_Memory.cpp,v 1.1 2019/02/25 15:32:24 wiz Exp $
Support SunOS/x86_64.
--- js/src/gc/Memory.cpp.orig 2019-02-23 20:00:48.000000000 +0000
+++ js/src/gc/Memory.cpp
@@ -419,6 +419,7 @@ static inline void* MapMemoryAt(void* de
off_t offset = 0) {
#if defined(__ia64__) || defined(__aarch64__) || \
+ (defined(__sun) && defined(__x86_64__)) || \
(defined(__sparc__) && defined(__arch64__) && \
(defined(__NetBSD__) || defined(__linux__)))
MOZ_ASSERT((0xffff800000000000ULL & (uintptr_t(desired) + length - 1)) == 0);
@@ -468,7 +469,7 @@ static inline void* MapMemory(size_t len
}
return region;
#elif defined(__aarch64__) || \
- (defined(__sparc__) && defined(__arch64__) && defined(__linux__))
+ (defined(__sparc__) && defined(__arch64__) && defined(__linux__)) || (defined(__sun) && defined(__x86_64__))
/*
* There might be similar virtual address issue on arm64 which depends on
* hardware and kernel configurations. But the work around is slightly

View file

@ -1,13 +0,0 @@
$NetBSD: patch-js_src_jit-LIR.cpp,v 1.2 2017/01/22 12:27:22 ryoon Exp $
--- js/src/jit/LIR.cpp.orig 2015-08-24 21:53:12.000000000 +0000
+++ js/src/jit/LIR.cpp
@@ -323,7 +323,7 @@ LNode::printName(GenericPrinter& out, Op
const char* name = names[op];
size_t len = strlen(name);
for (size_t i = 0; i < len; i++)
- out.printf("%c", tolower(name[i]));
+ out.printf("%c", tolower((unsigned char)name[i]));
}
void

View file

@ -1,13 +0,0 @@
$NetBSD: patch-js_src_jit_MIR.cpp,v 1.2 2017/01/22 12:27:22 ryoon Exp $
--- js/src/jit/MIR.cpp.orig 2015-08-24 21:53:12.000000000 +0000
+++ js/src/jit/MIR.cpp
@@ -72,7 +72,7 @@ MDefinition::PrintOpcodeName(GenericPrin
const char* name = names[op];
size_t len = strlen(name);
for (size_t i = 0; i < len; i++)
- out.printf("%c", tolower(name[i]));
+ out.printf("%c", tolower((unsigned char)name[i]));
}
const Value&

View file

@ -1,13 +0,0 @@
$NetBSD: patch-js_src_jit_arm_Architecture-arm.cpp,v 1.2 2017/01/22 12:27:22 ryoon Exp $
--- js/src/jit/arm/Architecture-arm.cpp.orig 2015-08-24 21:53:12.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_SIMULATOR_ARM)
+#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)

View file

@ -1,15 +0,0 @@
$NetBSD: patch-js_src_jsdate.cpp,v 1.2 2017/01/22 12:27:22 ryoon Exp $
--- js/src/jsdate.cpp.orig 2016-02-25 23:02:04.000000000 +0000
+++ js/src/jsdate.cpp
@@ -2672,8 +2672,8 @@ 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]))) {

View file

@ -1,13 +0,0 @@
$NetBSD: patch-js_src_jskwgen.cpp,v 1.2 2017/01/22 12:27:22 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)));

View file

@ -1,13 +0,0 @@
$NetBSD: patch-js_src_jsmath.cpp,v 1.2 2017/01/22 12:27:22 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);

View file

@ -1,13 +0,0 @@
$NetBSD: patch-js_src_shell_jsoptparse.cpp,v 1.2 2017/01/22 12:27:22 ryoon Exp $
--- js/src/shell/jsoptparse.cpp.orig 2015-06-18 20:55:32.000000000 +0000
+++ js/src/shell/jsoptparse.cpp
@@ -95,7 +95,7 @@ PrintParagraph(const char* text, unsigne
++it;
while (*it != '\0') {
- MOZ_ASSERT(!isspace(*it));
+ MOZ_ASSERT(!isspace((unsigned char)*it));
/* Delimit the current token. */
const char* limit = it;

View file

@ -0,0 +1,15 @@
$NetBSD: patch-js_src_threading_posix_Thread.cpp,v 1.1 2019/02/25 15:32:24 wiz Exp $
Support SunOS.
--- js/src/threading/posix/Thread.cpp.orig 2018-06-05 19:47:32.000000000 +0000
+++ js/src/threading/posix/Thread.cpp
@@ -194,6 +194,8 @@ js::ThisThread::SetName(const char* name
rv = 0;
#elif defined(__NetBSD__)
rv = pthread_setname_np(pthread_self(), "%s", (void*)name);
+#elif defined(__sun)
+ rv = 0;
#else
rv = pthread_setname_np(pthread_self(), name);
#endif

View file

@ -0,0 +1,23 @@
$NetBSD: patch-js_src_util_NativeStack.cpp,v 1.1 2019/02/25 15:32:24 wiz Exp $
Support SunOS.
--- js/src/util/NativeStack.cpp.orig 2019-02-23 20:00:48.000000000 +0000
+++ js/src/util/NativeStack.cpp
@@ -40,7 +40,7 @@ void* js::GetNativeStackBaseImpl() {
return static_cast<void*>(pTib->StackBase);
}
-#elif defined(SOLARIS)
+#elif defined(__sun)
JS_STATIC_ASSERT(JS_STACK_GROWTH_DIRECTION < 0);
@@ -86,6 +86,7 @@ void* js::GetNativeStackBaseImpl() {
return stackBase;
}
+# elif defined(__sun)
// Non-main threads have the required info stored in memory, so no filesystem
// calls are made.
pthread_t thread = pthread_self();

View file

@ -0,0 +1,14 @@
$NetBSD: patch-js_src_wasm_WasmSignalHandlers.cpp,v 1.1 2019/02/25 15:32:24 wiz Exp $
Support SunOS.
--- js/src/wasm/WasmSignalHandlers.cpp.orig 2019-02-23 20:00:48.000000000 +0000
+++ js/src/wasm/WasmSignalHandlers.cpp
@@ -135,6 +135,7 @@ struct AutoSignalHandler {
#else
#define XMM_sig(p, i) ((p)->uc_mcontext.fpregs.fp_reg_set.fpchip_state.xmm[i])
#define EIP_sig(p) ((p)->uc_mcontext.gregs[REG_PC])
+# include <sys/regset.h>
#define EBP_sig(p) ((p)->uc_mcontext.gregs[REG_EBP])
#define ESP_sig(p) ((p)->uc_mcontext.gregs[REG_ESP])
#endif

View file

@ -1,16 +0,0 @@
$NetBSD: patch-js_xpconnect_src_XPCConvert.cpp,v 1.2 2017/01/22 12:27:22 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));

View file

@ -1,17 +0,0 @@
$NetBSD: patch-js_xpconnect_src_xpcprivate.h,v 1.2 2017/01/22 12:27:22 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

View file

@ -0,0 +1,12 @@
$NetBSD: patch-media_libcubeb_gtest_moz.build,v 1.1 2019/02/25 15:32:24 wiz Exp $
--- media/libcubeb/gtest/moz.build.orig 2018-03-10 02:54:17.000000000 +0000
+++ media/libcubeb/gtest/moz.build
@@ -72,7 +72,6 @@ elif CONFIG['OS_TARGET'] == 'OpenBSD':
'sndio',
]
else:
- OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
OS_LIBS += CONFIG['MOZ_PULSEAUDIO_LIBS']
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):

View file

@ -1,8 +1,10 @@
$NetBSD: patch-media_libcubeb_src_cubeb.c,v 1.2 2017/01/22 12:27:22 ryoon Exp $
$NetBSD: patch-media_libcubeb_src_cubeb.c,v 1.3 2019/02/25 15:32:24 wiz Exp $
--- media/libcubeb/src/cubeb.c.orig 2016-02-25 23:01:58.000000000 +0000
* Support OSS audio
--- media/libcubeb/src/cubeb.c.orig 2017-07-31 16:20:49.000000000 +0000
+++ media/libcubeb/src/cubeb.c
@@ -60,6 +60,9 @@ int audiotrack_init(cubeb ** context, ch
@@ -55,6 +55,9 @@ int audiotrack_init(cubeb ** context, ch
#if defined(USE_KAI)
int kai_init(cubeb ** context, char const * context_name);
#endif
@ -10,9 +12,20 @@ $NetBSD: patch-media_libcubeb_src_cubeb.c,v 1.2 2017/01/22 12:27:22 ryoon Exp $
+int oss_init(cubeb ** context, char const * context_name);
+#endif
int
validate_stream_params(cubeb_stream_params stream_params)
@@ -129,6 +132,9 @@ cubeb_init(cubeb ** context, char const
static int
validate_stream_params(cubeb_stream_params * input_stream_params,
@@ -155,6 +158,10 @@ cubeb_init(cubeb ** context, char const
#if defined(USE_KAI)
init_oneshot = kai_init;
#endif
+ } else if (!strcmp(backend_name, "oss")) {
+#if defined(USE_OSS)
+ init_oneshot = oss_init;
+#endif
} else {
/* Already set */
}
@@ -199,6 +206,9 @@ cubeb_init(cubeb ** context, char const
#if defined(USE_KAI)
kai_init,
#endif

View file

@ -1,14 +1,15 @@
$NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon Exp $
$NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.3 2019/02/25 15:32:24 wiz Exp $
--- media/libcubeb/src/cubeb_alsa.c.orig 2016-02-25 23:01:58.000000000 +0000
* Support alsa audio under NetBSD
* Avoid https://github.com/kinetiknz/cubeb/issues/226
--- media/libcubeb/src/cubeb_alsa.c.orig 2018-05-03 16:58:30.000000000 +0000
+++ media/libcubeb/src/cubeb_alsa.c
@@ -7,12 +7,18 @@
@@ -7,11 +7,13 @@
#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>
@ -16,12 +17,9 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
#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 @@
@@ -25,6 +27,52 @@
#define ALSA_PA_PLUGIN "ALSA <-> PulseAudio PCM I/O Plugin"
@ -44,7 +42,6 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
+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 */
@ -62,8 +59,10 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
+MAKE_TYPEDEF(snd_pcm_poll_descriptors);
+MAKE_TYPEDEF(snd_pcm_poll_descriptors_count);
+MAKE_TYPEDEF(snd_pcm_poll_descriptors_revents);
+MAKE_TYPEDEF(snd_pcm_readi);
+MAKE_TYPEDEF(snd_pcm_recover);
+MAKE_TYPEDEF(snd_pcm_set_params);
+MAKE_TYPEDEF(snd_pcm_start);
+MAKE_TYPEDEF(snd_pcm_state);
+MAKE_TYPEDEF(snd_pcm_writei);
+
@ -73,7 +72,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
/* 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 @@ struct cubeb {
@@ -65,6 +113,8 @@ struct cubeb {
workaround is not required. */
snd_config_t * local_config;
int is_pa;
@ -82,179 +81,85 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
};
enum stream_state {
@@ -258,32 +311,35 @@ alsa_refill_stream(cubeb_stream * stm)
long got;
void * p;
int draining;
+ unsigned pipefailures, againfailures;
@@ -245,8 +295,8 @@ set_timeout(struct timeval * timeout, un
static void
stream_buffer_decrement(cubeb_stream * stm, long count)
{
- char * bufremains = stm->buffer + snd_pcm_frames_to_bytes(stm->pcm, count);
- memmove(stm->buffer, bufremains, snd_pcm_frames_to_bytes(stm->pcm, stm->bufframes - count));
+ char * bufremains = stm->buffer + WRAP(snd_pcm_frames_to_bytes)(stm->pcm, count);
+ memmove(stm->buffer, bufremains, WRAP(snd_pcm_frames_to_bytes)(stm->pcm, stm->bufframes - count));
stm->bufframes -= count;
}
draining = 0;
@@ -278,9 +328,9 @@ alsa_process_stream(cubeb_stream * stm)
/* Call _poll_descriptors_revents() even if we don't use it
to let underlying plugins clear null events. Otherwise poll()
may wake up again and again, producing unnecessary CPU usage. */
- snd_pcm_poll_descriptors_revents(stm->pcm, stm->fds, stm->nfds, &revents);
+ WRAP(snd_pcm_poll_descriptors_revents)(stm->pcm, stm->fds, stm->nfds, &revents);
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;
+ }
+ avail = WRAP(snd_pcm_avail_update)(stm->pcm);
- /* 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 @@ alsa_refill_stream(cubeb_stream * stm)
available to write. If avail is still zero here, the stream must be in
a funky state, so recover and try again. */
/* Got null event? Bail and wait for another wakeup. */
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 @@ alsa_refill_stream(cubeb_stream * stm)
@@ -303,7 +353,7 @@ alsa_process_stream(cubeb_stream * stm)
// TODO: should it be marked as DRAINING?
}
}
- 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);
- got = snd_pcm_readi(stm->pcm, stm->buffer+stm->bufframes, avail);
+ got = WRAP(snd_pcm_readi)(stm->pcm, stm->buffer+stm->bufframes, avail);
pthread_mutex_unlock(&stm->mutex);
@@ -312,10 +368,11 @@ alsa_refill_stream(cubeb_stream * stm)
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 (got < 0) {
avail = got; // the error handler below will recover us
@@ -347,7 +397,7 @@ alsa_process_stream(cubeb_stream * stm)
(!stm->other_stream || stm->other_stream->bufframes > 0)) {
long got = avail - stm->bufframes;
void * other_buffer = stm->other_stream ? stm->other_stream->buffer : NULL;
- char * buftail = stm->buffer + snd_pcm_frames_to_bytes(stm->pcm, stm->bufframes);
+ char * buftail = stm->buffer + WRAP(snd_pcm_frames_to_bytes)(stm->pcm, stm->bufframes);
if (stm->params.format == CUBEB_SAMPLE_FLOAT32NE) {
float * b = (float *) p;
@@ -328,14 +385,66 @@ alsa_refill_stream(cubeb_stream * stm)
b[i] *= stm->volume;
/* Correct read size to the other stream available frames */
if (stm->other_stream && got > (snd_pcm_sframes_t) stm->other_stream->bufframes) {
@@ -374,8 +424,8 @@ alsa_process_stream(cubeb_stream * stm)
long drain_frames = avail - stm->bufframes;
double drain_time = (double) drain_frames / stm->params.rate;
- char * buftail = stm->buffer + snd_pcm_frames_to_bytes(stm->pcm, stm->bufframes);
- memset(buftail, 0, snd_pcm_frames_to_bytes(stm->pcm, drain_frames));
+ char * buftail = stm->buffer + WRAP(snd_pcm_frames_to_bytes)(stm->pcm, stm->bufframes);
+ memset(buftail, 0, WRAP(snd_pcm_frames_to_bytes)(stm->pcm, drain_frames));
stm->bufframes = avail;
/* Mark as draining, unless we're waiting for capture */
@@ -402,7 +452,7 @@ alsa_process_stream(cubeb_stream * stm)
}
}
- 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 __linux__
+ case -EBADFD:
+#else
+ case -EBADF:
+#endif
+ 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;
+ }
+ 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;
+ }
- wrote = snd_pcm_writei(stm->pcm, stm->buffer, avail);
+ wrote = WRAP(snd_pcm_writei)(stm->pcm, stm->buffer, avail);
if (wrote < 0) {
avail = wrote; // the error handler below will recover us
} else {
@@ -415,13 +465,13 @@ alsa_process_stream(cubeb_stream * stm)
/* Got some error? Let's try to recover the stream. */
if (avail < 0) {
- avail = snd_pcm_recover(stm->pcm, avail, 0);
+ avail = WRAP(snd_pcm_recover)(stm->pcm, avail, 0);
/* Capture pcm must be started after initial setup/recover */
if (avail >= 0 &&
stm->stream_type == SND_PCM_STREAM_CAPTURE &&
- snd_pcm_state(stm->pcm) == SND_PCM_STATE_PREPARED) {
- avail = snd_pcm_start(stm->pcm);
+ WRAP(snd_pcm_state)(stm->pcm) == SND_PCM_STATE_PREPARED) {
+ avail = WRAP(snd_pcm_start)(stm->pcm);
}
}
if (got != avail) {
long buffer_fill = stm->buffer_size - (avail - got);
@@ -343,7 +452,7 @@ alsa_refill_stream(cubeb_stream * stm)
/* 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 +563,26 @@ get_slave_pcm_node(snd_config_t * lconf,
@@ -537,26 +587,26 @@ get_slave_pcm_node(snd_config_t * lconf,
slave_def = NULL;
@ -286,7 +191,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
if (r < 0) {
break;
}
@@ -482,7 +591,7 @@ get_slave_pcm_node(snd_config_t * lconf,
@@ -565,7 +615,7 @@ get_slave_pcm_node(snd_config_t * lconf,
if (r < 0 || r > (int) sizeof(node_name)) {
break;
}
@ -295,7 +200,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
if (r < 0) {
break;
}
@@ -491,7 +600,7 @@ get_slave_pcm_node(snd_config_t * lconf,
@@ -574,7 +624,7 @@ get_slave_pcm_node(snd_config_t * lconf,
} while (0);
if (slave_def) {
@ -304,7 +209,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
}
return NULL;
@@ -514,22 +623,22 @@ init_local_config_with_workaround(char c
@@ -597,22 +647,22 @@ init_local_config_with_workaround(char c
lconf = NULL;
@ -331,7 +236,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
if (r < 0) {
break;
}
@@ -538,7 +647,7 @@ init_local_config_with_workaround(char c
@@ -621,7 +671,7 @@ init_local_config_with_workaround(char c
if (r < 0 || r > (int) sizeof(node_name)) {
break;
}
@ -340,7 +245,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
if (r < 0) {
break;
}
@@ -549,12 +658,12 @@ init_local_config_with_workaround(char c
@@ -632,12 +682,12 @@ init_local_config_with_workaround(char c
}
/* Fetch the PCM node's type, and bail out if it's not the PulseAudio plugin. */
@ -355,7 +260,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
if (r < 0) {
break;
}
@@ -565,18 +674,18 @@ init_local_config_with_workaround(char c
@@ -648,18 +698,18 @@ init_local_config_with_workaround(char c
/* Don't clobber an explicit existing handle_underrun value, set it only
if it doesn't already exist. */
@ -377,7 +282,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
if (r < 0) {
break;
}
@@ -584,7 +693,7 @@ init_local_config_with_workaround(char c
@@ -667,7 +717,7 @@ init_local_config_with_workaround(char c
return lconf;
} while (0);
@ -386,19 +291,19 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
return NULL;
}
@@ -596,9 +705,9 @@ alsa_locked_pcm_open(snd_pcm_t ** pcm, s
@@ -679,9 +729,9 @@ alsa_locked_pcm_open(snd_pcm_t ** pcm, c
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);
- r = snd_pcm_open_lconf(pcm, pcm_name, stream, SND_PCM_NONBLOCK, local_config);
+ r = WRAP(snd_pcm_open_lconf)(pcm, 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);
- r = snd_pcm_open(pcm, pcm_name, stream, SND_PCM_NONBLOCK);
+ r = WRAP(snd_pcm_open)(pcm, pcm_name, stream, SND_PCM_NONBLOCK);
}
pthread_mutex_unlock(&cubeb_alsa_mutex);
@@ -611,7 +720,7 @@ alsa_locked_pcm_close(snd_pcm_t * pcm)
@@ -694,7 +744,7 @@ alsa_locked_pcm_close(snd_pcm_t * pcm)
int r;
pthread_mutex_lock(&cubeb_alsa_mutex);
@ -407,7 +312,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
pthread_mutex_unlock(&cubeb_alsa_mutex);
return r;
@@ -668,12 +777,65 @@ alsa_init(cubeb ** context, char const *
@@ -757,12 +807,65 @@ alsa_init(cubeb ** context, char const *
pthread_attr_t attr;
snd_pcm_t * dummy;
@ -474,7 +379,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
cubeb_alsa_error_handler_set = 1;
}
pthread_mutex_unlock(&cubeb_alsa_mutex);
@@ -681,6 +843,8 @@ alsa_init(cubeb ** context, char const *
@@ -770,6 +873,8 @@ alsa_init(cubeb ** context, char const *
ctx = calloc(1, sizeof(*ctx));
assert(ctx);
@ -483,7 +388,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
ctx->ops = &alsa_ops;
r = pthread_mutex_init(&ctx->mutex, NULL);
@@ -730,7 +894,7 @@ alsa_init(cubeb ** context, char const *
@@ -819,7 +924,7 @@ alsa_init(cubeb ** context, char const *
config fails with EINVAL, the PA PCM is too old for this workaround. */
if (r == -EINVAL) {
pthread_mutex_lock(&cubeb_alsa_mutex);
@ -492,7 +397,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
pthread_mutex_unlock(&cubeb_alsa_mutex);
ctx->local_config = NULL;
} else if (r >= 0) {
@@ -769,9 +933,13 @@ alsa_destroy(cubeb * ctx)
@@ -859,9 +964,13 @@ alsa_destroy(cubeb * ctx)
pthread_mutex_destroy(&ctx->mutex);
free(ctx->fds);
@ -507,7 +412,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
pthread_mutex_unlock(&cubeb_alsa_mutex);
}
@@ -839,7 +1007,7 @@ alsa_stream_init(cubeb * ctx, cubeb_stre
@@ -948,7 +1057,7 @@ alsa_stream_init_single(cubeb * ctx, cub
return CUBEB_ERROR;
}
@ -515,26 +420,30 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
+ 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 +1017,23 @@ alsa_stream_init(cubeb * ctx, cubeb_stre
latency = latency < 500 ? 500 : latency;
latency_us = latency_frames * 1e6 / stm->params.rate;
@@ -961,7 +1070,7 @@ alsa_stream_init_single(cubeb * ctx, cub
latency_us = latency_us < min_latency ? min_latency: latency_us;
}
- 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);
stm->params.channels, stm->params.rate, 1,
latency_us);
if (r < 0) {
alsa_stream_destroy(stm);
@@ -969,20 +1078,20 @@ alsa_stream_init_single(cubeb * ctx, cub
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);
- r = snd_pcm_get_params(stm->pcm, &stm->buffer_size, &period_size);
+ r = WRAP(snd_pcm_get_params)(stm->pcm, &stm->buffer_size, &period_size);
assert(r == 0);
/* Double internal buffer size to have enough space when waiting for the other side of duplex connection */
stm->buffer_size *= 2;
- stm->buffer = calloc(1, snd_pcm_frames_to_bytes(stm->pcm, stm->buffer_size));
+ stm->buffer = calloc(1, WRAP(snd_pcm_frames_to_bytes)(stm->pcm, stm->buffer_size));
assert(stm->buffer);
- stm->nfds = snd_pcm_poll_descriptors_count(stm->pcm);
+ stm->nfds = WRAP(snd_pcm_poll_descriptors_count)(stm->pcm);
assert(stm->nfds > 0);
@ -545,8 +454,8 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
+ 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 +1064,7 @@ alsa_stream_destroy(cubeb_stream * stm)
if (alsa_register_stream(ctx, stm) != 0) {
@@ -1054,7 +1163,7 @@ alsa_stream_destroy(cubeb_stream * stm)
pthread_mutex_lock(&stm->mutex);
if (stm->pcm) {
if (stm->state == DRAINING) {
@ -555,21 +464,9 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
}
alsa_locked_pcm_close(stm->pcm);
stm->pcm = NULL;
@@ -906,7 +1074,10 @@ alsa_stream_destroy(cubeb_stream * stm)
pthread_mutex_destroy(&stm->mutex);
@@ -1100,12 +1209,12 @@ alsa_get_max_channel_count(cubeb * ctx,
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 +1109,12 @@ alsa_get_max_channel_count(cubeb * ctx,
return CUBEB_ERROR;
}
assert(stm);
- r = snd_pcm_hw_params_any(stm->pcm, hw_params);
+ r = WRAP(snd_pcm_hw_params_any)(stm->pcm, hw_params);
@ -582,12 +479,12 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
if (r < 0) {
return CUBEB_ERROR;
}
@@ -963,34 +1134,34 @@ alsa_get_preferred_sample_rate(cubeb * c
@@ -1126,34 +1235,34 @@ alsa_get_preferred_sample_rate(cubeb * c
/* get a pcm, disabling resampling, so we get a rate the
* hardware/dmix/pulse/etc. supports. */
- r = snd_pcm_open(&pcm, CUBEB_ALSA_PCM_NAME, SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0);
+ r = WRAP(snd_pcm_open)(&pcm, CUBEB_ALSA_PCM_NAME, SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0);
- r = snd_pcm_open(&pcm, CUBEB_ALSA_PCM_NAME, SND_PCM_STREAM_PLAYBACK, SND_PCM_NO_AUTO_RESAMPLE);
+ r = WRAP(snd_pcm_open)(&pcm, CUBEB_ALSA_PCM_NAME, SND_PCM_STREAM_PLAYBACK, SND_PCM_NO_AUTO_RESAMPLE);
if (r < 0) {
return CUBEB_ERROR;
}
@ -625,16 +522,21 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
return CUBEB_OK;
}
@@ -1014,7 +1185,7 @@ alsa_stream_start(cubeb_stream * stm)
ctx = stm->context;
@@ -1186,10 +1295,10 @@ alsa_stream_start(cubeb_stream * stm)
pthread_mutex_lock(&stm->mutex);
/* Capture pcm must be started after initial setup/recover */
if (stm->stream_type == SND_PCM_STREAM_CAPTURE &&
- snd_pcm_state(stm->pcm) == SND_PCM_STATE_PREPARED) {
- snd_pcm_start(stm->pcm);
+ WRAP(snd_pcm_state)(stm->pcm) == SND_PCM_STATE_PREPARED) {
+ WRAP(snd_pcm_start)(stm->pcm);
}
- 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 +1219,7 @@ alsa_stream_stop(cubeb_stream * stm)
@@ -1229,7 +1338,7 @@ alsa_stream_stop(cubeb_stream * stm)
pthread_mutex_unlock(&ctx->mutex);
pthread_mutex_lock(&stm->mutex);
@ -643,7 +545,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
pthread_mutex_unlock(&stm->mutex);
return CUBEB_OK;
@@ -1064,14 +1235,17 @@ alsa_stream_get_position(cubeb_stream *
@@ -1245,8 +1354,8 @@ alsa_stream_get_position(cubeb_stream *
pthread_mutex_lock(&stm->mutex);
delay = -1;
@ -654,17 +556,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.2 2017/01/22 12:27:22 ryoon
*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 +1264,7 @@ alsa_stream_get_latency(cubeb_stream * s
@@ -1271,7 +1380,7 @@ alsa_stream_get_latency(cubeb_stream * s
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. */

View file

@ -1,8 +1,10 @@
$NetBSD: patch-media_libcubeb_src_cubeb__oss.c,v 1.2 2017/01/22 12:27:22 ryoon Exp $
$NetBSD: patch-media_libcubeb_src_cubeb__oss.c,v 1.3 2019/02/25 15:32:24 wiz Exp $
--- media/libcubeb/src/cubeb_oss.c.orig 2015-02-20 05:47:26.000000000 +0000
* Restore OSS audio support code
--- media/libcubeb/src/cubeb_oss.c.orig 2018-05-09 10:25:44.118207555 +0000
+++ media/libcubeb/src/cubeb_oss.c
@@ -0,0 +1,402 @@
@@ -0,0 +1,454 @@
+/*
+ * Copyright © 2014 Mozilla Foundation
+ *
@ -23,6 +25,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb__oss.c,v 1.2 2017/01/22 12:27:22 ryoon E
+#include <errno.h>
+#include <pthread.h>
+#include <stdio.h>
+#include <assert.h>
+
+#include "cubeb/cubeb.h"
+#include "cubeb-internal.h"
@ -38,11 +41,13 @@ $NetBSD: patch-media_libcubeb_src_cubeb__oss.c,v 1.2 2017/01/22 12:27:22 ryoon E
+};
+
+struct cubeb_stream {
+ /* Note: Must match cubeb_stream layout in cubeb.c. */
+ cubeb * context;
+ void * user_ptr;
+ /**/
+
+ cubeb_data_callback data_callback;
+ cubeb_state_callback state_callback;
+ void * user_ptr;
+ float volume;
+ float panning;
+
@ -93,10 +98,11 @@ $NetBSD: patch-media_libcubeb_src_cubeb__oss.c,v 1.2 2017/01/22 12:27:22 ryoon E
+}
+
+static int oss_get_min_latency(cubeb * context, cubeb_stream_params params,
+ uint32_t * latency_ms)
+ uint32_t * latency_frames)
+{
+ (void)context;
+ /* 40ms is a big enough number to work ok */
+ *latency_ms = 40;
+ *latency_frames = 40 * params.rate / 1000;
+ return CUBEB_OK;
+}
+
@ -121,15 +127,15 @@ $NetBSD: patch-media_libcubeb_src_cubeb__oss.c,v 1.2 2017/01/22 12:27:22 ryoon E
+ 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);
+ got = stream->data_callback(stream, stream->user_ptr, NULL, 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)
+static void apply_volume_int(int16_t* buffer, unsigned int n,
+ float volume, float panning)
+{
+ float left = volume;
+ float right = volume;
@ -147,6 +153,26 @@ $NetBSD: patch-media_libcubeb_src_cubeb__oss.c,v 1.2 2017/01/22 12:27:22 ryoon E
+ }
+}
+
+static void apply_volume_float(float* buffer, unsigned int n,
+ float volume, float panning)
+{
+ float left = volume;
+ float right = volume;
+ unsigned int i;
+ float pan[2];
+ if (panning<0) {
+ right *= (1+panning);
+ } else {
+ left *= (1-panning);
+ }
+ pan[0] = left;
+ pan[1] = right;
+ for(i=0; i<n; i++){
+ buffer[i] = buffer[i]*pan[i%2];
+ }
+}
+
+
+static void *writer(void *stm)
+{
+ cubeb_stream* stream = (cubeb_stream*)stm;
@ -171,15 +197,25 @@ $NetBSD: patch-media_libcubeb_src_cubeb__oss.c,v 1.2 2017/01/22 12:27:22 ryoon E
+ if (stream->floating) {
+ got = run_data_callback(stream, f_buffer,
+ OSS_BUFFER_SIZE/stream->params.channels);
+ apply_volume_float(f_buffer, got*stream->params.channels,
+ stream->volume, stream->panning);
+ for (i=0; i<((unsigned long)got)*stream->params.channels; i++) {
+ buffer[i] = f_buffer[i]*32767.0;
+ /* Clipping is prefered to overflow */
+ if(f_buffer[i]>=1.0){
+ f_buffer[i]=1.0;
+ }
+ if(f_buffer[i]<=-1.0){
+ f_buffer[i]=-1.0;
+ }
+ /* One might think that multipling by 32767.0 is logical but results in clipping */
+ buffer[i] = f_buffer[i]*32767.0;
+ }
+ } else {
+ got = run_data_callback(stream, buffer,
+ OSS_BUFFER_SIZE/stream->params.channels);
+ apply_volume_int(buffer, got*stream->params.channels,
+ stream->volume, stream->panning);
+ }
+ apply_volume(buffer, got*stream->params.channels,
+ stream->volume, stream->panning);
+ if (got<0) {
+ run_state_callback(stream, CUBEB_STATE_ERROR);
+ break;
@ -209,8 +245,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb__oss.c,v 1.2 2017/01/22 12:27:22 ryoon E
+ 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 */
+ unsigned int frag_log=10; /* 2^frag_log = fragment size */
+ latency_bytes =
+ latency*stream->params.rate*stream->params.channels*sizeof(uint16_t)/1000;
+ n_frag = latency_bytes>>frag_log;
@ -221,7 +256,10 @@ $NetBSD: patch-media_libcubeb_src_cubeb__oss.c,v 1.2 2017/01/22 12:27:22 ryoon E
+
+static int oss_stream_init(cubeb * context, cubeb_stream ** stm,
+ char const * stream_name,
+ cubeb_stream_params stream_params,
+ cubeb_devid input_device,
+ cubeb_stream_params * input_stream_params,
+ cubeb_devid output_device,
+ cubeb_stream_params * output_stream_params,
+ unsigned int latency,
+ cubeb_data_callback data_callback,
+ cubeb_state_callback state_callback, void * user_ptr)
@ -232,6 +270,17 @@ $NetBSD: patch-media_libcubeb_src_cubeb__oss.c,v 1.2 2017/01/22 12:27:22 ryoon E
+ stream->state_callback = state_callback;
+ stream->user_ptr = user_ptr;
+
+ assert(!input_stream_params && "not supported.");
+ if (input_device || output_device) {
+ /* Device selection not yet implemented. */
+ return CUBEB_ERROR_DEVICE_UNAVAILABLE;
+ }
+
+ if ((input_stream_params && input_stream_params->prefs & CUBEB_STREAM_PREF_LOOPBACK) ||
+ (output_stream_params && output_stream_params->prefs & CUBEB_STREAM_PREF_LOOPBACK)) {
+ return CUBEB_ERROR_NOT_SUPPORTED;
+ }
+
+ if ((stream->fd = open(CUBEB_OSS_DEFAULT_OUTPUT, O_WRONLY)) == -1) {
+ free(stream);
+ return CUBEB_ERROR;
@ -243,16 +292,16 @@ $NetBSD: patch-media_libcubeb_src_cubeb__oss.c,v 1.2 2017/01/22 12:27:22 ryoon E
+ free(stream); \
+ return CUBEB_ERROR_INVALID_FORMAT; } } while (0)
+
+ stream->params = stream_params;
+ stream->params = *output_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) {
+ 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;
@ -392,16 +441,21 @@ $NetBSD: patch-media_libcubeb_src_cubeb__oss.c,v 1.2 2017/01/22 12:27:22 ryoon E
+ .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,
+ .get_preferred_channel_layout = NULL,
+ .enumerate_devices = NULL,
+ .device_collection_destroy = NULL,
+ .destroy = oss_destroy,
+ .stream_init = oss_stream_init,
+ .stream_destroy = oss_stream_destroy,
+ .stream_start = oss_stream_start,
+ .stream_stop = oss_stream_stop,
+ .stream_reset_default_device = NULL,
+ .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
+ .stream_register_device_changed_callback = NULL,
+ .register_device_collection_changed = NULL
+};

View file

@ -1,10 +1,11 @@
$NetBSD: patch-media_libcubeb_src_moz.build,v 1.2 2017/01/22 12:27:22 ryoon Exp $
$NetBSD: patch-media_libcubeb_src_moz.build,v 1.3 2019/02/25 15:32:24 wiz Exp $
Don't assume cocoa toolkit just because OS_TARGET is Darwin.
* Add OSS audio support
* Support system library
--- media/libcubeb/src/moz.build.orig 2016-02-25 23:01:58.000000000 +0000
--- media/libcubeb/src/moz.build.orig 2018-05-03 16:58:30.000000000 +0000
+++ media/libcubeb/src/moz.build
@@ -17,6 +17,12 @@ if CONFIG['MOZ_ALSA']:
@@ -22,6 +22,12 @@ if CONFIG['MOZ_ALSA']:
]
DEFINES['USE_ALSA'] = True
@ -14,32 +15,14 @@ Don't assume cocoa toolkit just because OS_TARGET is Darwin.
+ ]
+ DEFINES['USE_OSS'] = True
+
if CONFIG['MOZ_PULSEAUDIO']:
if CONFIG['MOZ_PULSEAUDIO'] or CONFIG['MOZ_JACK']:
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',
]
@@ -64,6 +70,9 @@ if CONFIG['OS_TARGET'] == 'Android':
'cubeb_resampler.cpp',
@@ -87,6 +93,7 @@ if CONFIG['OS_TARGET'] == 'Android':
FINAL_LIBRARY = 'gkmedias'
+if CONFIG['MOZ_NATIVE_SPEEX']:
+ SOURCES['cubeb_resampler.cpp'].flags += CONFIG['MOZ_SPEEX_CFLAGS']
+
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
if CONFIG['ANDROID_VERSION'] >= '17':
LOCAL_INCLUDES += [
@@ -74,5 +83,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk
'%' + '%s/system/media/wilhelm/include' % CONFIG['ANDROID_SOURCE'],
]
+CFLAGS += CONFIG['MOZ_OSS_CFLAGS']
CFLAGS += CONFIG['MOZ_ALSA_CFLAGS']
+CFLAGS += CONFIG['MOZ_OSS_CFLAGS']
CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS']
# We allow warnings for third-party code that can be updated from upstream.

View file

@ -0,0 +1,12 @@
$NetBSD: patch-media_libcubeb_update.sh,v 1.1 2019/02/25 15:32:24 wiz Exp $
--- media/libcubeb/update.sh.orig 2018-05-03 16:58:30.000000000 +0000
+++ media/libcubeb/update.sh
@@ -20,6 +20,7 @@ cp $1/src/cubeb_log.h src
cp $1/src/cubeb_mixer.cpp src
cp $1/src/cubeb_mixer.h src
cp $1/src/cubeb_opensl.c src
+cp $1/src/cubeb_oss.c src
cp $1/src/cubeb-jni.cpp src
cp $1/src/cubeb-jni.h src
cp $1/src/android/cubeb-output-latency.h src/android

View file

@ -1,12 +1,17 @@
$NetBSD: patch-media_libpng_pngpriv.h,v 1.2 2017/01/22 12:27:22 ryoon Exp $
$NetBSD: patch-media_libpng_pngpriv.h,v 1.3 2019/02/25 15:32:24 wiz Exp $
--- media/libpng/pngpriv.h.orig 2014-02-12 21:29:13.000000000 +0000
Fix _POSIX_SOURCE on SunOS.
--- media/libpng/pngpriv.h.orig 2018-06-05 19:47:32.000000000 +0000
+++ media/libpng/pngpriv.h
@@ -38,6 +38,7 @@
@@ -36,8 +36,10 @@
* still required (as of 2011-05-02.)
*/
#define _POSIX_SOURCE 1 /* Just the POSIX 1003.1 and C89 APIs */
+#define _XOPEN_SOURCE 600
#ifndef _POSIX_SOURCE
+#if !defined(__sun) || (__STDC_VERSION__-0 < 199901L)
# define _POSIX_SOURCE 1 /* Just the POSIX 1003.1 and C89 APIs */
#endif
+#endif
#ifndef PNG_VERSION_INFO_ONLY
/* Standard library headers not required by png.h: */

View file

@ -1,15 +0,0 @@
$NetBSD: patch-media_libsoundtouch_src_cpu__detect__x86.cpp,v 1.2 2017/01/22 12:27:22 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:

View file

@ -1,12 +0,0 @@
$NetBSD: patch-media_libstagefright_frameworks_av_include_media_stagefright_foundation_AString.h,v 1.1 2017/01/22 12:27:22 ryoon Exp $
--- media/libstagefright/frameworks/av/include/media/stagefright/foundation/AString.h.orig 2015-12-08 18:06:36.000000000 +0000
+++ media/libstagefright/frameworks/av/include/media/stagefright/foundation/AString.h
@@ -18,6 +18,7 @@
#define A_STRING_H_
+#include <cctype>
#include <sys/types.h>
namespace stagefright {

View file

@ -1,22 +0,0 @@
$NetBSD: patch-media_libstagefright_frameworks_av_media_libstagefright_foundation_AString.cpp,v 1.2 2017/01/22 12:27:22 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

View file

@ -1,27 +0,0 @@
$NetBSD: patch-media_libstagefright_system_core_liblog_fake__log__device.c,v 1.2 2017/01/22 12:27:22 ryoon Exp $
--- media/libstagefright/system/core/liblog/fake_log_device.c.orig 2015-01-23 05:59:59.000000000 +0000
+++ media/libstagefright/system/core/liblog/fake_log_device.c 2015-02-16 14:09:00.000000000 +0000
@@ -229,11 +229,11 @@
char tagName[kMaxTagLen];
int i, minPrio;
- while (isspace(*tags))
+ while (isspace((unsigned char)*tags))
tags++;
i = 0;
- while (*tags != '\0' && !isspace(*tags) && *tags != ':' &&
+ while (*tags != '\0' && !isspace((unsigned char)*tags) && *tags != ':' &&
i < kMaxTagLen)
{
tagName[i++] = *tags++;
@@ -272,7 +272,7 @@
}
tags++;
- if (*tags != '\0' && !isspace(*tags)) {
+ if (*tags != '\0' && !isspace((unsigned char)*tags)) {
TRACE("ERROR: garbage in tag env; expected whitespace\n");
TRACE(" env='%s'\n", tags);
return;

View file

@ -1,22 +0,0 @@
$NetBSD: patch-media_libstagefright_system_core_liblog_logprint.c,v 1.2 2017/01/22 12:27:22 ryoon Exp $
--- media/libstagefright/system/core/liblog/logprint.c.orig 2015-01-23 05:59:59.000000000 +0000
+++ media/libstagefright/system/core/liblog/logprint.c 2015-02-16 14:12:46.000000000 +0000
@@ -101,7 +101,7 @@
{
android_LogPriority pri;
- c = tolower(c);
+ c = tolower((unsigned char)c);
if (c >= '0' && c <= '9') {
if (c >= ('0'+ANDROID_LOG_SILENT)) {
@@ -370,7 +370,7 @@
{
char *end = str + strlen(str) - 1;
- while (end >= str && isspace(*end))
+ while (end >= str && isspace((unsigned char)*end))
*end-- = '\0';
return str;
}

View file

@ -1,25 +0,0 @@
$NetBSD: patch-media_libtheora_lib_arm_armcpu.c,v 1.2 2017/01/22 12:27:22 ryoon Exp $
* NetBSD/evbearmv7hf-el's /proc/cpuinfo return empty, use hardcoded flags.
--- media/libtheora/lib/arm/armcpu.c.orig 2014-11-13 22:50:10.000000000 +0000
+++ media/libtheora/lib/arm/armcpu.c
@@ -107,6 +107,18 @@ ogg_uint32_t oc_cpu_flags_get(void){
return flags;
}
+#elif defined(__NetBSD__)
+ogg_uint32_t oc_cpu_flags_get(void){
+ ogg_uint32_t flags;
+ /* XXX ryoon: I have no idea about ARM CPU extensions detection mechanism
+ under NetBSD/earm.
+ evbearmv6hf-el machine, Raspberry Pi does not have NEON.
+ evbearmv7hf-el machine, CubieBoard2 does not have EDSP.
+ I have no idea about MEDIA.
+ So I will disable all options. */
+ flags=0;
+ return flags;
+}
#else
/*The feature registers which can tell us what the processor supports are
accessible in priveleged modes only, so we can't have a general user-space

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