summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2012-10-17 13:16:31 +0000
committerAlexis Ballier <aballier@gentoo.org>2012-10-17 13:16:31 +0000
commit51ec8866add59cb0b2813aa6956bab5926221b8d (patch)
treee2dc0c4e4513200fad25a6cabccd9e031da16cdd /eclass/texlive-common.eclass
parentVersion bump. Fix x11-base/xorg-server version dep. (diff)
downloadhistorical-51ec8866add59cb0b2813aa6956bab5926221b8d.tar.gz
historical-51ec8866add59cb0b2813aa6956bab5926221b8d.tar.bz2
historical-51ec8866add59cb0b2813aa6956bab5926221b8d.zip
introduce efmtutil-sys: same as etexmf-update but for fmtutil-sys
Diffstat (limited to 'eclass/texlive-common.eclass')
-rw-r--r--eclass/texlive-common.eclass21
1 files changed, 20 insertions, 1 deletions
diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index f4d317d583f0..20fec9860168 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-common.eclass,v 1.18 2012/10/17 12:55:42 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-common.eclass,v 1.19 2012/10/17 13:16:31 aballier Exp $
# @ECLASS: texlive-common.eclass
# @MAINTAINER:
@@ -142,3 +142,22 @@ etexmf-update() {
fi
fi
}
+
+# @FUNCTION: efmtutil-sys
+# @USAGE: In ebuilds' pkg_postinst to force a rebuild of TeX formats.
+# @DESCRIPTION:
+# Runs fmtutil-sys if it is available and prints a warning otherwise. This
+# function helps in factorizing some code.
+
+efmtutil-sys() {
+ if has_version 'app-text/texlive-core' ; then
+ if [ "$ROOT" = "/" ] && [ -x /usr/bin/fmtutil-sys ] ; then
+ einfo "Rebuilding formats"
+ /usr/bin/fmtutil-sys --all &> /dev/null
+ else
+ ewarn "Cannot run fmtutil-sys for some reason."
+ ewarn "Your formats might be inconsistent with your installed ${PN} version"
+ ewarn "Please try to figure what has happened"
+ fi
+ fi
+}