blob: c0d968947f2038030bad04576a798f7460ba6b65 (
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
185
186
187
188
189
190
191
192
193
|
# Distributed under the terms of the GNU General Public License v2
SCM_REPOSITORY="https://github.com/psi-im/psi.git"
SCM_EXTERNAL_REFS="
src/libpsi:libpsi
iris:iris
3rdparty/qhttp:qhttp
3rdparty/http-parser:httpparser
"
SCM_SECONDARY_REPOSITORIES="
iris
libpsi
qhttp
httpparser
psiplus
resources
psiplusl10n
"
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_psiplus_REPOSITORY="https://github.com/psi-plus/main.git"
SCM_resources_REPOSITORY="https://github.com/psi-plus/resources.git"
#SCM_l10n_REPOSITORY="https://github.com/psi-im/psi-l10n.git"
SCM_psiplusl10n_REPOSITORY="https://github.com/psi-plus/psi-plus-l10n.git"
require scm-git
require qmake [ slot=5 ]
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
( providers:
aspell
hunspell
enchant
)
[[ number-selected = at-most-one ]]
extras
(
sql
iconsets
)
[[ *requires = extras ]]
jingle
( providers:
webengine
webkit
)
[[ number-selected = at-most-one ]]
webp
whiteboarding
xscreensaver
linguas: ( ${LANGS} )
"
DEPENDENCIES="
build+run:
app-crypt/qca[qt5]
crypt? ( app-crypt/qca[gnupg] )
jingle? (
net-im/psimedia[extras?]
)
webp? ( x11-libs/qtimageformats )
x11-libs/qtbase:5[gui][sql][sqlite]
x11-libs/qtmultimedia:5
x11-libs/qtx11extras:5
net-dns/libidn
sys-libs/zlib
x11-libs/libX11
x11-libs/libxcb
providers:aspell? ( app-spell/aspell )
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 )
whiteboarding? ( x11-libs/qtsvg:5 )
xscreensaver? ( x11-libs/libXScrnSaver )
build:
doc? ( app-doc/doxygen )
extras? ( sys-devel/qconf[>=2.4] )
"
#$DEFAULT_SRC_PREPARE_PATCHES=(
#)
pkg_setup() {
MY_PN=psi
if option extras; then
MY_PN=psi-plus
fi
}
src_prepare() {
default_src_prepare
edo mv ../psiplus psi-plus
edo mv ../psiplusl10n psi-l10n
edo mv ../resources resources
if option extras; then
edo cp -a "${WORK}/psi-plus/iconsets" . || die "failed to copy iconsets"
if option iconsets; then
edo cp -a "${WORK}/resources/iconsets" . || die "failed to copy additional iconsets"
fi
expatch "${WORK}/psi-plus/patches"/*.diff
option sql && expatch "${WORK}/psi-plus/patches/dev/psi-new-history.patch"
vergen="${WORK}/psi-plus/admin/psi-plus-nightly-version"
local features=()
# option webkit && features+="--webkit"
# option 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"
qconf || die "Failed to create ./configure."
fi
}
src_configure() {
CONF=(
--prefix=/usr/$(exhost --target)
--no-separate-debug-info
--enable-qdbus
$(option_enable providers:aspell aspell)
$(option_enable providers:enchant enchant)
$(option_enable providers:hunspell hunspell)
$(option_enable xscreensaver xss)
$(option_enable whiteboarding)
)
option debug && CONF+=("--debug")
option providers:webengine && CONF+=("--enable-webkit" "--with-webkit=qtwebengine")
option providers:webkit && CONF+=("--enable-webkit" "--with-webkit=qtwebkit")
# This may generate warnings if passed option already matches with default.
# Just ignore them. It's how qconf-based configure works and will be fixed in
# future qconf versions.
./configure "${CONF[@]}" || die "configure failed"
eqmake psi.pro
edo rm -rf psi-plus
}
src_compile() {
emake
option doc && emake -C doc api_public
}
src_install() {
# qmake_src_install
default_src_install
# rm "${ED}"/usr/share/${MY_PN}/{COPYING,README.html} || die "Installed file set seems to be changed by upstream"
newdoc iconsets/roster/README README.roster
newdoc iconsets/system/README README.system
newdoc certs/README README.certs
dodoc README.html
option doc && HTML_DOCS=( doc/api/. )
emagicdocs
mylrelease=lrelease-qt5
cd "${WORK}"/psi-l10n
insinto /usr/share/${MY_PN}
for lang in ${LANGS}; do
if option "linguas:${lang}"; then
"${mylrelease}" "translations/${PN}_${lang}.ts" || die "lrelease ${1} failed"
doins "translations/${PN}_${lang}.qm"
fi
done
}
|