icu: recipe for version 66.1.

We should rebootstrap all the non-gcc2 architectures using this. New
versions of WebKit require at least ICU60 and we are currently shipping
version 57.

Currently the recipe has a different name so it can be installed
side-by-side with the old one, but we don't want to ship Haiku with 2
versions of ICU.

In order to not further delay the beta2 release, this should be done
after the release.
This commit is contained in:
Adrien Destugues
2020-04-11 12:02:47 +02:00
parent 6f3f3ae2e3
commit e43d05b8a4
4 changed files with 21 additions and 383 deletions

View File

@@ -1,188 +0,0 @@
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-2017 IBM Corporation and others."
LICENSE="ICU"
REVISION="1"
SOURCE_URI="https://ssl.icu-project.org/files/icu4c/$portVersion/icu4c-60_1-src.tgz"
SOURCE_URI_2="http://www.iana.org/time-zones/repository/releases/tzdata2017c.tar.gz#noarchive"
SOURCE_URI_3="https://ssl.icu-project.org/files/icu4c/$portVersion/icu4c-60_1-data.zip#noarchive"
CHECKSUM_SHA256="f8f5a6c8fbf32c015a467972bdb1477dc5f5d5dfea908b6ed218715eeb5ee225"
CHECKSUM_SHA256_2="d6543f92a929826318e2f44ff3a7611ce5f565a43e10250b42599d0ba4cbd90b"
CHECKSUM_SHA256_3="bbb920c6e67de8d9dcc0f0ec5554870170d0cb5eff6f0bc9881efc605f68210c"
SOURCE_DIR="icu"
PATCHES="icu-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64 ?arm sparc m68k"
# leave inactive until full testing can be done
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
icu$secondaryArchSuffix = $portVersion compat >= 60
lib:libicudata$secondaryArchSuffix = $portVersion compat >= 60
lib:libicui18n$secondaryArchSuffix = $portVersion compat >= 60
lib:libicuio$secondaryArchSuffix = $portVersion compat >= 60
lib:libicutest$secondaryArchSuffix = $portVersion compat >= 60
lib:libicutu$secondaryArchSuffix = $portVersion compat >= 60
lib:libicuuc$secondaryArchSuffix = $portVersion compat >= 60
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
icu${secondaryArchSuffix}_devel = $portVersion
cmd:icu_config${secondaryArchSuffix} = $portVersion compat >= 60
devel:libicudata${secondaryArchSuffix} = $portVersion compat >= 60
devel:libicui18n${secondaryArchSuffix} = $portVersion compat >= 60
devel:libicuio${secondaryArchSuffix} = $portVersion compat >= 60
devel:libicutest${secondaryArchSuffix} = $portVersion compat >= 60
devel:libicutu${secondaryArchSuffix} = $portVersion compat >= 60
devel:libicuuc${secondaryArchSuffix} = $portVersion compat >= 60
"
REQUIRES_devel="
icu${secondaryArchSuffix} == $portVersion base
"
if [ -z "$secondaryArchSuffix" ]; then
SUMMARY_tools="The ICU support tools"
PROVIDES_tools="
icu_tools = $portVersion
cmd:derb
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="
icu == $portVersion base
haiku
"
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:sed
cmd:unzip
cmd:tar
cmd:gunzip
"
BUILD()
{
cd source
cp ../../../sources-2/tzdata*.tar.gz tools/tzcode/
unzip -oq ../../../sources-3/icu4c-*-data.zip
rm -f data/in/icudt??l.dat
autoconf
runConfigure ./configure \
--disable-samples --disable-extras
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
# Rename the data/icu directory when built for the secondary architecture,
# so that it doesn't clash with the primary package's.
if [ -n "$secondaryArchSuffix" ]; then
mv $dataDir/icu $dataDir/icu$secondaryArchSuffix
# TODO: The icu-config, the Makefile.inc, and possibly other files need
# to be adjusted as well. They are probably also not quite correct for
# the primary architecture (lib vs. develop/lib).
fi
# devel package
packageEntries devel \
$developDir \
$dataDir/icu$secondaryArchSuffix \
$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
}

View File

