summaryrefslogtreecommitdiff
blob: 45b7e4625a08ccf5805b898367037171423a3d88 (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
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/glib/glib-1.2.10-r5.ebuild,v 1.22 2004/05/03 02:49:21 tgall Exp $

inherit libtool gnuconfig flag-o-matic eutils

DESCRIPTION="The GLib library of C routines"
HOMEPAGE="http://www.gtk.org/"
SRC_URI="ftp://ftp.gtk.org/pub/gtk/v1.2/${P}.tar.gz
	 ftp://ftp.gnome.org/pub/GNOME/stable/sources/glib/${P}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="1"
KEYWORDS="x86 ppc sparc mips alpha arm hppa amd64 ia64 ppc64 s390"
IUSE=""

DEPEND="virtual/glibc"

src_unpack() {
	unpack ${A}

	# Allow glib to build with gcc-3.4.x
	# Closes Bug #47047
	epatch ${FILESDIR}/${P}-gcc34-fix.patch
}

src_compile() {
	elibtoolize

	# elibtoolize breaks (see brad's comments below, left here for
	# historical purposes) but libtoolize won't work either because
	# there is no libtoolize in the stage1 and it brings in nasty
	# deps if you try to install it during bootstrap.
	# elibtoolize seems to be working decently on x86. As a temporary
	# fix for amd64 users to be able to bootstrap, we run gnuconfig.
	# The glib .a's will be broken, but it's a start.
	# See bug 47950 for more information.
	# -- avenj@gentoo.org  19 Apr 04

	use amd64 && gnuconfig_update
	use ppc64 && gnuconfig_update

	# For some reason, elibtoolize stopped doing its job in the last couple
	# of days on this ebuild, and amd64 won't compile it anymore, need to
	# manually run libtoolize, I need to inspect the libtool.eclass I guess.
	# Brad House <brad_mssw@gentoo.org> 1/2/2004
#	libtoolize -c -f

	# Bug 48839: pam fails to build on ia64
	# The problem is that it attempts to link a shared object against
	# libglib.a; this library needs to be built with -fPIC.  Since
	# this package doesn't contain any significant binaries, build the
	# whole thing with -fPIC (23 Apr 2004 agriffis)
	append-flags -fPIC

	econf \
		--with-threads=posix \
		--enable-debug=yes || die

	emake || die
}

src_install() {
	einstall || die

	( cd ${D}/usr/lib ; chmod 755 libgmodule-1.2.so.* )

	dodoc AUTHORS ChangeLog README* INSTALL NEWS
	dohtml -r docs
}