summaryrefslogtreecommitdiff
blob: a32151fe56b61504a14af614b25c426d2f49a79e (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
# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

MY_PN="fcitx5-chinese-addons"

inherit cmake unpacker xdg

DESCRIPTION="Addons related to Chinese, including IME previous bundled inside fcitx4."
HOMEPAGE="https://github.com/fcitx/fcitx5-chinese-addons"
SRC_URI="https://download.fcitx-im.org/fcitx5/${MY_PN}/${MY_PN}-${PV}_dict.tar.zst"

S="${WORKDIR}/${MY_PN}-${PV}"
LICENSE="GPL-2+ LGPL-2+"
SLOT="5"
KEYWORDS="amd64 ~arm64 ~loong ~riscv x86"
IUSE="+data +gui webengine +cloudpinyin +qt5 qt6 lua +opencc test"
REQUIRED_USE="
	webengine? ( gui )
"
RESTRICT="!test? ( test )"

RDEPEND="
	>=app-i18n/fcitx-5.1.9:5
	>=app-i18n/libime-1.1.7:5[data?]
	>=dev-libs/boost-1.61:=
	cloudpinyin? ( net-misc/curl )
	lua? ( app-i18n/fcitx-lua:5 )
	opencc? ( app-i18n/opencc:= )
	gui? (
		qt5? (
			dev-qt/qtconcurrent:5
			app-i18n/fcitx-qt:5[qt5,-onlyplugin]
			webengine? ( dev-qt/qtwebengine:5[widgets] )
		)
		qt6? (
			dev-qt/qtbase:6[concurrent]
			app-i18n/fcitx-qt:5[qt6,-onlyplugin]
			webengine? ( dev-qt/qtwebengine:6[widgets] )
		)
	)
"
DEPEND="${RDEPEND}"
BDEPEND="
	kde-frameworks/extra-cmake-modules:0
	virtual/pkgconfig
"

src_configure() {
	local mycmakeargs=(
		-DENABLE_BROWSER=$(usex webengine)
		-DENABLE_CLOUDPINYIN=$(usex cloudpinyin)
		-DENABLE_DATA=$(usex data)
		-DENABLE_GUI=$(usex gui)
		-DENABLE_OPENCC=$(usex opencc)
		-DENABLE_TEST=$(usex test)
		-DUSE_WEBKIT=no
		-DUSE_QT6=$(usex qt6)
	)
	cmake_src_configure
}