| 1 | # Copyright 1999-2008 Gentoo Foundation |
1 | # Copyright 1999-2008 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-module.eclass,v 1.54 2010/10/24 00:41:41 aballier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.55 2010/10/24 16:26:36 aballier Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: texlive-module.eclass |
5 | # @ECLASS: texlive-module.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # tex@gentoo.org |
7 | # tex@gentoo.org |
| 8 | # |
8 | # |
| … | |
… | |
| 354 | # exported function: |
354 | # exported function: |
| 355 | # Run texmf-update to ensure the tex installation is consistent with the |
355 | # Run texmf-update to ensure the tex installation is consistent with the |
| 356 | # installed texmf trees. |
356 | # installed texmf trees. |
| 357 | |
357 | |
| 358 | texlive-module_pkg_postinst() { |
358 | texlive-module_pkg_postinst() { |
| 359 | if [ "$ROOT" = "/" ] && [ -x /usr/sbin/texmf-update ] ; then |
359 | etexmf-update |
| 360 | /usr/sbin/texmf-update |
|
|
| 361 | else |
|
|
| 362 | ewarn "Cannot run texmf-update for some reason." |
|
|
| 363 | ewarn "Your texmf tree might be inconsistent with your configuration" |
|
|
| 364 | ewarn "Please try to figure what has happened" |
|
|
| 365 | fi |
|
|
| 366 | } |
360 | } |
| 367 | |
361 | |
| 368 | # @FUNCTION: texlive-module_pkg_postrm |
362 | # @FUNCTION: texlive-module_pkg_postrm |
| 369 | # @DESCRIPTION: |
363 | # @DESCRIPTION: |
| 370 | # exported function: |
364 | # exported function: |
| 371 | # Run texmf-update to ensure the tex installation is consistent with the |
365 | # Run texmf-update to ensure the tex installation is consistent with the |
| 372 | # installed texmf trees. |
366 | # installed texmf trees. |
| 373 | |
367 | |
| 374 | texlive-module_pkg_postrm() { |
368 | texlive-module_pkg_postrm() { |
| 375 | if [ "$ROOT" = "/" ] && [ -x /usr/sbin/texmf-update ] ; then |
369 | etexmf-update |
| 376 | /usr/sbin/texmf-update |
|
|
| 377 | else |
|
|
| 378 | ewarn "Cannot run texmf-update for some reason." |
|
|
| 379 | ewarn "Your texmf tree might be inconsistent with your configuration" |
|
|
| 380 | ewarn "Please try to figure what has happened" |
|
|
| 381 | fi |
|
|
| 382 | } |
370 | } |
| 383 | |
371 | |
| 384 | if [ "${PV#2008}" != "${PV}" ]; then |
372 | if [ "${PV#2008}" != "${PV}" ]; then |
| 385 | EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm |
373 | EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm |
| 386 | else |
374 | else |