# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils MY_P=${PN}-voikko-${PV} # ISPELL build is copypasted from in tree version ebuild defined below! ISPELL_PF=ispell-3.2.06-r6 ISPELL_P=ispell-3.2.06 ISPELL_PATCH_VER=0.1 DESCRIPTION="Tmispell is interface between ispell OO.o Finnish spellcheckers. (This is a voikko patched version)" SRC_URI="http://www.hunspell-fi.org/files/${MY_P}.tar.gz http://fmg-www.cs.ucla.edu/geoff/tars/${ISPELL_P}.tar.gz mirror://gentoo/${ISPELL_PF}-gentoo-${ISPELL_PATCH_VER}.diff.bz2" HOMEPAGE="http://www.hut.fi/~ptvirtan/programs/tmispell.html" SLOT="0" LICENSE="GPL-2 as-is" #GPL=tmispell as-is=ispell KEYWORDS="-x86" # -x86 until I figure how to hack the ispell and all #KEYWORDS="alpha amd64 hppa mips ppc ppc-macos sparc x86" # ← ispell has this DEPEND="!app-text/ispell !app-dicts/ispell-fi app-text/voikko >=dev-libs/glib-2.0.0 nls? ( sys-devel/gettext ) sys-apps/coreutils sys-apps/sed sys-devel/bison sys-apps/miscfiles >=sys-libs/ncurses-5.2" RDEPEND="!app-text/ispell app-text/voikko >=dev-libs/glib-2.0.0 nls? ( sys-devel/gettext )" S="${WORKDIR}/${MY_P}" ISPELL_S="${WORKDIR}/${ISPELL_P}/" src_unpack() { # ispell unpack ${A} cd "${ISPELL_S}" epatch "${WORKDIR}/${ISPELL_PF}-gentoo-${ISPELL_PATCH_VER}.diff" epatch "${FILESDIR}/${ISPELL_P}-patch.diff" } src_compile() { # ispell einfo "compiling ispell..." cd "${ISPELL_S}" # ? make config.sh || die "make config.sh failed" cp -p config.sh config.sh.org sed \ -e "s:^\(BINDIR='\)\(.*\):\1${D}\2:" \ -e "s:^\(LIBDIR='\)\(.*\):\1${D}\2:" \ -e "s:^\(MAN1DIR='\)\(.*\):\1${D}\2:" \ -e "s:^\(MAN4DIR='\)\(.*\):\1${D}\2:" \ < config.sh > config.sh.install emake -j1 || die "emake ispell failed" # tmispell einfo "compiling tmispell..." cd ${S} econf || die "econf tmispell failed" emake || die "emake tmispell failed" } src_install() { # ispell cd ${ISPELL_S} einfo "installing ispell" cp -p config.sh.install config.sh dodir /usr/bin /usr/lib/ispell /usr/share/info \ /usr/share/man/man1 /usr/share/man/man5 emake install || die "install ispell failed" rmdir ${D}/usr/share/man/man5 rmdir ${D}/usr/share/info dodir /usr/share/doc/${ISPELL_P} insinto /usr/share/doc/${ISPELL_P} doins Contributors README WISHES dosed ${D}/usr/share/man/man1/ispell.1 # tmispell cd ${S} einfo "installing tmispell" emake DESTDIR="${D}" install || die "install failed" dodoc AUTHORS ChangeLog LUEMINUT NEWS NEWS.fi README tmispell.conf.example touch "${D}/usr/lib/ispell/suomi.hash" "${D}/usr/lib/ispell/suomi.aff" touch "${D}/usr/lib/ispell/finnish.hash" "${D}/usr/lib/ispell/finnish.aff" # FIXME: configuration needs sedding for ${ROOT} != / ? insinto /etc/ newins "${FILESDIR}/tmispell.conf.gentoo" tmispell.conf mv "${D}/usr/bin/ispell" "${D}/usr/bin/ispell.real" dosym /usr/bin/tmispell /usr/bin/ispell } pkg_postinst() { elog "ispell was installed as /usr/bin/ispell.real," elog "and tmispell as symlink /usr/bin/ispell→/usr/bin/tmispell" }