| # Copyright 1999-2009 Gentoo Foundation |
| # Distributed under the terms of the GNU General Public License v2 |
| # $Header: /var/cvsroot/gentoo-x86/app-i18n/ibus-m17n/ibus-m17n-1.2.0.20090617.ebuild,v 1.1 2009/06/18 15:40:00 matsuu Exp $ |
| |
| EAPI="2" |
| inherit eutils |
| |
| DESCRIPTION="The M17N engine IMEngine for IBus Framework" |
| HOMEPAGE="http://code.google.com/p/ibus/" |
| SRC_URI="http://ibus.googlecode.com/files/${P}.tar.gz" |
| |
| LICENSE="GPL-2" |
| SLOT="0" |
| KEYWORDS="amd64 arm x86" |
| IUSE="nls" |
| |
| RDEPEND=">=app-i18n/ibus-1.2 |
| >=dev-libs/m17n-lib-1.6.1 |
| nls? ( virtual/libintl )" |
| DEPEND="${RDEPEND} |
| chromeos-base/chromeos-assets |
| =dev-db/m17n-contrib-1.1.10 |
| >=dev-db/m17n-db-1.6.1 |
| dev-util/pkgconfig |
| >=sys-devel/gettext-0.16.1" |
| |
| src_prepare() { |
| # Apply patches that are not in the 1.3.1 tarball. |
| # The 00XX-*.paches are generated by |
| # 'git format-patch f6934abe8bdc2550d0f830cd9cf80352f932b08c..' |
| epatch "${FILESDIR}"/0001-Add-code-coderview.settings.patch |
| epatch "${FILESDIR}"/0002-Fix-bug-in-ibus_m17n_engine_reset.patch |
| epatch "${FILESDIR}"/0003-Don-t-init-IBusBus-in-print_engines_xml.patch |
| epatch "${FILESDIR}"/0004-Use-MInputContext-arg-and-remove-the-table-for-ic-an.patch |
| epatch "${FILESDIR}"/0005-Give-higher-rank-for-all-Indic-engines.patch |
| |
| # ibus-m17n-ibus-1.4.patch is taken from Fedora's repository at |
| # http://pkgs.fedoraproject.org/gitweb/?p=ibus-m17n.git;a=tree;h=refs/heads/master;hb=refs/heads/master |
| if ibus-daemon --version | egrep -e '(1\.4\.|1\.3\.99)' > /dev/null ; then |
| epatch "${FILESDIR}"/ibus-m17n-ibus-1.4.patch |
| fi |
| |
| epatch "${FILESDIR}"/0006-Simplify-AltGr-handling.patch |
| epatch "${FILESDIR}"/0007-Clear-errno-to-0-before-calling-strtol-strtoul.patch |
| # These patches conflict with ibus-m17n-ibus-1.4.patch. Disabled temporarily. |
| # epatch "${FILESDIR}"/0008-Assign-separate-GType-to-each-m17n-engine-to-make-co.patch |
| # epatch "${FILESDIR}"/0009-Use-ibus_m17n_scan_engine_name-to-simplify-the-code.patch |
| epatch "${FILESDIR}"/0010-Don-t-compile-m17nutil.c-twice-for-engine-and-setup.patch |
| epatch "${FILESDIR}"/0011-Use-gnome-autogen.sh-to-generate-configure-and-Makef.patch |
| |
| # Build ibus-engine-m17n for the host platform. |
| (env -i ./configure && env -i make) || die |
| # Obtain the XML output by running the binary. |
| src/ibus-engine-m17n --xml > output.xml || die |
| # Clean up. |
| make distclean || die |
| } |
| |
| src_configure() { |
| econf $(use_enable nls) || die |
| } |
| |
| src_compile() { |
| emake || die |
| # Rewrite m17n.xml using the XML output. |
| LIST="${SYSROOT}"/usr/share/chromeos-assets/input_methods/whitelist.txt |
| python "${FILESDIR}"/filter.py < output.xml \ |
| --whitelist="${LIST}" \ |
| --rewrite=src/m17n.xml || die |
| } |
| |
| src_install() { |
| emake DESTDIR="${D}" install || die |
| |
| dodoc AUTHORS ChangeLog NEWS README |
| } |
| |
| pkg_postinst() { |
| ewarn "This package is very experimental, please report your bugs to" |
| ewarn "http://ibus.googlecode.com/issues/list" |
| elog |
| elog "You should run ibus-setup and enable IM Engines you want to use!" |
| elog |
| } |