kde-frameworks/ktexteditor: 5.70.1 version bump
[gentoo.git] / kde-apps / kopete / kopete-20.04.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 ECM_HANDBOOK="forceoptional"
7 ECM_TEST="forceoptional"
8 PVCUT=$(ver_cut 1-3)
9 KFMIN=5.69.0
10 QTMIN=5.12.3
11 inherit ecm kde.org
12
13 DESCRIPTION="Multi-protocol IM client based on KDE Frameworks"
14 HOMEPAGE="https://kde.org/applications/internet/org.kde.kopete
15 https://userbase.kde.org/Kopete"
16
17 LICENSE="GPL-2" # TODO: CHECK
18 SLOT="5"
19 KEYWORDS="~amd64 ~arm64 ~x86"
20 IUSE="ssl v4l"
21
22 # Available plugins
23 #       addbookmarks: NO DEPS
24 #       alias: NO DEPS (disabled upstream)
25 #       autoreplace: NO DEPS
26 #       contactnotes: NO DEPS
27 #       cryptography: BROKEN (app-crypt/gpgme[cxx,qt5], kde-apps/libkleo:5)
28 #       highlight: NO DEPS
29 #       history: NO DEPS
30 #       latex: virtual/latex as RDEPEND
31 #       nowlistening: NO DEPS
32 #       otr: libotr
33 #       pipes: NO DEPS
34 #       privacy: NO DEPS
35 #       statistics: dev-db/sqlite:3
36 #       texteffect: NO DEPS
37 #       translator: NO DEPS
38 #       urlpicpreview: NO DEPS
39 #       webpresence: libxml2 libxslt
40 # NOTE: By default we enable all plugins that don't have any dependencies
41 PLUGINS="+addbookmarks +autoreplace +contactnotes +highlight history latex nowlistening
42 otr pipes +privacy +statistics +texteffect translator +urlpicpreview webpresence"
43
44 # Available protocols
45 #       gadu: net-libs/libgadu @since 4.3
46 #       groupwise: app-crypt/qca:2
47 #       irc: NO DEPS, probably will fail so inform user about it
48 #       xmpp: net-dns/libidn app-crypt/qca:2 ENABLED BY DEFAULT NETWORK
49 #       meanwhile: net-libs/meanwhile
50 #       oscar: NO DEPS
51 #       telepathy: net-libs/decibel
52 #       testbed: NO DEPS
53 #       winpopup: NO DEPS (we're adding samba as RDEPEND so it works)
54 #       zeroconf (bonjour): NO DEPS
55 PROTOCOLS="gadu groupwise meanwhile oscar testbed winpopup +xmpp zeroconf"
56
57 # disabled protocols
58 #       irc: NO DEPS
59 #       jingle: media-libs/speex net-libs/ortp DISABLED BY UPSTREAM
60 #       qq: NO DEPS
61 #       telepathy: net-libs/decibel
62 #       skype, sms (until fixed)
63
64 IUSE="${IUSE} ${PLUGINS} ${PROTOCOLS}"
65
66 COMMON_DEPEND="
67         app-crypt/gpgme[cxx,qt5]
68         dev-libs/libpcre
69         >=dev-qt/qtgui-${QTMIN}:5
70         >=dev-qt/qtsql-${QTMIN}:5
71         >=dev-qt/qtwidgets-${QTMIN}:5
72         >=dev-qt/qtxml-${QTMIN}:5
73         >=kde-apps/kidentitymanagement-${PVCUT}:5
74         >=kde-apps/libkleo-${PVCUT}:5
75         >=kde-frameworks/kcmutils-${KFMIN}:5
76         >=kde-frameworks/kconfig-${KFMIN}:5
77         >=kde-frameworks/kcontacts-${KFMIN}:5
78         >=kde-frameworks/kcrash-${KFMIN}:5
79         >=kde-frameworks/kdbusaddons-${KFMIN}:5
80         >=kde-frameworks/khtml-${KFMIN}:5
81         >=kde-frameworks/kcoreaddons-${KFMIN}:5
82         >=kde-frameworks/kdbusaddons-${KFMIN}:5
83         >=kde-frameworks/kdelibs4support-${KFMIN}:5
84         >=kde-frameworks/kemoticons-${KFMIN}:5
85         >=kde-frameworks/khtml-${KFMIN}:5
86         >=kde-frameworks/ki18n-${KFMIN}:5
87         >=kde-frameworks/knotifyconfig-${KFMIN}:5
88         >=kde-frameworks/kparts-${KFMIN}:5
89         >=kde-frameworks/ktexteditor-${KFMIN}:5
90         media-libs/phonon[qt5(+)]
91         x11-libs/libX11
92         x11-libs/libXScrnSaver
93         gadu? ( >=net-libs/libgadu-1.8.0[threads] )
94         groupwise? ( app-crypt/qca:2[qt5(+)] )
95         meanwhile? ( net-libs/meanwhile )
96         otr? ( >=net-libs/libotr-4.0.0 )
97         statistics? ( dev-db/sqlite:3 )
98         v4l? ( media-libs/libv4l )
99         webpresence? (
100                 dev-libs/libxml2
101                 dev-libs/libxslt
102         )
103         xmpp? (
104                 app-crypt/qca:2[qt5(+)]
105                 net-dns/libidn:0=
106                 sys-libs/zlib
107         )
108         zeroconf? (
109                 >=kde-apps/kidentitymanagement-${PVCUT}:5
110                 >=kde-frameworks/kdnssd-${KFMIN}:5
111         )
112 "
113 #       jingle? (
114 #               dev-libs/expat
115 #               dev-libs/openssl:0=
116 #               >=media-libs/mediastreamer-2.3.0
117 #               media-libs/speex
118 #               net-libs/libsrtp:0=
119 #               net-libs/ortp:=
120 #       )
121 RDEPEND="${COMMON_DEPEND}
122         latex? (
123                 || (
124                         media-gfx/imagemagick
125                         media-gfx/graphicsmagick[imagemagick]
126                 )
127                 virtual/latex-base
128         )
129         ssl? ( app-crypt/qca:2[ssl] )
130 "
131 #       sms? ( app-mobilephone/smssend )
132 #       winpopup? ( net-fs/samba )
133 DEPEND="${COMMON_DEPEND}
134         x11-base/xorg-proto
135 "
136 #       jingle? ( dev-libs/jsoncpp )
137
138 # tests hang, last checked for 4.2.96
139 RESTRICT+=" test"
140
141 src_configure() {
142         local x x2
143         # Handle common stuff
144         local mycmakeargs=(
145                 -DWITH_qq=OFF
146                 -DDISABLE_VIDEOSUPPORT=$(usex !v4l)
147         )
148 #               $(cmake_use_find_package jingle LiboRTP)
149 #               $(cmake_use_find_package jingle Mediastreamer)
150 #               $(cmake_use_find_package jingle Speex)
151
152         # enable protocols
153         for x in ${PROTOCOLS}; do
154                 case ${x/+/} in
155                         jingle) x2=libjingle ;;
156                         xmpp) x2=jabber ;;
157                         zeroconf) x2=bonjour ;;
158                         *) x2=${x/+/} ;;
159                 esac
160                 mycmakeargs+=( -DWITH_${x2}=$(usex ${x/+/}) )
161         done
162
163         # disable until fixed:
164         mycmakeargs+=( -DWITH_{cryptography,libjingle,skype,sms}=OFF )
165
166         # enable plugins
167         for x in ${PLUGINS}; do
168                 mycmakeargs+=( -DWITH_${x/+/}=$(usex ${x/+/}) )
169         done
170
171         ecm_src_configure
172 }
173
174 pkg_postinst() {
175         ecm_pkg_postinst
176
177         if ! use ssl; then
178                 if use xmpp ; then
179                         if ! has_version "app-crypt/qca:2[ssl]" ; then
180                                 elog "In order to use ssl in xmpp you'll need to"
181                                 elog "install app-crypt/qca package with USE=ssl."
182                         fi
183                 fi
184         fi
185 }