aboutsummaryrefslogtreecommitdiff
blob: bb622b76703f61d0c751b77fe2916fa96a4b4a7a (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
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-editors/gobby/gobby-0.4.5-r1.ebuild,v 1.2 2008/05/20 01:01:23 jer Exp $

inherit eutils

DESCRIPTION="GTK-based collaborative editor"
HOMEPAGE="http://gobby.0x539.de/"
SRC_URI="http://releases.0x539.de/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~hppa ~ppc ~x86"
IUSE="avahi gnome"

DEPEND=">=dev-cpp/glibmm-2.6
	>=dev-cpp/gtkmm-2.6
	>=dev-libs/libsigc++-2.0
	>=net-libs/obby-0.4.4
	>=dev-cpp/libxmlpp-2.6
	>=x11-libs/gtksourceview-1.2.0
	gnome? ( gnome-base/gnome-vfs )"
RDEPEND="${DEPEND}"

# There's only one test and it needs X
RESTRICT="test"

pkg_setup() {
	if use avahi && ! built_with_use net-libs/obby avahi ; then
		eerror "Please reinstall net-libs/obby with the avahi USE-flag enabled"
		eerror "for zeroconf/DNS-SD support or disable it for this package."
		die "Missing 'avahi' USE-flag for net-libs/obby"
	fi
}

src_unpack() {
	unpack ${A}
	if (has_version '>=x11-libs/gtksourceview-1.90') ; then
		epatch "${FILESDIR}/${P}-GtkSourceView2.patch"
	fi
	epatch "${FILESDIR}/${P}-g++-4.3.patch"
}
src_compile() {
	econf \
		--with-gtksourceview$(has_version '>=x11-libs/gtksourceview-1.90' && echo 2) \
		$(use_with gnome) \
		 || die "econf failed"
	emake || die "make failed"
}

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

	domenu contrib/gobby.desktop
}