| 1 | # Copyright 1999-2011 Gentoo Foundation |
1 | # Copyright 1999-2011 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/texlive-common.eclass,v 1.18 2012/10/17 12:55:42 aballier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/texlive-common.eclass,v 1.19 2012/10/17 13:16:31 aballier Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: texlive-common.eclass |
5 | # @ECLASS: texlive-common.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # tex@gentoo.org |
7 | # tex@gentoo.org |
| 8 | # @AUTHOR: |
8 | # @AUTHOR: |
| … | |
… | |
| 140 | ewarn "Your texmf tree might be inconsistent with your configuration" |
140 | ewarn "Your texmf tree might be inconsistent with your configuration" |
| 141 | ewarn "Please try to figure what has happened" |
141 | ewarn "Please try to figure what has happened" |
| 142 | fi |
142 | fi |
| 143 | fi |
143 | fi |
| 144 | } |
144 | } |
|
|
145 | |
|
|
146 | # @FUNCTION: efmtutil-sys |
|
|
147 | # @USAGE: In ebuilds' pkg_postinst to force a rebuild of TeX formats. |
|
|
148 | # @DESCRIPTION: |
|
|
149 | # Runs fmtutil-sys if it is available and prints a warning otherwise. This |
|
|
150 | # function helps in factorizing some code. |
|
|
151 | |
|
|
152 | efmtutil-sys() { |
|
|
153 | if has_version 'app-text/texlive-core' ; then |
|
|
154 | if [ "$ROOT" = "/" ] && [ -x /usr/bin/fmtutil-sys ] ; then |
|
|
155 | einfo "Rebuilding formats" |
|
|
156 | /usr/bin/fmtutil-sys --all &> /dev/null |
|
|
157 | else |
|
|
158 | ewarn "Cannot run fmtutil-sys for some reason." |
|
|
159 | ewarn "Your formats might be inconsistent with your installed ${PN} version" |
|
|
160 | ewarn "Please try to figure what has happened" |
|
|
161 | fi |
|
|
162 | fi |
|
|
163 | } |