1 |
|
# Copyright 1999-2023 Gentoo Authors
|
|
1 |
# Copyright 2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
if [[ ${PV} != *9999* ]]; then
|
7 |
|
KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64 ~riscv x86"
|
8 |
|
fi
|
9 |
|
|
10 |
|
inherit qt5-build
|
|
6 |
inherit qt6-build
|
11 |
7 |
|
12 |
8 |
DESCRIPTION="Customizable input framework and virtual keyboard for Qt"
|
13 |
9 |
|
14 |
|
# TODO: unbundle libraries for more layouts
|
15 |
|
IUSE="handwriting +spell +X"
|
|
10 |
if [[ ${QT6_BUILD_TYPE} == release ]]; then
|
|
11 |
KEYWORDS="amd64"
|
|
12 |
fi
|
|
13 |
|
|
14 |
IUSE="+spell"
|
16 |
15 |
|
17 |
|
DEPEND="
|
18 |
|
=dev-qt/qtcore-${QT5_PV}*
|
19 |
|
=dev-qt/qtdeclarative-${QT5_PV}*
|
20 |
|
=dev-qt/qtgui-${QT5_PV}*
|
21 |
|
=dev-qt/qtsvg-${QT5_PV}*
|
|
16 |
RDEPEND="
|
|
17 |
~dev-qt/qtbase-${PV}:6[gui]
|
|
18 |
~dev-qt/qtdeclarative-${PV}:6
|
|
19 |
~dev-qt/qtsvg-${PV}:6
|
22 |
20 |
spell? ( app-text/hunspell:= )
|
23 |
|
X? ( x11-libs/libxcb:= )
|
24 |
21 |
"
|
25 |
|
RDEPEND="${DEPEND}"
|
|
22 |
DEPEND="${RDEPEND}"
|
26 |
23 |
|
27 |
24 |
src_configure() {
|
28 |
|
local myqmakeargs=(
|
29 |
|
$(usev handwriting CONFIG+=lipi-toolkit)
|
30 |
|
$(usev !spell CONFIG+=disable-hunspell)
|
31 |
|
$(usev !X CONFIG+=disable-desktop)
|
32 |
|
CONFIG+="lang-ar_AR lang-bg_BG lang-cs_CZ lang-da_DK lang-de_DE \
|
33 |
|
lang-el_GR lang-en_GB lang-en_US lang-es_ES lang-es_MX \
|
34 |
|
lang-et_EE lang-fa_FA lang-fi_FI lang-fr_CA lang-fr_FR \
|
35 |
|
lang-he_IL lang-hi_IN lang-hr_HR lang-hu_HU lang-id_ID \
|
36 |
|
lang-it_IT lang-ms_MY lang-nb_NO lang-nl_NL lang-pl_PL \
|
37 |
|
lang-pt_BR lang-pt_PT lang-ro_RO lang-ru_RU lang-sk_SK \
|
38 |
|
lang-sl_SI lang-sq_AL lang-sr_SP lang-sv_SE lang-tr_TR \
|
39 |
|
lang-uk_UA lang-vi_VN"
|
|
25 |
local mycmakeargs=(
|
|
26 |
$(qt_feature spell hunspell)
|
|
27 |
-DINPUT_vkb_handwriting=no # neither cerence nor myscript are packaged
|
40 |
28 |
)
|
41 |
|
qt5-build_src_configure
|
|
29 |
|
|
30 |
qt6-build_src_configure
|
|
31 |
}
|
|
32 |
|
|
33 |
src_test() {
|
|
34 |
if use spell && has_version app-dicts/myspell-en; then
|
|
35 |
# 99% pass but minor sub-tests fail with myspell-en, needs looking into
|
|
36 |
ewarn "Warning: notable tests were skipped due to ${_} being installed"
|
|
37 |
local CMAKE_SKIP_TESTS=(
|
|
38 |
tst_inputpanel
|
|
39 |
tst_inputpanelcontrols2
|
|
40 |
)
|
|
41 |
else
|
|
42 |
einfo "tst_inputpanel can take >5mins, not known to actually hang"
|
|
43 |
fi
|
|
44 |
|
|
45 |
# tst_layoutfilesystem seems to fail randomly without -j1
|
|
46 |
qt6-build_src_test -j1
|
42 |
47 |
}
|