Contents of /smage/trunk/core/fontconfig/fontconfig-2.8.0-r3.smage2
Parent Directory | Revision Log
Revision 1780 -
(show annotations)
(download)
Fri Sep 23 15:43:33 2011 UTC (13 years ago) by niro
File size: 2848 byte(s)
Fri Sep 23 15:43:33 2011 UTC (13 years ago) by niro
File size: 2848 byte(s)
auto added: ver bump to 2.8.0-r3
1 | # $Id$ |
2 | |
3 | PNAME="fontconfig" |
4 | PVER="2.8.0" |
5 | PBUILD="r3" |
6 | |
7 | PCATEGORIE="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.4 |
13 | >= dev-libs/expat-2" |
14 | |
15 | SDEPEND=">= virtual/sed" |
16 | |
17 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
18 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
19 | |
20 | MCORE_ONLY_KEEP="etc usr/bin/fc-cache usr/$(mlibdir)/*.so usr/$(mlibdir)/*.so.*" |
21 | sminclude multilib mtools mcore-split |
22 | |
23 | SRC_URI=( |
24 | #http://fontconfig.org/release/${SRCFILE} |
25 | http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/distfiles/${SRCFILE} |
26 | mirror://${PNAME}/${SRCFILE} |
27 | mirror://${PNAME}/fontconfig-2.2-local_fontdir-r2.patch |
28 | mirror://${PNAME}/fontconfig-2.2-local_fontdir64-r2.patch |
29 | "mirror://${PNAME}/man-2.3.1/fc-cache.man man-2.3.1" |
30 | "mirror://${PNAME}/man-2.3.1/fc-list.man man-2.3.1" |
31 | ) |
32 | |
33 | UP2DATE="updatecmd http://fontconfig.org/release/ | grep ${PNAME}- | lasttarball gz" |
34 | |
35 | src_prepare() |
36 | { |
37 | munpack ${SRCFILE} || die |
38 | |
39 | # adds local fontpathes to local.conf |
40 | if [[ $(mlibdir) != lib ]] |
41 | then |
42 | mpatch fontconfig-2.2-local_fontdir64-r2.patch || die |
43 | else |
44 | mpatch fontconfig-2.2-local_fontdir-r2.patch || die |
45 | fi |
46 | |
47 | # the date can be troublesome |
48 | all-abis 'sed -i "s:\`date\`::" configure' || die |
49 | } |
50 | |
51 | src_compile() |
52 | { |
53 | |
54 | mconfigure \ |
55 | --disable-docs \ |
56 | --with-docdir=/usr/share/doc/${PNAME}-${PVER} \ |
57 | --x-includes=/usr/include \ --x-libraries=/usr/$(mlibdir) \ |
58 | --with-default-fonts=/usr/share/fonts \ |
59 | --with-add-fonts=/usr/local/share/fonts \ |
60 | || die |
61 | |
62 | # does not like optimations |
63 | mmake -j1 || die |
64 | |
65 | # remove Luxi TTF fonts from the list, the Type1 are much better |
66 | # all-abis 'sed -i "s:<dir>/usr/$(mlibdir)/X11/fonts/TTF</dir>::" fonts.conf' || die |
67 | } |
68 | |
69 | mcore_generic_src_install() |
70 | { |
71 | minstall_destdir || die |
72 | |
73 | # install font.conf |
74 | minstallfile fonts.conf /etc/fonts || die |
75 | minstallfile fonts.conf /etc/fonts/fonts.conf.new || die |
76 | |
77 | # fc-lang directory contains language coverage datafiles |
78 | # which are needed to test the coverage of fonts. |
79 | minstalldir /usr/share/fc-lang || die |
80 | minstallfile fc-lang/\*.orth /usr/share/fc-lang || die |
81 | |
82 | # install man-pages |
83 | # we're using prebuilded man pages to prevent docbook dependencies |
84 | minstalldir /usr/share/man/man1 || die |
85 | minstallfile -s man-2.3.1/fc-cache.man /usr/share/man/man1/fc-cache.1 || die |
86 | minstallfile -s man-2.3.1/fc-list.man /usr/share/man/man1/fc-list.1 || die |
87 | } |
88 | |
89 | preinstall() |
90 | { |
91 | add_conf_prot_mask /etc/fonts |
92 | |
93 | # delete this file if it exists |
94 | [ -f ${MROOT}/etc/fonts/fonts.conf.new ] && \ |
95 | rm -f ${MROOT}/etc/fonts/fonts.conf.new |
96 | } |
97 | |
98 | postinstall() |
99 | { |
100 | echo "Creating new font cache..." |
101 | |
102 | # force update; config_protect will prevent this |
103 | mv -f ${MROOT}/etc/fonts/fonts.conf.new ${MROOT}/etc/fonts/fonts.conf |
104 | rm -f ${MROOT}/etc/fonts/._cfg????_fonts.conf |
105 | HOME="${MROOT}/root" ${MROOT}/usr/bin/fc-cache -sr |
106 | } |