From fb976153d8c02991aaf3722b91f81fef7ff47892 Mon Sep 17 00:00:00 2001 From: Nico Grunbaum Date: Thu, 24 Nov 2022 04:34:08 +0000 Subject: [PATCH] Bug 1776141 - P1 - update patch files to work with updatebots -p1 path requirement;r=mjf Depends on D150726 Differential Revision: https://phabricator.services.mozilla.com/D150727 --- media/libyuv/fix_build_errors.patch | 31 +++++-------------- .../libyuv/make_mjpeg_printfs_optional.patch | 6 ++-- media/libyuv/update.py | 2 +- media/libyuv/update_gyp.patch | 6 ++-- 4 files changed, 15 insertions(+), 30 deletions(-) diff --git a/media/libyuv/fix_build_errors.patch b/media/libyuv/fix_build_errors.patch index 7645395ff115..28d1b647ab99 100644 --- a/media/libyuv/fix_build_errors.patch +++ b/media/libyuv/fix_build_errors.patch @@ -1,37 +1,22 @@ -# HG changeset patch -# User Randell Jesup -# Parent 260ab5c93e30a3d90f10ac30a15edf36fb0f03e9 - -diff --git a/media/libyuv/libyuv/include/libyuv/row.h b/media/libyuv/libyuv/include/libyuv/row.h ---- a/media/libyuv/libyuv/include/libyuv/row.h -+++ b/media/libyuv/libyuv/include/libyuv/row.h -@@ -174,19 +174,20 @@ extern "C" { - #define HAS_SOBELROW_SSE2 - #define HAS_SOBELTOPLANEROW_SSE2 - #define HAS_SOBELXROW_SSE2 - #define HAS_SOBELXYROW_SSE2 - #define HAS_SOBELYROW_SSE2 +diff --git a/include/libyuv/row.h b/include/libyuv/row.h +--- a/include/libyuv/row.h ++++ b/include/libyuv/row.h +@@ -176,8 +176,9 @@ extern "C" { // The following functions fail on gcc/clang 32 bit with fpic and framepointer. // caveat: clangcl uses row_win.cc which works. -#if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \ - defined(_MSC_VER) +#if !defined(MOZ_PROFILING) && \ -+ (defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \ -+ defined(_MSC_VER)) ++ (defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \ ++ defined(_MSC_VER)) // TODO(fbarchard): fix build error on android_full_debug=1 // https://code.google.com/p/libyuv/issues/detail?id=517 #define HAS_I422ALPHATOARGBROW_SSSE3 - #define HAS_I444ALPHATOARGBROW_SSSE3 - #endif +@@ -246,8 +247,9 @@ extern "C" { + #define HAS_ARGBATTENUATEROW_AVX2 #endif - // The following are available on all x86 platforms, but - // require VS2012, clang 3.4 or gcc 4.7. -@@ -248,8 +249,9 @@ extern "C" { - #define HAS_ARGBUNATTENUATEROW_AVX2 - #define HAS_BLENDPLANEROW_AVX2 - -#if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \ - defined(_MSC_VER) +#if !defined(MOZ_PROFILING) && \ diff --git a/media/libyuv/make_mjpeg_printfs_optional.patch b/media/libyuv/make_mjpeg_printfs_optional.patch index fcb7c8512022..649bbec54573 100644 --- a/media/libyuv/make_mjpeg_printfs_optional.patch +++ b/media/libyuv/make_mjpeg_printfs_optional.patch @@ -2,9 +2,9 @@ # User Randell Jesup # Parent 5d4d728adccff4539e44f697b8011fb2eb1a1ad5 -diff --git a/media/libyuv/libyuv/source/mjpeg_decoder.cc b/media/libyuv/libyuv/source/mjpeg_decoder.cc ---- a/media/libyuv/libyuv/source/mjpeg_decoder.cc -+++ b/media/libyuv/libyuv/source/mjpeg_decoder.cc +diff --git a/source/mjpeg_decoder.cc b/source/mjpeg_decoder.cc +--- a/source/mjpeg_decoder.cc ++++ b/source/mjpeg_decoder.cc @@ -73,18 +73,20 @@ MJpegDecoder::MJpegDecoder() databuf_strides_(NULL) { decompress_struct_ = new jpeg_decompress_struct; diff --git a/media/libyuv/update.py b/media/libyuv/update.py index f01e1b6b3db0..f4693550bc04 100755 --- a/media/libyuv/update.py +++ b/media/libyuv/update.py @@ -56,7 +56,7 @@ def apply_patches(base): for patch in patches: print('\nApplying patch %s' % patch) with open(os.path.join(base, patch)) as f: - Popen(["patch", "-p3"], stdin=f, cwd=base).wait() + Popen(["patch", "-p1"], stdin=f, cwd=os.path.join(base, 'libyuv')).wait() def update_moz_yaml(base, commit, commitdate): diff --git a/media/libyuv/update_gyp.patch b/media/libyuv/update_gyp.patch index 9756beee2592..522e06734135 100644 --- a/media/libyuv/update_gyp.patch +++ b/media/libyuv/update_gyp.patch @@ -2,9 +2,9 @@ # Parent 034c99a4c2010c8d60ff52daf0a183ac1fd05777 Bug 1341543: Update libyuv gyp file with mozilla changes r=sotaro -diff --git a/media/libyuv/libyuv/libyuv.gyp b/media/libyuv/libyuv/libyuv.gyp ---- a/media/libyuv/libyuv/libyuv.gyp -+++ b/media/libyuv/libyuv/libyuv.gyp +diff --git a/libyuv.gyp b/libyuv.gyp +--- a/libyuv.gyp ++++ b/libyuv.gyp @@ -47,17 +47,17 @@ { 'target_name': 'libyuv',