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>.
5 # Copyright (c) 2022 Matias Fonzo, <selk@dragora.org>.
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 # Exit immediately on any error
26 # Define a category for the output of the package name
29 # The installation of this package replaces to
30 replace=fontconfig-pass1
33 Library for font configuration.
35 The fontconfig package is a library for configuring and customizing
39 homepage=https://www.freedesktop.org/wiki/Software/fontconfig/
42 tarname=${program}-${version}.tar.gz
45 fetch=https://www.freedesktop.org/software/fontconfig/release/$tarname
47 # Source documentation
48 docs="AUTHORS COPYING ChangeLog NEWS README"
49 docsdir="${docdir}/${program}-${version}"
52 unpack "${tardir}/$tarname"
56 # Set sane permissions
57 chmod -R u+w,go-w,a+rX-s .
59 # Make sure the system regenerates src/fcobjshash.h (Thanks to BLFS!)
60 rm -f src/fcobjshash.h
62 ./configure CPPFLAGS="$QICPPFLAGS" \
63 CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
65 --libdir=/usr/lib${libSuffix} \
67 --with-docdir=$docsdir \
71 --build="$(gcc -dumpmachine)"
74 make -j${jobs} DESTDIR="$destdir" install-strip
76 # Compress manual pages
77 if [ -d "${destdir}/$mandir" ] ; then
79 cd "${destdir}/$mandir"
80 find . -type f -exec lzip -9 {} +
81 find . -type l | while read -r file
83 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
90 mkdir -p "${destdir}/$docsdir"
91 cp -p $docs "${destdir}/$docsdir"