From 4cb35b98e0e9bb3ea151f20e27130cf88e1b2975 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Fri, 21 Jul 2023 08:12:09 +0000 Subject: [PATCH] Bug 1844554 - Vendor double-conversion using `mach vendor` r=RyanVM Differential Revision: https://phabricator.services.mozilla.com/D184091 --- mfbt/double-conversion/GIT-INFO | 5 -- .../{double-conversion => }/LICENSE | 0 .../add-mfbt-api-markers.patch | 12 +-- .../debug-only-functions.patch | 6 +- mfbt/double-conversion/moz.yaml | 48 ++++++++++++ mfbt/double-conversion/to-fixed-dbl-max.patch | 12 +-- mfbt/double-conversion/update.sh | 76 ------------------- .../use-mozilla-assertions.patch | 6 +- 8 files changed, 66 insertions(+), 99 deletions(-) delete mode 100644 mfbt/double-conversion/GIT-INFO rename mfbt/double-conversion/{double-conversion => }/LICENSE (100%) create mode 100644 mfbt/double-conversion/moz.yaml delete mode 100755 mfbt/double-conversion/update.sh diff --git a/mfbt/double-conversion/GIT-INFO b/mfbt/double-conversion/GIT-INFO deleted file mode 100644 index 70016edd4aaf..000000000000 --- a/mfbt/double-conversion/GIT-INFO +++ /dev/null @@ -1,5 +0,0 @@ -commit 4f7a25d8ced8c7cf6eee6fd09d6788eaa23c9afe -Author: Florian Loitsch -Date: Thu May 18 14:20:37 2023 +0200 - - Prepare v3.2.0 release. (#196) diff --git a/mfbt/double-conversion/double-conversion/LICENSE b/mfbt/double-conversion/LICENSE similarity index 100% rename from mfbt/double-conversion/double-conversion/LICENSE rename to mfbt/double-conversion/LICENSE diff --git a/mfbt/double-conversion/add-mfbt-api-markers.patch b/mfbt/double-conversion/add-mfbt-api-markers.patch index d8e96cea43dd..6fd0ae709124 100644 --- a/mfbt/double-conversion/add-mfbt-api-markers.patch +++ b/mfbt/double-conversion/add-mfbt-api-markers.patch @@ -1,6 +1,6 @@ -diff --git a/mfbt/double-conversion/double-conversion/double-to-string.h b/mfbt/double-conversion/double-conversion/double-to-string.h ---- a/mfbt/double-conversion/double-conversion/double-to-string.h -+++ b/mfbt/double-conversion/double-conversion/double-to-string.h +diff --git a/double-conversion/double-to-string.h b/double-conversion/double-to-string.h +--- a/double-conversion/double-to-string.h ++++ b/double-conversion/double-to-string.h @@ -23,16 +23,17 @@ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT @@ -145,9 +145,9 @@ diff --git a/mfbt/double-conversion/double-conversion/double-to-string.h b/mfbt/ const int flags_; const char* const infinity_symbol_; const char* const nan_symbol_; -diff --git a/mfbt/double-conversion/double-conversion/string-to-double.h b/mfbt/double-conversion/double-conversion/string-to-double.h ---- a/mfbt/double-conversion/double-conversion/string-to-double.h -+++ b/mfbt/double-conversion/double-conversion/string-to-double.h +diff --git a/double-conversion/string-to-double.h b/double-conversion/string-to-double.h +--- a/double-conversion/string-to-double.h ++++ b/double-conversion/string-to-double.h @@ -23,16 +23,17 @@ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT diff --git a/mfbt/double-conversion/debug-only-functions.patch b/mfbt/double-conversion/debug-only-functions.patch index 3988eaad56c5..b231e369494b 100644 --- a/mfbt/double-conversion/debug-only-functions.patch +++ b/mfbt/double-conversion/debug-only-functions.patch @@ -1,6 +1,6 @@ -diff --git a/mfbt/double-conversion/double-conversion/strtod.cc b/mfbt/double-conversion/double-conversion/strtod.cc ---- a/mfbt/double-conversion/double-conversion/strtod.cc -+++ b/mfbt/double-conversion/double-conversion/strtod.cc +diff --git a/double-conversion/strtod.cc b/double-conversion/strtod.cc +--- a/double-conversion/strtod.cc ++++ b/double-conversion/strtod.cc @@ -436,16 +436,17 @@ static bool ComputeGuess(Vector] -# -# Copies the needed files from a directory containing the original -# double-conversion source that we need. If no revision is specified, the tip -# revision is used. See GIT-INFO for the last revision used. - -set -e - -LOCAL_PATCHES="" - -LOCAL_PATCHES="$LOCAL_PATCHES add-mfbt-api-markers.patch" -LOCAL_PATCHES="$LOCAL_PATCHES use-mozilla-assertions.patch" -LOCAL_PATCHES="$LOCAL_PATCHES debug-only-functions.patch" -LOCAL_PATCHES="$LOCAL_PATCHES to-fixed-dbl-max.patch" - -TMPDIR=`mktemp -d` -LOCAL_CLONE="$TMPDIR/new-double-conversion" - -git clone https://github.com/google/double-conversion.git "$LOCAL_CLONE" - -# If a particular revision was requested, check it out. -if [ "$1" != "" ]; then - git -C "$LOCAL_CLONE" checkout "$1" -fi - -# First clear out everything already present. -DEST=./double-conversion -mv "$DEST" "$TMPDIR"/old-double-conversion -mkdir "$DEST" - -# Copy over critical files. -cp "$LOCAL_CLONE/LICENSE" "$DEST/" -cp "$LOCAL_CLONE/README.md" "$DEST/" - -# Includes -for header in "$LOCAL_CLONE/double-conversion/"*.h; do - cp "$header" "$DEST/" -done - -# Source -for ccfile in "$LOCAL_CLONE/double-conversion/"*.cc; do - cp "$ccfile" "$DEST/" -done - -# Now apply our local patches. -for patch in $LOCAL_PATCHES; do - patch --directory "$DEST" --strip 4 < "$patch" - - # Out-of-date patches may spew *.{orig,rej} when applied. Report an error if - # any such file is found, and roll the source directory back to its previous - # state in such case. - detritus_files=`find "$DEST" -name '*.orig' -o -name '*.rej'` - if [ "$detritus_files" != "" ]; then - echo "ERROR: Local patch $patch created these detritus files when applied:" - echo "" - echo " $detritus_files" - echo "" - echo "Please fix $patch before running $0." - - rm -rf "$DEST" - mv "$TMPDIR"/source "$DEST" - - exit 1 - fi -done - -# Update Mercurial file status. -hg addremove "$DEST" - -# Note the revision used in this update. -git -C "$LOCAL_CLONE" show -s > ./GIT-INFO - -# Delete the tmpdir. -rm -rf "$TMPDIR" diff --git a/mfbt/double-conversion/use-mozilla-assertions.patch b/mfbt/double-conversion/use-mozilla-assertions.patch index 4a7574f9b520..c6f8988d6b1d 100644 --- a/mfbt/double-conversion/use-mozilla-assertions.patch +++ b/mfbt/double-conversion/use-mozilla-assertions.patch @@ -1,6 +1,6 @@ -diff --git a/mfbt/double-conversion/double-conversion/utils.h b/mfbt/double-conversion/double-conversion/utils.h ---- a/mfbt/double-conversion/double-conversion/utils.h -+++ b/mfbt/double-conversion/double-conversion/utils.h +diff --git a/double-conversion/utils.h b/double-conversion/utils.h +--- a/double-conversion/utils.h ++++ b/double-conversion/utils.h @@ -36,27 +36,29 @@ // For pre-C++11 compatibility