summaryrefslogtreecommitdiff
blob: bb32604f4df5e5642fb55cee385fb08cff57e261 (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-im/wengophone/wengophone-2.0_pre20099999.ebuild,v 1.4 2006/07/19 11:36:12 genstef Exp $

inherit subversion eutils toolchain-funcs

DESCRIPTION="Wengophone NG is a VoIP client featuring the SIP protcol"
HOMEPAGE="http://dev.openwengo.com"
SRC_URI=""
ESVN_REPO_URI="http://dev.openwengo.com/svn/openwengo/wengophone-ng/trunk"
ESVN_OPTIONS="--username guest --password guest"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="-*"
IUSE=""

RDEPEND="dev-libs/boost
	dev-libs/glib
	dev-libs/openssl
	media-libs/alsa-lib
	media-video/ffmpeg
	net-libs/gnutls
	|| ( x11-libs/libX11 virtual/x11 )
	>=x11-libs/qt-4.1"

DEPEND="${RDEPEND}
	media-libs/speex
	dev-util/scons"

pkg_setup() {
	if ! built_with_use dev-libs/boost threads; then
		eerror "This package requires dev-libs/boost compiled with threads support."
		eerror "Please reemerge dev-libs/boost with USE=\"threads\"."
		die "Please reemerge dev-libs/boost with USE=\"threads\"."
	fi

	if test $(gcc-major-version) -ge 4 \
		&& test $(gcc-minor-version) -ge 1 && ! grep visit_each.hpp /usr/include/boost/bind.hpp >/dev/null 2>&1; then
		eerror "You need to add #include <boost/visit_each.hpp> in"
		eerror "/usr/include/boost/bind.hpp to build with gcc-4.1"
		die "Please fix your includes"
	fi
}

src_compile() {
	# use system ffmpeg
	cp ${FILESDIR}/ffmpeg-system.scons libs/ffmpeg/SConscript
	sed -i -e "s:<avcodec.h:<ffmpeg/avcodec.h:" \
		./libs/pixertool/src/ffmpeg/ffmpeg-pixertool.c \
		./libs/pixertool/include/pixertool/pixertool.h \
		./libs/pixertool/include/pixertool/ffmpeg-pixertool.h \
		./wifo/phapi/phcodec-mpeg4.c \
		./wifo/phapi/phcodec-mpeg4.h \
		./wifo/phapi/phcodec-avcodec-wrapper.c \
		./wifo/phapi/phcodec-avcodec-wrapper.h \
		./wifo/phapi/phmedia-video-bwcontrol.c \
		./wifo/phapi/phmedia-video.c \
		./wifo/phapi/phmedia-video-control.c \
		./wifo/phapi/phapi.c \
		./wifo/phapi/phcodec-h263.c \
		./wifo/phapi/phcodec-h263.h \
		./wifo/phapi/phcodec-h264.c \
		./wengophone/src/presentation/qt/QtAbout.cpp

	QTLIBDIR=/usr/lib/qt4 QTDIR=/usr QTINCLUDEDIR=/usr/include/qt4 \
		scons qtwengophone \
		mode=release || die "scons failed"
}

src_install() {
	cd release-symbols
	insinto /usr/share/wengophone
	doins -r emoticons pics sounds
	exeinto /usr/lib/wengophone
	doexe wengophone/src/presentation/qt/qtwengophone \
		wifo/phapi/libphapi.so libs/curl/libowcurl.so
	make_wrapper wengophone /usr/lib/wengophone/qtwengophone /usr/share/wengophone /usr/lib/wengophone
	newicon ${S}/wengophone/src/presentation/qt/pics/contact/wengo.png wengophone.png
	make_desktop_entry wengophone
}