app-i18n/fcitx-unikey: Rename "qt4" USE flag to "macro-editor".
[gentoo.git] / app-i18n / fcitx-unikey / fcitx-unikey-0.2.5.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="6"
6
7 inherit cmake-utils gnome2-utils
8
9 if [[ "${PV}" == "9999" ]]; then
10         inherit git-r3
11
12         EGIT_REPO_URI="https://github.com/fcitx/fcitx-unikey"
13 fi
14
15 DESCRIPTION="Vietnamese Unikey input methods for Fcitx"
16 HOMEPAGE="https://fcitx-im.org/ https://github.com/fcitx/fcitx-unikey"
17 if [[ "${PV}" == "9999" ]]; then
18         SRC_URI=""
19 else
20         SRC_URI="https://download.fcitx-im.org/${PN}/${P}.tar.xz"
21 fi
22
23 LICENSE="GPL-2+ GPL-3+"
24 SLOT="0"
25 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
26 IUSE="+macro-editor"
27
28 RDEPEND=">=app-i18n/fcitx-4.2.8
29         virtual/libiconv
30         virtual/libintl
31         macro-editor? (
32                 >=app-i18n/fcitx-4.2.8[qt4]
33                 dev-qt/qtcore:4
34                 dev-qt/qtgui:4
35         )"
36 DEPEND="${RDEPEND}
37         sys-devel/gettext
38         virtual/pkgconfig"
39
40 PATCHES=(
41         "${FILESDIR}/${P}-c++11.patch"
42 )
43
44 DOCS=()
45
46 src_configure() {
47         local mycmakeargs=(
48                 -DENABLE_QT=$(usex macro-editor)
49         )
50
51         cmake-utils_src_configure
52 }
53
54 pkg_preinst() {
55         gnome2_icon_savelist
56 }
57
58 pkg_postinst() {
59         gnome2_icon_cache_update
60 }
61
62 pkg_postrm() {
63         gnome2_icon_cache_update
64 }