1 # Recipe file for freetype.
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.
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/x-libs"
25 # The installation of this package replaces to
26 replace=freetype_pass1
28 tarname=${program}-${version}.tar.bz2
31 fetch=http://download.savannah.gnu.org/releases/freetype/$tarname
36 FreeType is a software font engine that is designed to be small,
37 efficient, highly customizable, and portable while capable of
38 producing high-quality output (glyph images). It can be used in
39 graphics libraries, display servers, font conversion tools,
40 text image generation tools, and many other products as well.
43 homepage=http://www.freetype.org/
44 license="GPLv2 | FreeType License (FTL)"
46 # Source documentation
47 docs="ChangeLog* README*"
48 docsdir="${docdir}/${program}-${version}"
53 unpack "${tardir}/$tarname"
57 # Set sane permissions
58 chmod -R u+w,go-w,a+rX-s .
60 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
62 --libdir=/usr/lib${libSuffix} \
71 --build="$(cc -dumpmachine)" \
72 ac_cv_prog_RC= ac_cv_prog_ac_ct_RC=
75 make -j${jobs} DESTDIR="$destdir" install
77 # Strip remaining binaries and libraries
78 find "$destdir" -type f | xargs file | \
79 awk '/ELF/ && /executable/ || /shared object/' | \
80 cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
82 # Compress manual pages
83 if [ -d "${destdir}/$mandir" ] ; then
85 cd "${destdir}/$mandir"
86 find . -type f -exec lzip -9 '{}' +
87 find . -type l | while read -r file
89 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
96 mkdir -p "${destdir}${docsdir}"
97 cp -p $docs "${destdir}${docsdir}/"