icu74, add new icu74 (#9713)

This commit is contained in:
Schrijvers Luc
2023-11-10 09:20:59 +00:00
committed by GitHub
parent c281292f2b
commit eb347bb555
2 changed files with 363 additions and 0 deletions

View File

@@ -0,0 +1,197 @@
SUMMARY="Libraries to support Unicode and globalization"
SUMMARY_devel="The ICU development files"
DESCRIPTION="International Components for Unicode (ICU) is a mature, widely \
used set of C/C++ and Java libraries providing Unicode and Globalization \
support for software applications. ICU is widely portable and gives \
applications the same results on all platforms and between C/C++ and Java \
software.
ICU is released under a nonrestrictive open source license that is suitable \
for use with both commercial software and with other open source or free \
software.
Here are a few highlights of the services provided by ICU:
* Code Page Conversion: Convert text data to or from Unicode and nearly any \
other character set or encoding. ICU's conversion tables are based on charset \
data collected by IBM over the course of many decades, and is the most \
complete available anywhere.
* Collation: Compare strings according to the conventions and standards of a \
particular language, region or country. ICU's collation is based on the \
Unicode Collation Algorithm plus locale-specific comparison rules from the \
Common Locale Data Repository, a comprehensive source for this type of data.
* Formatting: Format numbers, dates, times and currency amounts according the \
conventions of a chosen locale. This includes translating month and day names \
into the selected language, choosing appropriate abbreviations, ordering \
fields correctly, etc. This data also comes from the Common Locale Data \
Repository.
* Time Calculations: Multiple types of calendars are provided beyond the \
traditional Gregorian calendar. A thorough set of timezone calculation APIs \
are provided.
* Unicode Support: ICU closely tracks the Unicode standard, providing easy \
access to all of the many Unicode character properties, Unicode Normalization, \
Case Folding and other fundamental operations as specified by the Unicode \
Standard.
* Regular Expression: ICU's regular expressions fully support Unicode while \
providing very competitive performance.
* Bidi: support for handling text containing a mixture of left to right \
(English) and right to left (Arabic or Hebrew) data.
* Text Boundaries: Locate the positions of words, sentences, paragraphs within \
a range of text, or identify locations that would be suitable for line \
wrapping when displaying the text."
HOMEPAGE="http://www.icu-project.org"
COPYRIGHT="1995-2020 IBM Corporation and others."
LICENSE="ICU"
REVISION="1"
SOURCE_URI="https://github.com/unicode-org/icu/releases/download/release-${portVersion/\./-}/icu4c-${portVersion/\./_}-src.tgz"
CHECKSUM_SHA256="36278693c6ff4f7ab38936ab88f2e3dc7bc3cebdc694a54e9cbcb6f77a575fd9"
SOURCE_URI_2="https://github.com/unicode-org/icu/releases/download/release-${portVersion/\./-}/icu4c-${portVersion/\./_}-data.zip#noarchive"
CHECKSUM_SHA256_2="67d5ab39c5187e1dd0fed60a3fe52794dce9784b4c045cb85e19f5d317fd783f"
SOURCE_URI_3="https://raw.githubusercontent.com/unicode-org/icu/main/LICENSE#noarchive"
CHECKSUM_SHA256_3="17510cf7a58b4879b887ec05a45d72cf1b73544dd9ec7e72f20110ed104229ee"
SOURCE_DIR="icu"
PATCHES="icu74-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2 ?arm ?sparc ?arm64 ?riscv64 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
icu74$secondaryArchSuffix = $portVersion compat >= 74
lib:libicudata$secondaryArchSuffix = $portVersion compat >= 74
lib:libicui18n$secondaryArchSuffix = $portVersion compat >= 74
lib:libicuio$secondaryArchSuffix = $portVersion compat >= 74
lib:libicutest$secondaryArchSuffix = $portVersion compat >= 74
lib:libicutu$secondaryArchSuffix = $portVersion compat >= 74
lib:libicuuc$secondaryArchSuffix = $portVersion compat >= 74
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
icu74${secondaryArchSuffix}_devel = $portVersion
cmd:icu_config${secondaryArchSuffix} = $portVersion compat >= 74
devel:libicudata${secondaryArchSuffix} = $portVersion compat >= 74
devel:libicui18n${secondaryArchSuffix} = $portVersion compat >= 74
devel:libicuio${secondaryArchSuffix} = $portVersion compat >= 74
devel:libicutest${secondaryArchSuffix} = $portVersion compat >= 74
devel:libicutu${secondaryArchSuffix} = $portVersion compat >= 74
devel:libicuuc${secondaryArchSuffix} = $portVersion compat >= 74
"
REQUIRES_devel="
icu74${secondaryArchSuffix} == $portVersion base
"
CONFLICTS_devel="
icu66${secondaryArchSuffix}_devel
icu70${secondaryArchSuffix}_devel
icu73${secondaryArchSuffix}_devel
"
if [ -z "$secondaryArchSuffix" ]; then
SUMMARY_tools="The ICU support tools"
PROVIDES_tools="
icu74_tools = $portVersion
cmd:derb
cmd:icuexportdata
cmd:escapesrc
cmd:genbrk
cmd:genccode
cmd:gencfu
cmd:gencmn
cmd:gencnval
cmd:gendict
cmd:gennorm2
cmd:genrb
cmd:gensprep
cmd:icuinfo
cmd:icupkg
cmd:makeconv
cmd:pkgdata
"
REQUIRES_tools="
icu74 == $portVersion base
haiku
"
CONFLICTS_tools="
icu66_tools
icu70_tools
icu73_tools
"
fi
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:autoconf
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python3
cmd:sed
cmd:unzip
cmd:tar
cmd:gunzip
"
BUILD()
{
cd source
# Created during build and prevent rebuilds.
#rm -rf tools/tzcode/vanguard
#cp ../../../sources-3/tzdata*.tar.gz tools/tzcode/
rm $sourceDir/LICENSE
cp -r $sourceDir3/LICENSE $sourceDir
cp $sourceDir3/LICENSE $sourceDir
unzip -oq ../../../sources-2/icu4c-*-data.zip
rm -f data/in/icudt??l.dat
autoconf
runConfigure ./configure \
--disable-samples --disable-extras --with-data-packaging=archive
make $jobArgs
}
INSTALL()
{
cd source
make install
prepareInstalledDevelLibs \
libicudata \
libicui18n \
libicuio \
libicutest \
libicutu \
libicuuc
fixPkgconfig
# Update icu-config to point to the develop/lib dir
fixDevelopLibDirReferences \
$binDir/icu-config
# devel package
packageEntries devel \
$developDir \
$libDir/icu \
$binDir/icu-config \
$manDir/man1/icu-config.1
# tools package
if [ -z "$secondaryArchSuffix" ]; then
packageEntries tools \
$binDir \
$manDir
else
rm -r $binDir $manDir
fi
}
TEST()
{
cd source
make check VERBOSE=1
}

View File

@@ -0,0 +1,166 @@
From 105fd4cc7fb9dc95548362742360619e1cc67f6f 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.42.0
From d993329641a68dbf24ec076652b45138b3869fca 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.42.0