1 # Build recipe for gettext.
3 # Copyright (c) 2016-2017 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 tarname=${program}-${version}.tar.lz
24 fetch=http://ftp.gnu.org/pub/gnu/gettext/$tarname
27 Utilities for internationalization and localization.
29 The Gettext package contains utilities for internationalization and
30 localization. These allow programs to be compiled with NLS (Native
31 Language Support), enabling them to output messages in the user's
35 homepage=http://www.gnu.org/software/gettext
36 license="GPLv3+, LGPLv2.1"
38 # Source documentation
39 docsdir="${docdir}/${program}-${version}"
45 unpack "${tardir}/$tarname"
50 CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
52 --libdir=/usr/lib${libSuffix} \
59 --build="$(cc -dumpmachine)"
62 make -j${jobs} DESTDIR="$destdir" install-strip
64 # Fix library permission if needed
65 if test -f "${destdir}/usr/lib${libSuffix}/preloadable_libintl.so"
67 chmod 755 "${destdir}/usr/lib${libSuffix}/preloadable_libintl.so"
70 # Remove generated charset.alias
71 rm -f "${destdir}/usr/lib${libSuffix}/charset.alias"
73 # Compress info documents deleting index file for the package
74 if test -d "${destdir}/$infodir"
76 rm -f "${destdir}/${infodir}/dir"
77 lzip -9 "${destdir}/${infodir}"/*
80 # Compress and link man pages (if needed)
81 if test -d "${destdir}/$mandir"
84 cd "${destdir}/$mandir"
85 find . -type f -exec lzip -9 '{}' +
86 find . -type l | while read -r file
88 ln -sf "$(readlink -- "$file").lz" "${file}.lz"