Merge pull request #37 from fsb4000/master

Decrease ICU version requirements to 49
This commit is contained in:
Fred Kiefer 2019-04-01 09:05:36 +02:00 committed by GitHub
commit 0a77ddb0d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 10 deletions

View file

@ -1,3 +1,9 @@
2019-03-29 Igor Zhukov <fsb4000@yandex.ru>
* Source/NSDateFormatter.m:
* configure:
* configure.ac:
Decrease ICU version requirements to 49 to support Windows 2000.
2019-03-25 Sergii Stoian <stoyan255@gmail.com>
* Resources/Lanuages/Ukrainian:

View file

@ -946,8 +946,13 @@ static NSDateFormatterBehavior _defaultBehavior = 0;
pat = malloc(sizeof(UChar) * patLength);
[self->_dateFormat getCharacters: pat];
}
#if U_ICU_VERSION_MAJOR_NUM >= 50
timeStyle = pat ? UDAT_PATTERN : NSToUDateFormatStyle (internal->_timeStyle);
dateStyle = pat ? UDAT_PATTERN : NSToUDateFormatStyle (internal->_dateStyle);
#else
timeStyle = NSToUDateFormatStyle (internal->_timeStyle);
dateStyle = NSToUDateFormatStyle (internal->_dateStyle);
#endif
internal->_formatter = udat_open (timeStyle, dateStyle,
[[internal->_locale localeIdentifier] UTF8String],
tzID, tzIDLength, pat, patLength, &err);

18
configure vendored
View file

@ -12269,12 +12269,12 @@ if test -n "$ICU_CFLAGS"; then
pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-i18n > 50.0\""; } >&5
($PKG_CONFIG --exists --print-errors "icu-i18n > 50.0") 2>&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-i18n > 49.0\""; } >&5
($PKG_CONFIG --exists --print-errors "icu-i18n > 49.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-i18n > 50.0" 2>/dev/null`
pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-i18n > 49.0" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@ -12286,12 +12286,12 @@ if test -n "$ICU_LIBS"; then
pkg_cv_ICU_LIBS="$ICU_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-i18n > 50.0\""; } >&5
($PKG_CONFIG --exists --print-errors "icu-i18n > 50.0") 2>&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-i18n > 49.0\""; } >&5
($PKG_CONFIG --exists --print-errors "icu-i18n > 49.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-i18n > 50.0" 2>/dev/null`
pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-i18n > 49.0" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@ -12312,14 +12312,14 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-i18n > 50.0" 2>&1`
ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-i18n > 49.0" 2>&1`
else
ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-i18n > 50.0" 2>&1`
ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-i18n > 49.0" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$ICU_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (icu-i18n > 50.0) were not met:
as_fn_error $? "Package requirements (icu-i18n > 49.0) were not met:
$ICU_PKG_ERRORS

View file

@ -3336,7 +3336,7 @@ AC_ARG_ENABLE(icu,
enable_icu=yes)
if test "$enable_icu" = "yes"; then
PKG_CHECK_MODULES([ICU], [icu-i18n > 50.0])
PKG_CHECK_MODULES([ICU], [icu-i18n > 49.0])
AC_CHECK_HEADERS(unicode/uloc.h unicode/ulocdata.h unicode/ucol.h unicode/ucurr.h unicode/uregex.h unicode/ucal.h unicode/unorm2.h unicode/unum.h unicode/udat.h unicode/udatpg.h unicode/ustring.h unicode/usearch.h unicode/ucnv.h)
LIBS="$LIBS $ICU_LIBS"
HAVE_ICU=1