aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlammie Pirinen <flammie@gentoo.org>2012-08-01 03:44:54 +0300
committerFlammie Pirinen <flammie@gentoo.org>2012-08-01 03:44:54 +0300
commit7b2f61c42b449e1a5f1b3388bd9740d6d214ba74 (patch)
tree8aef14cdd9db66bc18c0721030db723a3841adbc /sci-misc/sfst/sfst-1.4.6g.ebuild
parentBump foma to version 0.9.16alpha. (diff)
downloadsci-7b2f61c42b449e1a5f1b3388bd9740d6d214ba74.tar.gz
sci-7b2f61c42b449e1a5f1b3388bd9740d6d214ba74.tar.bz2
sci-7b2f61c42b449e1a5f1b3388bd9740d6d214ba74.zip
Version bump sfst to 1.4.6g
(Portage version: 2.1.10.65/git/Linux i686, unsigned Manifest commit)
Diffstat (limited to 'sci-misc/sfst/sfst-1.4.6g.ebuild')
-rw-r--r--sci-misc/sfst/sfst-1.4.6g.ebuild83
1 files changed, 83 insertions, 0 deletions
diff --git a/sci-misc/sfst/sfst-1.4.6g.ebuild b/sci-misc/sfst/sfst-1.4.6g.ebuild
new file mode 100644
index 000000000..6222fddd1
--- /dev/null
+++ b/sci-misc/sfst/sfst-1.4.6g.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit elisp-common eutils
+
+MY_PN="SFST"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Uni Stuttgart Finite State Transducer tools"
+HOMEPAGE="http://www.ims.uni-stuttgart.de/projekte/gramotron/SOFTWARE/SFST.html"
+SRC_URI="
+ ftp://ftp.ims.uni-stuttgart.de/pub/corpora/${MY_PN}/${MY_P}.tar.gz
+ vim-syntax? ( ftp://ftp.ims.uni-stuttgart.de/pub/corpora/${MY_PN}/vim-mode.tar.gz )
+ emacs? ( http://www.cis.uni-muenchen.de/~wastl/emacs/sfst.el )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="emacs vim-syntax"
+
+RDEPEND="sys-libs/readline"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex
+ sys-apps/sed
+ emacs? ( virtual/emacs )"
+
+S="${WORKDIR}/${MY_PN}"
+
+src_prepare() {
+ # settings in makefile are a bit hacky
+ #epatch "${FILESDIR}"/SFST-1.3-gcc43.patch || die "patch failed"
+ sed \
+ -e "s/^CFLAGS = -O3/CFLAGS = ${CFLAGS}/g" \
+ -e "s/local//g" \
+ -e 's/strip/echo strip removed: /g' \
+ -e 's/# FPIC/FPIC/' \
+ -e 's/ $(PREFIX/ $(DESTDIR)$(PREFIX/g' \
+ -e 's/ldconfig/true/' \
+ -e 's/$(INSTALL_LIBS)/$(INSTALL_DIR) $(DESTDIR)$(PREFIX)\/lib\n\t\0/' \
+ -i "${S}"/src/Makefile || die "sed failed"
+ cd "${S}"
+ if use emacs ; then
+ cp "${DISTDIR}/sfst.el" "${S}"
+ fi
+ if use vim-syntax ; then
+ mv "${WORKDIR}"/INSTALL "${S}"/INSTALL-vim-syntax
+ mv "${WORKDIR}"/sfst.vim "${S}"/
+ fi
+}
+
+src_compile() {
+ emake -C "${S}/src"
+ if use emacs ; then
+ cd "${S}"
+ elisp-compile *.el || die "could not compile elisp"
+ fi
+}
+
+src_install() {
+ cd "${S}/src"
+ # destdir works but prefix fails
+ emake DESTDIR="${D}" install maninstall libinstall
+ cd "${S}"
+ dodoc README
+ insinto /usr/share/doc/${PF}/
+ doins doc/SFST-Manual.pdf doc/SFST-Tutorial.pdf
+ insinto /usr/share/${PN}
+ doins -r data/*
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax/
+ doins sfst.vim
+ insinto /usr/share/vim/vimfiles/ftdetect/
+ newins "${FILESDIR}"/ftdetect-sfst.vim sfst.vim
+ dodoc INSTALL-vim-syntax
+ fi
+ if use emacs ; then
+ elisp-install ${PN} *.el *.elc || die "could not install elisp"
+ fi
+}