1 # Build recipe for icu.
3 # Copyright (c) 2019 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.
21 # Set custom name and custom version for the package
25 # Define hash tag to categorize the package name output
28 tarname=${program}-${version}-src.tgz
31 fetch="http://github.com/unicode-org/icu/releases/download/release-$(printf $version | tr _ -)/$tarname"
34 International Components for Unicode.
36 The International Components for Unicode (icu) package is a mature,
37 widely used set of C/C++ libraries providing Unicode and
38 Globalization support for software applications. ICU is widely
39 portable and gives applications the same results on all platforms.
42 homepage=http://site.icu-project.org
45 # Source documentation
46 docs="LICENSE icu4c.css license.html readme.html"
47 docsdir="${docdir}/${program}-${version}"
49 # The source has a custom source directory
56 unpack "${tardir}/$tarname"
60 # Set sane permissions
61 chmod -R u+w,go-w,a+rX-s .
63 ./configure CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" \
64 LDFLAGS="$QILDFLAGS" \
66 --libdir=/usr/lib${libSuffix} \
74 --build="$(cc -dumpmachine)"
77 make -j${jobs} DESTDIR="$destdir" install
83 mkdir -p "${destdir}${docsdir}"
84 cp -p $docs "${destdir}${docsdir}"
86 # Compress and link man pages (if needed)
87 if test -d "${destdir}/$mandir"
90 cd "${destdir}/$mandir"
91 find . -type f -exec lzip -9 '{}' +
92 find . -type l | while read -r file
94 ln -sf "$(readlink -- "$file").lz" "${file}.lz"