summaryrefslogtreecommitdiff
blob: a2f0ad32779baa5cfe6cf9d8e03eecfdf5b35794 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-libs/gnome-libs-1.4.2.ebuild,v 1.30 2005/05/29 22:47:14 halcy0n Exp $

inherit eutils libtool multilib

DESCRIPTION="GNOME Core Libraries"
HOMEPAGE="http://www.gnome.org/"
SRC_URI="ftp://ftp.gnome.org/pub/GNOME/sources/${PN}/1.4/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="1"
KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 sparc x86"
IUSE="doc nls kde"

RDEPEND=">=media-libs/imlib-1.9.10
	>=media-sound/esound-0.2.23
	=gnome-base/orbit-0*
	=x11-libs/gtk+-1.2*
	<=sys-libs/db-2
	doc? ( app-text/docbook-sgml
		dev-util/gtk-doc )"
DEPEND="${RDEPEND}
	nls? ( >=sys-devel/gettext-0.10.40
		>=dev-util/intltool-0.11 )"

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}"/${P}-m4.patch
	# Correct problems with documentation. See bug #44439.
	epatch "${FILESDIR}"/${P}-gtkdoc_fixes.patch
	# Fix compilation with GCC4 ; bug #94321
	epatch "${FILESDIR}"/${P}-gcc4.patch
}

src_compile() {
	CFLAGS="$CFLAGS -I/usr/include/db1"

	# On alpha with 3.3.2 compilers we need to restrict options to
	# make this actually build.  I don't know what the upper limit is
	# but the following works (and who really cares about
	# gnome-libs-1.4.x performance)
	# (12 Nov 2003 agriffis)
	if use alpha; then
		# hopefully this overrides whatever is earlier on the line
		# since working out the replacements would be a pain
		CFLAGS="${CFLAGS} -O0 -mcpu=ev4"
	fi

	local myconf

	use nls || myconf="${myconf} --disable-nls"
	use kde && myconf="${myconf} --with-kde-datadir=/usr/share"
	use doc || myconf="${myconf} --disable-gtk-doc"

	# libtoolize
	elibtoolize

	./configure --host=${CHOST} \
		--prefix=/usr \
		--libdir=/usr/$(get_libdir) \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--sysconfdir=/etc \
		--localstatedir=/var/lib \
		--enable-prefer-db1 \
		${myconf} || die

	emake || die

	#do the docs (maby add a use variable or put in seperate
	#ebuild since it is mostly developer docs?)
	if use doc
	then
		cd ${S}/devel-docs
		emake || die
		cd ${S}
	fi
}

src_install() {
	make prefix=${D}/usr \
		libdir=${D}/usr/$(get_libdir) \
		mandir=${D}/usr/share/man \
		infodir=${D}/usr/share/info \
		sysconfdir=${D}/etc \
		localstatedir=${D}/var/lib \
		docdir=${D}/usr/share/doc/${P} \
		HTML_DIR=${D}/usr/share/gnome/html \
		install || die

	rm ${D}/usr/share/gtkrc*

	dodoc AUTHORS ChangeLog README NEWS HACKING
}