summaryrefslogtreecommitdiff
blob: ebcda8387a31c59c7a34e257cab7180a1fdb76fc (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-libs/imlib/imlib-1.9.15-r2.ebuild,v 1.8 2007/12/14 18:22:42 dertobi123 Exp $

inherit autotools eutils gnome.org

DESCRIPTION="Image loading and rendering library"
HOMEPAGE="http://ftp.acc.umu.se/pub/GNOME/sources/imlib/1.9/"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~x86-fbsd"
IUSE="doc gtk"

RDEPEND="gtk? ( =x11-libs/gtk+-1.2* )
	>=media-libs/tiff-3.5.5
	>=media-libs/giflib-4.1.0
	>=media-libs/libpng-1.2.1
	>=media-libs/jpeg-6b
	x11-libs/libICE
	x11-libs/libSM
	x11-libs/libXext"
DEPEND="${RDEPEND}"

src_unpack() {
	unpack ${A}
	cd "${S}"

	# Fix aclocal underquoted definition warnings.
	# Conditionalize gdk functions for bug 40453.
	# Fix imlib-config for bug 3425.
	epatch "${FILESDIR}"/${P}.patch

	# Fix security bug 72681.
	epatch "${FILESDIR}"/${PN}-security.patch

	# Fixes security bug #201887
	epatch "${FILESDIR}"/${P}-bpp16-CVE-2007-3568.patch

	# Fixes #197489
	epatch "${FILESDIR}"/${P}-fix-rendering.patch

	eautoconf
	_elibtoolize
}

src_compile() {
	econf --sysconfdir=/etc/imlib \
		$(use_enable gtk gdk) \
		$(use_enable gtk gtktest)

	emake || die "emake failed."
}

src_install() {
	emake DESTDIR="${D}" install || die "emake install failed."

	dodoc AUTHORS ChangeLog README
	use doc && dohtml doc/*

	# Hack to avoid installing pkgconfig file.
	use gtk || rm "${D}"/usr/lib*/pkgconfig/imlibgdk.pc
}