summaryrefslogtreecommitdiff
blob: 33069c2f1fc9a267beadee482eff6c22e88c44c4 (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-libs/wxmozilla/wxmozilla-0.5.3.ebuild,v 1.3 2004/12/16 21:03:48 kloeri Exp $

inherit eutils libtool

IUSE="python doc"

DESCRIPTION="Mozilla widget for wxWindows"
SRC_URI="mirror://sourceforge/wxmozilla/${P}.tar.gz"
HOMEPAGE="http://wxmozilla.sourceforge.net/"

DEPEND=">=net-www/mozilla-1.3
	python? ( dev-lang/python >=dev-python/wxpython-2.4 )
	>=x11-libs/wxGTK-2.4"

SLOT="0"
LICENSE="wxWinLL-3"
KEYWORDS="~x86"

pkg_setup() {
	# make sure gtk{1,2} setting of Mozilla and wxGTK is same
	if built_with_use net-www/mozilla gtk2; then
		tk_mozilla="gtk2"
	else
		tk_mozilla="gtk1"
	fi
	if built_with_use x11-libs/wxGTK gtk2; then
		tk_wxgtk="gtk2"
	else
		tk_wxgtk="gtk1"
	fi

	if [ $tk_mozilla != $tk_wxgtk ]; then
		eerror "You need x11-libs/wxGTK and net-www/mozilla compiled with same GTK+ version."
		eerror "Emerge both either with or without 'gtk2' in your USE flags."
		eerror "wxGTK toolkit: $tk_wxgtk"
		eerror "Mozilla toolkit: $tk_mozilla"
		die "wxGTK and Mozilla must use same major GTK+ version"
	fi
}

src_compile() {
	elibtoolize

	econf `use_enable python` || die "configure failed"
	emake || die "make failed"
}

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

	if use doc; then
		dodoc README
		newdoc demo/main.cpp example.cpp
		if use python; then
			dodoc wxPython/demo/*.py
		fi
	fi
}