summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/tetex-3.eclass')
-rw-r--r--eclass/tetex-3.eclass47
1 files changed, 42 insertions, 5 deletions
diff --git a/eclass/tetex-3.eclass b/eclass/tetex-3.eclass
index 3cde1b69db63..a8b2968b8b13 100644
--- a/eclass/tetex-3.eclass
+++ b/eclass/tetex-3.eclass
@@ -1,9 +1,11 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/tetex-3.eclass,v 1.9 2006/01/22 16:23:54 nattfodd Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/tetex-3.eclass,v 1.10 2006/02/01 19:49:49 ehmsen Exp $
#
# Author: Jaromir Malenko <malenko@email.cz>
# Author: Mamoru KOMACHI <usata@gentoo.org>
+# Author: Martin Ehmsen <ehmsen@gentoo.org>
+# Author: Alexandre Buisse <nattfodd@gentoo.org>
#
# A generic eclass to install tetex 3.x distributions.
@@ -48,6 +50,41 @@ tetex-3_src_unpack() {
tetex_src_unpack
+ # create update script
+ cat >${T}/texmf-update<<'EOF'
+#!/bin/bash
+#
+# Utility to update Gentoo teTeX distribution configuration files
+#
+
+PATH=/bin:/usr/bin
+
+for conf in texmf.cnf fmtutil.cnf updmap.cfg
+do
+ if [ -d "/etc/texmf/${conf/.*/.d}" ]
+ then
+ echo "Generating /etc/texmf/web2c/${conf} from /etc/texmf/${conf/.*/.d} ..."
+ cat /etc/texmf/${conf/.*/.d}/* > "/etc/texmf/web2c/${conf}"
+ fi
+done
+
+# configure
+echo "Configuring teTeX ..."
+mktexlsr &>/dev/null
+texconfig-sys init &>/dev/null
+texconfig-sys confall &>/dev/null
+texconfig-sys font rw &>/dev/null
+texconfig-sys font vardir /var/cache/fonts &>/dev/null
+updmap-sys &>/dev/null
+
+# generate
+echo "Generating format files ..."
+fmtutil-sys --missing &>/dev/null
+echo
+echo "Use 'texconfig font ro' to disable font generation for users"
+echo
+EOF
+
# need to fix up the hyperref driver, see bug #31967
sed -i -e "/providecommand/s/hdvips/hypertex/" \
${S}/texmf/tex/latex/hyperref/hyperref.cfg
@@ -112,9 +149,9 @@ tetex-3_src_install() {
dodir /etc/texmf/{updmap.d,fmtutil.d,texmf.d}
#cp ${D}/usr/share/texmf/web2c/updmap.cfg ${D}/etc/texmf/updmap.d/00updmap.cfg
dosym /etc/texmf/web2c/updmap.cfg ${TEXMF_PATH}/web2c/updmap.cfg
- dosym /usr/share/texmf/web2c/updmap.cfg /etc/texmf/updmap.d/00updmap.cfg
- dosym /etc/texmf/web2c/fmtutil.cnf /etc/texmf/fmtutil.d/00fmtutil.cnf
- dosym /etc/texmf/web2c/texmf.cnf /etc/texmf/texmf.d/00texmf.cnf
+ mv ${D}/usr/share/texmf/web2c/updmap.cfg ${D}/etc/texmf/updmap.d/00updmap.cfg
+ mv ${D}/etc/texmf/web2c/fmtutil.cnf ${D}/etc/texmf/fmtutil.d/00fmtutil.cnf
+ mv ${D}/etc/texmf/web2c/texmf.cnf ${D}/etc/texmf/texmf.d/00texmf.cnf
# xdvi
if useq X ; then