491
|
1
|
|
2 EAPI=7
|
|
3
|
|
4 #inherit eutils l10n multilib gnome2-utils
|
|
5 inherit l10n qmake-utils xdg
|
|
6
|
|
7 DESCRIPTION="Qt5 Jabber client, with Licq-like interface"
|
|
8 HOMEPAGE="https://github.com/psi-plus/psi-plus-snapshots/"
|
|
9 SRC_URI="https://github.com/psi-plus/psi-plus-snapshots/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
|
10
|
|
11 S="${WORKDIR}/psi-plus-snapshots-${PV}"
|
|
12
|
|
13 LICENSE="GPL-2"
|
|
14 SLOT="0"
|
|
15 KEYWORDS="~amd64 ~x86"
|
|
16 IUSE="aspell autoreplyplugin crypt debug doc enchant hunspell jingle keychain omemo otrplugin spell ssl xscreensaver watcherplugin webkit +webengine whiteboarding"
|
|
17
|
|
18 BDEPEND="
|
|
19 dev-qt/linguist-tools:5
|
|
20 virtual/pkgconfig
|
|
21 "
|
|
22
|
|
23 DEPEND="
|
|
24 app-crypt/qca:2[ssl]
|
|
25 dev-qt/qtconcurrent:5
|
|
26 dev-qt/qtcore:5
|
|
27 dev-qt/qtdbus:5
|
|
28 dev-qt/qtgui:5
|
|
29 dev-qt/qtmultimedia:5
|
|
30 dev-qt/qtnetwork:5
|
|
31 dev-qt/qtwidgets:5
|
|
32 dev-qt/qtx11extras:5
|
|
33 dev-qt/qtxml:5
|
|
34 net-dns/libidn:0
|
|
35 net-libs/http-parser
|
|
36 sys-libs/zlib[minizip]
|
|
37 x11-libs/libX11
|
|
38 x11-libs/libxcb
|
|
39 aspell? ( app-text/aspell )
|
|
40 enchant? ( >=app-text/enchant-1.3.0 )
|
|
41 hunspell? ( app-text/hunspell:= )
|
|
42 keychain? ( dev-libs/qtkeychain )
|
|
43 omemo? ( net-libs/libsignal-protocol-c )
|
|
44 otrplugin? ( net-libs/libotr app-text/htmltidy )
|
|
45 webengine? (
|
|
46 dev-qt/qtwebchannel:5
|
|
47 dev-qt/qtwebengine:5[widgets]
|
|
48 )
|
|
49 webkit? ( dev-qt/qtwebkit:5 )
|
|
50 whiteboarding? ( dev-qt/qtsvg:5 )
|
|
51 xscreensaver? ( x11-libs/libXScrnSaver )
|
|
52 "
|
|
53
|
|
54 RDEPEND="${DEPEND}
|
|
55 dev-qt/qtimageformats
|
|
56 "
|
|
57
|
|
58 src_configure() {
|
|
59 CONF=(
|
|
60 --prefix="${EPREFIX}"/usr
|
|
61 --libdir="${EPREFIX}"/usr/$(get_libdir)
|
|
62 --no-separate-debug-info
|
|
63 --qtdir="$(qt5_get_bindir)/.."
|
|
64 $(use_enable aspell)
|
|
65 $(use_enable enchant)
|
|
66 $(use_enable hunspell)
|
|
67 $(use_enable keychain)
|
|
68 $(use_enable xscreensaver xss)
|
|
69 $(use_enable whiteboarding)
|
|
70 )
|
|
71
|
|
72 use debug && CONF+=("--debug")
|
|
73 use webengine && CONF+=("--enable-webkit" "--with-webkit=qtwebengine")
|
|
74 use webkit && CONF+=("--enable-webkit" "--with-webkit=qtwebkit")
|
|
75
|
|
76 # This may generate warnings if passed option already matches with default.
|
|
77 # Just ignore them. It's how qconf-based configure works and will be fixed in
|
|
78 # future qconf versions.
|
|
79 ./configure "${CONF[@]}" || die "configure failed"
|
|
80
|
|
81 eqmake5 psi.pro
|
|
82 }
|
|
83
|
|
84 src_compile() {
|
|
85 emake
|
|
86 use doc && emake -C doc api_public
|
|
87
|
|
88 if use autoreplyplugin; then
|
|
89 cd src/plugins/generic/autoreplyplugin
|
|
90 qmake
|
|
91 make
|
|
92 cd ../../../..
|
|
93 fi
|
|
94
|
|
95 if use otrplugin; then
|
|
96 cd src/plugins/generic/otrplugin
|
|
97 qmake
|
|
98 make
|
|
99 cd ../../../..
|
|
100 fi
|
|
101
|
|
102 if use omemo; then
|
|
103 cd src/plugins/generic/omemoplugin
|
|
104 qmake
|
|
105 make
|
|
106 cd ../../../..
|
|
107 fi
|
|
108
|
|
109 if use watcherplugin; then
|
|
110 cd src/plugins/generic/watcherplugin
|
|
111 qmake
|
|
112 make
|
|
113 cd ../../../..
|
|
114 fi
|
|
115 }
|
|
116
|
|
117 src_install() {
|
|
118 emake INSTALL_ROOT="${D}" install
|
|
119
|
|
120 # this way the docs will be installed in the standard gentoo dir
|
|
121 rm "${ED}"/usr/share/${PN}/{COPYING,README.html} || die "doc files set seems to have changed"
|
|
122 newdoc iconsets/roster/README README.roster
|
|
123 newdoc iconsets/system/README README.system
|
|
124 newdoc certs/README README.certs
|
|
125 dodoc README.html
|
|
126
|
|
127 use doc && HTML_DOCS=( doc/api/. )
|
|
128 einstalldocs
|
|
129
|
|
130 # install translations
|
|
131 # local mylrelease="$(qt5_get_bindir)"/lrelease
|
|
132 # cd "${WORKDIR}/${PN}/psi-l10n" || die
|
|
133 # insinto /usr/share/${PN}
|
|
134 # install_locale() {
|
|
135 # "${mylrelease}" "translations/${PN}_${1}.ts" || die "lrelease ${1} failed"
|
|
136 # doins "translations/${PN}_${1}.qm"
|
|
137 # }
|
|
138 # l10n_for_each_locale_do install_locale
|
|
139
|
|
140 local plugindir="/usr/share/psi-plus/plugins"
|
|
141 if use autoreplyplugin; then
|
|
142 cd src/plugins/generic/autoreplyplugin
|
|
143
|
|
144 strip --strip-unneeded libautoreplyplugin.so
|
|
145
|
|
146 dodir "${plugindir}"
|
|
147 insinto "${plugindir}"
|
|
148 doins libautoreplyplugin.so
|
|
149
|
|
150 cd ../../../..
|
|
151 fi
|
|
152
|
|
153 if use otrplugin; then
|
|
154 cd src/plugins/generic/otrplugin
|
|
155
|
|
156 strip --strip-unneeded libotrplugin.so
|
|
157
|
|
158 dodir "${plugindir}"
|
|
159 insinto "${plugindir}"
|
|
160 doins libotrplugin.so
|
|
161
|
|
162 cd ../../../..
|
|
163 fi
|
|
164
|
|
165 if use omemo; then
|
|
166 cd src/plugins/generic/omemoplugin
|
|
167
|
|
168 strip --strip-unneeded libomemoplugin.so
|
|
169
|
|
170 dodir "${plugindir}"
|
|
171 insinto "${plugindir}"
|
|
172 doins libomemoplugin.so
|
|
173
|
|
174 cd ../../../..
|
|
175 fi
|
|
176
|
|
177 if use watcherplugin; then
|
|
178 cd src/plugins/generic/watcherplugin
|
|
179
|
|
180 strip --strip-unneeded libwatcherplugin.so
|
|
181
|
|
182 dodir "${plugindir}"
|
|
183 insinto "${plugindir}"
|
|
184 doins libwatcherplugin.so
|
|
185
|
|
186 cd ../../../..
|
|
187 fi
|
|
188 }
|
|
189
|
|
190 pkg_postinst() {
|
|
191 xdg_pkg_postinst
|
|
192 }
|