@@ -39,24 +39,23 @@ providing very competitive performance.
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-2019 IBM Corporation and others."
COPYRIGHT="1995-2020 IBM Corporation and others."
LICENSE="ICU"
REVISION="1"
SOURCE_URI="https://ssl.icu-project.org/files/icu4c/$portVersion/icu4c-64_2-src.tgz"
SOURCE_URI_2="http://www.iana.org/time-zones/repository/releases/tzdata2019c.tar.gz#noarchive"
SOURCE_URI_3="https://ssl.icu-project.org/files/icu4c/$portVersion/icu4c-64_2-data.zip#noarchive"
CHECKSUM_SHA256="627d5d8478e6d96fc8c90fed4851239079a561a6a8b9e48b0892f24e82d31d6c"
CHECKSUM_SHA256_2="79c7806dab09072308da0e3d22c37d3b245015a591891ea147d3b133b60ffc7c"
CHECKSUM_SHA256_3="fba0e89f5b3f285d722a83317647bffee69b6f1eb8d067d5da03c5677c45e510"
SOURCE_URI="https://github.com/unicode-org/icu/releases/download/release-66-1/icu4c-66_1-src.tgz"
SOURCE_URI_2="https://github.com/unicode-org/icu/releases/download/release-66-1/icu4c-66_1-data.zip#noarchive"
#SOURCE_URI_3="http://www.iana.org/time-zones/repository/releases/tzdata2019c.tar.gz#noarchive"
CHECKSUM_SHA256="52a3f2209ab95559c1cf0a14f24338001f389615bf00e2585ef3dbc43ecf0a2e"
CHECKSUM_SHA256_2="8be647f738891d2beb79d48f99077b3499948430eae6f1be112553b15ab0243e"
SOURCE_DIR="icu"
PATCHES="icu-$portVersion.patchset"
PATCHES="icu66-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64 ?arm ?sparc"
# leave inactive until full testing can be done
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
icu$secondaryArchSuffix = $portVersion compat >= 60
icu66$secondaryArchSuffix = $portVersion compat >= 60
lib:libicudata$secondaryArchSuffix = $portVersion compat >= 60
lib:libicui18n$secondaryArchSuffix = $portVersion compat >= 60
lib:libicuio$secondaryArchSuffix = $portVersion compat >= 60
@@ -69,7 +68,7 @@ REQUIRES="
"
PROVIDES_devel="
icu${secondaryArchSuffix}_devel = $portVersion
icu66${secondaryArchSuffix}_devel = $portVersion
cmd:icu_config${secondaryArchSuffix} = $portVersion compat >= 60
devel:libicudata${secondaryArchSuffix} = $portVersion compat >= 60
devel:libicui18n${secondaryArchSuffix} = $portVersion compat >= 60
@@ -79,13 +78,13 @@ PROVIDES_devel="
devel:libicuuc${secondaryArchSuffix} = $portVersion compat >= 60
"
REQUIRES_devel="
icu${secondaryArchSuffix} == $portVersion base
icu66${secondaryArchSuffix} == $portVersion base
"
if [ -z "$secondaryArchSuffix" ]; then
SUMMARY_tools="The ICU support tools"
PROVIDES_tools="
icu_tools = $portVersion
icu66_tools = $portVersion
cmd:derb
cmd:escapesrc
cmd:genbrk
@@ -130,10 +129,10 @@ BUILD()
cd source
# Created during build and prevent rebuilds.
rm -rf tools/tzcode/vanguard
#rm -rf tools/tzcode/vanguard
#cp ../../../sources-3/tzdata*.tar.gz tools/tzcode/
cp ../../../sources-2/tzdata*.tar.gz tools/tzcode/
unzip -oq ../../../sources-3/icu4c-*-data.zip
unzip -oq ../../../sources-2/icu4c-*-data.zip
rm -f data/in/icudt??l.dat
autoconf
runConfigure ./configure \

View File

