summaryrefslogtreecommitdiff
blob: 95f21d5ea91eaef5649da22acf5cf3bb0c23397d (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-im/qutim/qutim-0.3.0.ebuild,v 1.2 2012/04/09 22:26:02 pesa Exp $

EAPI=4

LANGS="ar bg cs de en_GB ru uk zh_CN"

inherit qt4-r2 cmake-utils

DESCRIPTION="Qt4-based multi-protocol instant messenger"
HOMEPAGE="http://www.qutim.org"
SRC_URI="http://www.qutim.org/downloads/${P}.tar.bz2"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="aspell awn ayatana crypt dbus debug doc histman hunspell irc jabber kde kinetic mrim
	multimedia oscar phonon purple qml sdl +ssl telepathy vkontakte webkit +xscreensaver"

REQUIRED_USE="
	oscar? ( ssl )
"

QT_PV="4.7.0:4"

RDEPEND="
	x11-libs/libqxt
	>=x11-libs/qt-core-${QT_PV}[ssl?]
	>=x11-libs/qt-gui-${QT_PV}
	>=x11-libs/qt-script-${QT_PV}
	aspell? ( app-text/aspell )
	awn? ( >=x11-libs/qt-dbus-${QT_PV} )
	ayatana? ( >=dev-libs/libindicate-qt-0.2.2 )
	crypt? ( app-crypt/qca:2 )
	dbus? ( >=x11-libs/qt-dbus-${QT_PV} )
	debug? ( >=x11-libs/qt-declarative-${QT_PV} )
	histman? ( >=x11-libs/qt-sql-${QT_PV} )
	hunspell? ( app-text/hunspell )
	jabber? ( net-libs/jreen )
	kde? (
		dev-util/automoc
		kde-base/kdelibs:4
	)
	kinetic? ( >=x11-libs/qt-declarative-${QT_PV} )
	multimedia? ( >=x11-libs/qt-multimedia-${QT_PV} )
	oscar? ( app-crypt/qca:2 )
	phonon? (
		kde? ( media-libs/phonon )
		!kde? ( || ( >=x11-libs/qt-phonon-${QT_PV} media-libs/phonon ) )
	)
	purple? ( net-im/pidgin )
	qml? (
		>=x11-libs/qt-declarative-${QT_PV}
		>=x11-libs/qt-opengl-${QT_PV}
	)
	sdl? ( media-libs/sdl-mixer )
	telepathy? ( net-libs/telepathy-qt )
	vkontakte? ( >=x11-libs/qt-webkit-${QT_PV} )
	webkit? ( >=x11-libs/qt-webkit-${QT_PV} )
	xscreensaver? ( x11-libs/libXScrnSaver )
"
DEPEND="${RDEPEND}
	dev-util/pkgconfig
	doc? ( app-doc/doxygen )
"

PATCHES=(
	"${FILESDIR}/${P}-fix-linking-with-system-jreen.patch"
)

src_prepare() {
	base_src_prepare

	# fix automagic dep on libXScrnSaver
	if ! use xscreensaver; then
		sed -i -e '/XSS xscrnsaver/d' \
			core/src/corelayers/idledetector/CMakeLists.txt || die
	fi

	# remove unwanted translations
	local lang
	for lang in ${LANGS}; do
		use linguas_${lang} || rm -f translations/modules/*/${lang}.{po,ts}
	done
}

src_configure() {
	local mycmakeargs=(
		-DSYSTEM_JREEN=ON
		$(cmake-utils_use_with doc DOXYGEN)
		$(cmake-utils_use doc QUTIM_GENERATE_DOCS)
		# plugins
		$(cmake-utils_use aspell ASPELLER)
		$(cmake-utils_use awn)
		$(cmake-utils_use ayatana INDICATOR)
		$(cmake-utils_use crypt AESCRYPTO)
		$(cmake-utils_use dbus DBUSAPI)
		$(cmake-utils_use dbus DBUSNOTIFICATIONS)
		$(cmake-utils_use dbus NOWPLAYING)
		$(cmake-utils_use debug LOGGER)
		$(cmake-utils_use histman)
		$(cmake-utils_use hunspell HUNSPELLER)
		$(cmake-utils_use kde KDEINTEGRATION)
		$(cmake-utils_use kinetic KINETICPOPUPS)
		$(cmake-utils_use multimedia MULTIMEDIABACKEND)
		$(cmake-utils_use phonon PHONONSOUND)
		$(cmake-utils_use qml QMLCHAT)
		$(cmake-utils_use sdl SDLSOUND)
		$(cmake-utils_use webkit ADIUMWEBVIEW)
		-DHAIKUNOTIFICATIONS=OFF
		-DUNITYLAUNCHER=OFF
		-DUPDATER=OFF
		# protocols
		$(cmake-utils_use irc)
		$(cmake-utils_use jabber)
		$(cmake-utils_use mrim)
		$(cmake-utils_use oscar)
		$(cmake-utils_use purple QUETZAL)
		$(cmake-utils_use telepathy ASTRAL)
		$(cmake-utils_use vkontakte)
	)
	cmake-utils_src_configure
}