Subject: [alpine-aports] [PATCH] testing/firefox: upgrade to 65.0.1

From: Bradley Saulteaux <[email-masked]>
Date: Thu, 21 Feb 2019 22:42:10 -0700

https://www.firefox.com/
Firefox web browser
---
 community/ffmpeg/APKBUILD                    |   6 +-
 community/libaom/10-fix-changelog.patch      | 638 +++++++++++++++++++
 community/libaom/APKBUILD                    |  30 +
 main/icu/10-firefox-65.0.1-fix.patch         |  23 +
 main/icu/APKBUILD                            |   6 +-
 main/libvpx/10-find-diff.patch               |  11 +
 main/libvpx/APKBUILD                         |  15 +-
 testing/cbindgen/APKBUILD                    |  26 +
 testing/firefox/10-debug-fixes.patch         |  25 +
 testing/firefox/APKBUILD                     | 125 ++--
 testing/firefox/disable-moz-stackwalk.patch  |  10 +-
 testing/firefox/fix-arm-atomics-grsec.patch  |  74 +--
 testing/firefox/fix-seccomp-bpf.patch        |  26 +-
 testing/firefox/fix-toolkit.patch            |  26 +-
 testing/firefox/fix-tools.patch              |  18 +-
 testing/firefox/fix-webrtc-glibcisms.patch   |  18 +-
 testing/firefox/rust-unitialized-field.patch |  11 +-
 17 files changed, 903 insertions(+), 185 deletions(-)
 create mode 100644 community/libaom/10-fix-changelog.patch
 create mode 100644 community/libaom/APKBUILD
 create mode 100644 main/icu/10-firefox-65.0.1-fix.patch
 create mode 100644 main/libvpx/10-find-diff.patch
 create mode 100644 testing/cbindgen/APKBUILD
 create mode 100644 testing/firefox/10-debug-fixes.patch

diff --git a/community/ffmpeg/APKBUILD b/community/ffmpeg/APKBUILD
index 4d2ac5757e..4b0ba5ec00 100644
--- a/community/ffmpeg/APKBUILD
+++ b/community/ffmpeg/APKBUILD
@@ -4,7 +4,7 @@
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=ffmpeg
 pkgver=4.1.1
-pkgrel=0
+pkgrel=1
 pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix"
 url="http://ffmpeg.org/"
 arch="all"
@@ -12,7 +12,7 @@ license="GPL"
 options="!check" # tests/data/hls-lists.append.m3u8 fails
 subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
 makedepends="gnutls-dev lame-dev libvorbis-dev xvidcore-dev zlib-dev libvdpau-dev
-	imlib2-dev x264-dev libtheora-dev coreutils bzip2-dev perl-dev libvpx-dev
+	imlib2-dev x264-dev libtheora-dev coreutils bzip2-dev perl-dev libaom-dev
 	libvpx-dev sdl2-dev libxfixes-dev libva-dev alsa-lib-dev
 	v4l-utils-dev yasm opus-dev x265-dev libass-dev"
 checkdepends="rsync"
@@ -71,6 +71,7 @@ build() {
 	x86 | arm*) _asm="--disable-asm" ;;
 	esac
 
+
 	cd "$builddir"
 	./configure \
 		--prefix=/usr \
