1 # Build recipe for fontconfig.
3 # Copyright (c) 2017 Mateus P. Rodrigues, <mprodrigues@dragora.org>.
4 # Copyright (c) 2017-2018 Matias Fonzo, <selk@dragora.org>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # Exit immediately on any error
25 # Define a category for the output of the package name
28 # The installation of this package replaces to
29 replace=fontconfig-pass1
32 Library for font configuration.
34 The fontconfig package is a library for configuring and customizing
38 homepage=https://www.freedesktop.org/wiki/Software/fontconfig/
41 tarname=${program}-${version}.tar.bz2
44 fetch=https://www.freedesktop.org/software/fontconfig/release/$tarname
46 # Source documentation
47 docs="AUTHORS COPYING ChangeLog NEWS README"
48 docsdir="${docdir}/${program}-${version}"
51 unpack "${tardir}/$tarname"
55 # Set sane permissions
56 chmod -R u+w,go-w,a+rX-s .
58 # Make sure the system regenerates src/fcobjshash.h (Thanks to BLFS!)
59 rm -f src/fcobjshash.h
61 ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
63 --libdir=/usr/lib${libSuffix} \
65 --with-docdir=$docsdir \
69 --build="$(gcc -dumpmachine)"
72 make -j${jobs} DESTDIR="$destdir" install-strip
74 # Compress manual pages
75 if [ -d "${destdir}/$mandir" ] ; then
77 cd "${destdir}/$mandir"
78 find . -type f -exec lzip -9 {} +
79 find . -type l | while read -r file
81 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
88 mkdir -p "${destdir}/$docsdir"
89 cp -p $docs "${destdir}/$docsdir"