diff options
Diffstat (limited to 'app-misc/gtypist/gtypist-2.8.ebuild')
-rw-r--r-- | app-misc/gtypist/gtypist-2.8.ebuild | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/app-misc/gtypist/gtypist-2.8.ebuild b/app-misc/gtypist/gtypist-2.8.ebuild new file mode 100644 index 000000000000..c4d85b16334a --- /dev/null +++ b/app-misc/gtypist/gtypist-2.8.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-misc/gtypist/gtypist-2.8.ebuild,v 1.1 2010/01/17 23:36:37 cla Exp $ + +inherit eutils elisp-common + +DESCRIPTION="Universal typing tutor" +HOMEPAGE="http://www.gnu.org/software/gtypist/" +SRC_URI="mirror://gnu/gtypist/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="nls emacs xemacs" + +DEPEND=">=sys-libs/ncurses-5.2 + emacs? ( virtual/emacs ) + xemacs? ( !emacs? ( app-editors/xemacs app-xemacs/fsf-compat ) )" + +RDEPEND="${DEPEND}" + +SITEFILE=50${PN}-gentoo.el + +src_unpack() { + unpack ${A} + epatch "${FILESDIR}"/${P/8/7}-xemacs-compat.patch +} + +src_compile() { + local lispdir="" + if use emacs; then + lispdir="${SITELISP}/${PN}" + einfo "Configuring to build with GNU Emacs support" + elif use xemacs; then + lispdir="/usr/lib/xemacs/site-packages/lisp/${PN}" + einfo "Configuring to build with XEmacs support" + fi + + econf $(use_enable nls) \ + EMACS=$(usev emacs || usev xemacs || echo no) \ + --with-lispdir="${lispdir}" \ + || die "econf failed" + emake || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + dodoc AUTHORS ChangeLog NEWS README THANKS TODO + + if use emacs; then + elisp-site-file-install "${FILESDIR}/${SITEFILE}" \ + || die "elisp-site-file-install failed" + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} |