app-i18n/libchewing: add ~arm keyword (bug #628030)
[gentoo.git] / app-i18n / libchewing / libchewing-9999.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="6"
5
6 if [[ "${PV}" == "9999" ]]; then
7         inherit autotools git-r3
8
9         EGIT_REPO_URI="https://github.com/chewing/libchewing"
10 fi
11
12 DESCRIPTION="Intelligent phonetic (Zhuyin/Bopomofo) input method library"
13 HOMEPAGE="http://chewing.im/ https://github.com/chewing/libchewing"
14 if [[ "${PV}" == "9999" ]]; then
15         SRC_URI=""
16 else
17         SRC_URI="https://github.com/chewing/${PN}/releases/download/v${PV}/${P}.tar.bz2"
18 fi
19
20 LICENSE="LGPL-2.1"
21 SLOT="0/3"
22 KEYWORDS=""
23 IUSE="static-libs test"
24
25 RDEPEND="dev-db/sqlite:3"
26 DEPEND="${RDEPEND}
27         test? ( sys-libs/ncurses[unicode] )"
28
29 src_prepare() {
30         default
31
32         if [[ "${PV}" == "9999" ]]; then
33                 eautoreconf
34         fi
35 }
36
37 src_configure() {
38         # libchewing.a is required for building of tests.
39         econf \
40                 --with-sqlite3 \
41                 $(if use static-libs || use test; then echo --enable-static; else echo --disable-static; fi)
42 }
43
44 src_test() {
45         emake -j1 check
46 }
47
48 src_install() {
49         default
50         find "${D}" -name "*.la" -delete || die
51         use static-libs || find "${D}" -name "*.a" -delete || die
52 }