/[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.7 Revision 1.8
1# Copyright 1999-2004 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.7 2008/01/20 00:14:45 aballier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.8 2008/02/14 09:02:11 aballier Exp $
4 4
5# @ECLASS: texlive-module.eclass
6# @MAINTAINER:
7# tex@gentoo.org
5# 8#
6# Original Author: Alexis Ballier <aballier@gentoo.org> 9# Original Author: Alexis Ballier <aballier@gentoo.org>
10# @BLURB: Provide generic install functions so that modular texlive's texmf ebuild will only have to inherit this eclass
11# @DESCRIPTION:
7# Purpose: Provide generic install functions so that modular texlive's texmf ebuilds will 12# Purpose: Provide generic install functions so that modular texlive's texmf ebuilds will
8# only have to inherit this eclass. 13# only have to inherit this eclass.
9# Ebuilds have to provide TEXLIVE_MODULE_CONTENTS variable that contains the list 14# Ebuilds have to provide TEXLIVE_MODULE_CONTENTS variable that contains the list
10# of packages that it will install. 15# of packages that it will install. (See below)
11# TEXLIVE_MODULE_CONTENTS will be expanded to SRC_URI : 16#
12# foo -> texlive-module-foo-${PV}.zip
13# What is assumed is that it unpacks texmf and texmf-dist directories to 17# What is assumed is that it unpacks texmf and texmf-dist directories to
14# ${WORKDIR}. 18# ${WORKDIR}.
15# 19#
20# It inherits texlive-common
21
22# @ECLASS-VARIABLE: TEXLIVE_MODULE_CONTENTS
23# @DESCRIPTION:
24# The list of packages that will be installed. This variable will be expanded to
25# SRC_URI:
26#
27# foo -> texlive-module-foo-${PV}.zip
16 28
17inherit texlive-common 29inherit texlive-common
18 30
19HOMEPAGE="http://www.tug.org/texlive/" 31HOMEPAGE="http://www.tug.org/texlive/"
20 32
32 44
33IUSE="doc" 45IUSE="doc"
34 46
35S="${WORKDIR}" 47S="${WORKDIR}"
36 48
49# @FUNCTION: texlive-module_src_compile
50# @DESCRIPTION:
37# src_compile, exported function: 51# exported function:
38# Will look for format.foo.cnf and build foo format files using fmtutil 52# Will look for format.foo.cnf and build foo format files using fmtutil
39# (provided by texlive-core). The compiled format files will be sent to 53# (provided by texlive-core). The compiled format files will be sent to
40# texmf-var/web2c, like fmtutil defaults to but with some trick to stay in the 54# texmf-var/web2c, like fmtutil defaults to but with some trick to stay in the
41# sandbox 55# sandbox
42# The next step is to generate config files that are to be installed in 56# The next step is to generate config files that are to be installed in
75 echo "f ${parameter}" >> "${S}/${PN}-config";; 89 echo "f ${parameter}" >> "${S}/${PN}-config";;
76 esac 90 esac
77 done 91 done
78} 92}
79 93
94# @FUNCTION: texlive-module_src_install
95# @DESCRIPTION:
80# src_install, exported function: 96# exported function:
81# Install texmf and config files to the system 97# Install texmf and config files to the system
82 98
83texlive-module_src_install() { 99texlive-module_src_install() {
84 for i in texmf/fmtutil/format*.cnf; do 100 for i in texmf/fmtutil/format*.cnf; do
85 [ -f "${i}" ] && etexlinks "${i}" 101 [ -f "${i}" ] && etexlinks "${i}"
107 [ -f "${S}/${PN}-config" ] && doins "${S}/${PN}-config" 123 [ -f "${S}/${PN}-config" ] && doins "${S}/${PN}-config"
108 124
109 texlive-common_handle_config_files 125 texlive-common_handle_config_files
110} 126}
111 127
112# pkg_postinst and pkg_postrm, exported functions: 128# @FUNCTION: texlive-module_pkg_postinst
129# @DESCRIPTION:
130# exported function:
113# run texmf-update to ensure the tex installation is consistent with the 131# run texmf-update to ensure the tex installation is consistent with the
114# installed texmf trees. 132# installed texmf trees.
115 133
116texlive-module_pkg_postinst() { 134texlive-module_pkg_postinst() {
117 if [ "$ROOT" = "/" ] && [ -x /usr/sbin/texmf-update ] ; then 135 if [ "$ROOT" = "/" ] && [ -x /usr/sbin/texmf-update ] ; then
121 ewarn "Your texmf tree might be inconsistent with your configuration" 139 ewarn "Your texmf tree might be inconsistent with your configuration"
122 ewarn "Please try to figure what has happened" 140 ewarn "Please try to figure what has happened"
123 fi 141 fi
124} 142}
125 143
144# @FUNCTION: texlive-module_pkg_postrm
145# @DESCRIPTION:
146# exported function:
147# run texmf-update to ensure the tex installation is consistent with the
148# installed texmf trees.
149
126texlive-module_pkg_postrm() { 150texlive-module_pkg_postrm() {
127 if [ "$ROOT" = "/" ] && [ -x /usr/sbin/texmf-update ] ; then 151 if [ "$ROOT" = "/" ] && [ -x /usr/sbin/texmf-update ] ; then
128 /usr/sbin/texmf-update 152 /usr/sbin/texmf-update
129 else 153 else
130 ewarn "Cannot run texmf-update for some reason." 154 ewarn "Cannot run texmf-update for some reason."

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

  ViewVC Help
Powered by ViewVC 1.1.20