Ticket #16975: icu_bootstrap-67.1.recipe

File icu_bootstrap-67.1.recipe, 7.3 KB (added by tqh, 3 years ago)
Line 
1SUMMARY="Libraries to support Unicode and globalization"
2SUMMARY_devel="The ICU development files"
3DESCRIPTION="International Components for Unicode (ICU) is a mature, widely \
4used set of C/C++ and Java libraries providing Unicode and Globalization \
5support for software applications. ICU is widely portable and gives \
6applications the same results on all platforms and between C/C++ and Java \
7software.
8ICU is released under a nonrestrictive open source license that is suitable \
9for use with both commercial software and with other open source or free \
10software.
11
12Here are a few highlights of the services provided by ICU:
13
14* Code Page Conversion: Convert text data to or from Unicode and nearly any \
15other character set or encoding. ICU's conversion tables are based on charset \
16data collected by IBM over the course of many decades, and is the most \
17complete available anywhere.
18* Collation: Compare strings according to the conventions and standards of a \
19particular language, region or country. ICU's collation is based on the \
20Unicode Collation Algorithm plus locale-specific comparison rules from the \
21Common Locale Data Repository, a comprehensive source for this type of data.
22* Formatting: Format numbers, dates, times and currency amounts according the \
23conventions of a chosen locale. This includes translating month and day names \
24into the selected language, choosing appropriate abbreviations, ordering \
25fields correctly, etc. This data also comes from the Common Locale Data \
26Repository.
27* Time Calculations: Multiple types of calendars are provided beyond the \
28traditional Gregorian calendar. A thorough set of timezone calculation APIs \
29are provided.
30* Unicode Support: ICU closely tracks the Unicode standard, providing easy \
31access to all of the many Unicode character properties, Unicode Normalization, \
32Case Folding and other fundamental operations as specified by the Unicode \
33Standard.
34* Regular Expression: ICU's regular expressions fully support Unicode while \
35providing very competitive performance.
36* Bidi: support for handling text containing a mixture of left to right \
37(English) and right to left (Arabic or Hebrew) data.
38* Text Boundaries: Locate the positions of words, sentences, paragraphs within \
39a range of text, or identify locations that would be suitable for line \
40wrapping when displaying the text."
41HOMEPAGE="http://www.icu-project.org"
42COPYRIGHT="1995-2020 IBM Corporation and others."
43LICENSE="ICU"
44REVISION="1"
45SOURCE_URI="https://github.com/unicode-org/icu/releases/download/release-67-1/icu4c-67_1-src.tgz"
46SOURCE_URI_2="https://github.com/unicode-org/icu/releases/download/release-67-1/icu4c-67_1-data.zip#noarchive"
47#SOURCE_URI_3="http://www.iana.org/time-zones/repository/releases/tzdata2019c.tar.gz#noarchive"
48CHECKSUM_SHA256="94a80cd6f251a53bd2a997f6f1b5ac6653fe791dfab66e1eb0227740fb86d5dc"
49CHECKSUM_SHA256_2="7c16a59cc8c06128b7ecc1dc4fc056b36b17349312829b17408b9e67b05c4a7e"
50SOURCE_DIR="icu"
51PATCHES="icu66-66.1.patchset"
52
53ARCHITECTURES="arm64"
54# leave inactive until full testing can be done
55SECONDARY_ARCHITECTURES="!x86"
56
57PROVIDES="
58 icu$secondaryArchSuffix = $portVersion compat >= 67
59 lib:libicudata$secondaryArchSuffix = $portVersion compat >= 67
60 lib:libicui18n$secondaryArchSuffix = $portVersion compat >= 67
61 lib:libicuio$secondaryArchSuffix = $portVersion compat >= 67
62 lib:libicutest$secondaryArchSuffix = $portVersion compat >= 67
63 lib:libicutu$secondaryArchSuffix = $portVersion compat >= 67
64 lib:libicuuc$secondaryArchSuffix = $portVersion compat >= 67
65 "
66REQUIRES="
67 haiku$secondaryArchSuffix
68 "
69
70PROVIDES_devel="
71 icu_bootstrap${secondaryArchSuffix}_devel = $portVersion
72 cmd:icu_config${secondaryArchSuffix} = $portVersion compat >= 67
73 devel:libicudata${secondaryArchSuffix} = $portVersion compat >= 67
74 devel:libicui18n${secondaryArchSuffix} = $portVersion compat >= 67
75 devel:libicuio${secondaryArchSuffix} = $portVersion compat >= 67
76 devel:libicutest${secondaryArchSuffix} = $portVersion compat >= 67
77 devel:libicutu${secondaryArchSuffix} = $portVersion compat >= 67
78 devel:libicuuc${secondaryArchSuffix} = $portVersion compat >= 67
79 "
80REQUIRES_devel="
81 icu${secondaryArchSuffix} == $portVersion base
82 "
83
84if [ -z "$secondaryArchSuffix" ]; then
85 SUMMARY_tools="The ICU support tools"
86 PROVIDES_tools="
87 icu_tools = $portVersion
88 cmd:derb
89 cmd:escapesrc
90 cmd:genbrk
91 cmd:genccode
92 cmd:gencfu
93 cmd:gencmn
94 cmd:gencnval
95 cmd:gendict
96 cmd:gennorm2
97 cmd:genrb
98 cmd:gensprep
99 cmd:icuinfo
100 cmd:icupkg
101 cmd:makeconv
102 cmd:pkgdata
103 "
104 REQUIRES_tools="
105 icu == $portVersion base
106 haiku
107 "
108fi
109
110BUILD_REQUIRES="
111 gcc${secondaryArchSuffix}_syslibs_devel
112 "
113BUILD_PREREQUIRES="
114 haiku${secondaryArchSuffix}_devel
115 cmd:autoconf
116 cmd:awk
117 cmd:gcc$secondaryArchSuffix
118 cmd:ld$secondaryArchSuffix
119 cmd:make
120 cmd:sed
121 "
122
123sourceDir=$(pwd)
124buildOutputDir=$sourceDir/../icu-build
125targetOutputDir=$sourceDir/../icu-target
126
127BUILD()
128{
129 cd source
130
131 # Created during build and prevent rebuilds.
132 #rm -rf tools/tzcode/vanguard
133 #cp ../../../sources-3/tzdata*.tar.gz tools/tzcode/
134
135 unzip -oq ../../../sources-2/icu4c-*-data.zip
136 rm -f data/in/icudt??l.dat
137 autoconf
138
139 # make build-architecture-specific output directory and build ICU for the
140 # current architecture
141 mkdir -p $buildOutputDir
142 cd $buildOutputDir
143 runConfigure ../icu/source/configure \
144 --disable-samples --disable-extras --with-data-packaging=archive
145 make $jobArgs
146
147 # now make target-architecture-specific output directory and build ICU for
148 # the target architecture, pointing at the directory containing the version
149 # that's just been built for the build architecture
150 mkdir -p $targetOutputDir
151 cd $targetOutputDir
152 runConfigure ../icu/source/configure \
153 --host=$effectiveTargetMachineTriple \
154 --with-cross-build=$buildOutputDir \
155 --disable-samples --disable-extras --with-data-packaging=archive
156 make $jobArgs
157}
158
159INSTALL()
160{
161 cd $targetOutputDir
162 make DESTDIR=$installDestDir install
163
164 prepareInstalledDevelLibs \
165 libicudata \
166 libicui18n \
167 libicuio \
168 libicutest \
169 libicutu \
170 libicuuc
171 fixPkgconfig
172
173 # Update icu-config to point to the develop/lib dir
174 fixDevelopLibDirReferences \
175 $installDestDir$binDir/icu-config
176
177 # Rename the data/icu directory when built for the secondary architecture,
178 # so that it doesn't clash with the primary package's.
179 if [ -n "$secondaryArchSuffix" ]; then
180 mv $installDestDir$dataDir/icu \
181 $installDestDir$dataDir/icu$secondaryArchSuffix
182 # TODO: The icu-config, the Makefile.inc, and possibly other files need
183 # to be adjusted as well. They are probably also not quite correct for
184 # the primary architecture (lib vs. develop/lib).
185 fi
186
187 # devel package
188 packageEntries devel \
189 $installDestDir$developDir \
190 $installDestDir$dataDir/icu$secondaryArchSuffix \
191 $installDestDir$libDir/icu \
192 $installDestDir$binDir/icu-config \
193 $installDestDir$manDir/man1/icu-config.1
194
195 rm -r $installDestDir$binDir $installDestDir$manDir
196}
197
198TEST()
199{
200 cd source
201 make check
202}