summaryrefslogtreecommitdiff
blob: 0fe7e1a3848b68545dc51824bb3eaaf36e4fdfcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-libs/xft/xft-2.0.1-r2.ebuild,v 1.9 2004/02/17 08:09:14 mr_bones_ Exp $

inherit eutils

DESCRIPTION="X FreeType library, also known as Xft2.0"
HOMEPAGE="http://fontconfig.org/"
SRC_URI="http://fontconfig.org/release/fcpackage.${PV/\.0\./_}.tar.gz"

LICENSE="fontconfig"
SLOT="0"
KEYWORDS="x86 ppc alpha sparc hppa ~amd64"

RDEPEND="x11-base/xfree
	>=media-libs/fontconfig-2.1-r1"
DEPEND="${RDEPEND}
	>=sys-devel/autoconf-2.58
	!>=x11-base/xfree-4.3.0-r2"
PROVIDE="virtual/xft"

S="${WORKDIR}/fcpackage.${PV/\.0\./_}/Xft"

src_unpack() {
	unpack ${A}

	cd ${S}

	# Update from XFree86 cvs tree
	epatch ${FILESDIR}/${P}-cvs-update-20021221.patch

	einfo "Running autoconf..."
	export WANT_AUTOCONF=2.5
	autoconf --force
}

src_compile() {
	econf --x-includes=/usr/X11R6/include \
		--x-libraries=/usr/X11R6/lib \
		--includedir=/usr/X11R6/include \
		|| die "Xft2 config failed"
	emake || die "Xft2 make failed"
}

src_install() {
	einstall confdir=${D}/etc/fonts \
		datadir=${D}/usr/share \
		includedir=${D}/usr/X11R6/include || die

	dodir /usr/X11R6/lib
	dosym ../../lib/libXft.so.2.0 /usr/X11R6/lib/libXft.so
}

pkg_preinst() {
	if [ "${ROOT}" = "/" -a ! -d /root/.Xft -a \
	     -f /usr/X11R6/include/X11/Xft/XftFreetype.h ]
	then
		mv -f /usr/X11R6/include/X11/Xft /root/.Xft
	fi
}

pkg_postinst() {
	einfo "Your old Xft1.1 includes have been saved to /root/.Xft,"
	einfo "if they were present ..."
}