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
40 epatch
"${FILESDIR}"/${P}-libtool-2.2.
patch #213831 Fix libtool-2.2 brekage
42 # Enable control over freetype's sub-pixel configuration; currently, this
43 # only has an effect on cairo, and only if it contains the patch from
44 # freedesktop #10301. This will be included in fontconfig 2.6. See
47 epatch
"${FILESDIR}"/${PN}-2.5
.0-ubuntu-3.
diff
48 epatch
"${FILESDIR}"/${PN}-lcd-filtering.
patch
49 epatch
"${FILESDIR}"/${PN}-monospace-lcd-filtering.
patch
50 epatch
"${FILESDIR}"/${PN}-hinting-and-alising-confs.
patch
51 cp "${FILESDIR}"/30-replace-bitmap-fonts.conf conf.d
/
59 # I'm thinking this should be removed
60 [[ ${ARCH} == alpha
&& ${CC} == ccc
]] && \
61 die
"Dont compile fontconfig with ccc, it doesnt work very well"
63 # disable docs only disables local docs generation, they come with the tarball
64 econf $
(use_enable doc docs
) \
65 $
(use_enable doc docbook
) \
66 --localstatedir=/var \
67 --with-docdir=/usr
/share
/doc
/${PF} \
68 --with-default-fonts=/usr
/share
/fonts \
69 --with-add-fonts=/usr
/local
/share
/fonts \
70 $
(use_enable xml libxml2
) \
77 emake DESTDIR
="${D}" install || die
80 doins
"${S}"/fonts.conf
82 newman
doc
/fonts-conf
.5 fonts.conf
.5
83 dohtml
doc
/fontconfig-user.html
84 dodoc
doc
/fontconfig-user.
{txt
,pdf
}
88 dohtml
doc
/fontconfig-devel.html doc
89 dohtml
-r doc
/fontconfig-devel
90 dodoc
doc
/fontconfig-devel.
{txt
,pdf
}
93 dodoc AUTHORS ChangeLog NEWS README
95 # Changes should be made to /etc/fonts/local.conf, and as we had
96 # too much problems with broken fonts.conf, we force update it ...
97 # <azarah@gentoo.org> (11 Dec 2002)
98 echo 'CONFIG_PROTECT_MASK="/etc/fonts/fonts.conf"' > "${T}"/37fontconfig
99 doenvd
"${T}"/37fontconfig
104 ewarn
"Please make fontconfig configuration changes in /etc/fonts/conf.d/"
105 ewarn
"and NOT to /etc/fonts/fonts.conf, as it will be replaced!"
108 if [[ ${ROOT} = / ]]; then
109 ebegin
"Creating global font cache..."
110 /usr
/bin
/fc-cache
-sr