Contents of /trunk/core/fontconfig/fontconfig-2.12.2-r1.smage2
Parent Directory | Revision Log
Revision 29340 -
(show annotations)
(download)
Thu Jun 1 10:33:37 2017 UTC (7 years ago) by niro
File size: 2461 byte(s)
Thu Jun 1 10:33:37 2017 UTC (7 years ago) by niro
File size: 2461 byte(s)
auto added: ver bump to 2.12.2-r1
1 | # $Id$ |
2 | |
3 | PNAME="fontconfig" |
4 | PVER="2.12.2" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="media-libs" |
8 | |
9 | DESCRIPTION="fontconfig is a library for configuring and customizing font access." |
10 | HOMEPAGE="http://fontconfig.org/" |
11 | |
12 | DEPEND=">= media-libs/freetype-2.6 |
13 | >= dev-libs/expat-2" |
14 | |
15 | SDEPEND=">= virtual/sed |
16 | >= dev-util/gperf-3.1" |
17 | |
18 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
19 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
20 | |
21 | sminclude multilib mtools |
22 | |
23 | SRC_URI=( |
24 | http://fontconfig.org/release/${SRCFILE} |
25 | mirror://${PNAME}/${SRCFILE} |
26 | "mirror://${PNAME}/man-2.3.1/fc-cache.man man-2.3.1" |
27 | "mirror://${PNAME}/man-2.3.1/fc-list.man man-2.3.1" |
28 | mirror://${PNAME}/${PNAME}-2.12.1-freetype-271.patch |
29 | ) |
30 | |
31 | UP2DATE="updatecmd http://fontconfig.org/release/ | grep ${PNAME}- | highesttarball gz" |
32 | |
33 | src_prepare() |
34 | { |
35 | munpack ${SRCFILE} || die |
36 | |
37 | # fix ftbfs with freetype-2.7.1 |
38 | mpatch ${PNAME}-2.12.1-freetype-271.patch || die |
39 | |
40 | # required by gperf-3.1 patch |
41 | mautoreconf || die |
42 | } |
43 | |
44 | src_compile() |
45 | { |
46 | mconfigure \ |
47 | --disable-docs \ |
48 | --with-docdir=/usr/share/doc/${PNAME}-${PVER} \ |
49 | --x-includes=/usr/include \ |
50 | --x-libraries=/usr/$(mlibdir) \ |
51 | --with-default-fonts=/usr/share/fonts \ |
52 | --with-add-fonts=/usr/local/share/fonts \ |
53 | || die |
54 | |
55 | # does not like optimations |
56 | mmake -j1 || die |
57 | |
58 | # remove Luxi TTF fonts from the list, the Type1 are much better |
59 | # all-abis 'sed -i "s:<dir>/usr/$(mlibdir)/X11/fonts/TTF</dir>::" fonts.conf' || die |
60 | } |
61 | |
62 | src_install() |
63 | { |
64 | mmake DESTDIR=${BINDIR} install || die |
65 | |
66 | # install font.conf |
67 | minstallfile fonts.conf /etc/fonts || die |
68 | minstallfile fonts.conf /etc/fonts/fonts.conf.new || die |
69 | |
70 | # fc-lang directory contains language coverage datafiles |
71 | # which are needed to test the coverage of fonts. |
72 | minstalldir /usr/share/fc-lang || die |
73 | minstallfile fc-lang/\*.orth /usr/share/fc-lang || die |
74 | |
75 | # install man-pages |
76 | # we're using prebuilded man pages to prevent docbook dependencies |
77 | minstalldir /usr/share/man/man1 || die |
78 | minstallfile -s man-2.3.1/fc-cache.man /usr/share/man/man1/fc-cache.1 || die |
79 | minstallfile -s man-2.3.1/fc-list.man /usr/share/man/man1/fc-list.1 || die |
80 | } |
81 | |
82 | preinstall() |
83 | { |
84 | # delete this file if it exists |
85 | [ -f ${MROOT}/etc/fonts/fonts.conf.new ] && \ |
86 | rm -f ${MROOT}/etc/fonts/fonts.conf.new |
87 | } |
88 | |
89 | postinstall() |
90 | { |
91 | echo "Creating new font cache..." |
92 | |
93 | # force update; config_protect will prevent this |
94 | mv -f ${MROOT}/etc/fonts/fonts.conf.new ${MROOT}/etc/fonts/fonts.conf |
95 | rm -f ${MROOT}/etc/fonts/._cfg????_fonts.conf |
96 | HOME="${MROOT}/root" ${MROOT}/usr/bin/fc-cache -sr |
97 | } |