1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils libtool autotools
8 DESCRIPTION
="A library for configuring and customizing font access"
9 HOMEPAGE
="http://fontconfig.org/"
10 SRC_URI
="http://fontconfig.org/release/${P}.tar.gz"
14 KEYWORDS
="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
15 IUSE
="doc xml +ubuntu"
17 RDEPEND
="newspr? ( >=media-libs/freetype-2.3.5-r2 )
18 !newspr? ( media-libs/freetype:2 )
19 !xml? ( dev-libs/expat )
20 xml? ( dev-libs/libxml2:2 )"
23 doc? ( app-text/docbook-sgml-utils )"
24 PDEPEND
="app-admin/eselect-fontconfig"
28 ! built_with_use
--missing false media-libs
/freetype
:2 ubuntu
; then
29 eerror
"You need to compile freetype-2 with the ubuntu USE before you can compile fontconfig with the ubuntu USE flag."
30 die
"Please rebuild freetype-2 with ubuntu enabled."
38 # add docbook switch so we can disable it
39 epatch
"${FILESDIR}"/${PN}-2.3
.2-docbook.
patch
41 # Enable control over freetype's sub-pixel configuration; currently, this
42 # only has an effect on cairo, and only if it contains the patch from
43 # freedesktop #10301. This will be included in fontconfig 2.6. See
46 epatch
"${FILESDIR}"/${PN}-2.5
.0-ubuntu-3.
diff
47 epatch
"${FILESDIR}"/${PN}-lcd-filtering.
patch
48 epatch
"${FILESDIR}"/${PN}-monospace-lcd-filtering.
patch
49 epatch
"${FILESDIR}"/${PN}-hinting-and-alising-confs.
patch
50 cp "${FILESDIR}"/30-replace-bitmap-fonts.conf conf.d
/
58 # I'm thinking this should be removed
59 [[ ${ARCH} == alpha
&& ${CC} == ccc
]] && \
60 die
"Dont compile fontconfig with ccc, it doesnt work very well"
62 # disable docs only disables local docs generation, they come with the tarball
63 econf $
(use_enable doc docs
) \
64 $
(use_enable doc docbook
) \
65 --localstatedir=/var \
66 --with-docdir=/usr
/share
/doc
/${PF} \
67 --with-default-fonts=/usr
/share
/fonts \
68 --with-add-fonts=/usr
/local
/share
/fonts \
69 $
(use_enable xml libxml2
) \
76 emake DESTDIR
="${D}" install || die
79 doins
"${S}"/fonts.conf
81 newman
doc
/fonts-conf
.5 fonts.conf
.5
82 dohtml
doc
/fontconfig-user.html
83 dodoc
doc
/fontconfig-user.
{txt
,pdf
}
87 dohtml
doc
/fontconfig-devel.html doc
88 dohtml
-r doc
/fontconfig-devel
89 dodoc
doc
/fontconfig-devel.
{txt
,pdf
}
92 dodoc AUTHORS ChangeLog NEWS README
94 # Changes should be made to /etc/fonts/local.conf, and as we had
95 # too much problems with broken fonts.conf, we force update it ...
96 # <azarah@gentoo.org> (11 Dec 2002)
97 echo 'CONFIG_PROTECT_MASK="/etc/fonts/fonts.conf"' > "${T}"/37fontconfig
98 doenvd
"${T}"/37fontconfig
103 ewarn
"Please make fontconfig configuration changes in /etc/fonts/conf.d/"
104 ewarn
"and NOT to /etc/fonts/fonts.conf, as it will be replaced!"
107 if [[ ${ROOT} = / ]]; then
108 ebegin
"Creating global font cache..."
109 /usr
/bin
/fc-cache
-sr