Files
haikuports/dev-libs/icu/patches/icu73-73.2.patchset
2023-08-27 08:28:47 +00:00

167 lines
5.0 KiB
Plaintext

From 5eac349b77e65973fc205cce200beba9a8d2266e Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Tue, 22 Feb 2022 10:08:48 -0600
Subject: Import changes from icu66 patchset
diff --git a/source/common/putilimp.h b/source/common/putilimp.h
index 5b95a68..f4ca0c4 100644
--- a/source/common/putilimp.h
+++ b/source/common/putilimp.h
@@ -88,7 +88,7 @@ typedef size_t uintptr_t;
/* Use the predefined value. */
#elif !U_HAVE_NL_LANGINFO_CODESET
# define U_NL_LANGINFO_CODESET -1
-#elif U_PLATFORM == U_PF_OS400
+#elif U_PLATFORM == U_PF_OS400 || defined(__HAIKU__)
/* not defined */
#else
# define U_NL_LANGINFO_CODESET CODESET
@@ -101,7 +101,7 @@ typedef size_t uintptr_t;
#if U_PLATFORM_HAS_WINUWP_API == 0
# define U_TZSET _tzset
#endif
-#elif U_PLATFORM == U_PF_OS400
+#elif U_PLATFORM == U_PF_OS400 || defined(__HAIKU__)
/* not defined */
#else
# define U_TZSET tzset
diff --git a/source/config/mh-haiku b/source/config/mh-haiku
index bb814cd..965c949 100644
--- a/source/config/mh-haiku
+++ b/source/config/mh-haiku
@@ -20,7 +20,7 @@ LIBCPPFLAGS =
THREADSCPPFLAGS =
#
-CPPFLAGS += -D__STDC_ISO_10646__ -DU_CHARSET_IS_UTF8=1
+CPPFLAGS += -DU_CHARSET_IS_UTF8=1
## Compiler switch to embed a runtime search path
LD_RPATH=
diff --git a/source/configure.ac b/source/configure.ac
index 2d7eb30..6b33e74 100644
--- a/source/configure.ac
+++ b/source/configure.ac
@@ -313,7 +313,7 @@ if test "$ENABLE_STATIC" = "YES"; then
OLD_LDFLAGS="${LDFLAGS}"
case "${host}" in
- *-linux*|i*86-*-*bsd*|i*86-pc-gnu)
+ *-linux*|i*86-*-*bsd*|i*86-pc-gnu|*-haiku*)
if test "$GCC" = yes; then
CPPFLAGS="${CPPFLAGS} -ffunction-sections -fdata-sections"
LDFLAGS="${LDFLAGS} -Wl,--gc-sections"
@@ -805,50 +805,12 @@ else
fi
AC_SUBST(U_HAVE_POPEN)
-AC_CHECK_FUNC(tzset)
+#AC_CHECK_FUNC(tzset)
U_HAVE_TZSET=0
-if test x$ac_cv_func_tzset = xyes
-then
- U_TZSET=tzset
- U_HAVE_TZSET=1
-else
- AC_CHECK_FUNC(_tzset)
- if test x$ac_cv_func__tzset = xyes
- then
- U_TZSET=_tzset
- U_HAVE_TZSET=1
- else
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TZSET=0"
- fi
-fi
AC_SUBST(U_HAVE_TZSET)
AC_SUBST(U_TZSET)
U_HAVE_TZNAME=0
-AC_CACHE_CHECK(for tzname,ac_cv_var_tzname,
-[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifndef _XOPEN_SOURCE
-#define _XOPEN_SOURCE
-#endif
-#include <stdlib.h>
-#include <time.h>
-#ifndef tzname /* For SGI. */
-extern char *tzname[]; /* RS6000 and others reject char **tzname. */
-#endif]], [atoi(*tzname);])],[ac_cv_var_tzname=yes],[ac_cv_var_tzname=no])])
-if test $ac_cv_var_tzname = yes; then
- U_TZNAME=tzname
- U_HAVE_TZNAME=1
-else
- AC_CACHE_CHECK(for _tzname,ac_cv_var__tzname,
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
- #include <time.h>
- extern char *_tzname[];]], [atoi(*_tzname);])],[ac_cv_var__tzname=yes],[ac_cv_var__tzname=no])])
- if test $ac_cv_var__tzname = yes; then
- U_TZNAME=_tzname
- U_HAVE_TZNAME=1
- else
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TZNAME=0"
- fi
-fi
AC_SUBST(U_HAVE_TZNAME)
AC_SUBST(U_TZNAME)
@@ -1295,6 +1257,7 @@ case "${host}" in
*-*-nto*) platform=U_QNX ;;
*-dec-osf*) platform=U_OSF ;;
*-*-beos) platform=U_BEOS ;;
+ *-*-haiku) platform=U_HAIKU ;;
*-*-irix*) platform=U_IRIX ;;
*-ncr-*) platform=U_MPRAS ;;
*) platform=U_UNKNOWN_PLATFORM ;;
diff --git a/source/tools/tzcode/Makefile.in b/source/tools/tzcode/Makefile.in
index 4ba969f..ea249f0 100644
--- a/source/tools/tzcode/Makefile.in
+++ b/source/tools/tzcode/Makefile.in
@@ -136,7 +136,7 @@ $(ICUZDUMPTARG): $(srcdir)/icuzdump.cpp
$(LINK.cc) -I$(srcdir) -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/io -pedantic $(srcdir)/icuzdump.cpp $(LIBICUUC) $(LIBICUDT) $(LIBICUI18N) $(LIBICUIO) $(LIBICUTOOLUTIL) -o $@
-$(TDATA): tdatamarker
+$(TDATA) $(XDATA): tdatamarker
tdatamarker: $(TZDATA)
mkdir $(VANGUARD_DIR)
--
2.37.3
From 7d250044f8b2b3634600296784efd772d1c62266 Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Fri, 19 May 2023 11:46:23 +0200
Subject: Fix patchset according to upstream
diff --git a/source/common/putilimp.h b/source/common/putilimp.h
index f4ca0c4..50ff4b5 100644
--- a/source/common/putilimp.h
+++ b/source/common/putilimp.h
@@ -88,7 +88,9 @@ typedef size_t uintptr_t;
/* Use the predefined value. */
#elif !U_HAVE_NL_LANGINFO_CODESET
# define U_NL_LANGINFO_CODESET -1
-#elif U_PLATFORM == U_PF_OS400 || defined(__HAIKU__)
+#elif U_PLATFORM == U_PF_OS400
+ /* not defined */
+#elif U_PLATFORM == U_HAIKU
/* not defined */
#else
# define U_NL_LANGINFO_CODESET CODESET
@@ -101,7 +103,9 @@ typedef size_t uintptr_t;
#if U_PLATFORM_HAS_WINUWP_API == 0
# define U_TZSET _tzset
#endif
-#elif U_PLATFORM == U_PF_OS400 || defined(__HAIKU__)
+#elif U_PLATFORM == U_PF_OS400
+ /* not defined */
+#elif U_PLATFORM == U_HAIKU
/* not defined */
#else
# define U_TZSET tzset
--
2.37.3