summaryrefslogtreecommitdiff
blob: 85eac6aadfcf2acaf00bebf080fdc3f8420688b4 (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
101
102
103
104
105
106
107
108
109
110
111
112
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-im/ekg2/ekg2-9999.ebuild,v 1.4 2012/12/15 12:45:24 mgorny Exp $

EAPI=4

#if LIVE
AUTOTOOLS_AUTORECONF=yes
EGIT_REPO_URI="git://github.com/leafnode/${PN}.git
	http://github.com/leafnode/${PN}.git"

inherit git-2
#endif

PYTHON_COMPAT=( python{2_5,2_6,2_7} )
inherit autotools-utils python-single-r1

DESCRIPTION="Text-based, multi-protocol instant messenger"
HOMEPAGE="http://www.ekg2.org"
SRC_URI="http://pl.ekg2.org/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="gadu gpm gpg gtk inotify minimal ncurses nls nntp openssl
	perl python readline rss spell sqlite sqlite2 ssl xmpp unicode zlib"

RDEPEND="dev-libs/glib:2
	gadu? ( net-libs/libgadu )
	gpg? ( app-crypt/gpgme )
	gtk? ( x11-libs/gtk+:2 )
	nls? ( virtual/libintl )
	openssl? ( dev-libs/openssl )
	perl? ( dev-lang/perl )
	python? ( ${PYTHON_DEPS} )
	readline? ( sys-libs/readline )
	rss? ( dev-libs/expat )
	ssl? ( net-libs/gnutls )
	xmpp? ( dev-libs/expat )
	zlib? ( sys-libs/zlib )

	ncurses? ( sys-libs/ncurses[unicode=]
		gpm? ( sys-libs/gpm )
		spell? ( app-text/aspell ) )
	sqlite? (
		!sqlite2? ( dev-db/sqlite:3 )
		sqlite2? ( dev-db/sqlite:0 ) )"

DEPEND="${RDEPEND}
	sys-devel/gettext"

DOCS=(
	AUTHORS README.md docs/README docs/TODO
	docs/events.txt docs/mouse.txt docs/sim.txt docs/voip.txt
	docs/themes.txt docs/themes-en.txt
	docs/ui-ncurses.txt docs/ui-ncurses-en.txt
)

#if LIVE
KEYWORDS=
SRC_URI=
#endif

pkg_pretend() {
	if ! use gtk && ! use ncurses && ! use readline; then
		ewarn 'ekg2 is being compiled without any frontend, you should consider'
		ewarn 'enabling at least one of following USEflags:'
		ewarn '  gtk, ncurses, readline.'
	fi
}

src_configure() {
	myeconfargs=(
		# direct plugin references
		$(use_enable gadu gg)
		$(use_enable gpg)
		$(use_enable gtk)
		$(use_enable ncurses)
		$(use_enable nntp)
		$(use_enable openssl sim)
		$(use_enable perl)
		$(use_enable python)
		$(use_enable readline)
		$(use_enable rss)
		$(use_enable sqlite logsqlite)
		$(use_enable xmpp jabber)

		$(use_enable !minimal autoresponder)
		$(use_enable !minimal jogger)
		$(use_enable !minimal mail)
		$(use_enable !minimal polchat)
		$(use_enable !minimal rivchat)
		$(use_enable !minimal sms)

		# sqlite switch
		$(use_with !sqlite2 sqlite3)
		$(use_with sqlite2 sqlite)

		# optional deps
		$(use_with gpm)
		$(use_with inotify)
		$(use_with spell aspell)
		$(use_with ssl gnutls)
		$(use_with zlib)

		# other magic
		$(use_enable nls)
		--with-perl-module-build-flags='INSTALLDIRS=vendor'
		--enable-fast-configure
	)
	autotools-utils_src_configure
}