1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 MY_PN
="fcitx5-pinyin-sougou-baidu"
8 DESCRIPTION
="Sougou & Baidu Pinyin dictionary for Fcitx5 and RIME"
9 HOMEPAGE
="https://github.com/blackteahamburger/fcitx5-pinyin-sougou-baidu"
11 https://github.com/blackteahamburger/${MY_PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
12 sougou? ( https://github.com/blackteahamburger/${MY_PN}/releases/download/${PV}/sougou_dict.tar.gz
13 -> sougou_dict-${PV}.tar.gz )
14 baidu? ( https://github.com/blackteahamburger/${MY_PN}/releases/download/${PV}/baidu_dict.tar.gz
15 -> baidu_dict-${PV}.tar.gz )
18 S
="${WORKDIR}/${MY_PN}-${PV}"
23 IUSE
="+fcitx rime +sougou +baidu"
30 fcitx? ( app-i18n/fcitx:5 )
31 rime? ( || ( app-i18n/ibus-rime app-i18n/fcitx-rime ) )
34 fcitx? ( app-i18n/libime:5 )
35 >=app-text/imewlconverter-3.1.1
40 use sougou
&& cp -r "${WORKDIR}/sougou_dict" "${S}" || die
41 use baidu
&& cp -r "${WORKDIR}/baidu_dict" "${S}" || die
46 use sougou
&& emake sougou.dict
47 use baidu
&& emake baidu.dict
51 use sougou
&& emake sougou.dict.yaml
52 use baidu
&& emake baidu.dict.yaml
58 use sougou
&& emake DESTDIR
="${ED}" install_sougou_dict
59 use baidu
&& emake DESTDIR
="${ED}" install_baidu_dict
63 use sougou
&& emake DESTDIR
="${ED}" install_sougou_dict_yaml
64 use baidu
&& emake DESTDIR
="${ED}" install_baidu_dict_yaml