icu-60.1.recipe revision 3524e614
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-2017 IBM Corporation and others."
43LICENSE="ICU"
44REVISION="1"
45SOURCE_URI="https://ssl.icu-project.org/files/icu4c/$portVersion/icu4c-60_1-src.tgz"
46SOURCE_URI_2="http://www.iana.org/time-zones/repository/releases/tzdata2017c.tar.gz#noarchive"
47SOURCE_URI_3="https://ssl.icu-project.org/files/icu4c/$portVersion/icu4c-60_1-data.zip#noarchive"
48CHECKSUM_SHA256="f8f5a6c8fbf32c015a467972bdb1477dc5f5d5dfea908b6ed218715eeb5ee225"
49CHECKSUM_SHA256_2="d6543f92a929826318e2f44ff3a7611ce5f565a43e10250b42599d0ba4cbd90b"
50CHECKSUM_SHA256_3="bbb920c6e67de8d9dcc0f0ec5554870170d0cb5eff6f0bc9881efc605f68210c"
51SOURCE_DIR="icu"
52PATCHES="icu-$portVersion.patchset"
53
54ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64 ?arm sparc"
55# leave inactive until full testing can be done
56SECONDARY_ARCHITECTURES="?x86"
57
58PROVIDES="
59	icu$secondaryArchSuffix = $portVersion compat >= 60
60	lib:libicudata$secondaryArchSuffix = $portVersion compat >= 60
61	lib:libicui18n$secondaryArchSuffix = $portVersion compat >= 60
62	lib:libicuio$secondaryArchSuffix = $portVersion compat >= 60
63	lib:libicutest$secondaryArchSuffix = $portVersion compat >= 60
64	lib:libicutu$secondaryArchSuffix = $portVersion compat >= 60
65	lib:libicuuc$secondaryArchSuffix = $portVersion compat >= 60
66	"
67REQUIRES="
68	haiku$secondaryArchSuffix
69	"
70
71PROVIDES_devel="
72	icu${secondaryArchSuffix}_devel = $portVersion
73	cmd:icu_config${secondaryArchSuffix} = $portVersion compat >= 60
74	devel:libicudata${secondaryArchSuffix} = $portVersion compat >= 60
75	devel:libicui18n${secondaryArchSuffix} = $portVersion compat >= 60
76	devel:libicuio${secondaryArchSuffix} = $portVersion compat >= 60
77	devel:libicutest${secondaryArchSuffix} = $portVersion compat >= 60
78	devel:libicutu${secondaryArchSuffix} = $portVersion compat >= 60
79	devel:libicuuc${secondaryArchSuffix} = $portVersion compat >= 60
80	"
81REQUIRES_devel="
82	icu${secondaryArchSuffix} == $portVersion base
83	"
84
85if [ -z "$secondaryArchSuffix" ]; then
86	SUMMARY_tools="The ICU support tools"
87	PROVIDES_tools="
88		icu_tools = $portVersion
89		cmd:derb
90		cmd:escapesrc
91		cmd:genbrk
92		cmd:genccode
93		cmd:gencfu
94		cmd:gencmn
95		cmd:gencnval
96		cmd:gendict
97		cmd:gennorm2
98		cmd:genrb
99		cmd:gensprep
100		cmd:icuinfo
101		cmd:icupkg
102		cmd:makeconv
103		cmd:pkgdata
104		"
105	REQUIRES_tools="
106		icu == $portVersion base
107		haiku
108		"
109fi
110
111BUILD_REQUIRES="
112	haiku${secondaryArchSuffix}_devel
113	"
114BUILD_PREREQUIRES="
115	cmd:autoconf
116	cmd:awk
117	cmd:gcc$secondaryArchSuffix
118	cmd:ld$secondaryArchSuffix
119	cmd:make
120	cmd:pkg_config$secondaryArchSuffix
121	cmd:sed
122	cmd:unzip
123	cmd:tar
124	cmd:gunzip
125	"
126
127BUILD()
128{
129	cd source
130	cp ../../../sources-2/tzdata*.tar.gz tools/tzcode/
131	unzip -oq ../../../sources-3/icu4c-*-data.zip
132	rm -f data/in/icudt??l.dat
133	autoconf
134	runConfigure ./configure \
135		--disable-samples --disable-extras
136	make $jobArgs
137}
138
139INSTALL()
140{
141	cd source
142	make install
143
144	prepareInstalledDevelLibs \
145		libicudata \
146		libicui18n \
147		libicuio \
148		libicutest \
149		libicutu \
150		libicuuc
151	fixPkgconfig
152
153	# Update icu-config to point to the develop/lib dir
154	fixDevelopLibDirReferences \
155		$binDir/icu-config
156
157	# Rename the data/icu directory when built for the secondary architecture,
158	# so that it doesn't clash with the primary package's.
159	if [ -n "$secondaryArchSuffix" ]; then
160		mv $dataDir/icu $dataDir/icu$secondaryArchSuffix
161		# TODO: The icu-config, the Makefile.inc, and possibly other files need
162		# to be adjusted as well. They are probably also not quite correct for
163		# the primary architecture (lib vs. develop/lib).
164	fi
165
166	# devel package
167	packageEntries devel \
168		$developDir \
169		$dataDir/icu$secondaryArchSuffix \
170		$libDir/icu \
171		$binDir/icu-config \
172		$manDir/man1/icu-config.1
173
174	# tools package
175	if [ -z "$secondaryArchSuffix" ]; then
176		packageEntries tools \
177			$binDir \
178			$manDir
179	else
180		rm -r $binDir $manDir
181	fi
182}
183
184TEST()
185{
186	cd source
187	make check
188}
189