| # Copyright 1999-2009 Gentoo Foundation |
| # Distributed under the terms of the GNU General Public License v2 |
| # $Header: /var/cvsroot/gentoo-x86/app-emacs/auctex/auctex-11.85.ebuild,v 1.12 2009/12/26 17:24:25 pva Exp $ |
| |
| inherit elisp eutils latex-package |
| |
| DESCRIPTION="Extended support for writing, formatting and using (La)TeX, Texinfo and BibTeX files" |
| HOMEPAGE="http://www.gnu.org/software/auctex/" |
| SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" |
| |
| LICENSE="GPL-3 FDL-1.2" |
| SLOT="0" |
| KEYWORDS="amd64 ppc ppc64 sparc x86" |
| IUSE="preview-latex" |
| |
| DEPEND="virtual/latex-base |
| preview-latex? ( !dev-tex/preview-latex |
| app-text/dvipng |
| app-text/ghostscript-gpl )" |
| RDEPEND="${DEPEND}" |
| |
| TEXMF="/usr/share/texmf-site" |
| |
| src_compile() { |
| # Remove broken Info file (will be recreated by the build system) |
| rm doc/auctex.info |
| |
| EMACS_NAME=emacs EMACS_FLAVOUR=emacs econf --disable-build-dir-test \ |
| --with-auto-dir="/var/lib/auctex" \ |
| --with-lispdir="${SITELISP}/${PN}" \ |
| --with-packagelispdir="${SITELISP}/${PN}" \ |
| --with-packagedatadir="${SITEETC}/${PN}" \ |
| --with-texmf-dir="${TEXMF}" \ |
| --docdir=/usr/share/doc/${PF} \ |
| $(use_enable preview-latex preview) || die "econf failed" |
| emake || die "emake failed" |
| cd doc; emake tex-ref.pdf || die "creation of tex-ref.pdf failed" |
| } |
| |
| src_install() { |
| emake -j1 DESTDIR="${D}" install || die "emake install failed" |
| elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el" || die |
| if use preview-latex; then |
| elisp-site-file-install "${FILESDIR}/60${PN}-gentoo.el" || die |
| fi |
| keepdir /var/lib/auctex |
| dodoc ChangeLog CHANGES README RELEASE TODO FAQ INSTALL* |
| } |
| |
| pkg_postinst() { |
| # rebuild TeX-inputfiles-database |
| use preview-latex && latex-package_pkg_postinst |
| elisp-site-regen |
| } |
| |
| pkg_postrm(){ |
| use preview-latex && latex-package_pkg_postrm |
| elisp-site-regen |
| } |