diff options
author | Ulrich Müller <ulm@gentoo.org> | 2008-07-04 03:48:21 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2008-07-04 03:48:21 +0000 |
commit | 308aa2937f1a734d69aa05e21be83314623e4186 (patch) | |
tree | 3bfeac633273829af7e7e893170fb3f1eb9f1457 /app-text/noweb/noweb-2.11b.ebuild | |
parent | whitespace (diff) | |
download | gentoo-2-308aa2937f1a734d69aa05e21be83314623e4186.tar.gz gentoo-2-308aa2937f1a734d69aa05e21be83314623e4186.tar.bz2 gentoo-2-308aa2937f1a734d69aa05e21be83314623e4186.zip |
Optionally install Emacs noweb-mode, bug 230229.
(Portage version: 2.2_rc1/cvs/Linux 2.6.25-gentoo-r4 i686)
Diffstat (limited to 'app-text/noweb/noweb-2.11b.ebuild')
-rw-r--r-- | app-text/noweb/noweb-2.11b.ebuild | 41 |
1 files changed, 30 insertions, 11 deletions
diff --git a/app-text/noweb/noweb-2.11b.ebuild b/app-text/noweb/noweb-2.11b.ebuild index 37648e37f915..77ce8e40c523 100644 --- a/app-text/noweb/noweb-2.11b.ebuild +++ b/app-text/noweb/noweb-2.11b.ebuild @@ -1,24 +1,27 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/noweb/noweb-2.11b.ebuild,v 1.2 2008/06/18 06:31:03 wormo Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/noweb/noweb-2.11b.ebuild,v 1.3 2008/07/04 03:48:21 ulm Exp $ -inherit eutils toolchain-funcs +inherit eutils toolchain-funcs elisp-common -SRC_URI="http://www.eecs.harvard.edu/~nr/noweb/dist/${P}.tgz" -HOMEPAGE="http://www.eecs.harvard.edu/~nr/noweb/" -LICENSE="freedist" DESCRIPTION="a literate programming tool, lighter than web" +HOMEPAGE="http://www.eecs.harvard.edu/~nr/noweb/" +SRC_URI="http://www.eecs.harvard.edu/~nr/noweb/dist/${P}.tgz" +LICENSE="freedist emacs? ( GPL-2 )" SLOT="0" -IUSE="examples" KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="emacs examples" DEPEND="virtual/tex-base dev-lang/icon - sys-apps/debianutils" + sys-apps/debianutils + emacs? ( virtual/emacs )" S=${WORKDIR}/${P}/src +SITEFILE=50${PN}-gentoo.el + src_unpack() { unpack ${A} cd "${S}" @@ -32,18 +35,22 @@ src_unpack() { src_compile() { # noweb tries to use notangle and noweb; see bug #50429 - ( cd c; emake ICONC="icont" CC=$(tc-getCC) CFLAGS="${CFLAGS}" LIBSRC="icon" ) || die + ( cd c; emake ICONC="icont" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LIBSRC="icon" ) || die export PATH="${PATH}:${T}" - emake ICONC="icont" CC=$(tc-getCC) BIN="${T}" LIB="${T}" LIBSRC="icon" install-code \ + emake ICONC="icont" CC="$(tc-getCC)" BIN="${T}" LIB="${T}" LIBSRC="icon" install-code \ || die "make temporal install failed." - emake ICONC="icont" CC=$(tc-getCC) CFLAGS="${CFLAGS}" LIBSRC="icon" || die "make failed" + emake ICONC="icont" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LIBSRC="icon" || die "make failed" # Set awk to awk not nawk ./awkname awk + + if use emacs; then + elisp-compile elisp/noweb-mode.el || die "elisp-compile failed" + fi } src_install () { - # It needs the directories to exisst first... + # It needs the directories to exist first... dodir /usr/bin dodir /usr/libexec/${PN} dodir /usr/share/man @@ -63,9 +70,21 @@ src_install () { doins examples/* fi dodoc CHANGES README + + if use emacs; then + elisp-install ${PN} src/elisp/noweb-mode.{el,elc} \ + || die "elisp-install failed" + elisp-site-file-install "${FILESDIR}/${SITEFILE}" \ + || die "elisp-site-file-install failed" + fi } pkg_postinst() { + use emacs && elisp-site-regen einfo "Running texhash to complete installation.." texhash } + +pkg_postrm() { + use emacs && elisp-site-regen +} |