@@ -1,173 +0,0 @@
From 65d0fae2dc1ddae7ddfd9777fb7be1eb3631067d Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Sun, 19 Apr 2015 13:38:07 +0200
Subject: buildsystem configuration for Haiku
diff --git a/source/acinclude.m4 b/source/acinclude.m4
index 5c8fda7..e73ee7a 100644
--- a/source/acinclude.m4
+++ b/source/acinclude.m4
@@ -463,6 +463,9 @@ AC_DEFUN([AC_CHECK_STRICT_COMPILE],
if test "$GCC" = yes
then
case "${host}" in
+ *-*-haiku*)
+ CFLAGS="$CFLAGS -std=c9x"
+ ;;
*-*-solaris*)
# Don't use -std=c99 on Solaris because of timezone check fails
;;
--
2.14.2
From ab4897a6025b583c4656361f2a406b5eb73f5b80 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Fri, 3 Oct 2014 11:07:01 +0200
Subject: Don't call tzset and tzname on Haiku
While they exist, they are implemented using ICU, and trying to use them
within ICU results in a deadlock.
diff --git a/source/common/putilimp.h b/source/common/putilimp.h
index eb9b538..6d9ca65 100644
--- a/source/common/putilimp.h
+++ b/source/common/putilimp.h
@@ -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
@@ -139,7 +139,7 @@ typedef size_t uintptr_t;
#if U_PLATFORM_HAS_WINUWP_API == 0
# define U_TZNAME _tzname
#endif
-#elif U_PLATFORM == U_PF_OS400
+#elif U_PLATFORM == U_PF_OS400 || defined(__HAIKU__)
/* not defined */
#else
# define U_TZNAME tzname
diff --git a/source/configure.ac b/source/configure.ac
index a2fdf84..3497a81 100644
--- a/source/configure.ac
+++ b/source/configure.ac
@@ -803,50 +803,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)
--
2.14.2
From c17150775a84a5816286d804dd7322fd2413e84f Mon Sep 17 00:00:00 2001
From: Oliver Tappe <zooey@hirschkaefer.de>
Date: Fri, 14 Nov 2014 23:56:19 +0100
Subject: Restore missing parts for proper Haiku port.
* Actually set the platform to U_HAIKU for Haiku target.
* Use gcc to build icudt54l_dat.o for Haiku target.
diff --git a/source/configure.ac b/source/configure.ac
index 3497a81..f402219 100644
--- a/source/configure.ac
+++ b/source/configure.ac
@@ -636,7 +636,7 @@ AC_MSG_CHECKING([for genccode assembly])
# Check to see if genccode can generate simple assembly.
GENCCODE_ASSEMBLY=
case "${host}" in
-*-linux*|*-kfreebsd*-gnu*|i*86-*-*bsd*|i*86-pc-gnu)
+*-linux*|*-kfreebsd*-gnu*|i*86-*-*bsd*|i*86-pc-gnu|*-haiku*)
if test "$GCC" = yes; then
# We're using gcc, and the simple -a gcc command line works for genccode
GENCCODE_ASSEMBLY="-a gcc"
@@ -1239,6 +1239,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 ;;
--
2.14.2
From 50f4c8d8e7fd9c0e08d16163d50a5463afe58cbb Mon Sep 17 00:00:00 2001
From: Michael Lotz <mmlr@mlotz.ch>
Date: Sat, 19 Dec 2015 14:44:35 +0000
Subject: Fix missing dependency of yearistype.sh to tzdata extraction.
This caused parallel builds to fail because the script file wasn't yet
extracted when it was copied. The regression was introduced in r26995
when the dependency was reused for TDATA which yearistype.sh isn't part
of.
diff --git a/source/tools/tzcode/Makefile.in b/source/tools/tzcode/Makefile.in
index f8ab02d..1b33375 100644
--- a/source/tools/tzcode/Makefile.in
+++ b/source/tools/tzcode/Makefile.in
@@ -131,7 +131,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)
gunzip -d < $(TZDATA) | tar xf - --exclude=Makefile
--
2.14.2

View File

@@ -1,11 +1,11 @@
From 5645406365b4822caaa538cf3767f74c0fb1720b Mon Sep 17 00:00:00 2001
From fe890ee1d18946889c6efe516f8aca4ac326c449 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Fri, 20 Sep 2019 14:50:08 +0200
Subject: Import changes from icu 60.1 patchset.
diff --git a/source/common/putilimp.h b/source/common/putilimp.h
index 73defd9..d21cea0 100644
index d9c90cf..23a76c4 100644
--- a/source/common/putilimp.h
+++ b/source/common/putilimp.h
@@ -101,7 +101,7 @@ typedef size_t uintptr_t;
@@ -27,7 +27,7 @@ index 73defd9..d21cea0 100644
#else
# define U_TZNAME tzname
diff --git a/source/configure.ac b/source/configure.ac
index 8cd270b..76081c0 100644
index 759c495..9ec77fd 100644
--- a/source/configure.ac
+++ b/source/configure.ac
@@ -311,7 +311,7 @@ if test "$ENABLE_STATIC" = "YES"; then
@@ -91,7 +91,7 @@ index 8cd270b..76081c0 100644
AC_SUBST(U_HAVE_TZNAME)
AC_SUBST(U_TZNAME)
@@ -1277,6 +1239,7 @@ case "${host}" in
@@ -1296,6 +1258,7 @@ case "${host}" in
*-*-nto*) platform=U_QNX ;;
*-dec-osf*) platform=U_OSF ;;
*-*-beos) platform=U_BEOS ;;
@@ -113,10 +113,10 @@ index 80139f7..51328f1 100644
tdatamarker: $(TZDATA)
mkdir $(VANGUARD_DIR)
--
2.23.0
2.24.1
From 18813bf98d36d39d2648cc9691e4a4d670889225 Mon Sep 17 00:00:00 2001
From 753e3410f1e309310afb4bfd9999ec2e671490bb Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Fri, 20 Sep 2019 16:03:07 +0200
Subject: Fix duplicate definition of constant
@@ -137,5 +137,5 @@ index bb814cd..965c949 100644
## Compiler switch to embed a runtime search path
LD_RPATH=
--
2.23.0
2.24.1