Magellan Linux

Annotation of /trunk/core/fontconfig/fontconfig-2.13.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 30754 - (hide annotations) (download)
Tue Apr 3 09:00:35 2018 UTC (6 years, 2 months ago) by niro
File size: 2375 byte(s)
auto added: ver bump to 2.13.0-r1
1 niro 30754 # $Id$
2    
3     PNAME="fontconfig"
4     PVER="2.13.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.6
13     >= dev-libs/expat-2"
14    
15     SDEPEND=">= virtual/sed
16     >= dev-util/gperf-3.1"
17    
18     SRCFILE="${PNAME}-${PVER}.tar.gz"
19     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
20    
21     sminclude multilib mtools
22    
23     SRC_URI=(
24     http://fontconfig.org/release/${SRCFILE}
25     mirror://${PNAME}/${SRCFILE}
26     "mirror://${PNAME}/man-2.3.1/fc-cache.man man-2.3.1"
27     "mirror://${PNAME}/man-2.3.1/fc-list.man man-2.3.1"
28     )
29    
30     UP2DATE="updatecmd http://fontconfig.org/release/ | grep ${PNAME}- | highesttarball gz"
31    
32     src_prepare()
33     {
34     munpack ${SRCFILE} || die
35    
36     # utterly ugly hack- FIXME!: fix gperf size detection on x86_64
37     #only-m64 "sed -i '/FcObjectType/s/FC_GPERF_SIZE_T/unsigned int/' src/fcobjs.c || die"
38     }
39    
40     src_compile()
41     {
42     mconfigure \
43     --disable-docs \
44     --x-includes=/usr/include \
45     --x-libraries=/usr/$(mlibdir) \
46     --with-default-fonts=/usr/share/fonts \
47     --with-add-fonts=/usr/local/share/fonts \
48     || die
49    
50     # does not like optimations
51     mmake -j1 || die
52    
53     # remove Luxi TTF fonts from the list, the Type1 are much better
54     # all-abis 'sed -i "s:<dir>/usr/$(mlibdir)/X11/fonts/TTF</dir>::" fonts.conf' || die
55     }
56    
57     src_install()
58     {
59     mmake DESTDIR=${BINDIR} install || die
60    
61     # install font.conf
62     minstallfile fonts.conf /etc/fonts || die
63     minstallfile fonts.conf /etc/fonts/fonts.conf.new || die
64    
65     # fc-lang directory contains language coverage datafiles
66     # which are needed to test the coverage of fonts.
67     minstalldir /usr/share/fc-lang || die
68     minstallfile fc-lang/\*.orth /usr/share/fc-lang || die
69    
70     # install man-pages
71     # we're using prebuilded man pages to prevent docbook dependencies
72     minstalldir /usr/share/man/man1 || die
73     minstallfile -s man-2.3.1/fc-cache.man /usr/share/man/man1/fc-cache.1 || die
74     minstallfile -s man-2.3.1/fc-list.man /usr/share/man/man1/fc-list.1 || die
75     }
76    
77     preinstall()
78     {
79     # delete this file if it exists
80     [ -f ${MROOT}/etc/fonts/fonts.conf.new ] && \
81     rm -f ${MROOT}/etc/fonts/fonts.conf.new
82     }
83    
84     postinstall()
85     {
86     echo "Creating new font cache..."
87    
88     # force update; config_protect will prevent this
89     mv -f ${MROOT}/etc/fonts/fonts.conf.new ${MROOT}/etc/fonts/fonts.conf
90     rm -f ${MROOT}/etc/fonts/._cfg????_fonts.conf
91     HOME="${MROOT}/root" ${MROOT}/usr/bin/fc-cache -sr
92     }