diff options
Diffstat (limited to 'app-emacs')
-rw-r--r-- | app-emacs/auctex/ChangeLog | 7 | ||||
-rw-r--r-- | app-emacs/auctex/auctex-11.84.ebuild | 25 |
2 files changed, 24 insertions, 8 deletions
diff --git a/app-emacs/auctex/ChangeLog b/app-emacs/auctex/ChangeLog index d42bf1880ef9..db0b2335b6c7 100644 --- a/app-emacs/auctex/ChangeLog +++ b/app-emacs/auctex/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for app-emacs/auctex # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emacs/auctex/ChangeLog,v 1.52 2007/02/22 12:49:55 opfer Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emacs/auctex/ChangeLog,v 1.53 2007/02/22 15:05:39 opfer Exp $ + + 22 Feb 2007; Christian Faulhammer <opfer@gentoo.org> auctex-11.84.ebuild: + refined the checks for TEXMFSITE further. A non existing directory now lets + the emerge process fail to prevent installing TeX files into weird + directories 22 Feb 2007; Christian Faulhammer <opfer@gentoo.org> auctex-11.84.ebuild: applied better checks for the contents of TEXMFSITE: if it is defined at all diff --git a/app-emacs/auctex/auctex-11.84.ebuild b/app-emacs/auctex/auctex-11.84.ebuild index fab3716e5d3c..58b776ed6694 100644 --- a/app-emacs/auctex/auctex-11.84.ebuild +++ b/app-emacs/auctex/auctex-11.84.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emacs/auctex/auctex-11.84.ebuild,v 1.2 2007/02/22 12:49:55 opfer Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emacs/auctex/auctex-11.84.ebuild,v 1.3 2007/02/22 15:05:39 opfer Exp $ inherit elisp eutils latex-package autotools @@ -31,24 +31,35 @@ src_compile() { # with app-text/tetex, see bug #155944 if use preview-latex; then local TEXMFPATH="$(kpsewhich -var-value=TEXMFSITE)" + local TEXMFCONFIGFILE="$(kpsewhich texmf.cnf)" if [ -z "${TEXMFPATH}" ]; then - local TEXMFCONFIGFILE="$(kpsewhich texmf.cnf)" - eerror "You haven't defined the TEXMFSITE variable in your TeX config." eerror "Please do so in the file ${TEXMFCONFIGFILE:-/var/lib/texmf/web2c/texmf.cnf}" die "Define TEXMFSITE in TeX configuration!" else # go through the colon separated list of directories (maybe only one) provided in the variable - # TEXMFPATH (generated from TEXMFSITE from TeX's config) and choose only the first entry + # TEXMFPATH (generated from TEXMFSITE from TeX's config) and choose only the first entry. + # All entries are separated by colons, even when defined with semi-colons, kpsewhich changes + # the output to a generic format, so IFS has to be redefined. local IFS="${IFS}:" for strippedpath in ${TEXMFPATH} do - local PREVIEW_TEXMFDIR="${D}/${strippedpath}" - break + if [ -d ${strippedpath} ]; then + local PREVIEW_TEXMFDIR="${strippedpath}" + break + fi done + # verify if an existing path was chosen to prevent from installing into the wrong directory + if [ -z ${PREVIEW_TEXMFDIR} ]; then + eerror "TEXMFSITE does not contain any existing directory." + eerror "Please define an existing directory in your TeX config file" + eerror "${TEXMFCONFIGFILE:-/var/lib/texmf/web2c/texmf.cnf} or create at least one of the there specified directories" + die "TEXMFSITE variable did not contain an existing directory" + fi + dodir "${PREVIEW_TEXMFDIR}" fi fi @@ -56,7 +67,7 @@ src_compile() { econf --disable-build-dir-test \ --with-auto-dir="${D}/var/lib/auctex" \ --with-lispdir="${D}/usr/share/emacs/site-lisp" \ - --with-texmf-dir="${PREVIEW_TEXMFDIR}" \ + --with-texmf-dir="${D}/${PREVIEW_TEXMFDIR}" \ $(use_enable preview-latex preview) || die "econf failed" emake || die } |