@@ -78,6 +79,7 @@ build() {
 		--enable-avfilter \
 		--enable-gnutls \
 		--enable-gpl \
+		--enable-libaom \
 		--enable-libass \
 		--enable-libmp3lame \
 		--enable-libvorbis \
diff --git a/community/libaom/10-fix-changelog.patch b/community/libaom/10-fix-changelog.patch
new file mode 100644
index 0000000000..ede14d5b6e
--- /dev/null
+++ b/community/libaom/10-fix-changelog.patch
@@ -0,0 +1,638 @@
+fixed upstream
+https://aomedia.googlesource.com/aom/+/0ddc150516b7672101265eac032a11a9aae4cb53
+--- ./CHANGELOG
++++ ./CHANGELOG.
+@@ -1,631 +1,5 @@
+-Next Release
+-  - Incompatible changes:
+-    The AV1 encoder's default keyframe interval changed to 128 from 9999.
+-    Support for armv6 was removed.
++2018-06-28 v1.0.0
++  AOMedia Codec Workgroup Approved version 1.0
+ 
+ 2016-04-07 v0.1.0 "AOMedia Codec 1"
+   This release is the first Alliance for Open Media codec.
+-2015-11-09 v1.5.0 "Javan Whistling Duck"
+-  This release improves upon the VP9 encoder and speeds up the encoding and
+-  decoding processes.
+-
+-  - Upgrading:
+-    This release is ABI incompatible with 1.4.0. It drops deprecated VP8
+-    controls and adds a variety of VP9 controls for testing.
+-
+-    The vpxenc utility now prefers VP9 by default.
+-
+-  - Enhancements:
+-    Faster VP9 encoding and decoding
+-    Smaller library size by combining functions used by VP8 and VP9
+-
+-  - Bug Fixes:
+-    A variety of fuzzing issues
+-
+-2015-04-03 v1.4.0 "Indian Runner Duck"
+-  This release includes significant improvements to the VP9 codec.
+-
+-  - Upgrading:
+-    This release is ABI incompatible with 1.3.0. It drops the compatibility
+-    layer, requiring VPX_IMG_FMT_* instead of IMG_FMT_*, and adds several codec
+-    controls for VP9.
+-
+-  - Enhancements:
+-    Faster VP9 encoding and decoding
+-    Multithreaded VP9 decoding (tile and frame-based)
+-    Multithreaded VP9 encoding - on by default
+-    YUV 4:2:2 and 4:4:4 support in VP9
+-    10 and 12bit support in VP9
+-    64bit ARM support by replacing ARM assembly with intrinsics
+-
+-  - Bug Fixes:
+-    Fixes a VP9 bitstream issue in Profile 1. This only affected non-YUV 4:2:0
+-    files.
+-
+-  - Known Issues:
+-    Frame Parallel decoding fails for segmented and non-420 files.
+-
+-2013-11-15 v1.3.0 "Forest"
+-  This release introduces the VP9 codec in a backward-compatible way.
+-  All existing users of VP8 can continue to use the library without
+-  modification. However, some VP8 options do not map to VP9 in the same manner.
+-
+-  The VP9 encoder in this release is not feature complete. Users interested in
+-  the encoder are advised to use the git master branch and discuss issues on
+-  libvpx mailing lists.
+-
+-  - Upgrading:
+-    This release is ABI and API compatible with Duclair (v1.0.0). Users
+-    of older releases should refer to the Upgrading notes in this document
+-    for that release.
+-
+-  - Enhancements:
+-      Get rid of bashisms in the main build scripts
+-      Added usage info on command line options
+-      Add lossless compression mode
+-      Dll build of libvpx
+-      Add additional Mac OS X targets: 10.7, 10.8 and 10.9 (darwin11-13)
+-      Add option to disable documentation
+-      configure: add --enable-external-build support
+-      make: support V=1 as short form of verbose=yes
+-      configure: support mingw-w64
+-      configure: support hardfloat armv7 CHOSTS
+-      configure: add support for android x86
+-      Add estimated completion time to vpxenc
+-      Don't exit on decode errors in vpxenc
+-      vpxenc: support scaling prior to encoding
+-      vpxdec: support scaling output
+-      vpxenc: improve progress indicators with --skip
+-      msvs: Don't link to winmm.lib
+-      Add a new script for producing vcxproj files
+-      Produce Visual Studio 10 and 11 project files
+-      Produce Windows Phone project files
+-      msvs-build: use msbuild for vs >= 2005
+-      configure: default configure log to config.log
+-      Add encoding option --static-thresh
+-
+-  - Speed:
+-      Miscellaneous speed optimizations for VP8 and VP9.
+-
+-  - Quality:
+-      In general, quality is consistent with the Eider release.
+-
+-  - Bug Fixes:
+-      This release represents approximately a year of engineering effort,
+-      and contains multiple bug fixes. Please refer to git history for details.
+-
+-
+-2012-12-21 v1.2.0
+-  This release acts as a checkpoint for a large amount of internal refactoring
+-  and testing. It also contains a number of small bugfixes, so all users are
+-  encouraged to upgrade.
+-
+-  - Upgrading:
+-    This release is ABI and API compatible with Duclair (v1.0.0). Users
+-    of older releases should refer to the Upgrading notes in this
+-    document for that release.
+-
+-  - Enhancements:
+-      VP8 optimizations for MIPS dspr2
+-      vpxenc: add -quiet option
+-
+-  - Speed:
+-      Encoder and decoder speed is consistent with the Eider release.
+-
+-  - Quality:
+-      In general, quality is consistent with the Eider release.
+-
+-      Minor tweaks to ARNR filtering
+-      Minor improvements to real time encoding with multiple temporal layers
+-
+-  - Bug Fixes:
+-      Fixes multithreaded encoder race condition in loopfilter
+-      Fixes multi-resolution threaded encoding
+-      Fix potential encoder dead-lock after picture resize
+-
+-
+-2012-05-09 v1.1.0 "Eider"
+-  This introduces a number of enhancements, mostly focused on real-time
+-  encoding. In addition, it fixes a decoder bug (first introduced in
+-  Duclair) so all users of that release are encouraged to upgrade.
+-
+-  - Upgrading:
+-    This release is ABI and API compatible with Duclair (v1.0.0). Users
+-    of older releases should refer to the Upgrading notes in this
+-    document for that release.
+-
+-    This release introduces a new temporal denoiser, controlled by the
+-    VP8E_SET_NOISE_SENSITIVITY control. The temporal denoiser does not
+-    currently take a strength parameter, so the control is effectively
+-    a boolean - zero (off) or non-zero (on). For compatibility with
+-    existing applications, the values accepted are the same as those
+-    for the spatial denoiser (0-6). The temporal denoiser is enabled
+-    by default, and the older spatial denoiser may be restored by
+-    configuring with --disable-temporal-denoising. The temporal denoiser
+-    is more computationally intensive than the spatial one.
+-
+-    This release removes support for a legacy, decode only API that was
+-    supported, but deprecated, at the initial release of libvpx
+-    (v0.9.0). This is not expected to have any impact. If you are
+-    impacted, you can apply a reversion to commit 2bf8fb58 locally.
+-    Please update to the latest libvpx API if you are affected.
+-
+-  - Enhancements:
+-      Adds a motion compensated temporal denoiser to the encoder, which
+-      gives higher quality than the older spatial denoiser. (See above
+-      for notes on upgrading).
+-
+-      In addition, support for new compilers and platforms were added,
+-      including:
+-        improved support for XCode
+-        Android x86 NDK build
+-        OS/2 support
+-        SunCC support
+-
+-      Changing resolution with vpx_codec_enc_config_set() is now
+-      supported. Previously, reinitializing the codec was required to
+-      change the input resolution.
+-
+-      The vpxenc application has initial support for producing multiple
+-      encodes from the same input in one call. Resizing is not yet
+-      supported, but varying other codec parameters is. Use -- to
+-      delineate output streams. Options persist from one stream to the
+-      next.
+-
+-      Also, the vpxenc application will now use a keyframe interval of
+-      5 seconds by default. Use the --kf-max-dist option to override.
+-
+-  - Speed:
+-      Decoder performance improved 2.5% versus Duclair. Encoder speed is
+-      consistent with Duclair for most material. Two pass encoding of
+-      slideshow-like material will see significant improvements.
+-
+-      Large realtime encoding speed gains at a small quality expense are
+-      possible by configuring the on-the-fly bitpacking experiment with
+-      --enable-onthefly-bitpacking. Realtime encoder can be up to 13%
+-      faster (ARM) depending on the number of threads and bitrate
+-      settings. This technique sees constant gain over the 5-16 speed
+-      range. For VC style input the loss seen is up to 0.2dB. See commit
+-      52cf4dca for further details.
+-
+-  - Quality:
+-      On the whole, quality is consistent with the Duclair release. Some
+-      tweaks:
+-
+-        Reduced blockiness in easy sections by applying a penalty to
+-        intra modes.
+-
+-        Improved quality of static sections (like slideshows) with
+-        two pass encoding.
+-
+-        Improved keyframe sizing with multiple temporal layers
+-
+-  - Bug Fixes:
+-      Corrected alt-ref contribution to frame rate for visible updates
+-      to the alt-ref buffer. This affected applications making manual
+-      usage of the frame reference flags, or temporal layers.
+-
+-      Additional constraints were added to disable multi-frame quality
+-      enhancement (MFQE) in sections of the frame where there is motion.
+-      (#392)
+-
+-      Fixed corruption issues when vpx_codec_enc_config_set() was called
+-      with spatial resampling enabled.
+-
+-      Fixed a decoder error introduced in Duclair where the segmentation
+-      map was not being reinitialized on keyframes (#378)
+-
+-
+-2012-01-27 v1.0.0 "Duclair"
+-  Our fourth named release, focused on performance and features related to
+-  real-time encoding. It also fixes a decoder crash bug introduced in
+-  v0.9.7, so all users of that release are encouraged to upgrade.
+-
+-  - Upgrading:
+-      This release is ABI incompatible with prior releases of libvpx, so the
+-      "major" version number has been bumped to 1. You must recompile your
+-      applications against the latest version of the libvpx headers. The
+-      API remains compatible, and this should not require code changes in most
+-      applications.
+-
+-  - Enhancements:
+-      This release introduces several substantial new features to the encoder,
+-      of particular interest to real time streaming applications.
+-
+-      Temporal scalability allows the encoder to produce a stream that can
+-      be decimated to different frame rates, with independent rate targetting
+-      for each substream.
+-
+-      Multiframe quality enhancement postprocessing can make visual quality
+-      more consistent in the presence of frames that are substantially
+-      different quality than the surrounding frames, as in the temporal
+-      scalability case and in some forced keyframe scenarios.
+-
+-      Multiple-resolution encoding support allows the encoding of the
+-      same content at different resolutions faster than encoding them
+-      separately.
+-
+-  - Speed:
+-      Optimization targets for this release included the decoder and the real-
+-      time modes of the encoder. Decoder speed on x86 has improved 10.5% with
+-      this release. Encoder improvements followed a curve where speeds 1-3
+-      improved 4.0%-1.5%, speeds 4-8 improved <1%, and speeds 9-16 improved
+-      1.5% to 10.5%, respectively. "Best" mode speed is consistent with the
+-      Cayuga release.
+-
+-  - Quality:
+-      Encoder quality in the single stream case is consistent with the Cayuga
+-      release.
+-
+-  - Bug Fixes:
+-      This release fixes an OOB read decoder crash bug present in v0.9.7
+-      related to the clamping of motion vectors in SPLITMV blocks. This
+-      behavior could be triggered by corrupt input or by starting
+-      decoding from a P-frame.
+-
+-
+-2011-08-15 v0.9.7-p1 "Cayuga" patch 1
+-  This is an incremental bugfix release against Cayuga. All users of that
+-  release are strongly encouraged to upgrade.
+-
+-    - Fix potential OOB reads (cdae03a)
+-
+-          An unbounded out of bounds read was discovered when the
+-          decoder was requested to perform error concealment (new in
+-          Cayuga) given a frame with corrupt partition sizes.
+-
+-          A bounded out of bounds read was discovered affecting all
+-          versions of libvpx. Given an multipartition input frame that
+-          is truncated between the mode/mv partition and the first
+-          residiual paritition (in the block of partition offsets), up
+-          to 3 extra bytes could have been read from the source buffer.
+-          The code will not take any action regardless of the contents
+-          of these undefined bytes, as the truncated buffer is detected
+-          immediately following the read based on the calculated
+-          starting position of the coefficient partition.
+-
+-    - Fix potential error concealment crash when the very first frame
+-      is missing or corrupt (a609be5)
+-
+-    - Fix significant artifacts in error concealment (a4c2211, 99d870a)
+-
+-    - Revert 1-pass CBR rate control changes (e961317)
+-      Further testing showed this change produced undesirable visual
+-      artifacts, rolling back for now.
+-
+-
+-2011-08-02 v0.9.7 "Cayuga"
+-  Our third named release, focused on a faster, higher quality, encoder.
+-
+-  - Upgrading:
+-    This release is backwards compatible with Aylesbury (v0.9.5) and
+-    Bali (v0.9.6). Users of older releases should refer to the Upgrading
+-    notes in this document for that release.
+-
+-  - Enhancements:
+-          Stereo 3D format support for vpxenc
+-          Runtime detection of available processor cores.
+-          Allow specifying --end-usage by enum name
+-          vpxdec: test for frame corruption
+-          vpxenc: add quantizer histogram display
+-          vpxenc: add rate histogram display
+-          Set VPX_FRAME_IS_DROPPABLE
+-          update configure for ios sdk 4.3
+-          Avoid text relocations in ARM vp8 decoder
+-          Generate a vpx.pc file for pkg-config.
+-          New ways of passing encoded data between encoder and decoder.
+-
+-  - Speed:
+-      This release includes across-the-board speed improvements to the
+-      encoder. On x86, these measure at approximately 11.5% in Best mode,
+-      21.5% in Good mode (speed 0), and 22.5% in Realtime mode (speed 6).
+-      On ARM Cortex A9 with Neon extensions, real-time encoding of video
+-      telephony content is 35% faster than Bali on single core and 48%
+-      faster on multi-core. On the NVidia Tegra2 platform, real time
+-      encoding is 40% faster than Bali.
+-
+-      Decoder speed was not a priority for this release, but improved
+-      approximately 8.4% on x86.
+-
+-          Reduce motion vector search on alt-ref frame.
+-          Encoder loopfilter running in its own thread
+-          Reworked loopfilter to precalculate more parameters
+-          SSE2/SSSE3 optimizations for build_predictors_mbuv{,_s}().
+-          Make hor UV predict ~2x faster (73 vs 132 cycles) using SSSE3.
+-          Removed redundant checks
+-          Reduced structure sizes
+-          utilize preload in ARMv6 MC/LPF/Copy routines
+-          ARM optimized quantization, dfct, variance, subtract
+-          Increase chrow row alignment to 16 bytes.
+-          disable trellis optimization for first pass
+-          Write SSSE3 sub-pixel filter function
+-          Improve SSE2 half-pixel filter funtions
+-          Add vp8_sub_pixel_variance16x8_ssse3 function
+-          Reduce unnecessary distortion computation
+-          Use diamond search to replace full search
+-          Preload reference area in sub-pixel motion search (real-time mode)
+-
+-  - Quality:
+-      This release focused primarily on one-pass use cases, including
+-      video conferencing. Low latency data rate control was significantly
+-      improved, improving streamability over bandwidth constrained links.
+-      Added support for error concealment, allowing frames to maintain
+-      visual quality in the presence of substantial packet loss.
+-
+-          Add rc_max_intra_bitrate_pct control
+-          Limit size of initial keyframe in one-pass.
+-          Improve framerate adaptation
+-          Improved 1-pass CBR rate control
+-          Improved KF insertion after fades to still.
+-          Improved key frame detection.
+-          Improved activity masking (lower PSNR impact for same SSIM boost)
+-          Improved interaction between GF and ARFs
+-          Adding error-concealment to the decoder.
+-          Adding support for independent partitions
+-          Adjusted rate-distortion constants
+-
+-
+-  - Bug Fixes:
+-          Removed firstpass motion map
+-          Fix parallel make install
+-          Fix multithreaded encoding for 1 MB wide frame
+-          Fixed iwalsh_neon build problems with RVDS4.1
+-          Fix semaphore emulation, spin-wait intrinsics on Windows
+-          Fix build with xcode4 and simplify GLOBAL.
+-          Mark ARM asm objects as allowing a non-executable stack.
+-          Fix vpxenc encoding incorrect webm file header on big endian
+-
+-
+-2011-03-07 v0.9.6 "Bali"
+-  Our second named release, focused on a faster, higher quality, encoder.
+-
+-  - Upgrading:
+-    This release is backwards compatible with Aylesbury (v0.9.5). Users
+-    of older releases should refer to the Upgrading notes in this
+-    document for that release.
+-
+-  - Enhancements:
+-      vpxenc --psnr shows a summary when encode completes
+-      --tune=ssim option to enable activity masking
+-      improved postproc visualizations for development
+-      updated support for Apple iOS to SDK 4.2
+-      query decoder to determine which reference frames were updated
+-      implemented error tracking in the decoder
+-      fix pipe support on windows
+-
+-  - Speed:
+-      Primary focus was on good quality mode, speed 0. Average improvement
+-      on x86 about 40%, up to 100% on user-generated content at that speed.
+-      Best quality mode speed improved 35%, and realtime speed 10-20%. This
+-      release also saw significant improvement in realtime encoding speed
+-      on ARM platforms.
+-
+-        Improved encoder threading
+-        Dont pick encoder filter level when loopfilter is disabled.
+-        Avoid double copying of key frames into alt and golden buffer
+-        FDCT optimizations.
+-        x86 sse2 temporal filter
+-        SSSE3 version of fast quantizer
+-        vp8_rd_pick_best_mbsegmentation code restructure
+-        Adjusted breakout RD for SPLITMV
+-        Changed segmentation check order
+-        Improved rd_pick_intra4x4block
+-        Adds armv6 optimized variance calculation
+-        ARMv6 optimized sad16x16
+-        ARMv6 optimized half pixel variance calculations
+-        Full search SAD function optimization in SSE4.1
+-        Improve MV prediction accuracy to achieve performance gain
+-        Improve MV prediction in vp8_pick_inter_mode() for speed>3
+-
+-  - Quality:
+-      Best quality mode improved PSNR 6.3%, and SSIM 6.1%. This release
+-      also includes support for "activity masking," which greatly improves
+-      SSIM at the expense of PSNR. For now, this feature is available with
+-      the --tune=ssim option. Further experimentation in this area
+-      is ongoing. This release also introduces a new rate control mode
+-      called "CQ," which changes the allocation of bits within a clip to
+-      the sections where they will have the most visual impact.
+-
+-        Tuning for the more exact quantizer.
+-        Relax rate control for last few frames
+-        CQ Mode
+-        Limit key frame quantizer for forced key frames.
+-        KF/GF Pulsing
+-        Add simple version of activity masking.
+-        make rdmult adaptive for intra in quantizer RDO
+-        cap the best quantizer for 2nd order DC
+-        change the threshold of DC check for encode breakout
+-
+-  - Bug Fixes:
+-      Fix crash on Sparc Solaris.
+-      Fix counter of fixed keyframe distance
+-      ARNR filter pointer update bug fix
+-      Fixed use of motion percentage in KF/GF group calc
+-      Changed condition for using RD in Intra Mode
+-      Fix encoder real-time only configuration.
+-      Fix ARM encoder crash with multiple token partitions
+-      Fixed bug first cluster timecode of webm file is wrong.
+-      Fixed various encoder bugs with odd-sized images
+-      vp8e_get_preview fixed when spatial resampling enabled
+-      quantizer: fix assertion in fast quantizer path
+-      Allocate source buffers to be multiples of 16
+-      Fix for manual Golden frame frequency
+-      Fix drastic undershoot in long form content
+-
+-
+-2010-10-28 v0.9.5 "Aylesbury"
+-  Our first named release, focused on a faster decoder, and a better encoder.
+-
+-  - Upgrading:
+-    This release incorporates backwards-incompatible changes to the
+-    ivfenc and ivfdec tools. These tools are now called vpxenc and vpxdec.
+-
+-    vpxdec
+-      * the -q (quiet) option has been removed, and replaced with
+-        -v (verbose). the output is quiet by default. Use -v to see
+-        the version number of the binary.
+-
+-      * The default behavior is now to write output to a single file
+-        instead of individual frames. The -y option has been removed.
+-        Y4M output is the default.
+-
+-      * For raw I420/YV12 output instead of Y4M, the --i420 or --yv12
+-        options must be specified.
+-
+-          $ ivfdec -o OUTPUT INPUT
+-          $ vpxdec --i420 -o OUTPUT INPUT
+-
+-      * If an output file is not specified, the default is to write
+-        Y4M to stdout. This makes piping more natural.
+-
+-          $ ivfdec -y -o - INPUT | ...
+-          $ vpxdec INPUT | ...
+-
+-      * The output file has additional flexibility for formatting the
+-        filename. It supports escape characters for constructing a
+-        filename from the width, height, and sequence number. This
+-        replaces the -p option. To get the equivalent:
+-
+-          $ ivfdec -p frame INPUT
+-          $ vpxdec --i420 -o frame-%wx%h-%4.i420 INPUT
+-
+-    vpxenc
+-      * The output file must be specified with -o, rather than as the
+-        last argument.
+-
+-          $ ivfenc <options> INPUT OUTPUT
+-          $ vpxenc <options> -o OUTPUT INPUT
+-
+-      * The output defaults to webm. To get IVF output, use the --ivf
+-        option.
+-
+-          $ ivfenc <options> INPUT OUTPUT.ivf
+-          $ vpxenc <options> -o OUTPUT.ivf --ivf INPUT
+-
+-
+-  - Enhancements:
+-      ivfenc and ivfdec have been renamed to vpxenc, vpxdec.
+-      vpxdec supports .webm input
+-      vpxdec writes .y4m by default
+-      vpxenc writes .webm output by default
+-      vpxenc --psnr now shows the average/overall PSNR at the end
+-      ARM platforms now support runtime cpu detection
+-      vpxdec visualizations added for motion vectors, block modes, references
+-      vpxdec now silent by default
+-      vpxdec --progress shows frame-by-frame timing information
+-      vpxenc supports the distinction between --fps and --timebase
+-      NASM is now a supported assembler
+-      configure: enable PIC for shared libs by default
+-      configure: add --enable-small
+-      configure: support for ppc32-linux-gcc
+-      configure: support for sparc-solaris-gcc
+-
+-  - Bugs:
+-      Improve handling of invalid frames
+-      Fix valgrind errors in the NEON loop filters.
+-      Fix loopfilter delta zero transitions
+-      Fix valgrind errors in vp8_sixtap_predict8x4_armv6().
+-      Build fixes for darwin-icc
+-
+-  - Speed:
+-      20-40% (average 28%) improvement in libvpx decoder speed,
+-      including:
+-        Rewrite vp8_short_walsh4x4_sse2()
+-        Optimizations on the loopfilters.
+-        Miscellaneous improvements for Atom
+-        Add 4-tap version of 2nd-pass ARMv6 MC filter.
+-        Improved multithread utilization
+-        Better instruction choices on x86
+-        reorder data to use wider instructions
+-        Update NEON wide idcts
+-        Make block access to frame buffer sequential
+-        Improved subset block search
+-        Bilinear subpixel optimizations for ssse3.
+-        Decrease memory footprint
+-
+-      Encoder speed improvements (percentage gain not measured):
+-        Skip unnecessary search of identical frames
+-        Add SSE2 subtract functions
+-        Improve bounds checking in vp8_diamond_search_sadx4()
+-        Added vp8_fast_quantize_b_sse2
+-
+-  - Quality:
+-      Over 7% overall PSNR improvement (6.3% SSIM) in "best" quality
+-      encoding mode, and up to 60% improvement on very noisy, still
+-      or slow moving source video
+-
+-        Motion compensated temporal filter for Alt-Ref Noise Reduction
+-        Improved use of trellis quantization on 2nd order Y blocks
+-        Tune effect of motion on KF/GF boost in two pass
+-        Allow coefficient optimization for good quality speed 0.
+-        Improved control of active min quantizer for two pass.
+-        Enable ARFs for non-lagged compress
+-
+-2010-09-02 v0.9.2
+-  - Enhancements:
+-      Disable frame dropping by default
+-      Improved multithreaded performance
+-      Improved Force Key Frame Behaviour
+-      Increased rate control buffer level precision
+-      Fix bug in 1st pass motion compensation
+-      ivfenc: correct fixed kf interval, --disable-kf
+-  - Speed:
+-      Changed above and left context data layout
+-      Rework idct calling structure.
+-      Removed unnecessary MB_MODE_INFO copies
+-      x86: SSSE3 sixtap prediction
+-      Reworked IDCT to include reconstruction (add) step
+-      Swap alt/gold/new/last frame buffer ptrs instead of copying.
+-      Improve SSE2 loopfilter functions
+-      Change bitreader to use a larger window.
+-      Avoid loopfilter reinitialization when possible
+-  - Quality:
+-      Normalize quantizer's zero bin and rounding factors
+-      Add trellis quantization.
+-      Make the quantizer exact.
+-      Updates to ARNR filtering algorithm
+-      Fix breakout thresh computation for golden & AltRef frames
+-      Redo the forward 4x4 dct
+-      Improve the accuracy of forward walsh-hadamard transform
+-      Further adjustment of RD behaviour with Q and Zbin.
+-  - Build System:
+-      Allow linking of libs built with MinGW to MSVC
+-      Fix target auto-detection on mingw32
+-      Allow --cpu= to work for x86.
+-      configure: pass original arguments through to make dist
+-      Fix builds without runtime CPU detection
+-      msvs: fix install of codec sources
+-      msvs: Change devenv.com command line for better msys support
+-      msvs: Add vs9 targets.
+-      Add x86_64-linux-icc target
+-  - Bugs:
+-      Potential crashes on older MinGW builds
+-      Fix two-pass framrate for Y4M input.
+-      Fixed simple loop filter, other crashes on ARM v6
+-      arm: fix missing dependency with --enable-shared
+-      configure: support directories containing .o
+-      Replace pinsrw (SSE) with MMX instructions
+-      apple: include proper mach primatives
+-      Fixed rate control bug with long key frame interval.
+-      Fix DSO link errors on x86-64 when not using a version script
+-      Fixed buffer selection for UV in AltRef filtering
+-
+-
+-2010-06-17 v0.9.1
+-  - Enhancements:
+-      * ivfenc/ivfdec now support YUV4MPEG2 input and pipe I/O
+-      * Speed optimizations
+-  - Bugfixes:
+-      * Rate control
+-      * Prevent out-of-bounds accesses on invalid data
+-  - Build system updates:
+-      * Detect toolchain to be used automatically for native builds
+-      * Support building shared libraries
+-      * Better autotools emulation (--prefix, --libdir, DESTDIR)
+-  - Updated LICENSE
+-      * http://webmproject.blogspot.com/2010/06/changes-to-webm-open-source-license.html
+-
+-
+-2010-05-18 v0.9.0
+-  - Initial open source release. Welcome to WebM and VP8!
+-
diff --git a/community/libaom/APKBUILD b/community/libaom/APKBUILD
new file mode 100644
index 0000000000..a3ea87ff29
--- /dev/null
+++ b/community/libaom/APKBUILD
@@ -0,0 +1,30 @@
+# Maintainer: Bradley Saulteaux <[email-masked]>
+pkgname=libaom
+pkgver=1.0.0
+pkgrel=0
+pkgdesc="Alliance for Open Media"
+url="https://aomedia.googlesource.com/aom/"
+arch="all"
+license="BSD-2-Clause"
+depends=""
+makedepends="cmake python yasm"
+install=""
+options="!check" #tests fail at AV1/AV1DecodeMultiThreadedTest.MD5Match
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.gz::https://aomedia.googlesource.com/aom/+archive/v$pkgver.tar.gz
+	10-fix-changelog.patch"
+builddir="$srcdir"
+build() {
+	cd "$srcdir"/build
+	cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DBUILD_SHARED_LIBS=1 ..
+}
+check() {
+	cd "$srcdir"/build
+	make runtests
+}
+package() {
+	cd "$srcdir"/build
+	make DESTDIR="$pkgdir" install
+}
+sha512sums="f506a9399cfcf2aa3473639210511270c5a44b789eb51ce5616bd61f18a18e64080240a7b1ea2502d27df40ddf290b8f4686282f1eda3ffc57c45c803474f768  libaom-1.0.0.tar.gz
+7da8a8d1cb67fece415ee090acd8ba60b00837548fd225c71b7cc5f0059e3fdf2678b85004226fdfdd3989207b8f82632d1b207a8ec7721711ceefc4ae6bcdb5  10-fix-changelog.patch"
diff --git a/main/icu/10-firefox-65.0.1-fix.patch b/main/icu/10-firefox-65.0.1-fix.patch
new file mode 100644
index 0000000000..6c47bdde2a
--- /dev/null
+++ b/main/icu/10-firefox-65.0.1-fix.patch
@@ -0,0 +1,23 @@
+https://github.com/unicode-org/icu/commit/8baff8f03e07d8e02304d0c888d0bb21ad2eeb01
+fixed in 63.2
+--- ./common/unicode/urename.h
++++ ./common/unicode/urename.h.
+@@ -110,7 +110,6 @@
+ #define _UTF7Data U_ICU_ENTRY_POINT_RENAME(_UTF7Data)
+ #define _UTF8Data U_ICU_ENTRY_POINT_RENAME(_UTF8Data)
+ #define allowedHourFormatsCleanup U_ICU_ENTRY_POINT_RENAME(allowedHourFormatsCleanup)
+-#define checkImpl U_ICU_ENTRY_POINT_RENAME(checkImpl)
+ #define cmemory_cleanup U_ICU_ENTRY_POINT_RENAME(cmemory_cleanup)
+ #define dayPeriodRulesCleanup U_ICU_ENTRY_POINT_RENAME(dayPeriodRulesCleanup)
+ #define deleteAllowedHourFormats U_ICU_ENTRY_POINT_RENAME(deleteAllowedHourFormats)
+--- ./i18n/uspoof.cpp
++++ ./i18n/uspoof.cpp.
+@@ -547,7 +547,7 @@
+     return uspoof_check2UnicodeString(sc, id, NULL, status);
+ }
+ 
+-int32_t checkImpl(const SpoofImpl* This, const UnicodeString& id, CheckResult* checkResult, UErrorCode* status) {
++static int32_t checkImpl(const SpoofImpl* This, const UnicodeString& id, CheckResult* checkResult, UErrorCode* status) {
+     U_ASSERT(This != NULL);
+     U_ASSERT(checkResult != NULL);
+     checkResult->clear();
diff --git a/main/icu/APKBUILD b/main/icu/APKBUILD
index 14b6b66a4c..25fe4cc6af 100644
--- a/main/icu/APKBUILD
+++ b/main/icu/APKBUILD
@@ -6,7 +6,7 @@ pkgver=63.1
 # convert x.y.z to x_y_z
 _ver=${pkgver//./_}
 
-pkgrel=0
+pkgrel=1
 pkgdesc="International Components for Unicode library"
 url="http://www.icu-project.org/"
 arch="all"
@@ -17,6 +17,7 @@ depends_dev="$pkgname=$pkgver-r$pkgrel"
 checkdepends="diffutils"
 makedepends=
 source="http://download.icu-project.org/files/icu4c/${pkgver}/${pkgname}4c-$_ver-src.tgz
+	10-firefox-65.0.1-fix.patch
 	"
 
 # secfixes:
@@ -90,4 +91,5 @@ libs() {
 	replaces="icu"
 }
 
-sha512sums="9ab407ed840a00cdda7470dcc4c40299a125ad246ae4d019c4b1ede54781157fd63af015a8228cd95dbc47e4d15a0932b2c657489046a19788e5e8266eac079c  icu4c-63_1-src.tgz"
+sha512sums="9ab407ed840a00cdda7470dcc4c40299a125ad246ae4d019c4b1ede54781157fd63af015a8228cd95dbc47e4d15a0932b2c657489046a19788e5e8266eac079c  icu4c-63_1-src.tgz
+76fc0b69ef5dd78d31ed88e6b2976b3ff8b7715f03a94faef79dc2210fe75b9db1de47f1ccc8a5f783760e41de7da3a32628abc9e1ec44edcca98207c91d952d  10-firefox-65.0.1-fix.patch"
diff --git a/main/libvpx/10-find-diff.patch b/main/libvpx/10-find-diff.patch
new file mode 100644
index 0000000000..c0d9f9955b
--- /dev/null
+++ b/main/libvpx/10-find-diff.patch
@@ -0,0 +1,11 @@
+--- ./configure
++++ ./configure.
+@@ -166,7 +166,7 @@
+     [ -f "${source_path}/${t}.mk" ] && enable_feature ${t}
+ done
+ 
+-if ! diff --version >/dev/null; then
++if ! which diff &> /dev/null; then
+   die "diff missing: Try installing diffutils via your package manager."
+ fi
+ 
diff --git a/main/libvpx/APKBUILD b/main/libvpx/APKBUILD
index 767b2b21fa..c1e0dbc69f 100644
--- a/main/libvpx/APKBUILD
+++ b/main/libvpx/APKBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=libvpx
-pkgver=1.6.1
-pkgrel=1
+pkgver=1.7.0
+pkgrel=0
 pkgdesc="Library for the vp8 codec"
 url="https://www.webmproject.org/"
 arch="all"
@@ -9,11 +9,11 @@ license="GPL"
 depends=""
 makedepends="coreutils yasm bash perl"
 subpackages="$pkgname-dev $pkgname-utils"
-source="https://storage.googleapis.com/downloads.webmproject.org/releases/webm/$pkgname-$pkgver.tar.bz2
+source="$pkgname-$pkgver.tar.gz::https://chromium.googlesource.com/webm/$pkgname/+archive/v$pkgver.tar.gz
 	fix-arm-float-abi.patch
+	10-find-diff.patch
 	"
-
-builddir="$srcdir"/$pkgname-$pkgver
+builddir="$srcdir"
 build() {
 	cd "$builddir"
 	# build fix for arm
@@ -45,5 +45,6 @@ utils() {
 	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
 }
 
-sha512sums="1a4b009fe1737715c6563a79848126a5859394a5074b1e9cca9bc2e213df90890c15e708040d5f2c96c7c21e268f51e1352ac6911514bf891a4bf3eea154159d  libvpx-1.6.1.tar.bz2
-4eadbc2f4eb68eaff35cf85515aef271d6fd47293a53cba7b7a6e9e0fb71106dfb5ded45b9e9ba83264a91846e4a5fa4db42e39fc3eaff6ac37769e622f90f6c  fix-arm-float-abi.patch"
+sha512sums="6e114a6e8470b05153a8c41b7f30adb37d8cf99dc1c3d016867e5578b4f69905d7a1fcd902b6855f3f6b3e63ae305eb3fadd53359f2c8f344f3d701c3d4882b5  libvpx-1.7.0.tar.gz
+4eadbc2f4eb68eaff35cf85515aef271d6fd47293a53cba7b7a6e9e0fb71106dfb5ded45b9e9ba83264a91846e4a5fa4db42e39fc3eaff6ac37769e622f90f6c  fix-arm-float-abi.patch
+c14015273a2f081ef722f752a7ac17204e7fd5c42fb7a4bb457afdff1fcd2cc276bd34ca80a6e318968e0fa2e6ba49ceee026dd1bd7ee1b2806dbde70fd0a7fb  10-find-diff.patch"
diff --git a/testing/cbindgen/APKBUILD b/testing/cbindgen/APKBUILD
new file mode 100644
index 0000000000..6a58bcb45d
--- /dev/null
+++ b/testing/cbindgen/APKBUILD
@@ -0,0 +1,26 @@
+# Maintainer: Bradley Saulteaux <[email-masked]>
+pkgname=cbindgen
+pkgver=0.8.0
+pkgrel=0
+pkgdesc="A tool for generating C bindings to Rust code"
+url="https://github.com/eqrion/cbindgen"
+# limited by rust and cargo
+arch="x86_64"
+license="MPL2"
+depends=""
+subpackages="$pkgname-doc"
+makedepends="cargo"
+install=""
+source="$pkgname-$pkgver.tar.gz::https://github.com/eqrion/$pkgname/archive/v$pkgver.tar.gz"
+builddir="${srcdir}/$pkgname-$pkgver"
+build() {
+	cargo build --release
+}
+check() {
+	cargo test --release
+}
+package() {
+	install -Dt "$pkgdir/usr/bin" target/release/cbindgen
+	install -Dt "$pkgdir/usr/share/doc/$pkgname" -m644 README.md
+}
+sha512sums="634a61556b3ae20bb246d1c34c2869852af1e1003cbf0481a346191eb48f812d19755ae8e895628d53a3ab7792b977255bfb25a50a2dbb9baf18b4f3fc783b18  cbindgen-0.8.0.tar.gz"
diff --git a/testing/firefox/10-debug-fixes.patch b/testing/firefox/10-debug-fixes.patch
new file mode 100644
index 0000000000..968091935e
--- /dev/null
+++ b/testing/firefox/10-debug-fixes.patch
@@ -0,0 +1,25 @@
+--- ./intl/locale/LocaleService.cpp
++++ ./intl/locale/LocaleService.cpp.
+@@ -526,7 +526,6 @@
+     GetGREFileContents("update.locale", &locale);
+     locale.Trim(" \t\n\r");
+     // This should never be empty.
+-    MOZ_ASSERT(!locale.IsEmpty());
+     if (SanitizeForBCP47(locale, true)) {
+       mDefaultLocale.Assign(locale);
+     }
+--- ./browser/installer/package-manifest.in
++++ ./browser/installer/package-manifest.in.
+@@ -499,12 +499,6 @@
+ ; svg
+ @RESPATH@/res/svg.css
+ 
+-; [Layout Debugger]
+-#ifdef MOZ_DEBUG
+-@RESPATH@/chrome/layoutdebug@JAREXT@
+-@RESPATH@/chrome/layoutdebug.manifest
+-#endif
+-
+ ; [Personal Security Manager]
+ ;
+ ; NSS libraries are signed in the staging directory,
diff --git a/testing/firefox/APKBUILD b/testing/firefox/APKBUILD
index b31c1997b7..54c6600445 100644
--- a/testing/firefox/APKBUILD
+++ b/testing/firefox/APKBUILD
@@ -1,23 +1,27 @@
 # Contributor: William Pitcock <[email-masked]>
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=firefox
-pkgver=62.0.3
+pkgver=65.0.1
 _pkgver=$pkgver
 _xulver=$pkgver
-pkgrel=2
+pkgrel=0
 pkgdesc="Firefox web browser"
 url="https://www.firefox.com/"
 # limited by rust and cargo
 arch="x86_64"
 license="GPL LGPL MPL"
 depends=""
+subpackages="$pkgname-dbg"
+options="!check" # tests run while building
 makedepends="
 	alsa-lib-dev
 	autoconf2.13
+	autoconf
 	automake
 	bsd-compat-headers
 	bzip2-dev
 	cargo
+	cbindgen
 	clang-dev
 	dbus-glib-dev
 	ffmpeg-dev
@@ -27,6 +31,7 @@ makedepends="
 	hunspell-dev
 	icu-dev
 	libevent-dev
+	libffi-dev
 	libidl-dev
 	libjpeg-turbo-dev
 	libnotify-dev
@@ -39,9 +44,11 @@ makedepends="
 	libxcomposite-dev
 	llvm5-dev
 	mesa-dev
+	nasm
 	nspr-dev
 	nss-dev
 	nss-static
+	nodejs
 	paxmark
 	python3-dev
 	sqlite-dev
@@ -64,7 +71,6 @@ source="https://ftp.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkg
 	mallinfo.patch
 
 	fix-arm-atomics-grsec.patch
-	fix-arm-version-detect.patch
 	mozilla-build-arm.patch
 	disable-moz-stackwalk.patch
 	fix-rust-target.patch
@@ -73,7 +79,9 @@ source="https://ftp.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkg
 	fix-webrtc-glibcisms.patch
 
 	firefox.desktop
-	firefox-safe.desktop"
+	firefox-safe.desktop
+	
+	10-debug-fixes.patch"
 
 builddir="${srcdir}/firefox-$pkgver"
 _mozappdir=/usr/lib/firefox
@@ -82,70 +90,41 @@ _mozappdir=/usr/lib/firefox
 ldpath="$_mozappdir"
 
 prepare() {
+	cd "$builddir"
 	default_prepare
-
-	cp "$srcdir"/stab.h toolkit/crashreporter/google-breakpad/src/
-	# https://bugzilla.mozilla.org/show_bug.cgi?id=1341234
-	mkdir -p "$builddir"/objdir
-	echo "ac_add_options BINDGEN_CFLAGS='-I/usr/include/nspr -I/usr/include/pixman-1'" >>objdir/.mozconfig
+	autoreconf old-configure.in
+	cd js/src; autoreconf old-configure.in
 }
 
 build() {
-	cd "$builddir"/objdir
-
-	export SHELL=/bin/sh
-	export BUILD_OFFICIAL=1
-	export MOZILLA_OFFICIAL=1
-	export USE_SHORT_LIBNAME=1
-	# gcc 6
-	export CXXFLAGS="-fno-delete-null-pointer-checks -fno-schedule-insns2"
-
-	# set rpath so linker finds the libs
-	export LDFLAGS="$LDFLAGS -Wl,-rpath,${_mozappdir}"
-
-	../configure \
-		--prefix=/usr \
-		\
-		--disable-crashreporter \
-		--disable-elf-hack \
-		--disable-gold \
-		--disable-install-strip \
-		--disable-jemalloc \
-		--disable-profiling \
-		--disable-pulseaudio \
-		--disable-strip \
-		--disable-tests \
-		--disable-updater \
-		\
-		--enable-alsa \
-		--enable-default-toolkit=cairo-gtk3 \
-		--enable-official-branding \
-		--enable-optimize="$CFLAGS" \
-		--enable-pie \
-		--enable-startup-notification \
-		--enable-system-ffi \
-		--enable-system-sqlite \
-		--enable-ffmpeg \
-		\
-		--with-system-bz2 \
-		--with-system-icu \
-		--with-system-jpeg \
-		--with-system-libevent \
-		--with-system-libvpx \
-		--with-system-nspr \
-		--with-system-nss \
-		--with-system-pixman \
-		--with-system-png \
-		--with-system-zlib \
-		--with-clang-path=/usr/bin/clang \
-		--with-libclang-path=/usr/lib
-	make
-
-	# paxmark outside fakeroot
-	paxmark -msp dist/bin/xpcshell
-
+	cd "$builddir"
+	export_add() {
+		echo "export $1" >>"$builddir"/.mozconfig
+	}
+	ac_add_options() {
+		echo "ac_add_options $1" >>"$builddir"/.mozconfig
+	}
+	mk_add_options() {
+		echo "mk_add_options $1" >>"$builddir"/.mozconfig
+	}
+	export_add "SHELL=/bin/sh BUILD_OFFICIAL=1 MOZILLA_OFFICIAL=1 USE_SHORT_LIBNAME=1"
+	export_add "MOZ_NO_PIE_COMPAT=1	BUILDING_RELEASE=1 MOZ_PGO=1 MOZ_PACKAGE_JSSHELL=1"
+	export_add "LDFLAGS=\"$LDFLAGS -Wl,-rpath,${_mozappdir}\""
+	ac_add_options "--prefix=/usr --disable-jemalloc --disable-updater"
+	ac_add_options "--disable-pulseaudio --enable-alsa --enable-verify-mar"
+	ac_add_options "--enable-default-toolkit=cairo-gtk3 --enable-official-branding"
+	ac_add_options "--enable-optimize=\"$CFLAGS -gdwarf-4 -gsplit-dwarf\" --enable-startup-notification"
+	ac_add_options "--enable-system-ffi --enable-system-pixman --enable-system-sqlite"
+	ac_add_options "--enable-av1 --with-system-bz2 --with-system-icu"
+	ac_add_options "--with-system-libevent --with-system-libvpx --with-system-nspr"
+	ac_add_options "--with-system-nss --with-system-png  --with-system-zlib"
+	ac_add_options "--with-clang-path=/usr/bin/clang --with-libclang-path=/usr/lib"
+	ac_add_options "--disable-install-strip --enable-debug-symbols=-gdwarf-4"
+	ac_add_options "--disable-crashreporter --disable-elf-hack"
+	mk_add_options "MOZ_OBJDIR=\"$builddir\"/objdir"
+	
+	./mach configure; ./mach build
 }
-
 package() {
 	cd "$builddir"/objdir
 
@@ -214,21 +193,21 @@ __EOF__
 	rm -f "$pkgdir"/${_mozappdirdev}/sdk/lib/libxul.so
 }
 
-sha512sums="487bb7791284367158c79cf7918fecf3d598627a6416e679aeb5d22626089aeffe07762fa2389819ba881c90ece1c5a83cf2d85b2def15b8d5ba0ed1c498b527  firefox-62.0.3.source.tar.xz
+sha512sums="cc76a83f6430f501c2260c6b35b5e48f045f5b180daf03375e9ab114a9afd67dfc0146ddb81cd29be4617aadb66a332ed5ebc625cb500df9579e412ed4909599  firefox-65.0.1.source.tar.xz
 0b3f1e4b9fdc868e4738b5c81fd6c6128ce8885b260affcb9a65ff9d164d7232626ce1291aaea70132b3e3124f5e13fef4d39326b8e7173e362a823722a85127  stab.h
 2f4f15974d52de4bb273b62a332d13620945d284bbc6fe6bd0a1f58ff7388443bc1d3bf9c82cc31a8527aad92b0cd3a1bc41d0af5e1800e0dcbd7033e58ffd71  fix-fortify-system-wrappers.patch
 09bc32cf9ee81b9cc6bb58ddbc66e6cc5c344badff8de3435cde5848e5a451e0172153231db85c2385ff05b5d9c20760cb18e4138dfc99060a9e960de2befbd5  fix-fortify-inline.patch
-2f713a270f7d1588ec4a0b9c21e5a0d20823954e6a64293ee1a391f80d38af6c0a80b3d35c3ada59b605f6032fb2af3040cd8ca7f424b0e620cc53fd12674fd9  fix-seccomp-bpf.patch
-a2925045154f4fd34e5fc056656f4f9da100341529e5d4104d249154db0c7863384083f421ce6e47e0f20566a8b20787fa35444c7933c03cd03f96f06dcd4532  fix-toolkit.patch
-b46cb90d4fdd1a925a61e2c6c545489cd542f5d82980c529361c02042eed31d5c26972b5e237c1a020f87ffcfd12736d1f4f6e33eaa83ae156d523c808c718cb  fix-tools.patch
+6764e7af43f5a066ac0faf4f8d0747c03739f4f14b51f58c524eb0519dfd28540bdd25569b201a8e20919d0096479cf0e7a8e306fb223aba4c0f177c4df55200  fix-seccomp-bpf.patch
+e680a23490908e8be256a8dadee3952f29c4069558548c2b79252640471fa29c221abb0634fc9260a8c9ba755f50f417a77ef66ede87eca8e02d69f74f8b0075  fix-toolkit.patch
+a9e44759a584d148360405bf75981a6cb8b3ea0c2a553c13da7c559dc0193b35b2dca32571044cdca7ebd6ecc8c475da126d48a0c6ed19316857e2e88d28b49f  fix-tools.patch
 bdcd1b402d2ec94957ba5d08cbad7b1a7f59c251c311be9095208491a05abb05a956c79f27908e1f26b54a3679387b2f33a51e945b650671ad85c0a2d59a5a29  mallinfo.patch
-ed0d344c66fc8e1cc83a11e9858b32c42e841cbeedd9eb9438811e9fcc3593dc824a8336d00058d55836cedc970aeadd6a82c6dcd7bc0fb746e564d8b478cc6c  fix-arm-atomics-grsec.patch
-015e1ff6dbf920033982b5df95d869a0b7bf56c6964e45e50649ddf46d1ce09563458e45240c3ecb92808662b1300b67507f7af272ba184835d91068a9e7d5b0  fix-arm-version-detect.patch
+9a07f214877c8e4f919311b35ceb8b8ea990fb5811c89d060c0dc5f87a864ac678649fa2c0f1c1459e949e5abb81a894996e2f82b0f94d44e21cc94273fc6d5b  fix-arm-atomics-grsec.patch
 e61664bc93eadce5016a06a4d0684b34a05074f1815e88ef2613380d7b369c6fd305fb34f83b5eb18b9e3138273ea8ddcfdcb1084fdcaa922a1e5b30146a3b18  mozilla-build-arm.patch
-4797d2d89ac63a57abb826b8ea9f751314ce66946194033deb9d78c2ff377b88106fd2c7bc5034dc13ad03dd5085b1893c3ccae1a9e63fde35655bb0921f7188  disable-moz-stackwalk.patch
+61b3c2ab34f43ada0b8c1c9c26fc70f82719b7f344a503325a350749fd6921255134d414c1eba3919e5c3bc133f7e0a164400d3c8af5ec6298afb8c7a146a4da  disable-moz-stackwalk.patch
 42cc44fda4b05259b38f055d6f51461746aa89a474cedc5e92fb9d20879da0d12b1b515b273a549e7302cda9c7eddde20d5fdba09853e5c658784ad6d0b20078  fix-rust-target.patch
 a50b412edf9573a0bd04a43578b1c927967a616b73a5995eefb15bfa78fd2bd14e36ec05315a0703f6370ecd524e6bcb012e7285beb1245e9add9b8553acb79e  fix-bug-1261392.patch
-01b48a708cc6bc6e3cd7cc7b16f5137ec344566ac891d699b65e322bc992726072fa14a54cef1a7775799fcbbcf90a6c170107c8524caba3bc311b42d93b7581  rust-unitialized-field.patch
-75b97d59e81e5f1debe6a459b535da704d5a2ac4a57c446d16058fd18db81e22317fcc3ec11b89f569f4de87e8e80ced027c0e72e7f1dd16f6fd0feb6b263919  fix-webrtc-glibcisms.patch
+7bc98f6370e2ca170b7bbfbddd8bd684df6c11530f38152f37031809f2b6b0bffde70a998939d97ed460d807fa7decc94b85a1bb6bf6464a63733e0f9d0f7ac6  rust-unitialized-field.patch
+44c95a862b04747658b666ab6e2efb77e57e63e78b1a81e489410bec4ef4c81956548131b922a50f9c069a3340c2b6f60a055cebf3f889f4d7d8a6e94eead11f  fix-webrtc-glibcisms.patch
 f3b7c3e804ce04731012a46cb9e9a6b0769e3772aef9c0a4a8c7520b030fdf6cd703d5e9ff49275f14b7d738fe82a0a4fde3bc3219dff7225d5db0e274987454  firefox.desktop
-5dcb6288d0444a8a471d669bbaf61cdb1433663eff38b72ee5e980843f5fc07d0d60c91627a2c1159215d0ad77ae3f115dcc5fdfe87e64ca704b641aceaa44ed  firefox-safe.desktop"
+5dcb6288d0444a8a471d669bbaf61cdb1433663eff38b72ee5e980843f5fc07d0d60c91627a2c1159215d0ad77ae3f115dcc5fdfe87e64ca704b641aceaa44ed  firefox-safe.desktop
+8ade2c0c767b5097f25b06bf5f5543141131e302390ea86a89becec598f039a72cbda6722bedfd773ff946b592a2f92a5c442d024de47d220c41dcb2af80219f  10-debug-fixes.patch"
diff --git a/testing/firefox/disable-moz-stackwalk.patch b/testing/firefox/disable-moz-stackwalk.patch
index c83ae7eae9..8f4924bac1 100644
--- a/testing/firefox/disable-moz-stackwalk.patch
+++ b/testing/firefox/disable-moz-stackwalk.patch
@@ -1,12 +1,10 @@
-diff --git a/mozglue/misc/StackWalk.cpp b/mozglue/misc/StackWalk.cpp
-index a208bad..14e1f0d 100644
---- a/mozglue/misc/StackWalk.cpp
-+++ b/mozglue/misc/StackWalk.cpp
-@@ -41,13 +41,7 @@ static CriticalAddress gCriticalAddress;
+--- /mozglue/misc/StackWalk.cpp
++++ /mozglue/misc/StackWalk.cpp.
+@@ -32,13 +32,7 @@
  #define MOZ_STACKWALK_SUPPORTS_MACOSX 0
  #endif
  
--#if (defined(linux) && \
+-#if (defined(linux) &&                                            \
 -     ((defined(__GNUC__) && (defined(__i386) || defined(PPC))) || \
 -      defined(HAVE__UNWIND_BACKTRACE)))
 -#define MOZ_STACKWALK_SUPPORTS_LINUX 1
diff --git a/testing/firefox/fix-arm-atomics-grsec.patch b/testing/firefox/fix-arm-atomics-grsec.patch
index 0eb58f093f..c7e12ca0f0 100644
--- a/testing/firefox/fix-arm-atomics-grsec.patch
+++ b/testing/firefox/fix-arm-atomics-grsec.patch
@@ -1,8 +1,8 @@
---- mozilla-release/ipc/chromium/src/base/atomicops_internals_arm_gcc.h.orig
-+++ mozilla-release/ipc/chromium/src/base/atomicops_internals_arm_gcc.h
-@@ -12,43 +35,194 @@
- namespace base {
- namespace subtle {
+--- ./toolkit/components/protobuf/src/google/protobuf/stubs/atomicops_internals_arm_gcc.h
++++ ./toolkit/components/protobuf/src/google/protobuf/stubs/atomicops_internals_arm_gcc.h.
+@@ -39,43 +39,194 @@
+ namespace protobuf {
+ namespace internal {
  
 -// 0xffff0fc0 is the hard coded address of a function provided by
 -// the kernel which implements an atomic compare-exchange. On older
@@ -217,7 +217,7 @@
    return old_value;
  }
  
-@@ -63,36 +237,57 @@
+@@ -90,8 +241,7 @@
      // Atomic exchange the old value with an incremented one.
      Atomic32 old_value = *ptr;
      Atomic32 new_value = old_value + increment;
@@ -227,23 +227,19 @@
        // The exchange took place as expected.
        return new_value;
      }
-     // Otherwise, *ptr changed mid-loop and we need to retry.
-   }
--
- }
- 
+@@ -102,23 +252,45 @@
  inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
                                         Atomic32 old_value,
                                         Atomic32 new_value) {
 -  return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
-+  Atomic32 prev_value;
-+  for (;;) {
-+    prev_value = *ptr;
++Atomic32 prev_value;                                     
++  for (;;) {                  
++    prev_value = *ptr;                                               
 +    if (prev_value != old_value) {
-+      // Always ensure acquire semantics.
++      // Always ensure acquire semantics.                          
 +      MemoryBarrier();
-+      return prev_value;
-+    }
++      return prev_value;     
++    }                         
 +    if (!LinuxKernelCmpxchg(old_value, new_value, ptr))
 +      return old_value;
 +  }
@@ -253,38 +249,37 @@
                                         Atomic32 old_value,
                                         Atomic32 new_value) {
 -  return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
-+  // This could be implemented as:
-+  //    MemoryBarrier();
-+  //    return NoBarrier_CompareAndSwap();
-+  //
++  // This could be implemented as:                            
++  //    MemoryBarrier();                                             
++  //    return NoBarrier_CompareAndSwap();                    
++  //                                                               
 +  // But would use 3 barriers per succesful CAS. To save performance,
 +  // use Acquire_CompareAndSwap(). Its implementation guarantees that:
-+  // - A succesful swap uses only 2 barriers (in the kernel helper).
-+  // - An early return due to (prev_value != old_value) performs
-+  //   a memory barrier with no store, which is equivalent to the
-+  //   generic implementation above.
++  // - A succesful swap uses only 2 barriers (in the kernel helper).  
++  // - An early return due to (prev_value != old_value) performs      
++  //   a memory barrier with no store, which is equivalent to the     
++  //   generic implementation above.                                  
 +  return Acquire_CompareAndSwap(ptr, old_value, new_value);
  }
- 
-+#else
-+#  error "Your CPU's ARM architecture is not supported yet"
-+#endif
-+
-+// NOTE: Atomicity of the following load and store operations is only
++#else                                                                 
++#  error "Your CPU's ARM architecture is not supported yet"           
++#endif                                                                
++                                                                      
++// NOTE: Atomicity of the following load and store operations is only 
 +// guaranteed in case of 32-bit alignement of |ptr| values.
-+
+ 
  inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
    *ptr = value;
  }
  
--inline void MemoryBarrier() {
+-inline void MemoryBarrierInternal() {
 -  pLinuxKernelMemoryBarrier();
 -}
 -
  inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
    *ptr = value;
-   MemoryBarrier();
-@@ -103,9 +298,7 @@
+   MemoryBarrierInternal();
+@@ -129,9 +301,7 @@
    *ptr = value;
  }
  
@@ -295,12 +290,3 @@
  
  inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
    Atomic32 value = *ptr;
-@@ -118,7 +311,6 @@
-   return *ptr;
- }
- 
--} // namespace base::subtle
--} // namespace base
-+} }  // namespace base::subtle
- 
- #endif  // BASE_ATOMICOPS_INTERNALS_ARM_GCC_H_
diff --git a/testing/firefox/fix-seccomp-bpf.patch b/testing/firefox/fix-seccomp-bpf.patch
index ee6d666400..7f9fbae3a7 100644
--- a/testing/firefox/fix-seccomp-bpf.patch
+++ b/testing/firefox/fix-seccomp-bpf.patch
@@ -1,6 +1,5 @@
-diff -ru firefox-62.0.3.orig/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc firefox-62.0.3/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc
---- firefox-62.0.3.orig/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc	2018-12-14 08:53:46.083976137 +0000
-+++ firefox-62.0.3/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc	2018-12-14 08:51:22.084596411 +0000
+--- ./security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc	2018-12-14 08:53:46.083976137 +0000
++++ ./security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc	2018-12-14 08:51:22.084596411 +0000
 @@ -25,6 +25,11 @@
  #include "sandbox/linux/system_headers/linux_seccomp.h"
  #include "sandbox/linux/system_headers/linux_signal.h"
