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