app-i18n/nkf: fix tests
[gentoo.git] / app-i18n / sunpinyin-data / sunpinyin-data-20130220.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="6"
5
6 DICT_VERSION="${PV}"
7 LM_VERSION="20121025"
8
9 DESCRIPTION="Data sets for Sunpinyin"
10 HOMEPAGE="https://github.com/sunpinyin/open-gram"
11 SRC_URI="mirror://sourceforge/open-gram/dict.utf8-${DICT_VERSION}.tar.bz2
12         mirror://sourceforge/open-gram/lm_sc.t3g.arpa-${LM_VERSION}.tar.bz2"
13
14 LICENSE="Apache-2.0"
15 SLOT="0"
16 KEYWORDS="amd64 ppc ppc64 x86"
17 IUSE=""
18
19 DEPEND="=app-i18n/sunpinyin-2.0.4*"
20
21 src_unpack() {
22         default
23         mkdir "${S}" || die
24         mv "${WORKDIR}"/dict.utf8 "${S}" || die
25         mv "${WORKDIR}"/lm_sc.t3g.arpa "${S}" || die
26 }
27
28 src_compile() {
29         # lm_sc.t3g
30         echoit tslmpack lm_sc.t3g.arpa dict.utf8 lm_sc.t3g.orig
31         echoit tslmendian -i lm_sc.t3g.orig -o lm_sc.t3g
32         # lexicon3
33         echoit genpyt -i dict.utf8 -s lm_sc.t3g.orig -l pydict_sc.log -o pydict_sc.bin
34 }
35
36 echoit() {
37         echo "${@}"
38         "${@}"
39 }
40
41 src_install() {
42         insinto /usr/share/${PN/-data}
43         doins lm_sc.t3g pydict_sc.bin
44 }