Gentoo Archives: gentoo-commits

From: "Alexis Ballier (aballier)" <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: texlive-module.eclass
Date: Thu, 07 Jan 2010 20:31:18
Message-Id: E1NSz0m-0000O3-7B@stork.gentoo.org
1 aballier 10/01/07 20:31:16
2
3 Modified: texlive-module.eclass
4 Log:
5 Handle the AddFormat directive of TeX Live 2009
6
7 Revision Changes Path
8 1.31 eclass/texlive-module.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/texlive-module.eclass?rev=1.31&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/texlive-module.eclass?rev=1.31&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/texlive-module.eclass?r1=1.30&r2=1.31
13
14 Index: texlive-module.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v
17 retrieving revision 1.30
18 retrieving revision 1.31
19 diff -u -r1.30 -r1.31
20 --- texlive-module.eclass 7 Jan 2010 19:16:52 -0000 1.30
21 +++ texlive-module.eclass 7 Jan 2010 20:31:15 -0000 1.31
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2008 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.30 2010/01/07 19:16:52 aballier Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.31 2010/01/07 20:31:15 aballier Exp $
27
28 # @ECLASS: texlive-module.eclass
29 # @MAINTAINER:
30 @@ -121,6 +121,25 @@
31
32 fi
33
34 +# @FUNCTION: texlive-module_add_format
35 +# @DESCRIPTION:
36 +# Creates/appends to a format.${PN}.cnf file for fmtutil.
37 +# This will make fmtutil generate the formats when asked and allow the remaining
38 +# src_compile phase to build the formats
39 +
40 +texlive-module_add_format() {
41 + local name engine mode patterns options
42 + eval $@
43 + einfo "Appending to format.${PN}.cnf for $@"
44 + [ -d texmf/fmtutil ] || mkdir -p texmf/fmtutil
45 + [ -f texmf/fmtutil/format.${PN}.cnf ] || { echo "# Generated for ${PN} by texlive-module.eclass" > texmf/fmtutil/format.${PN}.cnf; }
46 + if [ "${mode}" == "disabled" ]; then
47 + printf "#! " >> texmf/fmtutil/format.${PN}.cnf
48 + fi
49 + [ -z "${patterns}" ] && patterns="-"
50 + printf "${name}\t${engine}\t${patterns}\t${options}\n" >> texmf/fmtutil/format.${PN}.cnf
51 +}
52 +
53 # @FUNCTION: texlive-module_make_language_def_lines
54 # @DESCRIPTION:
55 # Creates a language.${PN}.def entry to put in /etc/texmf/language.def.d
56 @@ -196,6 +215,8 @@
57 AddHyphen)
58 texlive-module_make_language_def_lines "$parameter"
59 texlive-module_make_language_dat_lines "$parameter";;
60 + AddFormat)
61 + texlive-module_add_format "$parameter";;
62 BuildFormat)
63 einfo "Format $parameter already built.";;
64 BuildLanguageDat)