667c30d3e7f99f132e78a1c624328483c7488c4a
[gentoo.git] / app-i18n / imhangul / imhangul-3.1.1.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 inherit gnome2-utils
7
8 DESCRIPTION="GTK+ 3 Hangul Input Modules"
9 HOMEPAGE="https://github.com/libhangul/imhangul"
10 SRC_URI="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/${PN}/${P}.tar.bz2"
11
12 LICENSE="LGPL-2.1"
13 SLOT="3"
14 KEYWORDS="~amd64 ~ppc ~x86"
15 IUSE=""
16
17 RDEPEND="app-i18n/libhangul
18         x11-libs/gtk+:3
19         virtual/libintl"
20 DEPEND="${RDEPEND}
21         virtual/pkgconfig
22         sys-devel/gettext"
23
24 src_prepare() {
25         default
26         gnome2_environment_reset
27         gnome2_disable_deprecation_warning
28 }
29
30 src_configure() {
31         econf --with-gtk-im-module-dir="${EPREFIX%/}"/usr/$(get_libdir)/gtk-3.0/$(pkg-config gtk+-3.0 --variable=gtk_binary_version)/immodules
32 }
33
34 src_install() {
35         default
36         find "${ED}" -name '*.la' -delete || die
37         dodoc ${PN}.conf
38
39         local s
40         insinto /etc/X11/xinit/xinput.d
41         for s in 2{,y} 3{2,9,f,s,y} ahn ro; do
42                 newins "${FILESDIR}"/xinput-${PN}${s} ${PN}${s}.conf
43         done
44 }
45
46 pkg_postinst() {
47         gnome2_query_immodules_gtk3
48         elog
49         elog "If you want to use one of the module as a default input method, "
50         elog
51         elog "export GTK_IM_MODULE=hangul2  # 2 input type"
52         elog "export GTK_IM_MODULE=hangul3f # 3 input type"
53         elog
54 }
55
56 pkg_postrm() {
57         gnome2_query_immodules_gtk3
58 }