1 # Build recipe for icu.
3 # Copyright (c) 2019-2022 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # Exit immediately on any error
24 # Set custom name and custom version for the package
26 pkgversion="$(echo $version | tr _ .)"
28 # Define a category for the output of the package name
31 tarname=${program}-${version}-src.tgz
34 fetch="https://github.com/unicode-org/icu/releases/download/release-$(printf $version | tr _ -)/$tarname"
37 International Components for Unicode.
39 The International Components for Unicode (icu) package is a mature,
40 widely used set of C/C++ libraries providing Unicode and
41 Globalization support for software applications. ICU is widely
42 portable and gives applications the same results on all platforms.
45 homepage=https://site.icu-project.org
48 # Source documentation
49 docs="LICENSE icu4c.css license.html readme.html"
50 docsdir="${docdir}/${program}-${version}"
52 # The source has a custom source directory
57 unpack "${tardir}/$tarname"
61 # Set sane permissions
62 chmod -R u+w,go-w,a+rX-s .
64 ./configure CC=gcc CXX=g++ \
65 CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" \
66 LDFLAGS="$QILDFLAGS" \
68 --libdir=/usr/lib${libSuffix} \
75 --build="$(gcc -dumpmachine)"
78 make -j${jobs} DESTDIR="$destdir" install
84 mkdir -p "${destdir}${docsdir}"
85 cp -p $docs "${destdir}${docsdir}"
87 # Compress and link man pages (if needed)
88 if test -d "${destdir}/$mandir"
91 cd "${destdir}/$mandir"
92 find . -type f -exec lzip -9 {} +
93 find . -type l | while read -r file
95 ln -sf "$(readlink -- "$file").lz" "${file}.lz"