summaryrefslogtreecommitdiff
blob: 8b7ec97f82f04aa542f724d034204cd73fe2e20a (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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

inherit eutils gnome2

DESCRIPTION="H.323 and SIP VoIP softphone"
HOMEPAGE="http://www.ekiga.org/"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="avahi dbus debug doc eds gconf gnome gstreamer +h323 kde kontact ldap libnotify mmx nls +shm +sip static v4l xcap xv"

RDEPEND=">=dev-libs/glib-2.8.0:2
	dev-libs/libsigc++:2
	dev-libs/libxml2:2
	>=net-libs/opal-3.6.1[audio,sip,video,debug=,h323?]
	>=net-libs/ptlib-2.6.1[stun,video,wav,debug=]
	sys-devel/gettext
	>=x11-libs/gtk+-2.12.0:2
	avahi? ( >=net-dns/avahi-0.6[dbus] )
	dbus? ( >=sys-apps/dbus-0.36
		>=dev-libs/dbus-glib-0.36 )
	eds? ( >=gnome-extra/evolution-data-server-1.2 )
	gconf? ( >=gnome-base/gconf-2.6.0:2 )
	gnome? ( || ( >=x11-libs/gtk+-2.14:2
		( >=gnome-base/libgnome-2.14.0
		>=gnome-base/libgnomeui-2.14.0 ) ) )
	gstreamer? ( >=media-libs/gst-plugins-base-0.10.21.3:0.10 )
	kde? ( kde-base/kdelibs:4.2
		x11-libs/qt-core:4
		kontact? ( kde-base/kdepimlibs:4.2 ) )
	ldap? ( dev-libs/cyrus-sasl:2
		net-nds/openldap[sasl] )
	libnotify? ( x11-libs/libnotify
		debug? ( >=x11-libs/libnotify-0.4.5 ) )
	shm? ( x11-libs/libXext )
	xcap? ( net-libs/libsoup:2.4 )
	xv? ( x11-libs/libXv )"
DEPEND="${RDEPEND}
	>=dev-util/intltool-0.35
	>=dev-util/pkgconfig-0.20
	>=sys-devel/make-3.81
	doc? ( app-text/scrollkeeper
		app-text/gnome-doc-utils )
	v4l? ( sys-kernel/linux-headers )"

DOCS="AUTHORS ChangeLog FAQ MAINTAINERS NEWS README TODO"

# debug is managed by the ebuild
GCONF_DEBUG="no"

# NOTES:
# make 3.80 is breaking installation phase, need make 3.81 at least
# having >=gtk+-2.14 is actually removing need of +gnome but it's clearer to
# 	represent it with || in gnome dep
# TODO: gnome2 eclass add --[dis|en]able-gtk-doc wich throws a QA warning
#	a patch has been submitted, see bug 262491
# ptlib/opal needed features are not checked by ekiga, see bug 577249 (upstream)
# opal[sip] should not be needed, it's an ekiga bug, see bug 577248 (upstream)
# there is a bug in libnotify-0.4.4 fixed in 0.4.5 wich is thrown in debug
# default src_test is working (with make check)

pkg_setup() {
	if use kontact && ! use kde; then
		eerror "You need to enable kde if you want to enable kontact"
		eerror "Please, re-emerge with disabling kontact or enabling kde"
		die
	fi

	# update scrollkeeper database if doc has been enabled
	if use doc; then
		SCROLLKEEPER_UPDATE=1
	else
		SCROLLKEEPER_UPDATE=0
	fi

	# dbus-service: always enable if dbus is enabled, no reason to disable it
	# scrollkeeper: updates scrollkeeper database
	# schemas-install: install gconf schemas
	G2CONF="${G2CONF}
		--disable-dependency-tracking
		--enable-fast-install
		--disable-maintainer-mode
		--enable-libtool-lock
		$(use_enable avahi)
		$(use_enable dbus)
		$(use_enable dbus dbus_service)
		$(use_enable debug gtk-debug)
		$(use_enable debug opal-debug)
		$(use_enable doc gdu)
		$(use_enable doc scrollkeeper)
		$(use_enable eds)
		$(use_enable gconf)
		$(use_enable gconf schemas-install)
		$(use_enable gnome)
		$(use_enable gstreamer)
		$(use_enable kde)
		$(use_enable kontact kab)
		$(use_enable ldap)
		$(use_enable libnotify notify)
		$(use_enable nls)
		$(use_enable static static-libs)
		$(use_enable xcap)
		$(use_enable xv)"
}

src_prepare() {
	gnome2_src_prepare

	# configure has many mistakes with this release
	# upstream has been contacted, see bug 577080 in their bugtracker
	# this patch is also fixing kde-4 support, see upstream bug 577878
	# fixing configure instead of configure.ac prevents eautoreconf
	epatch "${FILESDIR}"/${P}-configure.patch

	# remove call to gconftool-2 --shutdown
	# upstream has been contacted, see bug 555976 in their bugtracker
	# gnome-2 eclass is reloading schemas with SIGHUP
	sed -i -e '/gconftool-2 --shutdown/d' Makefile.in \
		|| die "patching Makefile.in failed"

	# fix compilation issues when PTRACING is disabled in ptlib
	# upstream has been contacted, see bug 575433 in their bugtracker
	epatch "${FILESDIR}"/${P}-ptracing.patch

	# fix segfault when accessing to preferences window in debug mode
	# backporting patch from upstream repository, see upstream bug 577629
	epatch "${FILESDIR}"/${P}-preferences.patch

	# fix stun bug which makes ekiga.net unavailable
	# see upstream bug 578883
	epatch "${FILESDIR}"/${P}-stun.patch

	# compilation breaks with xcap enabled
	# backporting patch from upstream repository
	if use xcap; then
		epatch "${FILESDIR}"/${P}-xcap.patch
	fi

	# mmx is automatically enabled for some arch, want it to be a user choice
	# upstream has been contacted, see bug 575831 in their bugtracker
	if use mmx; then
		sed -i -e "s/use_x86_asm=no/use_x86_asm=yes/" configure \
			|| die "patching configure failed"
	else
		sed -i -e "s/use_x86_asm=yes/use_x86_asm=no/" configure \
			|| die "patching configure failed"
	fi

	# SIP is automatically enabled with opal[sip], want it to be a user choice
	# upstream has been contacted, see bug 575832 in their bugtracker
	if ! use sip; then
		sed -i -e "s/SIP=\"yes\"/SIP=\"no\"/" configure \
			|| die "patching configure failed"
		sed -i -e \
			"s:SIP=\`\$PKG_CONFIG --variable=OPAL_SIP opal\`:SIP=\"no\":" \
			configure || die "patching configure failed"
	fi

	# H323 is automatically enabled with opal[h323], want it to be a user choice
	# upstream has been contacted, see bug 575833 in their bugtracker
	if ! use h323; then
		sed -i -e "s/H323=\"yes\"/H323=\"no\"/" configure \
			|| die "patching configure failed"
		sed -i -e \
			"s:H323=\`\$PKG_CONFIG --variable=OPAL_H323 opal\`:H323=\"no\":" \
			configure || die "patching configure failed"
	fi

	# SHM support from libXext is auto-enabled, want it to be a user choice
	# upstream has been contacted, see bug 575835 in their bugtracker
	if ! use shm; then
		sed -i -e "s/with_shm=\"yes\"/with_shm=\"no\"/" configure \
			 || die "patching configure failed"
	fi

	# V4L support is auto-enabled, want it to be a user choice
	# do not contact upstream because that's a hack
	# TODO: check if upstream has removed this hack
	if ! use v4l; then
		sed -i -e "s/V4L=\"enabled\"/V4L=\"disabled\"/" configure \
			|| die "patching configure failed"
	fi
}

pkg_postinst() {
	gnome2_pkg_postinst

	if ! use gnome; then
		ewarn "USE=-gnome is experimental, some weirdness with the UI and"
		ewarn "config keys can appear."
	fi
}