icu: add recipe for version 57.1.

* rename the 56.1 recipe for icu56 for compatibility.
This commit is contained in:
Jerome Duval
2016-07-12 13:38:52 +00:00
parent 6a45dc0ff9
commit 87bc25ad5d
4 changed files with 1552 additions and 39 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-2015 IBM Corporation and others."
LICENSE="ICU"
REVISION="1"
SOURCE_URI="http://download.icu-project.org/files/icu4c/$portVersion/icu4c-57_1-src.tgz"
SOURCE_URI_2="http://www.iana.org/time-zones/repository/releases/tzdata2016f.tar.gz#noarchive"
SOURCE_URI_3="http://download.icu-project.org/files/icu4c/$portVersion/icu4c-57_1-data.zip#noarchive"
CHECKSUM_SHA256="ff8c67cb65949b1e7808f2359f2b80f722697048e90e7cfc382ec1fe229e9581"
CHECKSUM_SHA256_2="ed8c951008d12f1db55a11e96fc055718c6571233327d9de16a7f8475e2502b0"
CHECKSUM_SHA256_3="dfcb18f02919d81b0b3ac1eec0c988b448fd39253e77546a0934861ee5c54eb9"
SOURCE_DIR="icu"
PATCHES="icu-$portVersion.patchset"
if [ $effectiveTargetArchitecture = x86_gcc2 ]; then
PATCHES+="
"icu-$portVersion.gcc2.patchset"
"
fi
ARCHITECTURES="x86_gcc2 x86 x86_64 arm"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
icu$secondaryArchSuffix = $portVersion compat >= 57
lib:libicudata$secondaryArchSuffix = $portVersion compat >= 57
lib:libicui18n$secondaryArchSuffix = $portVersion compat >= 57
lib:libicuio$secondaryArchSuffix = $portVersion compat >= 57
lib:libicule$secondaryArchSuffix = $portVersion compat >= 57
lib:libiculx$secondaryArchSuffix = $portVersion compat >= 57
lib:libicutest$secondaryArchSuffix = $portVersion compat >= 57
lib:libicutu$secondaryArchSuffix = $portVersion compat >= 57
lib:libicuuc$secondaryArchSuffix = $portVersion compat >= 57
"
REQUIRES="
haiku$secondaryArchSuffix
"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
REQUIRES+="
"
fi
PROVIDES_devel="
icu${secondaryArchSuffix}_devel = $portVersion
cmd:icu_config${secondaryArchSuffix} = $portVersion compat >= 57
devel:libicudata${secondaryArchSuffix} = $portVersion compat >= 57
devel:libicui18n${secondaryArchSuffix} = $portVersion compat >= 57
devel:libicuio${secondaryArchSuffix} = $portVersion compat >= 57
devel:libicule${secondaryArchSuffix} = $portVersion compat >= 57
devel:libiculx${secondaryArchSuffix} = $portVersion compat >= 57
devel:libicutest${secondaryArchSuffix} = $portVersion compat >= 57
devel:libicutu${secondaryArchSuffix} = $portVersion compat >= 57
devel:libicuuc${secondaryArchSuffix} = $portVersion compat >= 57
"
REQUIRES_devel="
icu${secondaryArchSuffix} == $portVersion base
"
if [ -z "$secondaryArchSuffix" ]; then
SUMMARY_tools="The ICU support tools"
PROVIDES_tools="
icu_tools = $portVersion
cmd:derb
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
"
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 \
libicule \
libiculx \
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

