summaryrefslogtreecommitdiff
blob: 7b5b4e6f203bcd8b9fee86c8a3cada440aeba91a (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
97
98
99
100
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-libs/gtk+/gtk+-1.2.10-r11.ebuild,v 1.25 2006/07/05 05:22:45 vapier Exp $

GNOME_TARBALL_SUFFIX="gz"
inherit gnome.org eutils libtool toolchain-funcs

DESCRIPTION="The GIMP Toolkit"
HOMEPAGE="http://www.gtk.org/"
SRC_URI="${SRC_URI} http://www.ibiblio.org/gentoo/distfiles/gtk+-1.2.10-r8-gentoo.diff.bz2"

LICENSE="LGPL-2.1"
SLOT="1"
KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 sh ~sparc x86 ~x86-fbsd"
IUSE="nls debug"

RDEPEND="||	(
				(
					x11-libs/libXi
					x11-libs/libXt
				)
				virtual/x11
			)
		 =dev-libs/glib-1.2*"
DEPEND="${RDEPEND}
		||	(
				(
					x11-proto/inputproto
					x11-proto/xextproto
				)
				virtual/x11
			)
		nls? ( sys-devel/gettext dev-util/intltool )
		sys-devel/autoconf
		sys-devel/libtool"

src_unpack() {
	unpack ${P}.tar.gz
	cd "${S}"
	epatch "${FILESDIR}"/${P}-m4.patch

	cd "${S}"/..
	epatch "${DISTDIR}"/gtk+-1.2.10-r8-gentoo.diff.bz2

	# locale fix by sbrabec@suse.cz
	cd "${S}"
	epatch "${FILESDIR}"/${PN}-1.2-locale_fix.patch

	epatch "${FILESDIR}"/gtk+-1.2-link.patch
	
	elibtoolize
	
	einfo "Copying in a recent libtool"
	cp `which libtool` "${S}"/libtool.copy
	libtoolize --force
}

src_compile() {
	local myconf=
	use nls || myconf="${myconf} --disable-nls"

	if use debug ; then
		myconf="${myconf} --enable-debug=yes"
	else
		myconf="${myconf} --enable-debug=minimum"
	fi

	econf \
		--sysconfdir=/etc \
		--with-xinput=xfree \
		--with-x \
		${myconf} || die

	cp libtool.copy libtool

	emake CC="$(tc-getCC)" || die
}

src_install() {
	make install DESTDIR="${D}" || die

	dodoc AUTHORS ChangeLog* HACKING
	dodoc NEWS* README* TODO
	docinto docs
	cd docs
	dodoc *.txt *.gif text/*
	dohtml -r html

	#install nice, clean-looking gtk+ style
	insinto /usr/share/themes/Gentoo/gtk
	doins "${FILESDIR}"/gtkrc
}

pkg_postinst() {
	ewarn "Older versions added /etc/X11/gtk/gtkrc which changed settings for"
	ewarn "all themes it seems.  Please remove it manually as it will not due"
	ewarn "to /env protection."
	echo ""
	einfo "The old gtkrc is available through the new Gentoo gtk theme."
}