etc: Enable a tty for a serial port by default.
[dragora.git] / recipes / x-libs / fontconfig / recipe
blob4a396e7a9e3015c68ba27ee4119f692b45dd00bf
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
20 set -e
22 program=fontconfig
23 version=2.14.1
24 release=1
26 # Define a category for the output of the package name
27 pkgcategory=x-libs
29 # The installation of this package replaces to
30 replace=fontconfig-pass1
32 description="
33 Library for font configuration.
35 The fontconfig package is a library for configuring and customizing
36 font access.
39 homepage=https://www.freedesktop.org/wiki/Software/fontconfig/
40 license=Custom
42 tarname=${program}-${version}.tar.gz
44 # Remote source(s)
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}"
51 build() {
52     unpack "${tardir}/$tarname"
54     cd "$srcdir"
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" \
64     $configure_args \
65     --libdir=/usr/lib${libSuffix} \
66     --mandir=$mandir \
67     --with-docdir=$docsdir \
68     --disable-static \
69     --enable-shared \
70     --disable-gtk-doc \
71     --build="$(gcc -dumpmachine)"
73     make -j${jobs} V=1
74     make -j${jobs} DESTDIR="$destdir" install-strip
76     # Compress manual pages
77     if [ -d "${destdir}/$mandir" ] ; then
78         (
79             cd "${destdir}/$mandir"
80             find . -type f -exec lzip -9 {} +
81             find . -type l | while read -r file
82             do
83                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
84                 rm -- "$file"
85             done
86         )
87     fi
89     # Copy documentation
90     mkdir -p "${destdir}/$docsdir"
91     cp -p $docs "${destdir}/$docsdir"