dev-python/Babel: Drop old
[gentoo.git] / kde-apps / kopete / kopete-4.14.3.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 KDE_HANDBOOK="optional"
8 inherit kde4-base
9
10 DESCRIPTION="KDE multi-protocol IM client"
11 HOMEPAGE="https://kopete.kde.org https://www.kde.org/applications/internet/kopete"
12 KEYWORDS="amd64 ~arm ppc ppc64 x86 ~amd64-linux ~x86-linux"
13 IUSE="debug ssl v4l"
14
15 # tests hang, last checked for 4.2.96
16 RESTRICT=test
17
18 # Available plugins
19 #
20 #       addbookmarks: NO DEPS
21 #       alias: NO DEPS (disabled upstream)
22 #       autoreplace: NO DEPS
23 #       contactnotes: NO DEPS
24 #       highlight: NO DEPS
25 #       history: NO DEPS
26 #       latex: virtual/latex as RDEPEND
27 #       nowlistening: NO DEPS
28 #       otr: libotr
29 #       pipes: NO DEPS
30 #       privacy: NO DEPS
31 #       statistics: dev-db/sqlite:3
32 #       texteffect: NO DEPS
33 #       translator: NO DEPS
34 #       urlpicpreview: NO DEPS
35 #       webpresence: libxml2 libxslt
36 # NOTE: By default we enable all plugins that don't have any dependencies
37 PLUGINS="+addbookmarks +autoreplace +contactnotes +highlight +history latex
38 +nowlistening otr +pipes +privacy +statistics +texteffect +translator
39 +urlpicpreview webpresence"
40
41 # Available protocols
42 #
43 #       gadu: net-libs/libgadu @since 4.3
44 #       groupwise: app-crypt/qca:2
45 #       irc: NO DEPS, probably will fail so inform user about it
46 #       xmpp: net-dns/libidn app-crypt/qca:2 ENABLED BY DEFAULT NETWORK
47 #       jingle: media-libs/speex net-libs/ortp DISABLED BY UPSTREAM
48 #       meanwhile: net-libs/meanwhile
49 #       oscar: NO DEPS
50 #   telepathy: net-libs/decibel
51 #   testbed: NO DEPS
52 #       winpopup: NO DEPS (we're adding samba as RDEPEND so it works)
53 #       yahoo: media-libs/jasper
54 #       zeroconf (bonjour): NO DEPS
55 PROTOCOLS="gadu groupwise jingle meanwhile oscar skype
56 sms testbed winpopup +xmpp yahoo zeroconf"
57
58 # disabled protocols
59 #   telepathy: net-libs/decibel
60 #   irc: NO DEPS
61 #   msn: net-libs/libmsn
62 #       qq: NO DEPS
63
64 IUSE="${IUSE} ${PLUGINS} ${PROTOCOLS}"
65
66 COMMONDEPEND="
67         dev-libs/libpcre
68         $(add_kdebase_dep kdelibs 'zeroconf?')
69         $(add_kdebase_dep kdepimlibs)
70         media-libs/qimageblitz
71         >=dev-qt/qtgui-4.4.0:4[mng]
72         !aqua? ( x11-libs/libXScrnSaver )
73         gadu? ( >=net-libs/libgadu-1.8.0[threads] )
74         groupwise? ( app-crypt/qca:2[qt4(+)] )
75         jingle? (
76                 >=media-libs/mediastreamer-2.3.0
77                 media-libs/speex
78                 net-libs/ortp:=
79         )
80         meanwhile? ( net-libs/meanwhile )
81         otr? ( >=net-libs/libotr-4.0.0 )
82         statistics? ( dev-db/sqlite:3 )
83         v4l? ( media-libs/libv4l )
84         webpresence? (
85                 dev-libs/libxml2
86                 dev-libs/libxslt
87         )
88         xmpp? (
89                 app-crypt/qca:2[qt4(+)]
90                 net-dns/libidn
91         )
92         yahoo? ( media-libs/jasper )
93 "
94 RDEPEND="${COMMONDEPEND}
95         latex? (
96                 || (
97                         media-gfx/imagemagick
98                         media-gfx/graphicsmagick[imagemagick]
99                 )
100                 virtual/latex-base
101         )
102         sms? ( app-mobilephone/smssend )
103         ssl? ( app-crypt/qca:2[openssl] )
104         winpopup? ( net-fs/samba )
105 "
106 #       telepathy? ( net-libs/decibel )"
107 DEPEND="${COMMONDEPEND}
108         !aqua? ( x11-proto/scrnsaverproto )
109 "
110
111 src_configure() {
112         local x x2
113         # Handle common stuff
114         local mycmakeargs=(
115                 $(cmake-utils_use_with jingle GOOGLETALK)
116                 $(cmake-utils_use_with jingle LiboRTP)
117                 $(cmake-utils_use_with jingle Mediastreamer)
118                 $(cmake-utils_use_with jingle Speex)
119                 $(cmake-utils_use_disable v4l VIDEOSUPPORT)
120         )
121         # enable protocols
122         for x in ${PROTOCOLS}; do
123                 case ${x/+/} in
124                         zeroconf) x2=bonjour ;;
125                         xmpp) x2=jabber ;;
126                         *) x2='' ;;
127                 esac
128                 mycmakeargs+=($(cmake-utils_use_with ${x/+/} ${x2}))
129         done
130
131         mycmakeargs+=( -DWITH_Libmsn=OFF -DWITH_qq=OFF )
132
133         # enable plugins
134         for x in ${PLUGINS}; do
135                 mycmakeargs+=($(cmake-utils_use_with ${x/+/}))
136         done
137
138         kde4-base_src_configure
139 }
140
141 pkg_postinst() {
142         kde4-base_pkg_postinst
143
144         #if use telepathy; then
145         #       elog "To use kopete telepathy plugins, you need to start gabble first:"
146         #       elog "GABBLE_PERSIST=1 telepathy-gabble &"
147         #       elog "export TELEPATHY_DATA_PATH='${EPREFIX}/usr/share/telepathy/managers/'"
148         #fi
149
150         if ! use ssl; then
151                 if use xmpp ; then # || use irc; then
152                         if ! has_version "app-crypt/qca:2[openssl]" ; then
153                                 elog "In order to use ssl in xmpp you'll need to"
154                                 elog "install app-crypt/qca package with USE=openssl."
155                         fi
156                 fi
157         fi
158 }