LibUnicode: Update ICU to 78.1

Updated also IdnaTestV2 for Unicode 17.0.0
This commit is contained in:
Marcos Del Sol Vives
2025-12-05 11:29:46 +00:00
committed by Tim Flynn
parent fa4e5ff13f
commit 77cab84620
Notes: github-actions[bot] 2025-12-08 16:30:20 +00:00
23 changed files with 84 additions and 505 deletions

View File

@@ -306,9 +306,9 @@ describe("day", () => {
describe("dayPeriod", () => {
// prettier-ignore
const data = [
{ dayPeriod: "narrow", en0: "5 in the afternoon", en1: "7 in the morning", ar0: "٥ بعد الظهر", ar1: "٧ صباحًا", as0: "pm ৫", as1: "am "},
{ dayPeriod: "short", en0: "5 in the afternoon", en1: "7 in the morning", ar0: "٥ بعد الظهر", ar1: "٧ ص", as0: "PM ৫", as1: "AM "},
{ dayPeriod: "long", en0: "5 in the afternoon", en1: "7 in the morning", ar0: "٥ بعد الظهر", ar1: "٧ صباحًا", as0: "PM ৫", as1: "AM "},
{ dayPeriod: "narrow", en0: "5 in the afternoon", en1: "7 in the morning", ar0: "٥ بعد الظهر", ar1: "٧ صباحًا", as0: "অপৰাহ্ন ৫", as1: "পূৰ্বাহ্ন "},
{ dayPeriod: "short", en0: "5 in the afternoon", en1: "7 in the morning", ar0: "٥ بعد الظهر", ar1: "٧ ص", as0: "অপৰাহ্ন ৫", as1: "পূৰ্বাহ্ন "},
{ dayPeriod: "long", en0: "5 in the afternoon", en1: "7 in the morning", ar0: "٥ بعد الظهر", ar1: "٧ صباحًا", as0: "অপৰাহ্ন ৫", as1: "পূৰ্বাহ্ন "},
];
data.forEach(d => {
@@ -340,19 +340,19 @@ describe("dayPeriod", () => {
});
test("flexible day period rolls over midnight", () => {
const en = new Intl.DateTimeFormat("en", {
const en = new Intl.DateTimeFormat("hi-Latn", {
hour: "numeric",
dayPeriod: "short",
timeZone: "UTC",
});
// For the en locale, these times (05:00 and 23:00) fall in the flexible day period range of
// [21:00, 06:00), on either side of midnight.
const date1 = Date.UTC(2017, 11, 12, 5, 0, 0, 0);
// For the hi-Latn locale, these times (03:00 and 23:00) fall in the flexible day period range of
// [20:00, 04:00), on either side of midnight.
const date1 = Date.UTC(2017, 11, 12, 3, 0, 0, 0);
const date2 = Date.UTC(2017, 11, 12, 23, 0, 0, 0);
expect(en.format(date1)).toBe("5 at night");
expect(en.format(date2)).toBe("11 at night");
expect(en.format(date1)).toBe("3 raat");
expect(en.format(date2)).toBe("11 raat");
});
});
@@ -405,9 +405,9 @@ describe("dayPeriod at noon", () => {
describe("dayPeriod without time", () => {
// prettier-ignore
const data = [
{ dayPeriod: "narrow", en0: "in the afternoon", en1: "in the morning", ar0: "بعد الظهر", ar1: "صباحًا", as0: "pm", as1: "am"},
{ dayPeriod: "short", en0: "in the afternoon", en1: "in the morning", ar0: "بعد الظهر", ar1: "ص", as0: "PM", as1: "AM"},
{ dayPeriod: "long", en0: "in the afternoon", en1: "in the morning", ar0: "بعد الظهر", ar1: "صباحًا", as0: "PM", as1: "AM"},
{ dayPeriod: "narrow", en0: "in the afternoon", en1: "in the morning", ar0: "بعد الظهر", ar1: "صباحًا", as0: "অপৰাহ্ন", as1: "পূৰ্বাহ্ন"},
{ dayPeriod: "short", en0: "in the afternoon", en1: "in the morning", ar0: "بعد الظهر", ar1: "ص", as0: "অপৰাহ্ন", as1: "পূৰ্বাহ্ন"},
{ dayPeriod: "long", en0: "in the afternoon", en1: "in the morning", ar0: "بعد الظهر", ar1: "صباحًا", as0: "অপৰাহ্ন", as1: "পূৰ্বাহ্ন"},
];
data.forEach(d => {
@@ -548,10 +548,10 @@ describe("timeZoneName", () => {
const data = [
{ timeZone: "UTC", timeZoneName: "short", en0: "12/7/2021, UTC", en1: "1/23/1989, UTC", ar0: "٧/١٢‏/٢٠٢١، UTC", ar1: "٢٣‏/١/١٩٨٩، UTC" },
{ timeZone: "UTC", timeZoneName: "long", en0: "12/7/2021, Coordinated Universal Time", en1: "1/23/1989, Coordinated Universal Time", ar0: "٧/١٢‏/٢٠٢١، التوقيت العالمي المنسق", ar1: "٢٣‏/١/١٩٨٩، التوقيت العالمي المنسق" },
{ timeZone: "UTC", timeZoneName: "shortOffset", en0: "12/7/2021, GMT", en1: "1/23/1989, GMT", ar0: "٧/١٢‏/٢٠٢١، غرينتش", ar1: "٢٣‏/١/١٩٨٩، غرينتش" },
{ timeZone: "UTC", timeZoneName: "longOffset", en0: "12/7/2021, GMT", en1: "1/23/1989, GMT", ar0: "٧/١٢‏/٢٠٢١، غرينتش", ar1: "٢٣‏/١/١٩٨٩، غرينتش" },
{ timeZone: "UTC", timeZoneName: "shortGeneric", en0: "12/7/2021, GMT", en1: "1/23/1989, GMT", ar0: "٧/١٢‏/٢٠٢١، غرينتش", ar1: "٢٣‏/١/١٩٨٩، غرينتش" },
{ timeZone: "UTC", timeZoneName: "longGeneric", en0: "12/7/2021, GMT", en1: "1/23/1989, GMT", ar0: "٧/١٢‏/٢٠٢١، غرينتش", ar1: "٢٣‏/١/١٩٨٩، غرينتش" },
{ timeZone: "UTC", timeZoneName: "shortOffset", en0: "12/7/2021, GMT+0", en1: "1/23/1989, GMT+0", ar0: "٧/١٢‏/٢٠٢١، غرينتش+٠", ar1: "٢٣‏/١/١٩٨٩، غرينتش+٠" },
{ timeZone: "UTC", timeZoneName: "longOffset", en0: "12/7/2021, GMT+00:00", en1: "1/23/1989, GMT+00:00", ar0: "٧/١٢‏/٢٠٢١، غرينتش+٠٠:٠٠", ar1: "٢٣‏/١/١٩٨٩، غرينتش+٠٠:٠٠" },
{ timeZone: "UTC", timeZoneName: "shortGeneric", en0: "12/7/2021, GMT+0", en1: "1/23/1989, GMT+0", ar0: "٧/١٢‏/٢٠٢١، غرينتش+٠", ar1: "٢٣‏/١/١٩٨٩، غرينتش+٠" },
{ timeZone: "UTC", timeZoneName: "longGeneric", en0: "12/7/2021, GMT+00:00", en1: "1/23/1989, GMT+00:00", ar0: "٧/١٢‏/٢٠٢١، غرينتش+٠٠:٠٠", ar1: "٢٣‏/١/١٩٨٩، غرينتش+٠٠:٠٠" },
{ timeZone: "America/New_York", timeZoneName: "short", en0: "12/7/2021, EST", en1: "1/23/1989, EST", ar0: "٧/١٢‏/٢٠٢١، غرينتش-٥", ar1: "٢٣‏/١/١٩٨٩، غرينتش-٥" },
{ timeZone: "America/New_York", timeZoneName: "long", en0: "12/7/2021, Eastern Standard Time", en1: "1/23/1989, Eastern Standard Time", ar0: "٧/١٢‏/٢٠٢١، التوقيت الرسمي الشرقي لأمريكا الشمالية", ar1: "٢٣‏/١/١٩٨٩، التوقيت الرسمي الشرقي لأمريكا الشمالية" },
@@ -560,10 +560,10 @@ describe("timeZoneName", () => {
{ timeZone: "America/New_York", timeZoneName: "shortGeneric", en0: "12/7/2021, ET", en1: "1/23/1989, ET", ar0: "٧/١٢‏/٢٠٢١، توقيت نيويورك", ar1: "٢٣‏/١/١٩٨٩، توقيت نيويورك" },
{ timeZone: "America/New_York", timeZoneName: "longGeneric", en0: "12/7/2021, Eastern Time", en1: "1/23/1989, Eastern Time", ar0: "٧/١٢‏/٢٠٢١، التوقيت الشرقي لأمريكا الشمالية", ar1: "٢٣‏/١/١٩٨٩، التوقيت الشرقي لأمريكا الشمالية" },
{ timeZone: "Europe/London", timeZoneName: "short", en0: "12/7/2021, GMT", en1: "1/23/1989, GMT", ar0: "٧/١٢‏/٢٠٢١، غرينتش", ar1: "٢٣‏/١/١٩٨٩، غرينتش" },
{ timeZone: "Europe/London", timeZoneName: "short", en0: "12/7/2021, GMT", en1: "1/23/1989, GMT", ar0: "٧/١٢‏/٢٠٢١، غرينتش+٠", ar1: "٢٣‏/١/١٩٨٩، غرينتش+٠" },
{ timeZone: "Europe/London", timeZoneName: "long", en0: "12/7/2021, Greenwich Mean Time", en1: "1/23/1989, Greenwich Mean Time", ar0: "٧/١٢‏/٢٠٢١، توقيت غرينتش", ar1: "٢٣‏/١/١٩٨٩، توقيت غرينتش" },
{ timeZone: "Europe/London", timeZoneName: "shortOffset", en0: "12/7/2021, GMT", en1: "1/23/1989, GMT", ar0: "٧/١٢‏/٢٠٢١، غرينتش", ar1: "٢٣‏/١/١٩٨٩، غرينتش" },
{ timeZone: "Europe/London", timeZoneName: "longOffset", en0: "12/7/2021, GMT", en1: "1/23/1989, GMT", ar0: "٧/١٢‏/٢٠٢١، غرينتش", ar1: "٢٣‏/١/١٩٨٩، غرينتش" },
{ timeZone: "Europe/London", timeZoneName: "shortOffset", en0: "12/7/2021, GMT+0", en1: "1/23/1989, GMT+0", ar0: "٧/١٢‏/٢٠٢١، غرينتش+٠", ar1: "٢٣‏/١/١٩٨٩، غرينتش+٠" },
{ timeZone: "Europe/London", timeZoneName: "longOffset", en0: "12/7/2021, GMT+00:00", en1: "1/23/1989, GMT+00:00", ar0: "٧/١٢‏/٢٠٢١، غرينتش+٠٠:٠٠", ar1: "٢٣‏/١/١٩٨٩، غرينتش+٠٠:٠٠" },
{ timeZone: "Europe/London", timeZoneName: "shortGeneric", en0: "12/7/2021, United Kingdom Time", en1: "1/23/1989, United Kingdom Time", ar0: "٧/١٢‏/٢٠٢١، توقيت المملكة المتحدة", ar1: "٢٣‏/١/١٩٨٩، توقيت المملكة المتحدة" },
{ timeZone: "Europe/London", timeZoneName: "longGeneric", en0: "12/7/2021, United Kingdom Time", en1: "1/23/1989, United Kingdom Time", ar0: "٧/١٢‏/٢٠٢١، توقيت المملكة المتحدة", ar1: "٢٣‏/١/١٩٨٩، توقيت المملكة المتحدة" },

View File

@@ -191,8 +191,8 @@ describe("correct behavior", () => {
{ calendar: "islamic", en: "Hijri Calendar", es419: "calendario hijri", zhHant: "伊斯蘭曆" },
{ calendar: "islamic-civil", en: "Hijri Calendar (tabular, civil epoch)", es419: "calendario hijri tabular", zhHant: "伊斯蘭民用曆" },
{ calendar: "islamic-umalqura", en: "Hijri Calendar (Umm al-Qura)", es419: "calendario hijri Umm al-Qura", zhHant: "伊斯蘭曆(烏姆庫拉)" },
{ calendar: "iso8601", en: "ISO-8601 Calendar", es419: "calendario ISO-8601", zhHant: "ISO 8601 國際曆法" },
{ calendar: "japanese", en: "Japanese Calendar", es419: "calendario japonés", zhHant: "日本曆" },
{ calendar: "iso8601", en: "Gregorian Calendar (ISO 8601 Weeks)", es419: "calendario ISO-8601", zhHant: "ISO 8601 國際曆法" },
{ calendar: "japanese", en: "Japanese Calendar", es419: "calendario japonés", zhHant: "曆" },
{ calendar: "persian", en: "Persian Calendar", es419: "calendario persa", zhHant: "波斯曆" },
{ calendar: "roc", en: "Minguo Calendar", es419: "calendario de la República de China", zhHant: "國曆" },
];

View File

@@ -49,7 +49,7 @@ describe("correct behavior", () => {
"1 J, 2 Mon., 3 Wo., 3 Tg., 4 Std., 5 Min., 6 Sek., 7 ms, 8 μs und 9 ns"
);
expect(new Intl.DurationFormat("de", { style: "narrow" }).format(duration)).toBe(
"1 J, 2 M, 3 W, 3 T, 4 Std., 5 Min., 6 Sek., 7 ms, 8 μs und 9 ns"
"1 J, 2 M, 3 W, 3 T, 4h, 5 Min., 6 Sek., 7 ms, 8 μs und 9 ns"
);
expect(new Intl.DurationFormat("de", { style: "digital" }).format(duration)).toBe(
"1 J, 2 Mon., 3 Wo., 3 Tg. und 4:05:06,007008009"
@@ -60,7 +60,7 @@ describe("correct behavior", () => {
nanoseconds: "numeric",
fractionalDigits: 3,
}).format(duration)
).toBe("1 J, 2 M, 3 W, 3 T, 4 Std., 5 Min., 6 Sek., 7 ms und 8,009 μs");
).toBe("1 J, 2 M, 3 W, 3 T, 4h, 5 Min., 6 Sek., 7 ms und 8,009 μs");
});
test("always show time fields for digital style", () => {

View File

@@ -400,8 +400,7 @@ describe("correct behavior", () => {
{ type: "unit", value: "T", unit: "day" },
{ type: "literal", value: ", " },
{ type: "integer", value: "4", unit: "hour" },
{ type: "literal", value: " ", unit: "hour" },
{ type: "unit", value: "Std.", unit: "hour" },
{ type: "unit", value: "h", unit: "hour" },
{ type: "literal", value: ", " },
{ type: "integer", value: "5", unit: "minute" },
{ type: "literal", value: " ", unit: "minute" },
@@ -478,8 +477,7 @@ describe("correct behavior", () => {
{ type: "unit", value: "T", unit: "day" },
{ type: "literal", value: ", " },
{ type: "integer", value: "4", unit: "hour" },
{ type: "literal", value: " ", unit: "hour" },
{ type: "unit", value: "Std.", unit: "hour" },
{ type: "unit", value: "h", unit: "hour" },
{ type: "literal", value: ", " },
{ type: "integer", value: "5", unit: "minute" },
{ type: "literal", value: " ", unit: "minute" },

View File

@@ -1335,14 +1335,14 @@ describe("style=currency", () => {
compactDisplay: "long",
});
expect(ar.format(1)).toBe("١ US$");
expect(ar.format(1200)).toBe("١٫٢ ألف US$");
expect(ar.format(1290)).toBe("١٫٣ ألف US$");
expect(ar.format(12000)).toBe("١٢ ألف US$");
expect(ar.format(12900)).toBe("١٣ ألف US$");
expect(ar.format(1200000)).toBe("١٫٢ مليون US$");
expect(ar.format(1290000)).toBe("١٫٣ مليون US$");
expect(ar.format(12000000)).toBe("١٢ مليون US$");
expect(ar.format(12900000)).toBe("١٣ مليون US$");
expect(ar.format(1200)).toBe("١٫٢ ألف US$");
expect(ar.format(1290)).toBe("١٫٣ ألف US$");
expect(ar.format(12000)).toBe("١٢ ألف US$");
expect(ar.format(12900)).toBe("١٣ ألف US$");
expect(ar.format(1200000)).toBe("١٫٢ مليون US$");
expect(ar.format(1290000)).toBe("١٫٣ مليون US$");
expect(ar.format(12000000)).toBe("١٢ مليون US$");
expect(ar.format(12900000)).toBe("١٣ مليون US$");
const ja = new Intl.NumberFormat("ja", {
style: "currency",
@@ -1405,14 +1405,14 @@ describe("style=currency", () => {
compactDisplay: "short",
});
expect(ar.format(1)).toBe("١ US$");
expect(ar.format(1200)).toBe("١٫٢ ألف US$");
expect(ar.format(1290)).toBe("١٫٣ ألف US$");
expect(ar.format(12000)).toBe("١٢ ألف US$");
expect(ar.format(12900)).toBe("١٣ ألف US$");
expect(ar.format(1200000)).toBe("١٫٢ مليون US$");
expect(ar.format(1290000)).toBe("١٫٣ مليون US$");
expect(ar.format(12000000)).toBe("١٢ مليون US$");
expect(ar.format(12900000)).toBe("١٣ مليون US$");
expect(ar.format(1200)).toBe("١٫٢ ألف US$");
expect(ar.format(1290)).toBe("١٫٣ ألف US$");
expect(ar.format(12000)).toBe("١٢ ألف US$");
expect(ar.format(12900)).toBe("١٣ ألف US$");
expect(ar.format(1200000)).toBe("١٫٢ مليون US$");
expect(ar.format(1290000)).toBe("١٫٣ مليون US$");
expect(ar.format(12000000)).toBe("١٢ مليون US$");
expect(ar.format(12900000)).toBe("١٣ مليون US$");
const ja = new Intl.NumberFormat("ja", {
style: "currency",

View File

@@ -24,7 +24,7 @@ set(GENERATED_SOURCES ${CURRENT_LIB_GENERATED})
ladybird_lib(LibUnicode unicode)
find_package(ICU 76 REQUIRED COMPONENTS data i18n uc)
find_package(ICU 78 REQUIRED COMPONENTS data i18n uc)
target_link_libraries(LibUnicode PRIVATE ICU::i18n ICU::uc ICU::data)
# FIXME: Add support for building LibGfx in sanitize

View File

@@ -1,14 +0,0 @@
diff --git a/source/config/mh-darwin b/source/config/mh-darwin
index 7b15709..e2cdbdb 100644
--- a/source/config/mh-darwin
+++ b/source/config/mh-darwin
@@ -31,7 +31,8 @@ SHLIB.cc= $(CXX) -dynamiclib -dynamic $(CXXFLAGS) $(LDFLAGS) $(LD_SOOPTIONS)
## Compiler switches to embed a library name and version information
ifeq ($(ENABLE_RPATH),YES)
-LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(libdir)/$(notdir $(MIDDLE_SO_TARGET))
+ID_PREFIX = @rpath
+LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(ID_PREFIX)/$(notdir $(MIDDLE_SO_TARGET))
else
LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(notdir $(MIDDLE_SO_TARGET)) $(PKGDATA_TRAILING_SPACE)
endif

View File

@@ -1,17 +0,0 @@
diff --git a/source/tools/Makefile.in b/source/tools/Makefile.in
index e0896f1..5ead980 100644
--- a/source/tools/Makefile.in
+++ b/source/tools/Makefile.in
@@ -19,9 +19,9 @@ SUBDIRS = toolutil ctestfw makeconv genrb genbrk \
gencnval gensprep icuinfo genccode gencmn icupkg pkgdata \
gentest gennorm2 gencfu gendict icuexportdata
-ifneq (@platform_make_fragment_name@,mh-cygwin-msvc)
-SUBDIRS += escapesrc
-endif
+#ifneq (@platform_make_fragment_name@,mh-cygwin-msvc)
+#SUBDIRS += escapesrc
+#endif
## List of phony targets
.PHONY : all all-local all-recursive install install-local \

View File

@@ -1,20 +0,0 @@
diff --git a/source/icudefs.mk.in b/source/icudefs.mk.in
index 24bd97a..33169de 100644
--- a/source/icudefs.mk.in
+++ b/source/icudefs.mk.in
@@ -213,13 +213,13 @@ LIBICU = $(LIBPREFIX)$(ICUPREFIX)
## If we can't use the shared libraries, use the static libraries
ifneq ($(ENABLE_SHARED),YES)
-STATIC_PREFIX_WHEN_USED = s
+STATIC_PREFIX_WHEN_USED =
else
STATIC_PREFIX_WHEN_USED =
endif
# Static library prefix and file extension
-STATIC_PREFIX = s
+STATIC_PREFIX =
LIBSICU = $(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
A = a
SOBJ = $(SO)

View File

@@ -1,13 +0,0 @@
diff --urN a/source/extra/Makefile.in b/source/extra/Makefile.in
--- a/source/extra/Makefile.in
+++ b/source/extra/Makefile.in
@@ -23,7 +23,7 @@
## Files to remove for 'make clean'
CLEANFILES = *~
-SUBDIRS = scrptrun uconv
+SUBDIRS = uconv
## List of phony targets
.PHONY : all all-local all-recursive install install-local \

View File

@@ -1,35 +0,0 @@
diff --git a/source/configure.ac b/source/configure.ac
index 425fdc7..97210f8 100644
--- a/source/configure.ac
+++ b/source/configure.ac
@@ -114,6 +114,15 @@ AC_ARG_ENABLE([icu-config],
esac], [enable_icu_config=true])
AC_SUBST(INSTALL_ICU_CONFIG, [$enable_icu_config])
+AC_ARG_ENABLE([icu-build-win],
+ AS_HELP_STRING([--enable-icu-build-win], [install icu-build-win]),
+ [case "${enableval}" in
+ yes) enable_icu_build_win=true ;;
+ no) enable_icu_build_win=false ;;
+ *) AC_MSG_ERROR([bad value '${enableval}' for --enable-icu-build-win]) ;;
+ esac], [enable_icu_build_win=true])
+AC_SUBST(INSTALL_ICU_BUILD_WIN, [$enable_icu_build_win])
+
# Check whether to build debug libraries
AC_MSG_CHECKING([whether to build debug libraries])
enabled=no
@@ -263,12 +272,14 @@ ICU_CHECK_MH_FRAG
# Checks for libraries and other host specific stuff
# On HP/UX, don't link to -lm from a shared lib because it isn't
# PIC (at least on 10.2)
+if test "$enable_icu_build_win" = no; then
case "${host}" in
*-*-hpux*) AC_CHECK_LIB(m, floor, LIB_M="-lm") ;;
*) AC_CHECK_LIB(m, floor)
LIB_M="" ;;
esac
+fi
AC_SUBST(LIB_M)
# Check whether to build shared libraries

View File

@@ -1,25 +0,0 @@
diff --urN a/source/data/Makefile.in b/source/data/Makefile.in
--- a/source/data/Makefile.in
+++ b/source/data/Makefile.in
@@ -236,11 +236,12 @@
## Include the main build rules for data files
include $(top_builddir)/$(subdir)/rules.mk
+PKGDATA_LIST = $(TMP_DIR)/icudata.lst
ifeq ($(ENABLE_SO_VERSION_DATA),1)
ifeq ($(PKGDATA_MODE),dll)
SO_VERSION_DATA = $(OUTTMPDIR)/icudata.res
-$(SO_VERSION_DATA) : $(MISCSRCDIR)/icudata.rc | $(TMP_DIR)/dirs.timestamp
+$(SO_VERSION_DATA) : $(MISCSRCDIR)/icudata.rc $(PKGDATA_LIST)
ifeq ($(MSYS_RC_MODE),1)
rc.exe -i$(srcdir)/../common -i$(top_builddir)/common -fo$@ $(CPPFLAGS) $<
else
@@ -249,7 +250,6 @@
endif
endif
-PKGDATA_LIST = $(TMP_DIR)/icudata.lst
#####################################################

View File

@@ -1,49 +0,0 @@
diff --git a/source/configure.ac b/source/configure.ac
index da4f170abfa..28dbff06a4c 100644
--- a/source/configure.ac
+++ b/source/configure.ac
@@ -6,16 +6,15 @@ AC_COPYRIGHT([ Copyright (C) 2016 and later: Unicode, Inc. and others. License &
# NOTE: please use 'autoreconf' to rebuild, otherwise 'aclocal && autoconf'.
-# Check for minimum autoconf version. Use exactly this version when rebuilding
-# 'aclocal.m4' and 'configure' for merging upstream, to avoid spurious diffs.
-AC_PREREQ([2.72])
+# Check for autoconf version
+AC_PREREQ(2.69)
# Process this file with autoreconf to produce a configure script
AC_INIT([ICU],
- m4_esyscmd_s([sed -n 's/^[ ]*#[ ]*define[ ]*U_ICU_VERSION[ ]*"\([^"]*\)".*/\1/p' common/unicode/uvernum.h]),
- [https://icu.unicode.org/bugs],
- [icu4c],
- [https://icu.unicode.org/])
+ m4_esyscmd_s([sed -n 's/^[ ]*#[ ]*define[ ]*U_ICU_VERSION[ ]*"\([^"]*\)".*/\1/p' "./common/unicode/uvernum.h]"),
+ [http://icu-project.org/bugs],
+ [International Components for Unicode],
+ [http://icu-project.org])
# Instruct Python to never write any byte code to the ICU source tree.
PYTHONDONTWRITEBYTECODE=1
@@ -660,13 +659,14 @@ fi
AC_SUBST(U_HAVE_DIRENT_H)
# Check for endianness
-AC_C_BIGENDIAN([
- U_IS_BIG_ENDIAN=1
- U_ENDIAN_CHAR="b"
- ], [
- U_IS_BIG_ENDIAN=0
- U_ENDIAN_CHAR="l"
- ], [], AC_MSG_ERROR([universal endianness not supported]))
+AC_C_BIGENDIAN()
+if test $ac_cv_c_bigendian = no; then
+U_IS_BIG_ENDIAN=0
+U_ENDIAN_CHAR="l"
+else
+U_IS_BIG_ENDIAN=1
+U_ENDIAN_CHAR="b"
+fi
AC_SUBST(U_IS_BIG_ENDIAN)
# Do various POSIX related checks

View File

@@ -1,26 +0,0 @@
diff --git a/source/config/mh-mingw b/source/config/mh-mingw
index 30f6e5be81..b6364551ea 100644
--- a/source/config/mh-mingw
+++ b/source/config/mh-mingw
@@ -13,7 +13,7 @@
# On Windows we generally have the DLLs in the bin directory rather than the lib directory.
# This setting moves the ICU DLLs into the bin folder for MinGW/MSYS2 when "make install" is run.
# If you prefer to have the DLLs in the lib folder, then set this to NO instead.
-MINGW_MOVEDLLSTOBINDIR = YES
+MINGW_MOVEDLLSTOBINDIR = NO
# We install sbin tools into the same bin directory because
# pkgdata needs some of the tools in sbin, and we can't always depend on
diff --git a/source/config/mh-mingw64 b/source/config/mh-mingw64
index fb64c56260..a43cc4dd71 100644
--- a/source/config/mh-mingw64
+++ b/source/config/mh-mingw64
@@ -10,7 +10,7 @@
# On Windows we generally have the DLLs in the bin directory rather than the lib directory.
# This setting moves the ICU DLLs into the bin folder for MinGW/MSYS2 when "make install" is run.
# If you prefer to have the DLLs in the lib folder, then set this to NO instead.
-MINGW_MOVEDLLSTOBINDIR = YES
+MINGW_MOVEDLLSTOBINDIR = NO
# This file is similar to mh-mingw
# Any changes made here may also need to be made in mh-mingw

View File

@@ -1,168 +0,0 @@
if(NOT VCPKG_TARGET_IS_WINDOWS)
message(WARNING "${PORT} currently requires the following programs from the system package manager:
autoconf automake autoconf-archive
On Debian and Ubuntu derivatives:
sudo apt-get install autoconf automake autoconf-archive
On recent Red Hat and Fedora derivatives:
sudo dnf install autoconf automake autoconf-archive
On Arch Linux and derivatives:
sudo pacman -S autoconf automake autoconf-archive
On Alpine:
apk add autoconf automake autoconf-archive
On macOS:
brew install autoconf automake autoconf-archive\n")
endif()
string(REGEX MATCH "^[0-9]*" ICU_VERSION_MAJOR "${VERSION}")
string(REPLACE "." "_" VERSION2 "${VERSION}")
string(REPLACE "." "-" VERSION3 "${VERSION}")
vcpkg_download_distfile(
ARCHIVE
URLS "https://github.com/unicode-org/icu/releases/download/release-${VERSION3}/icu4c-${VERSION2}-src.tgz"
FILENAME "icu4c-${VERSION2}-src.tgz"
SHA512 b702ab62fb37a1574d5f4a768326d0f8fa30d9db5b015605b5f8215b5d8547f83d84880c586d3dcc7b6c76f8d47ef34e04b0f51baa55908f737024dd79a42a6c
)
vcpkg_extract_source_archive(SOURCE_PATH
ARCHIVE "${ARCHIVE}"
PATCHES
disable-escapestr-tool.patch
remove-MD-from-configure.patch
fix_parallel_build_on_windows.patch
fix-extra.patch
mingw-dll-install.patch
disable-static-prefix.patch # https://gitlab.kitware.com/cmake/cmake/-/issues/16617; also mingw.
fix-win-build.patch
vcpkg-cross-data.patch
darwin-rpath.patch
ladybird-remove-autoconf272.patch # Reverts https://github.com/unicode-org/icu/commit/b542ae9d9123231d89ab0694e5809c9dfa45c8f7
)
vcpkg_find_acquire_program(PYTHON3)
set(ENV{PYTHON} "${PYTHON3}")
vcpkg_list(SET CONFIGURE_OPTIONS)
vcpkg_list(SET BUILD_OPTIONS)
if(VCPKG_TARGET_IS_EMSCRIPTEN)
vcpkg_list(APPEND CONFIGURE_OPTIONS --disable-extras)
vcpkg_list(APPEND BUILD_OPTIONS "PKGDATA_OPTS=--without-assembly -O ../data/icupkg.inc")
elseif(VCPKG_TARGET_IS_UWP)
vcpkg_list(APPEND CONFIGURE_OPTIONS --disable-extras ac_cv_func_tzset=no ac_cv_func__tzset=no)
string(APPEND VCPKG_C_FLAGS " -DU_PLATFORM_HAS_WINUWP_API=1")
string(APPEND VCPKG_CXX_FLAGS " -DU_PLATFORM_HAS_WINUWP_API=1")
vcpkg_list(APPEND BUILD_OPTIONS "PKGDATA_OPTS=--windows-uwp-build -O ../data/icupkg.inc")
elseif(VCPKG_TARGET_IS_OSX AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
vcpkg_list(APPEND CONFIGURE_OPTIONS --enable-rpath)
if(DEFINED CMAKE_INSTALL_NAME_DIR)
vcpkg_list(APPEND BUILD_OPTIONS "ID_PREFIX=${CMAKE_INSTALL_NAME_DIR}")
endif()
endif()
if(VCPKG_TARGET_IS_WINDOWS)
list(APPEND CONFIGURE_OPTIONS --enable-icu-build-win)
# https://github.com/microsoft/vcpkg/pull/38826/files#diff-ea2b03d0dcb43b39cfac7b4f96e0ba52a5e4f15c1df6986850e0d52d56229430R64
if(NOT VCPKG_TARGET_IS_MINGW)
string(APPEND VCPKG_C_FLAGS " /std:c11")
string(APPEND VCPKG_CXX_FLAGS " /std:c++17")
endif()
endif()
if("tools" IN_LIST FEATURES)
list(APPEND CONFIGURE_OPTIONS --enable-tools)
else()
list(APPEND CONFIGURE_OPTIONS --disable-tools)
endif()
if(CMAKE_HOST_WIN32 AND VCPKG_TARGET_IS_MINGW AND NOT HOST_TRIPLET MATCHES "mingw")
# Assuming no cross compiling because the host (windows) pkgdata tool doesn't
# use the '/' path separator when creating compiler commands for mingw bash.
elseif(VCPKG_CROSSCOMPILING)
set(TOOL_PATH "${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}")
# convert to unix path
string(REGEX REPLACE "^([a-zA-Z]):/" "/\\1/" _VCPKG_TOOL_PATH "${TOOL_PATH}")
list(APPEND CONFIGURE_OPTIONS "--with-cross-build=${_VCPKG_TOOL_PATH}")
endif()
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
PROJECT_SUBPATH source
AUTOCONFIG
DETERMINE_BUILD_TRIPLET
ADDITIONAL_MSYS_PACKAGES autoconf-archive
OPTIONS
${CONFIGURE_OPTIONS}
--disable-samples
--disable-tests
--disable-layoutex
OPTIONS_RELEASE
--disable-debug
--enable-release
OPTIONS_DEBUG
--enable-debug
--disable-release
)
vcpkg_install_make(OPTIONS ${BUILD_OPTIONS})
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/share"
"${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/lib/icu"
"${CURRENT_PACKAGES_DIR}/debug/lib/icu"
"${CURRENT_PACKAGES_DIR}/debug/lib/icud")
file(GLOB TEST_LIBS
"${CURRENT_PACKAGES_DIR}/lib/*test*"
"${CURRENT_PACKAGES_DIR}/debug/lib/*test*")
if(TEST_LIBS)
file(REMOVE ${TEST_LIBS})
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
# force U_STATIC_IMPLEMENTATION macro
foreach(HEADER utypes.h utf_old.h platform.h)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/unicode/${HEADER}" "defined(U_STATIC_IMPLEMENTATION)" "1")
endforeach()
endif()
# Install executables from /tools/icu/sbin to /tools/icu/bin on unix (/bin because icu require this for cross compiling)
if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX AND "tools" IN_LIST FEATURES)
vcpkg_copy_tools(
TOOL_NAMES icupkg gennorm2 gencmn genccode gensprep
SEARCH_DIR "${CURRENT_PACKAGES_DIR}/tools/icu/sbin"
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin"
)
endif()
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/tools/icu/sbin"
"${CURRENT_PACKAGES_DIR}/tools/icu/debug")
# To cross compile, we need some files at specific positions. So lets copy them
file(GLOB CROSS_COMPILE_DEFS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/config/icucross.*")
file(INSTALL ${CROSS_COMPILE_DEFS} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/config")
file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*icu*${ICU_VERSION_MAJOR}.dll")
file(COPY ${RELEASE_DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
# copy dlls
file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*icu*${ICU_VERSION_MAJOR}.dll")
file(COPY ${RELEASE_DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
if(NOT VCPKG_BUILD_TYPE)
file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*icu*${ICU_VERSION_MAJOR}.dll")
file(COPY ${DEBUG_DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
# remove any remaining dlls in /lib
file(GLOB DUMMY_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll" "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
if(DUMMY_DLLS)
file(REMOVE ${DUMMY_DLLS})
endif()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/icu/bin/icu-config" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../../../" IGNORE_UNCHANGED)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

View File

@@ -1,18 +0,0 @@
diff -urN a/source/runConfigureICU b/source/runConfigureICU
--- a/source/runConfigureICU 2018-03-26 21:38:44.000000000 +0800
+++ b/source/runConfigureICU 2018-08-26 09:04:53.197454400 +0800
@@ -322,10 +322,10 @@
THE_COMP="Microsoft Visual C++"
CC=cl; export CC
CXX=cl; export CXX
- RELEASE_CFLAGS='-Gy -MD'
- RELEASE_CXXFLAGS='-Gy -MD'
- DEBUG_CFLAGS='-FS -Zi -MDd'
- DEBUG_CXXFLAGS='-FS -Zi -MDd'
+ RELEASE_CFLAGS='-Gy'
+ RELEASE_CXXFLAGS='-Gy'
+ DEBUG_CFLAGS='-FS -Zi'
+ DEBUG_CXXFLAGS='-FS -Zi'
DEBUG_LDFLAGS='-DEBUG'
;;
*BSD)

View File

@@ -1,8 +0,0 @@
cmake_policy(PUSH)
cmake_policy(SET CMP0057 NEW)
if(NOT "COMPONENTS" IN_LIST ARGS)
_find_package(${ARGS} COMPONENTS data)
else()
_find_package(${ARGS})
endif()
cmake_policy(POP)

View File

@@ -1,13 +0,0 @@
diff --git a/source/configure.ac b/source/configure.ac
index 1bd5871..c508f48 100644
--- a/source/configure.ac
+++ b/source/configure.ac
@@ -1151,7 +1151,7 @@ AC_ARG_ENABLE(fuzzer,
fuzzer=false)
ICU_CONDITIONAL(FUZZER, test "$fuzzer" = true)
-ICU_CONDITIONAL(DATA, test "$tools" = true || test "$cross_compiling" = "yes")
+ICU_CONDITIONAL(DATA, test "$tools" = true || test "$cross_compiling" = "yes" || test -n "$cross_buildroot")
AC_ARG_WITH(data-packaging,
[ --with-data-packaging specify how to package ICU data. Possible values:

View File

@@ -1,23 +0,0 @@
{
"name": "icu",
"version": "76.1",
"port-version": 0,
"description": "Mature and widely used Unicode and localization library.",
"homepage": "https://icu.unicode.org/home",
"license": "ICU",
"dependencies": [
{
"name": "icu",
"host": true,
"features": [
"tools"
]
}
],
"features": {
"tools": {
"description": "Build tools",
"supports": "!uwp"
}
}
}

View File

@@ -21,6 +21,7 @@ TEST_CASE(to_ascii)
TEST_TO_ASCII("www.аррӏе.com"sv, "www.xn--80ak6aa92e.com"sv);
TEST_TO_ASCII("ö.com"sv, "xn--nda.com"sv);
TEST_TO_ASCII("o\u0308.com"sv, "xn--nda.com"sv);
TEST_TO_ASCII("\U0001FACD.ge"sv, "xn--i29h.ge"sv);
// Select cases from IdnaTestV2.txt
// FIXME: Download, parse and test all cases

View File

@@ -1,8 +1,8 @@
Harness status: OK
Found 2669 tests
Found 2671 tests
2669 Pass
2671 Pass
Pass Loading data…
Pass ToASCII("fass.de")
Pass ToASCII("faß.de")
@@ -1826,8 +1826,8 @@ Pass ToASCII("1꫶Ss𑲥。ᷘ") V6
Pass ToASCII("꫶Ss𑲥。ᷘ") V6
Pass ToASCII("xn--3j78f.xn--mkb20b") V7
Pass ToASCII("𲤱⒛⾳.ꡦ⒈") V7
Pass ToASCII("𲤱20.音.ꡦ1.") V7; A4_2 (ignored)
Pass ToASCII("xn--20-9802c.xn--0w5a.xn--1-eg4e.") V7; A4_2 (ignored)
Pass ToASCII("𲤱20.音.ꡦ1.") A4_2 (ignored)
Pass ToASCII("xn--20-9802c.xn--0w5a.xn--1-eg4e.") A4_2 (ignored)
Pass ToASCII("xn--dth6033bzbvx.xn--tsh9439b") V7
Pass ToASCII("Ⴕ。۰≮ß݅")
Pass ToASCII("Ⴕ。۰≮ß݅")
@@ -1910,17 +1910,19 @@ Pass ToASCII("ᡅ0‌。⎢󤨄") C1; V7
Pass ToASCII("ᡅ0。⎢󤨄") C1; V7
Pass ToASCII("xn--0-z6j.xn--8lh28773l") V7
Pass ToASCII("xn--0-z6jy93b.xn--8lh28773l") C1; V7
Pass ToASCII("𲮚9ꍩ៓.‍ß") C2; V7
Pass ToASCII("𲮚9ꍩ៓.‍ß") C2; V7
Pass ToASCII("𲮚9ꍩ៓.SS") C2; V7
Pass ToASCII("𲮚9ꍩ៓.ss") C2; V7
Pass ToASCII("xn--9-i0j5967eg3qz.ss") V7
Pass ToASCII("xn--9-i0j5967eg3qz.xn--ss-l1t") C2; V7
Pass ToASCII("xn--9-i0j5967eg3qz.xn--zca770n") C2; V7
Pass ToASCII("𲮚ꍩ៓SS") C2; V7
Pass ToASCII("𲮚ꍩ៓ss") C2; V7
Pass ToASCII("𲮚9ꍩ៓.Ss") C2; V7
Pass ToASCII("𲮚9ꍩ៓.‍Ss") C2; V7
Pass ToASCII("𲮚9ꍩ៓.‍ß") C2
Pass ToASCII("𲮚9ꍩ៓.‍ß") C2
Pass ToASCII("𲮚9ꍩ៓.SS") C2
Pass ToASCII("𲮚9ꍩ៓.ss") C2
Pass ToASCII("xn--9-i0j5967eg3qz.ss")
Pass ToASCII("𲮚9ꍩ៓.ss")
Pass ToASCII("𲮚9ꍩ៓.SS")
Pass ToASCII("xn--9-i0j5967eg3qz.xn--ss-l1t") C2
Pass ToASCII("xn--9-i0j5967eg3qz.xn--zca770n") C2
Pass ToASCII("𲮚ꍩ៓SS") C2
Pass ToASCII("𲮚9ꍩ៓.‍ss") C2
Pass ToASCII("𲮚9ꍩ៓.Ss") C2
Pass ToASCII("𲮚ꍩ៓Ss") C2
Pass ToASCII("ꗷ𑆀.ݝ𐩒")
Pass ToASCII("xn--ju8a625r.xn--hpb0073k")
Pass ToASCII("⒐≯-。︒򩑣-񞛠") V7; V3 (ignored)

View File

@@ -8708,14 +8708,14 @@
"output": null
},
{
"comment": "V7; A4_2 (ignored)",
"comment": "A4_2 (ignored)",
"input": "\ud88a\udd3120.\u97f3.\ua8661.",
"output": null
"output": "xn--20-9802c.xn--0w5a.xn--1-eg4e."
},
{
"comment": "V7; A4_2 (ignored)",
"comment": "A4_2 (ignored)",
"input": "xn--20-9802c.xn--0w5a.xn--1-eg4e.",
"output": null
"output": "xn--20-9802c.xn--0w5a.xn--1-eg4e."
},
{
"comment": "V7",
@@ -9095,57 +9095,64 @@
"output": null
},
{
"comment": "C2; V7",
"comment": "C2",
"input": "\ud88a\udf9a\uff19\ua369\u17d3\uff0e\u200d\u00df",
"output": null
},
{
"comment": "C2; V7",
"comment": "C2",
"input": "\ud88a\udf9a9\ua369\u17d3.\u200d\u00df",
"output": null
},
{
"comment": "C2; V7",
"comment": "C2",
"input": "\ud88a\udf9a9\ua369\u17d3.\u200dSS",
"output": null
},
{
"comment": "C2; V7",
"comment": "C2",
"input": "\ud88a\udf9a9\ua369\u17d3.\u200dss",
"output": null
},
{
"comment": "V7",
"input": "xn--9-i0j5967eg3qz.ss",
"output": null
"output": "xn--9-i0j5967eg3qz.ss"
},
{
"comment": "C2; V7",
"input": "\ud88a\udf9a9\ua369\u17d3.ss",
"output": "xn--9-i0j5967eg3qz.ss"
},
{
"input": "\ud88a\udf9a9\ua369\u17d3.SS",
"output": "xn--9-i0j5967eg3qz.ss"
},
{
"comment": "C2",
"input": "xn--9-i0j5967eg3qz.xn--ss-l1t",
"output": null
},
{
"comment": "C2; V7",
"comment": "C2",
"input": "xn--9-i0j5967eg3qz.xn--zca770n",
"output": null
},
{
"comment": "C2; V7",
"comment": "C2",
"input": "\ud88a\udf9a\uff19\ua369\u17d3\uff0e\u200dSS",
"output": null
},
{
"comment": "C2; V7",
"comment": "C2",
"input": "\ud88a\udf9a\uff19\ua369\u17d3\uff0e\u200dss",
"output": null
},
{
"comment": "C2; V7",
"comment": "C2",
"input": "\ud88a\udf9a9\ua369\u17d3.\u200dSs",
"output": null
},
{
"comment": "C2; V7",
"comment": "C2",
"input": "\ud88a\udf9a\uff19\ua369\u17d3\uff0e\u200dSs",
"output": null
},

View File

@@ -248,7 +248,7 @@
},
{
"name": "icu",
"version": "76.1#0"
"version": "78.1#0"
},
{
"name": "libjpeg-turbo",