Magellan Linux

Annotation of /branches/R11-stable/core/fontconfig/fontconfig-2.11.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 20114 - (hide annotations) (download)
Tue Nov 26 10:18:45 2013 UTC (10 years, 6 months ago) by niro
File size: 2199 byte(s)
-release branches/R11-stable
1 niro 19744 # $Id$
2    
3     PNAME="fontconfig"
4     PVER="2.11.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.5
13     >= dev-libs/expat-2"
14    
15     SDEPEND=">= virtual/sed"
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}/man-2.3.1/fc-cache.man man-2.3.1"
26     "mirror://${PNAME}/man-2.3.1/fc-list.man man-2.3.1"
27     )
28    
29     UP2DATE="updatecmd http://fontconfig.org/release/ | grep ${PNAME}- | lasttarball gz"
30    
31     src_compile()
32     {
33     mconfigure \
34     --disable-docs \
35     --with-docdir=/usr/share/doc/${PNAME}-${PVER} \
36     --x-includes=/usr/include \
37     --x-libraries=/usr/$(mlibdir) \
38     --with-default-fonts=/usr/share/fonts \
39     --with-add-fonts=/usr/local/share/fonts \
40     || die
41    
42     # does not like optimations
43     mmake -j1 || die
44    
45     # remove Luxi TTF fonts from the list, the Type1 are much better
46     # all-abis 'sed -i "s:<dir>/usr/$(mlibdir)/X11/fonts/TTF</dir>::" fonts.conf' || die
47     }
48    
49     src_install()
50     {
51     mmake DESTDIR=${BINDIR} install || die
52    
53     # install font.conf
54     minstallfile fonts.conf /etc/fonts || die
55     minstallfile fonts.conf /etc/fonts/fonts.conf.new || die
56    
57     # fc-lang directory contains language coverage datafiles
58     # which are needed to test the coverage of fonts.
59     minstalldir /usr/share/fc-lang || die
60     minstallfile fc-lang/\*.orth /usr/share/fc-lang || die
61    
62     # install man-pages
63     # we're using prebuilded man pages to prevent docbook dependencies
64     minstalldir /usr/share/man/man1 || die
65     minstallfile -s man-2.3.1/fc-cache.man /usr/share/man/man1/fc-cache.1 || die
66     minstallfile -s man-2.3.1/fc-list.man /usr/share/man/man1/fc-list.1 || die
67     }
68    
69     preinstall()
70     {
71     # delete this file if it exists
72     [ -f ${MROOT}/etc/fonts/fonts.conf.new ] && \
73     rm -f ${MROOT}/etc/fonts/fonts.conf.new
74     }
75    
76     postinstall()
77     {
78     echo "Creating new font cache..."
79    
80     # force update; config_protect will prevent this
81     mv -f ${MROOT}/etc/fonts/fonts.conf.new ${MROOT}/etc/fonts/fonts.conf
82     rm -f ${MROOT}/etc/fonts/._cfg????_fonts.conf
83     HOME="${MROOT}/root" ${MROOT}/usr/bin/fc-cache -sr
84     }