diff options
author | Job Bautista <jobbautista9@protonmail.com> | 2022-07-24 20:54:59 +0800 |
---|---|---|
committer | Job Bautista <jobbautista9@protonmail.com> | 2022-07-24 20:54:59 +0800 |
commit | 970b041574fb8e1cb8254b5c943dee64cdab61ea (patch) | |
tree | a6bcdeff6cfec20e824f718a4dac537cc5f2be68 /intl | |
parent | 3f0dc49164abdf1c9cdf60f20fe1eaf83fe865ba (diff) | |
download | uxp-970b041574fb8e1cb8254b5c943dee64cdab61ea.tar.gz |
Issue #1971 - Part 1: Update build system for ICU 63.2 upgrade.
Diffstat (limited to 'intl')
-rw-r--r-- | intl/icu-patches/bug-1198952-workaround-make-3.82-bug.diff | 8 | ||||
-rw-r--r-- | intl/icu-patches/bug-1228227-bug-1263325-libc++-gcc_hidden.diff | 66 | ||||
-rw-r--r-- | intl/icu-patches/suppress-warnings.diff | 12 | ||||
-rw-r--r-- | intl/icu-patches/ucol_getKeywordValuesForLocale-ulist_resetList.diff | 62 | ||||
-rw-r--r-- | intl/icu-patches/unum_formatDoubleForFields.diff | 133 | ||||
-rw-r--r-- | intl/patch-icu.sh | 3 | ||||
-rwxr-xr-x | intl/update-icu.sh | 25 | ||||
-rwxr-xr-x | intl/update-tzdata.sh | 2 |
8 files changed, 32 insertions, 279 deletions
diff --git a/intl/icu-patches/bug-1198952-workaround-make-3.82-bug.diff b/intl/icu-patches/bug-1198952-workaround-make-3.82-bug.diff index 6f8ed3f330..dc4f4e2692 100644 --- a/intl/icu-patches/bug-1198952-workaround-make-3.82-bug.diff +++ b/intl/icu-patches/bug-1198952-workaround-make-3.82-bug.diff @@ -1,8 +1,7 @@ diff --git a/intl/icu/source/Makefile.in b/intl/icu/source/Makefile.in -index 9db6c52..1b9a964 100644 --- a/intl/icu/source/Makefile.in +++ b/intl/icu/source/Makefile.in -@@ -134,28 +134,32 @@ endif +@@ -134,32 +134,36 @@ endif LOCAL_SUBDIRS = $(SUBDIRS) CLEAN_FIRST_SUBDIRS = $(TOOLS) @@ -16,6 +15,11 @@ index 9db6c52..1b9a964 100644 +## favor of RECURSIVE=YES when the submake in the subdirectory restarts itself +## after dependency files have been created. all-recursive install-recursive clean-recursive distclean-recursive dist-recursive check-recursive check-exhaustive-recursive: $(LIBDIR) $(BINDIR) + ifneq ($(NEED_ESCAPING),) + @echo "building tools/escapesrc (Needed for this platform with NEED_ESCAPING)" +- @(cd tools/escapesrc && $(MAKE) RECURSIVE=YES $$local_target) || exit ++ @(cd tools/escapesrc && $(MAKE) $(MAKEOVERRIDES) RECURSIVE=YES $$local_target) || exit + endif @dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(LOCAL_SUBDIRS)'; for subdir in $$list; do \ diff --git a/intl/icu-patches/bug-1228227-bug-1263325-libc++-gcc_hidden.diff b/intl/icu-patches/bug-1228227-bug-1263325-libc++-gcc_hidden.diff deleted file mode 100644 index de47f07810..0000000000 --- a/intl/icu-patches/bug-1228227-bug-1263325-libc++-gcc_hidden.diff +++ /dev/null @@ -1,66 +0,0 @@ -Limit libstdc++ workaround to not upset libc++ with pragma visibility. - -https://ssl.icu-project.org/trac/ticket/12023 - -diff --git a/intl/icu/source/common/unicode/std_string.h b/intl/icu/source/common/unicode/std_string.h ---- a/intl/icu/source/common/unicode/std_string.h -+++ b/intl/icu/source/common/unicode/std_string.h -@@ -24,16 +24,16 @@ - * \brief C++ API: Central ICU header for including the C++ standard <string> - * header and for related definitions. - */ - - #include "unicode/utypes.h" - - #if U_HAVE_STD_STRING - --#if !defined(_MSC_VER) -+#if defined(__GLIBCXX__) - namespace std { class type_info; } // WORKAROUND: http://llvm.org/bugs/show_bug.cgi?id=13364 - #endif - #include <string> - - #endif // U_HAVE_STD_STRING - - #endif // __STD_STRING_H__ -diff --git a/intl/icu/source/common/utypeinfo.h b/intl/icu/source/common/utypeinfo.h ---- a/intl/icu/source/common/utypeinfo.h -+++ b/intl/icu/source/common/utypeinfo.h -@@ -19,14 +19,14 @@ - // Whenever 'typeid' is used, this header has to be included - // instead of <typeinfo>. - // Visual Studio 10 emits warning 4275 with this change. If you compile - // with exception disabled, you have to suppress warning 4275. - #if defined(_MSC_VER) && _HAS_EXCEPTIONS == 0 - #include <exception> - using std::exception; - #endif --#if !defined(_MSC_VER) -+#if defined(__GLIBCXX__) - namespace std { class type_info; } // WORKAROUND: http://llvm.org/bugs/show_bug.cgi?id=13364 - #endif - #include <typeinfo> // for 'typeid' to work - - #endif -diff --git a/intl/icu/source/io/unicode/ustream.h b/intl/icu/source/io/unicode/ustream.h ---- a/intl/icu/source/io/unicode/ustream.h -+++ b/intl/icu/source/io/unicode/ustream.h -@@ -25,17 +25,17 @@ - * \file - * \brief C++ API: Unicode iostream like API - * - * At this time, this API is very limited. It contains - * operator<< and operator>> for UnicodeString manipulation with the - * C++ I/O stream API. - */ - --#if !defined(_MSC_VER) -+#if defined(__GLIBCXX__) - namespace std { class type_info; } // WORKAROUND: http://llvm.org/bugs/show_bug.cgi?id=13364 - #endif - - #if U_IOSTREAM_SOURCE >= 199711 - #if (__GNUC__ == 2) - #include <iostream> - #else - #include <istream> diff --git a/intl/icu-patches/suppress-warnings.diff b/intl/icu-patches/suppress-warnings.diff index 28b0ac9d9e..e124a1689d 100644 --- a/intl/icu-patches/suppress-warnings.diff +++ b/intl/icu-patches/suppress-warnings.diff @@ -1,11 +1,11 @@ diff --git a/intl/icu/source/acinclude.m4 b/intl/icu/source/acinclude.m4 --- a/intl/icu/source/acinclude.m4 +++ b/intl/icu/source/acinclude.m4 -@@ -473,30 +473,36 @@ AC_DEFUN([AC_CHECK_STRICT_COMPILE], +@@ -469,30 +469,36 @@ AC_DEFUN([AC_CHECK_STRICT_COMPILE], *) # Do not use -ansi. It limits us to C90, and it breaks some platforms. - # We use -std=c99 to disable the gnu99 defaults and its associated warnings - CFLAGS="$CFLAGS -std=c99" + # We use -std=c11 to disable the gnu99 defaults and its associated warnings + CFLAGS="$CFLAGS -std=c11" ;; esac @@ -41,11 +41,11 @@ diff --git a/intl/icu/source/acinclude.m4 b/intl/icu/source/acinclude.m4 diff --git a/intl/icu/source/configure b/intl/icu/source/configure --- a/intl/icu/source/configure +++ b/intl/icu/source/configure -@@ -4319,30 +4319,36 @@ fi +@@ -4359,30 +4359,36 @@ fi *) # Do not use -ansi. It limits us to C90, and it breaks some platforms. - # We use -std=c99 to disable the gnu99 defaults and its associated warnings - CFLAGS="$CFLAGS -std=c99" + # We use -std=c11 to disable the gnu99 defaults and its associated warnings + CFLAGS="$CFLAGS -std=c11" ;; esac diff --git a/intl/icu-patches/ucol_getKeywordValuesForLocale-ulist_resetList.diff b/intl/icu-patches/ucol_getKeywordValuesForLocale-ulist_resetList.diff deleted file mode 100644 index ebc4bd7d7f..0000000000 --- a/intl/icu-patches/ucol_getKeywordValuesForLocale-ulist_resetList.diff +++ /dev/null @@ -1,62 +0,0 @@ -https://ssl.icu-project.org/trac/ticket/12827 -https://ssl.icu-project.org/trac/changeset/39484 (Excluding test-related bits -because we remove the "test" directory before applying the ICU patches.) - -Index: /intl/icu/source/common/ulist.c -=================================================================== ---- /intl/icu/source/common/ulist.c (revision 39483) -+++ /intl/icu/source/common/ulist.c (revision 39484) -@@ -30,5 +30,4 @@ - - int32_t size; -- int32_t currentIndex; - }; - -@@ -52,5 +51,4 @@ - newList->tail = NULL; - newList->size = 0; -- newList->currentIndex = -1; - - return newList; -@@ -81,6 +79,7 @@ - p->next->previous = p->previous; - } -- list->curr = NULL; -- list->currentIndex = 0; -+ if (p == list->curr) { -+ list->curr = p->next; -+ } - --list->size; - if (p->forceDelete) { -@@ -151,5 +150,4 @@ - list->head->previous = newItem; - list->head = newItem; -- list->currentIndex++; - } - -@@ -194,5 +192,4 @@ - curr = list->curr; - list->curr = curr->next; -- list->currentIndex++; - - return curr->data; -@@ -210,5 +207,4 @@ - if (list != NULL) { - list->curr = list->head; -- list->currentIndex = 0; - } - } -@@ -273,3 +269,2 @@ - return (UList *)(en->context); - } -- -Index: /intl/icu/source/i18n/ucol_res.cpp -=================================================================== ---- /intl/icu/source/i18n/ucol_res.cpp (revision 39483) -+++ /intl/icu/source/i18n/ucol_res.cpp (revision 39484) -@@ -681,4 +681,5 @@ - } - memcpy(en, &defaultKeywordValues, sizeof(UEnumeration)); -+ ulist_resetList(sink.values); // Initialize the iterator. - en->context = sink.values; - sink.values = NULL; // Avoid deletion in the sink destructor. diff --git a/intl/icu-patches/unum_formatDoubleForFields.diff b/intl/icu-patches/unum_formatDoubleForFields.diff deleted file mode 100644 index 148c7d2d97..0000000000 --- a/intl/icu-patches/unum_formatDoubleForFields.diff +++ /dev/null @@ -1,133 +0,0 @@ -Add an ICU API for formatting a number into constituent parts (sign, integer, grouping separator, decimal, fraction, &c.) for use in implementing Intl.NumberFormat.prototype.formatToParts. - -https://ssl.icu-project.org/trac/ticket/12684 - -diff --git a/intl/icu/source/i18n/unicode/unum.h b/intl/icu/source/i18n/unicode/unum.h ---- a/intl/icu/source/i18n/unicode/unum.h -+++ b/intl/icu/source/i18n/unicode/unum.h -@@ -20,16 +20,17 @@ - - #include "unicode/localpointer.h" - #include "unicode/uloc.h" - #include "unicode/ucurr.h" - #include "unicode/umisc.h" - #include "unicode/parseerr.h" - #include "unicode/uformattable.h" - #include "unicode/udisplaycontext.h" -+#include "unicode/ufieldpositer.h" - - /** - * \file - * \brief C API: NumberFormat - * - * <h2> Number Format C API </h2> - * - * Number Format C API Provides functions for -@@ -647,16 +648,66 @@ U_STABLE int32_t U_EXPORT2 - unum_formatUFormattable(const UNumberFormat* fmt, - const UFormattable *number, - UChar *result, - int32_t resultLength, - UFieldPosition *pos, - UErrorCode *status); - - /** -+* Format a double using a UNumberFormat according to the UNumberFormat's locale, -+* and initialize a UFieldPositionIterator that enumerates the subcomponents of -+* the resulting string. -+* -+* @param format -+* The formatter to use. -+* @param number -+* The number to format. -+* @param result -+* A pointer to a buffer to receive the NULL-terminated formatted -+* number. If the formatted number fits into dest but cannot be -+* NULL-terminated (length == resultLength) then the error code is set -+* to U_STRING_NOT_TERMINATED_WARNING. If the formatted number doesn't -+* fit into result then the error code is set to -+* U_BUFFER_OVERFLOW_ERROR. -+* @param resultLength -+* The maximum size of result. -+* @param fpositer -+* A pointer to a UFieldPositionIterator created by {@link #ufieldpositer_open} -+* (may be NULL if field position information is not needed, but in this -+* case it's preferable to use {@link #unum_formatDouble}). Iteration -+* information already present in the UFieldPositionIterator is deleted, -+* and the iterator is reset to apply to the fields in the formatted -+* string created by this function call. The field values and indexes -+* returned by {@link #ufieldpositer_next} represent fields denoted by -+* the UNumberFormatFields enum. Fields are not returned in a guaranteed -+* order. Fields cannot overlap, but they may nest. For example, 1234 -+* could format as "1,234" which might consist of a grouping separator -+* field for ',' and an integer field encompassing the entire string. -+* @param status -+* A pointer to an UErrorCode to receive any errors -+* @return -+* The total buffer size needed; if greater than resultLength, the -+* output was truncated. -+* @see unum_formatDouble -+* @see unum_parse -+* @see unum_parseDouble -+* @see UFieldPositionIterator -+* @see UNumberFormatFields -+* @stable ICU 59 -+*/ -+U_STABLE int32_t U_EXPORT2 -+unum_formatDoubleForFields(const UNumberFormat* format, -+ double number, -+ UChar* result, -+ int32_t resultLength, -+ UFieldPositionIterator* fpositer, -+ UErrorCode* status); -+ -+/** - * Parse a string into an integer using a UNumberFormat. - * The string will be parsed according to the UNumberFormat's locale. - * Note: parsing is not supported for styles UNUM_DECIMAL_COMPACT_SHORT - * and UNUM_DECIMAL_COMPACT_LONG. - * @param fmt The formatter to use. - * @param text The text to parse. - * @param textLength The length of text, or -1 if null-terminated. - * @param parsePos If not NULL, on input a pointer to an integer specifying the offset at which -diff --git a/intl/icu/source/i18n/unum.cpp b/intl/icu/source/i18n/unum.cpp ---- a/intl/icu/source/i18n/unum.cpp -+++ b/intl/icu/source/i18n/unum.cpp -@@ -870,9 +870,37 @@ unum_formatUFormattable(const UNumberFor - if(pos != 0) { - pos->beginIndex = fp.getBeginIndex(); - pos->endIndex = fp.getEndIndex(); - } - - return res.extract(result, resultLength, *status); - } - -+U_CAPI int32_t U_EXPORT2 -+unum_formatDoubleForFields(const UNumberFormat* format, -+ double number, -+ UChar* result, -+ int32_t resultLength, -+ UFieldPositionIterator* fpositer, -+ UErrorCode* status) -+{ -+ if (U_FAILURE(*status)) -+ return -1; -+ -+ if (result == NULL ? resultLength != 0 : resultLength < 0) { -+ *status = U_ILLEGAL_ARGUMENT_ERROR; -+ return -1; -+ } -+ -+ UnicodeString res; -+ if (result != NULL) { -+ // NULL destination for pure preflighting: empty dummy string -+ // otherwise, alias the destination buffer -+ res.setTo(result, 0, resultLength); -+ } -+ -+ ((const NumberFormat*)format)->format(number, res, (FieldPositionIterator*)fpositer, *status); -+ -+ return res.extract(result, resultLength, *status); -+} -+ - #endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/intl/patch-icu.sh b/intl/patch-icu.sh index b96bc18319..4c8cd89cba 100644 --- a/intl/patch-icu.sh +++ b/intl/patch-icu.sh @@ -21,10 +21,7 @@ for patch in \ suppress-warnings.diff \ bug-1172609-timezone-recreateDefault.diff \ bug-1198952-workaround-make-3.82-bug.diff \ - bug-1228227-bug-1263325-libc++-gcc_hidden.diff \ - ucol_getKeywordValuesForLocale-ulist_resetList.diff \ ; do echo "Applying local patch $patch" patch -d ${icu_dir}/../../ -p1 --no-backup-if-mismatch < ${icu_dir}/../icu-patches/$patch done - diff --git a/intl/update-icu.sh b/intl/update-icu.sh index 0662c57c9e..7e4c833c7b 100755 --- a/intl/update-icu.sh +++ b/intl/update-icu.sh @@ -7,11 +7,11 @@ set -e # Update to an ICU release: # Usage: update-icu.sh <URL of ICU GIT> <release tag name> -# E.g., for ICU 62.1: update-icu.sh https://github.com/unicode-org/icu.git release-62-1 +# E.g., for ICU 63.2: update-icu.sh https://github.com/unicode-org/icu.git release-63-2 # # Update to an ICU maintenance branch: # Usage: update-icu.sh <URL of ICU GIT> <maintenance name> -# E.g., for ICU 62.1: update-icu.sh https://github.com/unicode-org/icu.git maint/maint-62 +# E.g., for ICU 63.2: update-icu.sh https://github.com/unicode-org/icu.git maint/maint-63 if [ $# -lt 2 ]; then echo "Usage: update-icu.sh <URL of ICU GIT> <release tag name>" @@ -65,14 +65,27 @@ rm ${icu_dir}/source/data/translit/* rm ${icu_dir}/source/data/unit/*.mk rm ${icu_dir}/source/data/unit/*.txt +# Remove all exemplar cities 'ec'. (bug 1225401 and bug 1345336) +find ${icu_dir}/source/data/zone \ + -name root.txt -prune -or \ + -name tzdbNames.txt -prune -or \ + -name '*.txt' -print | xargs sed -i '/^\s*ec{\".*\"}$/ { d }' +# Remove empty time zone entries after exemplar cities removal. +find ${icu_dir}/source/data/zone \ + -name root.txt -prune -or \ + -name tzdbNames.txt -prune -or \ + -name '*.txt' -print | xargs sed -i '/^\s*\"[A-Z][a-zA-Z:_-]*\"{/{N; s/^\s*\"[A-Z][a-zA-Z:_-]*\"{\n\s*}// }; /^$/d' +# And finally remove any empty 'zoneStrings' entries. +find ${icu_dir}/source/data/zone \ + -name root.txt -prune -or \ + -name tzdbNames.txt -prune -or \ + -name '*.txt' -print | xargs sed -i '/^\s*zoneStrings{/{N; s/^\s*zoneStrings{\n\s*}// }; /^$/d' + for patch in \ bug-915735 \ suppress-warnings.diff \ bug-1172609-timezone-recreateDefault.diff \ bug-1198952-workaround-make-3.82-bug.diff \ - bug-1228227-bug-1263325-libc++-gcc_hidden.diff \ - ucol_getKeywordValuesForLocale-ulist_resetList.diff \ - unum_formatDoubleForFields.diff \ ; do echo "Applying local patch $patch" patch -d ${icu_dir}/../../ -p1 --no-backup-if-mismatch < ${icu_dir}/../icu-patches/$patch @@ -85,7 +98,7 @@ python ${topsrcdir}/js/src/tests/ecma_6/String/make-normalize-generateddata-inpu # build a new ICU data file. python `dirname $0`/icu_sources_data.py $topsrcdir -#hg addremove ${icu_dir} ${topsrcdir}/config/external/icu +#hg addremove "${icu_dir}/source" "${icu_dir}/GIT-INFO" ${topsrcdir}/config/external/icu # Check local tzdata version. `dirname $0`/update-tzdata.sh -c diff --git a/intl/update-tzdata.sh b/intl/update-tzdata.sh index 03a7ac5f42..41a8e0e61e 100755 --- a/intl/update-tzdata.sh +++ b/intl/update-tzdata.sh @@ -165,5 +165,5 @@ if [ $dry = false ]; then fi echo "INFO: Successfully updated tzdata!" - echo "INFO: Please run js/src/builtin/intl/make_intl_data.py to update additional time zone files for SpiderMonkey." + echo "INFO: Please run js/src/builtin/make_intl_data.py to update additional time zone files for SpiderMonkey." fi |