# $Id: fontconfig-2.7.3-r1.smage2 3308 2009-10-19 21:29:44Z niro $ PNAME="fontconfig" PVER="2.8.0" PBUILD="r1" PCATEGORIE="media-libs" STATE="unstable" DESCRIPTION="fontconfig is a library for configuring and customizing font access." HOMEPAGE="http://fontconfig.org/" DEPEND=">= media-libs/freetype-2.4 >= dev-libs/expat-2" SDEPEND=">= sys-apps/sed-4" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude multilib mtools SRC_URI=( http://fontconfig.org/release/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/fontconfig-2.2-local_fontdir-r2.patch mirror://${PNAME}/fontconfig-2.2-local_fontdir64-r2.patch "mirror://${PNAME}/man-2.3.1/fc-cache.man man-2.3.1" "mirror://${PNAME}/man-2.3.1/fc-list.man man-2.3.1" ) UP2DATE="updatecmd http://fontconfig.org/release/ | grep ${PNAME}- | lasttarball gz" src_prepare() { munpack ${SRCFILE} || die # adds local fontpathes to local.conf if [[ $(mlibdir) != lib ]] then mpatch fontconfig-2.2-local_fontdir64-r2.patch || die else mpatch fontconfig-2.2-local_fontdir-r2.patch || die fi # the date can be troublesome all-abis 'sed -i "s:\`date\`::" configure' || die } src_compile() { mconfigure \ --disable-docs \ --with-docdir=/usr/share/doc/${PNAME}-${PVER} \ --x-includes=/usr/include \ --x-libraries=/usr/$(mlibdir) \ --with-default-fonts=/usr/share/fonts \ --with-add-fonts=/usr/local/share/fonts \ || die # does not like optimations mmake -j1 || die # remove Luxi TTF fonts from the list, the Type1 are much better # all-abis 'sed -i "s:/usr/$(mlibdir)/X11/fonts/TTF::" fonts.conf' || die } src_install() { minstall_destdir || die # install font.conf minstallfile fonts.conf /etc/fonts || die minstallfile fonts.conf /etc/fonts/fonts.conf.new || die # fc-lang directory contains language coverage datafiles # which are needed to test the coverage of fonts. minstalldir /usr/share/fc-lang || die minstallfile fc-lang/\*.orth /usr/share/fc-lang || die # install man-pages # we're using prebuilded man pages to prevent docbook dependencies minstalldir /usr/share/man/man1 || die minstallfile -s man-2.3.1/fc-cache.man /usr/share/man/man1/fc-cache.1 || die minstallfile -s man-2.3.1/fc-list.man /usr/share/man/man1/fc-list.1 || die } preinstall() { # delete this file if it exists [ -f ${MROOT}/etc/fonts/fonts.conf.new ] && \ rm -f ${MROOT}/etc/fonts/fonts.conf.new } postinstall() { echo "Creating new font cache..." # force update; config_protect will prevent this mv -f ${MROOT}/etc/fonts/fonts.conf.new ${MROOT}/etc/fonts/fonts.conf rm -f ${MROOT}/etc/fonts/._cfg????_fonts.conf HOME="${MROOT}/root" ${MROOT}/usr/bin/fc-cache -sr }