185 lines
5.7 KiB
Bash
185 lines
5.7 KiB
Bash
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="2"
|
|
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/tzdata2020f.tar.gz#noarchive"
|
|
CHECKSUM_SHA256="52a3f2209ab95559c1cf0a14f24338001f389615bf00e2585ef3dbc43ecf0a2e"
|
|
CHECKSUM_SHA256_2="8be647f738891d2beb79d48f99077b3499948430eae6f1be112553b15ab0243e"
|
|
CHECKSUM_SHA256_3="121131918c3ae6dc5d40f0eb87563a2be920b71a76e2392c09519a5e4a666881"
|
|
SOURCE_DIR="icu"
|
|
PATCHES="icu66-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="all !x86_gcc2 ?x86"
|
|
# leave inactive until full testing can be done
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
icu66$secondaryArchSuffix = $portVersion compat >= 66
|
|
lib:libicudata$secondaryArchSuffix = $portVersion compat >= 66
|
|
lib:libicui18n$secondaryArchSuffix = $portVersion compat >= 66
|
|
lib:libicuio$secondaryArchSuffix = $portVersion compat >= 66
|
|
lib:libicutest$secondaryArchSuffix = $portVersion compat >= 66
|
|
lib:libicutu$secondaryArchSuffix = $portVersion compat >= 66
|
|
lib:libicuuc$secondaryArchSuffix = $portVersion compat >= 66
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
icu66${secondaryArchSuffix}_devel = $portVersion
|
|
cmd:icu_config${secondaryArchSuffix} = $portVersion compat >= 66
|
|
devel:libicudata${secondaryArchSuffix} = $portVersion compat >= 66
|
|
devel:libicui18n${secondaryArchSuffix} = $portVersion compat >= 66
|
|
devel:libicuio${secondaryArchSuffix} = $portVersion compat >= 66
|
|
devel:libicutest${secondaryArchSuffix} = $portVersion compat >= 66
|
|
devel:libicutu${secondaryArchSuffix} = $portVersion compat >= 66
|
|
devel:libicuuc${secondaryArchSuffix} = $portVersion compat >= 66
|
|
"
|
|
REQUIRES_devel="
|
|
icu66${secondaryArchSuffix} == $portVersion base
|
|
"
|
|
|
|
if [ -z "$secondaryArchSuffix" ]; then
|
|
SUMMARY_tools="The ICU support tools"
|
|
PROVIDES_tools="
|
|
icu66_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="
|
|
icu66 == $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: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/
|
|
|
|
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
|
|
}
|