# Template file for 'uim'
pkgname=uim
version=1.8.6
revision=1
nocross="https://travis-ci.org/hyonhyoro/void-packages/builds/198274427"
build_style=gnu-configure
configure_args="--enable-pref --enable-fep --with-gtk2 --with-gtk3
 --with-qt4 --with-qt4-immodule --with-x --with-anthy-utf8 --with-skk"
hostmakedepends="pkg-config gettext intltool"
makedepends="gtk+-devel gtk+3-devel qt-devel ncurses-devel anthy-devel"
short_desc="Multilingual input method library and environment"
maintainer="Kazuho Sakoda <hyonhyoro.kazuho@gmail.com>"
license="BSD"
homepage="https://github.com/uim/uim/wiki"
distfiles="https://github.com/uim/uim/releases/download/${pkgname}-${version}/${pkgname}-${version}.tar.bz2"
checksum=7b1ea803c73f3478917166f04f67cce6e45ad7ea5ab6df99b948c17eb1cb235f

post_install() {
	vlicense COPYING
}

uim-gtk2_package() {
	short_desc+=" - GTK2 IM module"
	pkg_install() {
		vmove "usr/bin/uim-*-gtk"
		vmove usr/bin/uim-toolbar-gtk-systray
		vmove "usr/libexec/uim-*-gtk"
		vmove usr/lib/gtk-2.0
	}
}

uim-gtk3_package() {
	short_desc+=" - GTK3 IM module"
	pkg_install() {
		vmove "usr/bin/uim-*-gtk3"
		vmove usr/bin/uim-toolbar-gtk3-systray
		vmove "usr/libexec/uim-*-gtk3"
		vmove usr/lib/gtk-3.0
	}
}

uim-qt_package() {
	short_desc+=" - Qt4 IM module"
	pkg_install() {
		vmove "usr/bin/uim-*-qt4"
		vmove usr/libexec/uim-candwin-qt4
		vmove usr/lib/qt
	}
}

uim-anthy_package() {
	short_desc+=" - Anthy IME"
	pkg_install() {
		vmove "usr/lib/uim/plugin/libuim-anthy*.so"
		vmove "usr/share/uim/anthy*.scm"
		vmove "usr/share/uim/pixmaps/anthy*.png"
	}
}

uim-skk_package() {
	short_desc+=" - SKK IME"
	pkg_install() {
		vmove usr/lib/uim/plugin/libuim-skk.so
		vmove "usr/share/uim/skk*.scm"
		vmove "usr/share/uim/pixmaps/skk*"
	}
}

uim-devel_package() {
	depends="uim-${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove "usr/lib/*.a"
		vmove "usr/lib/*.so"
	}
}
