/[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.28 Revision 1.30
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.28 2010/01/07 18:42:47 aballier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.30 2010/01/07 19:16:52 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#
96# @FUNCTION: texlive-module_src_unpack 96# @FUNCTION: texlive-module_src_unpack
97# @DESCRIPTION: 97# @DESCRIPTION:
98# Only for TeX Live 2009. 98# Only for TeX Live 2009.
99# Gives tar.xz unpack support until we can use an EAPI with that support. 99# Gives tar.xz unpack support until we can use an EAPI with that support.
100 100
101RELOC_TARGET=texmf-dist
102
101texlive-module_src_unpack() { 103texlive-module_src_unpack() {
102 local i s 104 local i s
103 for i in ${A} 105 for i in ${A}
104 do 106 do
105 s="${DISTDIR%/}/${i}" 107 s="${DISTDIR%/}/${i}"
106 einfo "Unpacking ${s} to ${PWD}" 108 einfo "Unpacking ${s} to ${PWD}"
107 test -s "${s}" || die "${s} does not exist" 109 test -s "${s}" || die "${s} does not exist"
108 xz -dc -- "${s}" | tar xof - || die "Unpacking ${s} failed" 110 xz -dc -- "${s}" | tar xof - || die "Unpacking ${s} failed"
111 done
112 grep RELOC tlpkg/tlpobj/* | awk '{print $2}' | sed 's#^RELOC/##' > "${T}/reloclist"
113 { for i in $(<"${T}/reloclist"); do dirname $i; done; } | uniq | sort -r > "${T}/dirlist"
114 for i in $(<"${T}/dirlist"); do
115 [ -d "${RELOC_TARGET}/${i}" ] || mkdir -p "${RELOC_TARGET}/${i}"
116 done
117 for i in $(<"${T}/reloclist"); do
118 mv "${i}" "${RELOC_TARGET}"/$(dirname "${i}") || die "failed to relocate ${i} to ${RELOC_TARGET}/$(dirname ${i})"
109 done 119 done
110} 120}
111 121
112fi 122fi
113 123
160# The next step is to generate config files that are to be installed in 170# The next step is to generate config files that are to be installed in
161# /etc/texmf; texmf-update script will take care of merging the different config 171# /etc/texmf; texmf-update script will take care of merging the different config
162# files for different packages in a single one used by the whole tex installation. 172# files for different packages in a single one used by the whole tex installation.
163 173
164texlive-module_src_compile() { 174texlive-module_src_compile() {
165 # Build format files
166 for i in texmf/fmtutil/format*.cnf; do
167 if [ -f "${i}" ]; then
168 einfo "Building format ${i}"
169 VARTEXFONTS="${T}/fonts" TEXMFHOME="${S}/texmf:${S}/texmf-dist:${S}/texmf-var"\
170 env -u TEXINPUTS fmtutil --cnffile "${i}" --fmtdir "${S}/texmf-var/web2c" --all\
171 || die "failed to build format ${i}"
172 fi
173 done
174
175 # Generate config files 175 # Generate config files
176 # TeX Live 2007 was providing lists. For 2008 they are now tlpobj. 176 # TeX Live 2007 was providing lists. For 2008 they are now tlpobj.
177 for i in "${S}"/tlpkg/tlpobj/*; 177 for i in "${S}"/tlpkg/tlpobj/*;
178 do 178 do
179 grep '^execute ' "${i}" | sed -e 's/^execute //' | tr ' ' '@' |sort|uniq >> "${T}/jobs" 179 grep '^execute ' "${i}" | sed -e 's/^execute //' | tr ' ' '@' |sort|uniq >> "${T}/jobs"
203 *) 203 *)
204 die "No rule to proccess ${command}. Please file a bug." 204 die "No rule to proccess ${command}. Please file a bug."
205 esac 205 esac
206 done 206 done
207 207
208 # Build format files
209 for i in texmf/fmtutil/format*.cnf; do
210 if [ -f "${i}" ]; then
211 einfo "Building format ${i}"
212 VARTEXFONTS="${T}/fonts" TEXMFHOME="${S}/texmf:${S}/texmf-dist:${S}/texmf-var"\
213 env -u TEXINPUTS fmtutil --cnffile "${i}" --fmtdir "${S}/texmf-var/web2c" --all\
214 || die "failed to build format ${i}"
215 fi
216 done
217
208 # Delete ls-R files, these should not be created but better be certain they 218 # Delete ls-R files, these should not be created but better be certain they
209 # do not end up being installed. 219 # do not end up being installed.
210 find . -name 'ls-R' -delete 220 find . -name 'ls-R' -delete
211} 221}
212 222

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.30

  ViewVC Help
Powered by ViewVC 1.1.20