blob: 9d71becd261d4b550c32ddc247f401711069acca (
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
# Distributed under the terms of the GNU General Public License v2
# Copyright 1999-2018 Gentoo Foundation
# Copyright 2018 Gluzskiy Alexandr <sss@sss.chaoslab.ru>
SCM_REPOSITORY="https://github.com/psi-im/psi.git"
SCM_EXTERNAL_REFS="
src/libpsi:libpsi
iris:iris
3rdparty/qhttp:qhttp
3rdparty/http-parser:httpparser
3rdparty/qite:qite
"
SCM_SECONDARY_REPOSITORIES="
iris
libpsi
qhttp
httpparser
psiplus
resources
psiplusl10n
psiplusplugins
qite
"
SCM_iris_REPOSITORY="https://github.com/psi-im/iris.git"
SCM_libpsi_REPOSITORY="https://github.com/psi-im/libpsi.git"
SCM_qhttp_REPOSITORY="https://github.com/psi-im/qhttp.git"
SCM_httpparser_REPOSITORY="https://github.com/nodejs/http-parser.git"
SCM_qite_REPOSITORY="https://github.com/Ri0n/qite.git"
SCM_psiplus_REPOSITORY="https://github.com/psi-plus/main.git"
SCM_resources_REPOSITORY="https://github.com/psi-plus/resources.git"
SCM_psiplusl10n_REPOSITORY="https://github.com/psi-plus/psi-plus-l10n.git"
SCM_psiplusplugins_REPOSITORY="https://github.com/psi-im/plugins.git"
require scm-git
require cmake [ api=2 ]
DOWNLOADS=""
SLOT="0"
PLATFORMS="~amd64 ~x86"
SUMMARY="Qt XMPP client"
HOMEPAGE="http://psi-im.org/"
LANGS="be bg ca cs de en eo es et fa fi fr he hu it ja kk mk nl pl pt pt_BR ru sk sl sr@latin sv sw uk ur_PK vi zh_CN zh_TW"
MYOPTIONS="
crypt
debug
doc
sql [[ description = [ support sql backend for data storage ] ]]
plugins [[ description = [ build all available psi-plus plugins ] ]]
whiteboarding [[ description = [ Build whiteboarding plugin ] ]]
xscreensaver [[ description = [ support xscrinsaver (preventing) ] ]]
linguas: ( ${LANGS} )
( providers:
hunspell [[ description = [ spell checking support ] ]]
enchant [[ description = [ spell checking support ] ]]
)
[[ number-selected = at-most-one ]]
( providers:
webengine [[ description = [ support html/js rendering via qtwebengine ] ]]
webkit [[ description = [ support html/js rendering via qtwebkit (deprecated) ] ]]
)
[[ number-selected = at-most-one ]]
"
DEPENDENCIES="
build+run:
app-crypt/qca
net-dns/libidn
sys-libs/zlib
x11-libs/qtbase:5[gui][sql][sqlite]
x11-libs/qtmultimedia:5
x11-libs/qtx11extras:5
x11-libs/libX11
x11-libs/libxcb
crypt? ( app-crypt/qca[gnupg] )
whiteboarding? ( x11-libs/qtsvg:5 )
xscreensaver? ( x11-libs/libXScrnSaver )
providers:enchant? ( app-spell/enchant )
providers:hunspell? ( app-spell/hunspell )
providers:webengine? (
x11-libs/qtwebengine:5
x11-libs/qtwebchannel:5
net-libs/http-parser
)
providers:webkit? ( x11-libs/qtwebkit:5 )
build:
doc? ( app-doc/doxygen )
suggestion:
x11-libs/qtimageformats [[
description = [ for webp image format support ]
]]
"
#TODO: fix problem, disabled for now
# 'extras BUILD_PSIMEDIA'
CMAKE_SRC_CONFIGURE_OPTIONS=(
'providers:webkit IS_WEBKIT'
'providers:webengine IS_WEBENGINE'
)
CMAKE_SRC_CONFIGURE_OPTION_USES=(
'providers:enchant ENCHANT'
'providers:hunspell HUNSPELL'
)
CMAKE_SRC_CONFIGURE_OPTION_ENABLES=(
'plugins PLUGINS'
)
CMAKE_SRC_CONFIGURE_PARAMS+=(
-DBUNDLED_IRIS=ON
-DUSE_CCACHE=OFF
-DBUILD_PSIMEDIA=OFF
-DCHAT_TYPE=BASIC
-DPSI_PLUS=ON
)
pkg_setup() {
MY_PN=psi-plus
}
src_prepare() {
cd "${WORKBASE}/${PNV}"
edo mv ../psiplus psi-plus
edo mv ../psiplusl10n psi-l10n
edo mv ../resources resources
edo mv ../psiplusplugins/deprecated/* src/plugins/deprecated
edo rmdir ../psiplusplugins/deprecated
edo cp -r ../psiplusplugins/* src/plugins
#TODO: fix plugins build
# disabling broken for now
# disabling omemo: required additional libraryes
# disabling otr: required additional libraryes
# disabling juick: forcing webkit
edo cd src/plugins
expatch "${FILES}"/disable_plugins.patch
edo cd ../../
vergen="${WORKBASE}/${PNV}/psi-plus/admin/psi-plus-nightly-version"
local features=()
option providers:webkit && features+="--webkit"
option providers:webengine && features+="--webengine"
option sql && features+="--sql"
features="$(option providers:webkit && echo '--webkit') $(option providers:webengine && echo '--webengine') $(option sql && echo '--sql')"
NIGHTLY_VER=$("${vergen}" ./ $features)
elog "Prepared version: ${NIGHTLY_VER}"
echo "${NIGHTLY_VER}" > version || die "Failed to write version file"
edo sed -e "s/pkg-config/$(exhost --target)-pkg-config/g" -i "${WORKBASE}/${PNV}"/configure
edo sed -e "s/pkg-config/$(exhost --target)-pkg-config/g" -i "${WORKBASE}/${PNV}"/iris/configure
cd "${WORK}"
default
}
src_install() {
cmake_src_install
# rm "${ED}"/usr/share/${MY_PN}/{COPYING,README.html} || die "Installed file set seems to be changed by upstream"
# newdoc certs/README README.certs
# dodoc README.html
option doc && HTML_DOCS=( doc/api/. )
emagicdocs
mylrelease=lrelease-qt5
cd "${WORKBASE}/${PNV}"/psi-l10n
insinto /usr/$(exhost --target)/share/${MY_PN}
for lang in ${LANGS}; do
if option "linguas:${lang}"; then
edo "${mylrelease}" "translations/${PN}_${lang}.ts"
doins "translations/${PN}_${lang}.qm"
fi
done
}
|