/[gentoo-x86]/eclass/texlive-module.eclass
Gentoo

Diff of /eclass/texlive-module.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.4 Revision 1.7
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 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.4 2007/10/20 17:15:24 aballier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.7 2008/01/20 00:14:45 aballier Exp $
4 4
5# 5#
6# Original Author: Alexis Ballier <aballier@gentoo.org> 6# Original Author: Alexis Ballier <aballier@gentoo.org>
7# Purpose: Provide generic install functions so that modular texlive's texmf ebuilds will 7# Purpose: Provide generic install functions so that modular texlive's texmf ebuilds will
8# only have to inherit this eclass. 8# only have to inherit this eclass.
94 fi 94 fi
95 95
96 [ -d texmf ] && doins -r texmf 96 [ -d texmf ] && doins -r texmf
97 [ -d texmf-dist ] && doins -r texmf-dist 97 [ -d texmf-dist ] && doins -r texmf-dist
98 98
99 TEXMFSYSVAR="$(kpsewhich -var-value=TEXMFSYSVAR)" 99 insinto /var/lib/texmf
100 insinto "${TEXMFSYSVAR}"
101 [ -d texmf-var ] && doins -r texmf-var/* 100 [ -d texmf-var ] && doins -r texmf-var/*
102 101
103 insinto /etc/texmf/updmap.d 102 insinto /etc/texmf/updmap.d
104 [ -f "${S}/${PN}.cfg" ] && doins "${S}/${PN}.cfg" 103 [ -f "${S}/${PN}.cfg" ] && doins "${S}/${PN}.cfg"
105 insinto /etc/texmf/dvips/config 104 insinto /etc/texmf/dvips.d
106 [ -f "${S}/${PN}-config.ps" ] && doins "${S}/${PN}-config.ps" 105 [ -f "${S}/${PN}-config.ps" ] && doins "${S}/${PN}-config.ps"
107 insinto /etc/texmf/dvipdfm/config 106 insinto /etc/texmf/dvipdfm/config
108 [ -f "${S}/${PN}-config" ] && doins "${S}/${PN}-config" 107 [ -f "${S}/${PN}-config" ] && doins "${S}/${PN}-config"
109 108
110 texlive-common_handle_config_files 109 texlive-common_handle_config_files
113# pkg_postinst and pkg_postrm, exported functions: 112# pkg_postinst and pkg_postrm, exported functions:
114# run texmf-update to ensure the tex installation is consistent with the 113# run texmf-update to ensure the tex installation is consistent with the
115# installed texmf trees. 114# installed texmf trees.
116 115
117texlive-module_pkg_postinst() { 116texlive-module_pkg_postinst() {
118 if [ "$ROOT" = "/" ] ; then 117 if [ "$ROOT" = "/" ] && [ -x /usr/sbin/texmf-update ] ; then
119 /usr/sbin/texmf-update 118 /usr/sbin/texmf-update
119 else
120 ewarn "Cannot run texmf-update for some reason."
121 ewarn "Your texmf tree might be inconsistent with your configuration"
122 ewarn "Please try to figure what has happened"
120 fi 123 fi
121} 124}
122 125
123texlive-module_pkg_postrm() { 126texlive-module_pkg_postrm() {
124 if [ "$ROOT" = "/" ] ; then 127 if [ "$ROOT" = "/" ] && [ -x /usr/sbin/texmf-update ] ; then
125 /usr/sbin/texmf-update 128 /usr/sbin/texmf-update
129 else
130 ewarn "Cannot run texmf-update for some reason."
131 ewarn "Your texmf tree might be inconsistent with your configuration"
132 ewarn "Please try to figure what has happened"
126 fi 133 fi
127} 134}
128 135
129EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm 136EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.20