@@ -41,12 +41,12 @@ wrapping when displaying the text."
HOMEPAGE="http://www.icu-project.org"
COPYRIGHT="1995-2015 IBM Corporation and others."
LICENSE="ICU"
REVISION="2"
REVISION="1"
SOURCE_URI="http://download.icu-project.org/files/icu4c/$portVersion/icu4c-56_1-src.tgz"
SOURCE_URI_2="http://www.iana.org/time-zones/repository/releases/tzdata2015g.tar.gz#noarchive"
SOURCE_URI_2="http://www.iana.org/time-zones/repository/releases/tzdata2016f.tar.gz#noarchive"
SOURCE_URI_3="http://download.icu-project.org/files/icu4c/$portVersion/icu4c-56_1-data.zip#noarchive"
CHECKSUM_SHA256="3a64e9105c734dcf631c0b3ed60404531bce6c0f5a64bfe1a6402a4cc2314816"
CHECKSUM_SHA256_2="b923cdbf078491696b17bc8d069c74bce73fabc5774629da2f410c9b31576161"
CHECKSUM_SHA256_2="ed8c951008d12f1db55a11e96fc055718c6571233327d9de16a7f8475e2502b0"
CHECKSUM_SHA256_3="d9114d82ea87c4b2e7f2ae11117c21922b98aefba7b4e92c3a80075303b2ed23"
SOURCE_DIR="icu"
PATCHES="icu-$portVersion.patchset"
@@ -60,7 +60,7 @@ ARCHITECTURES="x86_gcc2 x86 x86_64 arm"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
icu$secondaryArchSuffix = $portVersion compat >= 56
icu56$secondaryArchSuffix = $portVersion compat >= 56
lib:libicudata$secondaryArchSuffix = $portVersion compat >= 56
lib:libicui18n$secondaryArchSuffix = $portVersion compat >= 56
lib:libicuio$secondaryArchSuffix = $portVersion compat >= 56
@@ -79,7 +79,7 @@ REQUIRES+="
fi
PROVIDES_devel="
icu${secondaryArchSuffix}_devel = $portVersion
icu56${secondaryArchSuffix}_devel = $portVersion
cmd:icu_config${secondaryArchSuffix} = $portVersion compat >= 56
devel:libicudata${secondaryArchSuffix} = $portVersion compat >= 56
devel:libicui18n${secondaryArchSuffix} = $portVersion compat >= 56
@@ -91,33 +91,13 @@ PROVIDES_devel="
devel:libicuuc${secondaryArchSuffix} = $portVersion compat >= 56
"
REQUIRES_devel="
icu${secondaryArchSuffix} == $portVersion base
icu56${secondaryArchSuffix} == $portVersion base
"
CONFLICTS_devel="
icu${secondaryArchSuffix}_devel
icu55${secondaryArchSuffix}_devel
icu54${secondaryArchSuffix}_devel
"
if [ -z "$secondaryArchSuffix" ]; then
SUMMARY_tools="The ICU support tools"
PROVIDES_tools="
icu_tools = $portVersion
cmd:derb
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
@@ -180,14 +160,8 @@ INSTALL()
$binDir/icu-config \
$manDir/man1/icu-config.1
# tools package
if [ -z "$secondaryArchSuffix" ]; then
packageEntries tools \
$binDir \
$manDir
else
rm -r $binDir $manDir
fi
# main package cleanup
rm -r $binDir
}
TEST()

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,203 @@
From 3c6dff2a3728889f67afcc5e2e5a667d59aa2b84 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 179c1c8..6a25dc4 100644
--- a/source/acinclude.m4
+++ b/source/acinclude.m4
@@ -470,6 +470,9 @@ AC_DEFUN([AC_CHECK_STRICT_COMPILE],
if test "$GCC" = yes
then
case "${host}" in
+ *-*-haiku*)
+ CFLAGS="$CFLAGS -std=c9x"
+ ;;
*)
# Do not use -ansi. It limits us to C90, and it breaks some platforms.
# We use -std=c99 to disable the gnu99 defaults and its associated warnings
diff --git a/source/config/mh-haiku b/source/config/mh-haiku
index ccf956e..55a3ed2 100644
--- a/source/config/mh-haiku
+++ b/source/config/mh-haiku
@@ -18,7 +18,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=
--
2.2.2
From 12c3d34d0c531dcd3af7ae9c0119001bcdf8261a 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 d2c1c66..a3e361f 100644
--- a/source/common/putilimp.h
+++ b/source/common/putilimp.h
@@ -105,7 +105,7 @@ typedef size_t uintptr_t;
/* Use the predefined value. */
#elif U_PLATFORM_USES_ONLY_WIN32_API
# define U_TZSET _tzset
-#elif U_PLATFORM == U_PF_OS400
+#elif U_PLATFORM == U_PF_OS400 || defined(__HAIKU__)
/* not defined */
#else
# define U_TZSET tzset
@@ -140,7 +140,7 @@ typedef size_t uintptr_t;
/* Use the predefined value. */
#elif U_PLATFORM_USES_ONLY_WIN32_API
# define U_TZNAME _tzname
-#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 b30c8d0..89902b4 100644
--- a/source/configure.ac
+++ b/source/configure.ac
@@ -790,50 +790,26 @@ 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
+#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 __USE_POSIX
-#define __USE_POSIX
-#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.2.2
From 85cb05132c7caf7c17c786a816efb31a08a40319 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 89902b4..9f3b893 100644
--- a/source/configure.ac
+++ b/source/configure.ac
@@ -626,7 +626,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"
@@ -1227,6 +1227,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.2.2
From 093540e0271aad6cc2aa23bfd8af1e37d04c5ef4 Mon Sep 17 00:00:00 2001
From: Michael Lotz <mmlr@mlotz.ch>
Date: Sat, 19 Dec 2015 14:44:35 +0000
Subject: [PATCH] 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.
---
source/tools/tzcode/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/tools/tzcode/Makefile.in b/source/tools/tzcode/Makefile.in
index b6ec447..d97e485 100644
--- a/source/tools/tzcode/Makefile.in
+++ b/source/tools/tzcode/Makefile.in
@@ -125,7 +125,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.2.2