@@ -13,14 +12,13 @@ diff -ru firefox-62.0.3.orig/security/sandbox/chromium/sandbox/linux/seccomp-bpf
  namespace {
  
  struct arch_sigsys {
-diff -ru firefox-62.0.3.orig/security/sandbox/linux/SandboxFilter.cpp firefox-62.0.3/security/sandbox/linux/SandboxFilter.cpp
---- firefox-62.0.3.orig/security/sandbox/linux/SandboxFilter.cpp	2018-10-01 18:35:28.000000000 +0000
-+++ firefox-62.0.3/security/sandbox/linux/SandboxFilter.cpp	2018-12-14 08:57:50.645264590 +0000
-@@ -1005,6 +1005,7 @@
-         // ffmpeg, and anything else that calls isatty(), will be told
-         // that nothing is a typewriter:
-         .ElseIf(request == TCGETS, Error(ENOTTY))
-+        .ElseIf(request == TIOCGWINSZ, Error(ENOTTY))
-         // Allow anything that isn't a tty ioctl, for now; bug 1302711
-         // will cover changing this to a default-deny policy.
-         .ElseIf(shifted_type != kTtyIoctls, Allow())
+--- ./security/sandbox/linux/SandboxFilter.cpp	2018-10-01 18:35:28.000000000 +0000
++++ ./security/sandbox/linux/SandboxFilter.cpp	2018-12-14 08:57:50.645264590 +0000
+@@ -997,6 +997,7 @@
+             // ffmpeg, and anything else that calls isatty(), will be told
+             // that nothing is a typewriter:
+             .ElseIf(request == TCGETS, Error(ENOTTY))
++            .ElseIf(request == TIOCGWINSZ, Error(ENOTTY))
+             // Allow anything that isn't a tty ioctl, for now; bug 1302711
+             // will cover changing this to a default-deny policy.
+             .ElseIf(shifted_type != kTtyIoctls, Allow())
diff --git a/testing/firefox/fix-toolkit.patch b/testing/firefox/fix-toolkit.patch
index 58fe5a3a9a..c79b9a15d4 100644
--- a/testing/firefox/fix-toolkit.patch
+++ b/testing/firefox/fix-toolkit.patch
@@ -55,21 +55,6 @@ index 93fdad7..f34e5e0 100644
  /* End of x86-64 definitions                                                 */
  #elif defined(__mips__)
  #if _MIPS_SIM == _MIPS_SIM_ABI32
-diff --git a/toolkit/mozapps/update/common/updatedefines.h b/toolkit/mozapps/update/common/updatedefines.h
-index 026e7ed..0801f14 100644
---- a/toolkit/mozapps/update/common/updatedefines.h
-+++ b/toolkit/mozapps/update/common/updatedefines.h
-@@ -117,7 +117,7 @@ static inline int mywcsprintf(WCHAR* dest, size_t count, const WCHAR* fmt, ...)
- 
- #ifdef SOLARIS
- # include <sys/stat.h>
--#else
-+#elif !defined(__linux__) || defined(__GLIBC__)
- # include <fts.h>
- #endif
- # include <dirent.h>
-diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp
-index 257ccb4..01314e4 100644
 --- a/toolkit/mozapps/update/updater/updater.cpp
 +++ b/toolkit/mozapps/update/updater/updater.cpp
 @@ -3737,6 +3737,7 @@ int add_dir_entries(const NS_tchar *dirpath, ActionList *list)
@@ -88,3 +73,14 @@ index 257ccb4..01314e4 100644
  
    return rv;
  }
+--- ./toolkit/mozapps/update/common/updatedefines.h
++++ ./toolkit/mozapps/update/common/updatedefines.h.
+@@ -102,7 +102,7 @@
+ 
+ #ifdef SOLARIS
+ #include <sys/stat.h>
+-#else
++#elif !defined(__linux__) || defined(__GLIBC__)
+ #include <fts.h>
+ #endif
+ #include <dirent.h>
diff --git a/testing/firefox/fix-tools.patch b/testing/firefox/fix-tools.patch
index 84f7fa9cb8..ed2c7f2bca 100644
--- a/testing/firefox/fix-tools.patch
+++ b/testing/firefox/fix-tools.patch
@@ -11,12 +11,12 @@
  #include "MainThreadUtils.h"
 --- a/tools/profiler/lul/LulElf.cpp
 +++ b/tools/profiler/lul/LulElf.cpp
-@@ -579,10 +579,10 @@
+@@ -469,10 +469,10 @@
  // Return the non-directory portion of FILENAME: the portion after the
  // last slash, or the whole filename if there are no slashes.
- string BaseFileName(const string &filename) {
+ string BaseFileName(const string& filename) {
 -  // Lots of copies!  basename's behavior is less than ideal.
--  char *c_filename = strdup(filename.c_str());
+-  char* c_filename = strdup(filename.c_str());
 -  string base = basename(c_filename);
 -  free(c_filename);
 +  // basename's behavior is less than ideal so avoid it
@@ -25,13 +25,13 @@
 +  string base = p ? p+1 : c_filename;
    return base;
  }
-
+ 
 --- a/tools/profiler/core/platform-linux-android.cpp.orig
 +++ b/tools/profiler/core/platform-linux-android.cpp
-@@ -534,9 +534,11 @@
- void
- Registers::SyncPopulate()
- {
+@@ -497,8 +497,10 @@
+ ucontext_t sSyncUContext;
+ 
+ void Registers::SyncPopulate() {
 +#if defined(__GLIBC__)
    if (!getcontext(&sSyncUContext)) {
      PopulateRegsFromContext(*this, &sSyncUContext);
@@ -39,4 +39,4 @@
 +#endif
  }
  #endif
- 
+
diff --git a/testing/firefox/fix-webrtc-glibcisms.patch b/testing/firefox/fix-webrtc-glibcisms.patch
index dc9206b50e..95b3a55eeb 100644
--- a/testing/firefox/fix-webrtc-glibcisms.patch
+++ b/testing/firefox/fix-webrtc-glibcisms.patch
@@ -1,13 +1,13 @@
---- ./media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c.orig	2018-05-09 23:48:44.677389171 +0200
-+++ ./media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c	2018-05-09 23:48:56.254373557 +0200
-@@ -11,7 +11,9 @@
- #include <stdlib.h>
- #include <string.h>
- #include <features.h>
+--- ./media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c
++++ ./media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c.
+@@ -14,7 +14,9 @@
+ #ifndef __GLIBC_PREREQ
+ #define __GLIBC_PREREQ(a, b) 0
+ #endif
 -#if __GLIBC_PREREQ(2, 16)
-+#if !defined(__GLIBC__)
-+#include <sys/auxv.h>
-+#elif __GLIBC_PREREQ(2, 16)
++#if !defined(__GLIBC__)                                                                                                                                       
++#include <sys/auxv.h>                                                                                                                                         
++#elif __GLIBC_PREREQ(2, 16) 
  #include <sys/auxv.h>
  #else
  #include <fcntl.h>
diff --git a/testing/firefox/rust-unitialized-field.patch b/testing/firefox/rust-unitialized-field.patch
index 67ef3a02ab..3ef7f055ca 100644
--- a/testing/firefox/rust-unitialized-field.patch
+++ b/testing/firefox/rust-unitialized-field.patch
@@ -1,11 +1,14 @@
---- ./media/audioipc/audioipc/src/cmsg.rs.orig	2018-05-09 22:19:14.748631939 +0200
-+++ ./media/audioipc/audioipc/src/cmsg.rs	2018-05-09 22:19:22.961620862 +0200
-@@ -106,11 +106,11 @@ impl ControlMsgBuilder {
+--- ./media/audioipc/audioipc/src/cmsg.rs
++++ ./media/audioipc/audioipc/src/cmsg.rs.
+@@ -105,14 +105,12 @@
+             if cmsg.remaining_mut() < cmsg_len {
                  return Err(Error::NoSpace);
              }
- 
+
 -            let cmsghdr = cmsghdr {
 -                cmsg_len: cmsg_len as _,
+-                #[cfg(target_env = "musl")]
+-                __pad1: 0,
 -                cmsg_level: level,
 -                cmsg_type: kind,
 -            };
-- 
2.20.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Natanael Copa <[email-masked]>
Date: Thu, 28 Feb 2019 09:32:24 +0100

Hi,

This patch no longer apply due to we upgraded libvpx to 1.8.0.

Can you please rebase it?

Maybe also send the ffmpeg change as separate patch.

-nc

On Thu, 21 Feb 2019 22:42:10 -0700

---