/[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.8 Revision 1.9
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.8 2008/02/14 09:02:11 aballier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.9 2008/07/03 21:06:25 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#
28 28
29inherit texlive-common 29inherit texlive-common
30 30
31HOMEPAGE="http://www.tug.org/texlive/" 31HOMEPAGE="http://www.tug.org/texlive/"
32 32
33COMMON_DEPEND=">=app-text/texlive-core-${PV}
34 ${TEXLIVE_MODULES_DEPS}"
35
36# TeX Live 2007 was providing .zip files of CTAN packages. For 2008 they are now
37# .tar.lzma
38if [ -z "${PV##2007*}" ] ; then
33for i in ${TEXLIVE_MODULE_CONTENTS}; do 39for i in ${TEXLIVE_MODULE_CONTENTS}; do
34 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.zip" 40 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.zip"
35done 41done
36
37COMMON_DEPEND=">=app-text/texlive-core-${PV}
38 ${TEXLIVE_MODULES_DEPS}"
39
40DEPEND="${COMMON_DEPEND} 42DEPEND="${COMMON_DEPEND}
41 app-arch/unzip" 43 app-arch/unzip"
44else
45for i in ${TEXLIVE_MODULE_CONTENTS}; do
46 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.lzma"
47done
48DEPEND="${COMMON_DEPEND}
49 app-arch/lzma-utils"
50fi
42 51
43RDEPEND="${COMMON_DEPEND}" 52RDEPEND="${COMMON_DEPEND}"
44 53
45IUSE="doc" 54IUSE="doc"
46 55
67 || die "failed to build format ${i}" 76 || die "failed to build format ${i}"
68 fi 77 fi
69 done 78 done
70 79
71 # Generate config files 80 # Generate config files
81 # TeX Live 2007 was providing lists. For 2008 they are now tlpobj.
82 if [ -z "${PV##2007*}" ] ; then
72 for i in "${S}"/texmf/lists/*; 83 for i in "${S}"/texmf/lists/*;
73 do 84 do
74 grep '^!' "${i}" | tr ' ' '=' |sort|uniq >> "${T}/jobs" 85 grep '^!' "${i}" | sed -e 's/^!//' | tr ' ' '@' |sort|uniq >> "${T}/jobs"
75 done 86 done
87 else
88 for i in "${S}"/tlpkg/tlpobj/*;
89 do
90 grep '^execute ' "${i}" | sed -e 's/^execute //' | tr ' ' '@' |sort|uniq >> "${T}/jobs"
91 done
92 fi
76 93
77 for j in $(<"${T}/jobs"); 94 for i in $(<"${T}/jobs");
78 do 95 do
79 command=$(echo ${j} | sed 's/.\(.*\)=.*/\1/') 96 j="$(echo $i | tr '@' ' ')"
80 parameter=$(echo ${j} | sed 's/.*=\(.*\)/\1/') 97 command=${j%% *}
98 parameter=${j#* }
81 case "${command}" in 99 case "${command}" in
82 addMap) 100 addMap)
83 echo "Map ${parameter}" >> "${S}/${PN}.cfg";; 101 echo "Map ${parameter}" >> "${S}/${PN}.cfg";;
84 addMixedMap) 102 addMixedMap)
85 echo "MixedMap ${parameter}" >> "${S}/${PN}.cfg";; 103 echo "MixedMap ${parameter}" >> "${S}/${PN}.cfg";;
86 addDvipsMap) 104 addDvipsMap)
87 echo "p +${parameter}" >> "${S}/${PN}-config.ps";; 105 echo "p +${parameter}" >> "${S}/${PN}-config.ps";;
88 addDvipdfmMap) 106 addDvipdfmMap)
89 echo "f ${parameter}" >> "${S}/${PN}-config";; 107 echo "f ${parameter}" >> "${S}/${PN}-config";;
108 AddHyphen)
109 ewarn "Sorry, $command not implemented yet.";;
110 BuildFormat)
111 elog "Format $parameter already built.";;
112 BuildLanguageDat)
113 elog "Language file $parameter already generated.";;
114 *)
115 die "No rule to proccess ${command}. Please file a bug."
90 esac 116 esac
91 done 117 done
92} 118}
93 119
94# @FUNCTION: texlive-module_src_install 120# @FUNCTION: texlive-module_src_install
109 [ -d texmf-dist/doc ] && rm -rf texmf-dist/doc 135 [ -d texmf-dist/doc ] && rm -rf texmf-dist/doc
110 fi 136 fi
111 137
112 [ -d texmf ] && doins -r texmf 138 [ -d texmf ] && doins -r texmf
113 [ -d texmf-dist ] && doins -r texmf-dist 139 [ -d texmf-dist ] && doins -r texmf-dist
140 [ -d tlpkg ] && doins -r tlpkg
114 141
115 insinto /var/lib/texmf 142 insinto /var/lib/texmf
116 [ -d texmf-var ] && doins -r texmf-var/* 143 [ -d texmf-var ] && doins -r texmf-var/*
117 144
118 insinto /etc/texmf/updmap.d 145 insinto /etc/texmf/updmap.d

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

  ViewVC Help
Powered by ViewVC 1.1.20