summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2008-07-03 21:06:25 +0000
committerAlexis Ballier <aballier@gentoo.org>2008-07-03 21:06:25 +0000
commite2377349e054d6247ed382028fadfec50d4a208d (patch)
tree27af51ab23990be698545b59a261b9a1aced1745 /eclass/texlive-module.eclass
parentbe nice and dont try to do anything if we have not installed any texmf file (diff)
downloadgentoo-2-e2377349e054d6247ed382028fadfec50d4a208d.tar.gz
gentoo-2-e2377349e054d6247ed382028fadfec50d4a208d.tar.bz2
gentoo-2-e2377349e054d6247ed382028fadfec50d4a208d.zip
start to make room for TeX Live 2008 and simplify the jobs parser.
Diffstat (limited to 'eclass/texlive-module.eclass')
-rw-r--r--eclass/texlive-module.eclass45
1 files changed, 36 insertions, 9 deletions
diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index e4d6ed99a6a3..75b8e1ff20e0 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.8 2008/02/14 09:02:11 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.9 2008/07/03 21:06:25 aballier Exp $
# @ECLASS: texlive-module.eclass
# @MAINTAINER:
@@ -30,15 +30,24 @@ inherit texlive-common
HOMEPAGE="http://www.tug.org/texlive/"
-for i in ${TEXLIVE_MODULE_CONTENTS}; do
- SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.zip"
-done
-
COMMON_DEPEND=">=app-text/texlive-core-${PV}
${TEXLIVE_MODULES_DEPS}"
+# TeX Live 2007 was providing .zip files of CTAN packages. For 2008 they are now
+# .tar.lzma
+if [ -z "${PV##2007*}" ] ; then
+for i in ${TEXLIVE_MODULE_CONTENTS}; do
+ SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.zip"
+done
DEPEND="${COMMON_DEPEND}
app-arch/unzip"
+else
+for i in ${TEXLIVE_MODULE_CONTENTS}; do
+ SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.lzma"
+done
+DEPEND="${COMMON_DEPEND}
+ app-arch/lzma-utils"
+fi
RDEPEND="${COMMON_DEPEND}"
@@ -69,15 +78,24 @@ texlive-module_src_compile() {
done
# Generate config files
+ # TeX Live 2007 was providing lists. For 2008 they are now tlpobj.
+ if [ -z "${PV##2007*}" ] ; then
for i in "${S}"/texmf/lists/*;
do
- grep '^!' "${i}" | tr ' ' '=' |sort|uniq >> "${T}/jobs"
+ grep '^!' "${i}" | sed -e 's/^!//' | tr ' ' '@' |sort|uniq >> "${T}/jobs"
done
+ else
+ for i in "${S}"/tlpkg/tlpobj/*;
+ do
+ grep '^execute ' "${i}" | sed -e 's/^execute //' | tr ' ' '@' |sort|uniq >> "${T}/jobs"
+ done
+ fi
- for j in $(<"${T}/jobs");
+ for i in $(<"${T}/jobs");
do
- command=$(echo ${j} | sed 's/.\(.*\)=.*/\1/')
- parameter=$(echo ${j} | sed 's/.*=\(.*\)/\1/')
+ j="$(echo $i | tr '@' ' ')"
+ command=${j%% *}
+ parameter=${j#* }
case "${command}" in
addMap)
echo "Map ${parameter}" >> "${S}/${PN}.cfg";;
@@ -87,6 +105,14 @@ texlive-module_src_compile() {
echo "p +${parameter}" >> "${S}/${PN}-config.ps";;
addDvipdfmMap)
echo "f ${parameter}" >> "${S}/${PN}-config";;
+ AddHyphen)
+ ewarn "Sorry, $command not implemented yet.";;
+ BuildFormat)
+ elog "Format $parameter already built.";;
+ BuildLanguageDat)
+ elog "Language file $parameter already generated.";;
+ *)
+ die "No rule to proccess ${command}. Please file a bug."
esac
done
}
@@ -111,6 +137,7 @@ texlive-module_src_install() {
[ -d texmf ] && doins -r texmf
[ -d texmf-dist ] && doins -r texmf-dist
+ [ -d tlpkg ] && doins -r tlpkg
insinto /var/lib/texmf
[ -d texmf-var ] && doins -r texmf-var/*