--- /usr/portage/app-text/enchant/enchant-1.3.0.ebuild 2007-12-11 13:05:58.000000000 +0200 +++ enchant-1.4.2.ebuild 2008-07-17 00:27:22.000000000 +0300 @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/enchant/enchant-1.3.0.ebuild,v 1.9 2007/12/11 11:01:36 vapier Exp $ +# $Header: $ inherit libtool @@ -10,29 +10,58 @@ LICENSE="LGPL-2.1" SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~x86-fbsd" -IUSE="" -# FIXME : some sort of proper spellchecker selection needed +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="aspell ispell hunspell zemberek" -# The || is meant to make sure there is a a default spell lib to work with -# 25 Aug 2003; foser +COMMON_DEPENDS=">=dev-libs/glib-2 + aspell? ( virtual/aspell-dict ) + hunspell? ( >=app-text/hunspell-1.2.1 ) + zemberek? ( dev-libs/dbus-glib )" -RDEPEND=">=dev-libs/glib-2 - || ( virtual/aspell-dict app-text/ispell app-text/hunspell )" +RDEPEND="${COMMON_DEPENDS} + zemberek? ( app-text/zemberek-server )" # libtool is needed for the install-sh to work -DEPEND="${RDEPEND} +DEPEND="${COMMON_DEPENDS} dev-util/pkgconfig" src_unpack() { unpack ${A} cd "${S}" - # FreeBSD requires this for sane versionsing and install fixes + # FreeBSD requires this for sane versioning and install fixes elibtoolize } +src_compile() { + if use aspell || use hunspell || use ispell || use zemberek; then + myconf="$(use_enable aspell) \ + $(use_enable hunspell myspell) \ + $(use_enable ispell) \ + $(use_enable zemberek)" + else + myconf="--disable-aspell \ + --disable-myspell \ + --enable-ispell \ + --disable-zemberek"; + ewarn "No USE flags for backends are enabled." + ewarn "Enabling ispell by default." + fi + + + econf ${myconf} || die "econf failed" + emake || die "emake failed" +} + src_install() { - emake -j1 DESTDIR="${D}" install || die + emake -j1 DESTDIR="${D}" install || die "emake install failed" dodoc AUTHORS BUGS ChangeLog HACKING MAINTAINERS NEWS README TODO } + +pkg_postinst() { + if use ispell; then + elog "To use ispell backend you will also need a dictionary" + elog "in the app-dicts category as ispell-." + fi +} +