/
icu-57.1.recipe
197 lines (182 loc) · 6.41 KB
/
icu-57.1.recipe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
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
}