1 # Recipe file for freetype.
3 # Copyright (c) 2017 Mateus P. Rodrigues, <mprodrigues@dragora.org>.
4 # Copyright (c) 2017-2018, 2022-2023 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=freetype-pass1
31 tarname=${program}-${version}.tar.gz
34 fetch=https://download.savannah.gnu.org/releases/freetype/$tarname
39 FreeType is a software font engine that is designed to be small,
40 efficient, highly customizable, and portable while capable of
41 producing high-quality output (glyph images). It can be used in
42 graphics libraries, display servers, font conversion tools,
43 text image generation tools, and many other products as well.
46 homepage=https://www.freetype.org/
47 license="GPLv2 | FreeType License (FTL)"
49 # Source documentation
50 docs="ChangeLog* README*"
51 docsdir="${docdir}/${program}-${version}"
54 unpack "${tardir}/$tarname"
58 # Set sane permissions
59 chmod -R u+w,go-w,a+rX-s .
61 ./configure CPPFLAGS="$QICPPFLAGS" \
62 CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
64 --libdir=/usr/lib${libSuffix} \
73 --build="$(gcc -dumpmachine)" \
74 ac_cv_prog_RC= ac_cv_prog_ac_ct_RC=
77 make -j${jobs} DESTDIR="$destdir" install
79 # Strip remaining binaries and libraries
80 find "$destdir" -type f | xargs file | \
81 awk '/ELF/ && /executable/ || /shared object/' | \
82 cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
84 # Compress manual pages
85 if [ -d "${destdir}/$mandir" ] ; then
87 cd "${destdir}/$mandir"
88 find . -type f -exec lzip -9 {} +
89 find . -type l | while read -r file
91 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
98 mkdir -p "${destdir}/$docsdir"
99 cp -p $docs "${destdir}/$docsdir"