Magellan Linux

Contents of /trunk/core/fontconfig/fontconfig-2.9.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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