/[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.63 Revision 1.66
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 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.63 2012/07/26 16:40:47 aballier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.66 2013/07/05 22:43:41 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# @AUTHOR: 8# @AUTHOR:
42# @ECLASS-VARIABLE: TEXLIVE_MODULE_BINSCRIPTS 42# @ECLASS-VARIABLE: TEXLIVE_MODULE_BINSCRIPTS
43# @DESCRIPTION: 43# @DESCRIPTION:
44# A space separated list of files that are in fact scripts installed in the 44# A space separated list of files that are in fact scripts installed in the
45# texmf tree and that we want to be available directly. They will be installed in 45# texmf tree and that we want to be available directly. They will be installed in
46# /usr/bin. 46# /usr/bin.
47
48# @ECLASS-VARIABLE: TEXLIVE_MODULE_BINLINKS
49# @DESCRIPTION:
50# A space separated list of links to add for BINSCRIPTS.
51# The systax is: foo:bar to create a symlink bar -> foo.
47 52
48# @ECLASS-VARIABLE: TL_PV 53# @ECLASS-VARIABLE: TL_PV
49# @DESCRIPTION: 54# @DESCRIPTION:
50# Normally the module's PV reflects the TeXLive release it belongs to. 55# Normally the module's PV reflects the TeXLive release it belongs to.
51# If this is not the case, TL_PV takes the version number for the 56# If this is not the case, TL_PV takes the version number for the
140 145
141texlive-module_add_format() { 146texlive-module_add_format() {
142 local name engine mode patterns options 147 local name engine mode patterns options
143 eval $@ 148 eval $@
144 einfo "Appending to format.${PN}.cnf for $@" 149 einfo "Appending to format.${PN}.cnf for $@"
145 [ -d texmf/fmtutil ] || mkdir -p texmf/fmtutil 150 [ -d texmf-dist/fmtutil ] || mkdir -p texmf-dist/fmtutil
146 [ -f texmf/fmtutil/format.${PN}.cnf ] || { echo "# Generated for ${PN} by texlive-module.eclass" > texmf/fmtutil/format.${PN}.cnf; } 151 [ -f texmf-dist/fmtutil/format.${PN}.cnf ] || { echo "# Generated for ${PN} by texlive-module.eclass" > texmf-dist/fmtutil/format.${PN}.cnf; }
147 if [ "${mode}" = "disabled" ]; then 152 if [ "${mode}" = "disabled" ]; then
148 printf "#! " >> texmf/fmtutil/format.${PN}.cnf 153 printf "#! " >> texmf-dist/fmtutil/format.${PN}.cnf
149 fi 154 fi
150 [ -z "${patterns}" ] && patterns="-" 155 [ -z "${patterns}" ] && patterns="-"
151 printf "${name}\t${engine}\t${patterns}\t${options}\n" >> texmf/fmtutil/format.${PN}.cnf 156 printf "${name}\t${engine}\t${patterns}\t${options}\n" >> texmf-dist/fmtutil/format.${PN}.cnf
152} 157}
153 158
154# @FUNCTION: texlive-module_make_language_def_lines 159# @FUNCTION: texlive-module_make_language_def_lines
155# @DESCRIPTION: 160# @DESCRIPTION:
156# Creates a language.${PN}.def entry to put in /etc/texmf/language.def.d. 161# Creates a language.${PN}.def entry to put in /etc/texmf/language.def.d.
277 die "No rule to proccess ${command}. Please file a bug." 282 die "No rule to proccess ${command}. Please file a bug."
278 esac 283 esac
279 done 284 done
280 285
281 # Build format files 286 # Build format files
282 for i in texmf/fmtutil/format*.cnf; do 287 for i in texmf-dist/fmtutil/format*.cnf; do
283 if [ -f "${i}" ]; then 288 if [ -f "${i}" ]; then
284 einfo "Building format ${i}" 289 einfo "Building format ${i}"
290 [ -d texmf-var ] || mkdir texmf-var
291 [ -d texmf-var/web2c ] || mkdir texmf-var/web2c
285 VARTEXFONTS="${T}/fonts" TEXMFHOME="${S}/texmf:${S}/texmf-dist:${S}/texmf-var"\ 292 VARTEXFONTS="${T}/fonts" TEXMFHOME="${S}/texmf:${S}/texmf-dist:${S}/texmf-var"\
286 env -u TEXINPUTS fmtutil --cnffile "${i}" --fmtdir "${S}/texmf-var/web2c" --all\ 293 env -u TEXINPUTS fmtutil --cnffile "${i}" --fmtdir "${S}/texmf-var/web2c" --all\
287 || die "failed to build format ${i}" 294 || die "failed to build format ${i}"
288 fi 295 fi
289 done 296 done
297# @DESCRIPTION: 304# @DESCRIPTION:
298# exported function: 305# exported function:
299# Installs texmf and config files to the system. 306# Installs texmf and config files to the system.
300 307
301texlive-module_src_install() { 308texlive-module_src_install() {
302 for i in texmf/fmtutil/format*.cnf; do 309 for i in texmf-dist/fmtutil/format*.cnf; do
303 [ -f "${i}" ] && etexlinks "${i}" 310 [ -f "${i}" ] && etexlinks "${i}"
304 done 311 done
305 312
306 dodir /usr/share 313 dodir /usr/share
307 if [ -z "${PN##*documentation*}" ] || use doc; then 314 if [ -z "${PN##*documentation*}" ] || use doc; then
339 insinto /etc/texmf/language.dat.lua.d 346 insinto /etc/texmf/language.dat.lua.d
340 doins "${S}/language.${PN}.dat.lua" 347 doins "${S}/language.${PN}.dat.lua"
341 fi 348 fi
342 349
343 [ -n "${TEXLIVE_MODULE_BINSCRIPTS}" ] && dobin_texmf_scripts ${TEXLIVE_MODULE_BINSCRIPTS} 350 [ -n "${TEXLIVE_MODULE_BINSCRIPTS}" ] && dobin_texmf_scripts ${TEXLIVE_MODULE_BINSCRIPTS}
351 if [ -n "${TEXLIVE_MODULE_BINLINKS}" ] ; then
352 for i in ${TEXLIVE_MODULE_BINLINKS} ; do
353 [ -f "${ED}/usr/bin/${i%:*}" ] || die "Trying to install an invalid BINLINK. This should not happen. Please file a bug."
354 dosym ${i%:*} /usr/bin/${i#*:}
355 done
356 fi
344 357
345 texlive-common_handle_config_files 358 texlive-common_handle_config_files
359 TEXMF_PATH=${TEXMF_DIST_PATH} texlive-common_handle_config_files
346} 360}
347 361
348# @FUNCTION: texlive-module_pkg_postinst 362# @FUNCTION: texlive-module_pkg_postinst
349# @DESCRIPTION: 363# @DESCRIPTION:
350# exported function: 364# exported function:

Legend:
Removed from v.1.63  
changed lines
  Added in v.1.66

  ViewVC Help
Powered by ViewVC 1.1.20