Contents of /smage/branches/alx-0_6_0/core/fontconfig/fontconfig-2.8.0-r1.smage2
Parent Directory | Revision Log
Revision 1799 -
(show annotations)
(download)
Wed Apr 13 12:39:28 2011 UTC (13 years, 1 month ago) by niro
File size: 2878 byte(s)
Wed Apr 13 12:39:28 2011 UTC (13 years, 1 month ago) by niro
File size: 2878 byte(s)
auto added: ver bump to 2.8.0-r1
1 | # $Id$ |
2 | |
3 | PNAME="fontconfig" |
4 | PVER="2.8.0" |
5 | PBUILD="r1" |
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 | REMOVE_DEPRECATED_MAGE_TARGETS=1 |
22 | ALX_ONLY_KEEP="etc usr/bin/fc-cache usr/$(mlibdir)/*.so usr/$(mlibdir)/*.so.*" |
23 | sminclude multilib mtools alx-split |
24 | |
25 | SRC_URI=( |
26 | #http://fontconfig.org/release/${SRCFILE} |
27 | http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/distfiles/${SRCFILE} |
28 | mirror://${PNAME}/${SRCFILE} |
29 | mirror://${PNAME}/fontconfig-2.2-local_fontdir-r2.patch |
30 | mirror://${PNAME}/fontconfig-2.2-local_fontdir64-r2.patch |
31 | "mirror://${PNAME}/man-2.3.1/fc-cache.man man-2.3.1" |
32 | "mirror://${PNAME}/man-2.3.1/fc-list.man man-2.3.1" |
33 | ) |
34 | |
35 | UP2DATE="updatecmd http://fontconfig.org/release/ | grep ${PNAME}- | lasttarball gz" |
36 | |
37 | src_prepare() |
38 | { |
39 | munpack ${SRCFILE} || die |
40 | |
41 | # adds local fontpathes to local.conf |
42 | if [[ $(mlibdir) != lib ]] |
43 | then |
44 | mpatch fontconfig-2.2-local_fontdir64-r2.patch || die |
45 | else |
46 | mpatch fontconfig-2.2-local_fontdir-r2.patch || die |
47 | fi |
48 | |
49 | # the date can be troublesome |
50 | all-abis 'sed -i "s:\`date\`::" configure' || die |
51 | } |
52 | |
53 | src_compile() |
54 | { |
55 | |
56 | mconfigure \ |
57 | --disable-docs \ |
58 | --with-docdir=/usr/share/doc/${PNAME}-${PVER} \ |
59 | --x-includes=/usr/include \ --x-libraries=/usr/$(mlibdir) \ |
60 | --with-default-fonts=/usr/share/fonts \ |
61 | --with-add-fonts=/usr/local/share/fonts \ |
62 | || die |
63 | |
64 | # does not like optimations |
65 | mmake -j1 || die |
66 | |
67 | # remove Luxi TTF fonts from the list, the Type1 are much better |
68 | # all-abis 'sed -i "s:<dir>/usr/$(mlibdir)/X11/fonts/TTF</dir>::" fonts.conf' || die |
69 | } |
70 | |
71 | alx_generic_src_install() |
72 | { |
73 | minstall_destdir || die |
74 | |
75 | # install font.conf |
76 | minstallfile fonts.conf /etc/fonts || die |
77 | minstallfile fonts.conf /etc/fonts/fonts.conf.new || die |
78 | |
79 | # fc-lang directory contains language coverage datafiles |
80 | # which are needed to test the coverage of fonts. |
81 | minstalldir /usr/share/fc-lang || die |
82 | minstallfile fc-lang/\*.orth /usr/share/fc-lang || die |
83 | |
84 | # install man-pages |
85 | # we're using prebuilded man pages to prevent docbook dependencies |
86 | minstalldir /usr/share/man/man1 || die |
87 | minstallfile -s man-2.3.1/fc-cache.man /usr/share/man/man1/fc-cache.1 || die |
88 | minstallfile -s man-2.3.1/fc-list.man /usr/share/man/man1/fc-list.1 || die |
89 | } |
90 | |
91 | preinstall() |
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 | |
107 | alx_postinstall |
108 | } |