/[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.9 Revision 1.14
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.9 2008/07/03 21:06:25 aballier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.14 2008/08/21 13:04:21 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#
22# @ECLASS-VARIABLE: TEXLIVE_MODULE_CONTENTS 22# @ECLASS-VARIABLE: TEXLIVE_MODULE_CONTENTS
23# @DESCRIPTION: 23# @DESCRIPTION:
24# The list of packages that will be installed. This variable will be expanded to 24# The list of packages that will be installed. This variable will be expanded to
25# SRC_URI: 25# SRC_URI:
26# 26#
27# foo -> texlive-module-foo-${PV}.zip 27# For TeX Live 2007: foo -> texlive-module-foo-${PV}.zip
28# For TeX Live 2008: foo -> texlive-module-foo-${PV}.tar.lzma
29
30# @ECLASS-VARIABLE: TEXLIVE_MODULE_DOC_CONTENTS
31# @DESCRIPTION:
32# The list of packages that will be installed if the doc useflag is enabled.
33# Expansion to SRC_URI is the same as for TEXLIVE_MODULE_CONTENTS. This is only
34# valid for TeX Live 2008
35
36# @ECLASS-VARIABLE: TEXLIVE_MODULE_SRC_CONTENTS
37# @DESCRIPTION:
38# The list of packages that will be installed if the source useflag is enabled.
39# Expansion to SRC_URI is the same as for TEXLIVE_MODULE_CONTENTS. This is only
40# valid for TeX Live 2008
28 41
29inherit texlive-common 42inherit texlive-common
30 43
31HOMEPAGE="http://www.tug.org/texlive/" 44HOMEPAGE="http://www.tug.org/texlive/"
32 45
33COMMON_DEPEND=">=app-text/texlive-core-${PV} 46COMMON_DEPEND=">=app-text/texlive-core-${PV}
34 ${TEXLIVE_MODULES_DEPS}" 47 ${TEXLIVE_MODULES_DEPS}"
48
49IUSE=""
35 50
36# TeX Live 2007 was providing .zip files of CTAN packages. For 2008 they are now 51# TeX Live 2007 was providing .zip files of CTAN packages. For 2008 they are now
37# .tar.lzma 52# .tar.lzma
38if [ -z "${PV##2007*}" ] ; then 53if [ -z "${PV##2007*}" ] ; then
39for i in ${TEXLIVE_MODULE_CONTENTS}; do 54for i in ${TEXLIVE_MODULE_CONTENTS}; do
45for i in ${TEXLIVE_MODULE_CONTENTS}; do 60for i in ${TEXLIVE_MODULE_CONTENTS}; do
46 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.lzma" 61 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.lzma"
47done 62done
48DEPEND="${COMMON_DEPEND} 63DEPEND="${COMMON_DEPEND}
49 app-arch/lzma-utils" 64 app-arch/lzma-utils"
65IUSE="${IUSE} source"
66
67# Forge doc SRC_URI
68[ -n "${PN##*documentation*}" ] && [ -n "${TEXLIVE_MODULE_DOC_CONTENTS}" ] && SRC_URI="${SRC_URI} doc? ("
69for i in ${TEXLIVE_MODULE_DOC_CONTENTS}; do
70 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.lzma"
71done
72[ -n "${PN##*documentation*}" ] && [ -n "${TEXLIVE_MODULE_DOC_CONTENTS}" ] && SRC_URI="${SRC_URI} )"
73
74# Forge source SRC_URI
75if [ -n "${TEXLIVE_MODULE_SRC_CONTENTS}" ] ; then
76 SRC_URI="${SRC_URI} source? ("
77 for i in ${TEXLIVE_MODULE_SRC_CONTENTS}; do
78 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.lzma"
79 done
80 SRC_URI="${SRC_URI} )"
50fi 81fi
82fi
51 83
52RDEPEND="${COMMON_DEPEND}" 84RDEPEND="${COMMON_DEPEND}"
53 85
54IUSE="doc" 86[ -z "${PN##*documentation*}" ] || IUSE="${IUSE} doc"
55 87
56S="${WORKDIR}" 88S="${WORKDIR}"
57 89
58# @FUNCTION: texlive-module_src_compile 90# @FUNCTION: texlive-module_src_compile
59# @DESCRIPTION: 91# @DESCRIPTION:
106 addDvipdfmMap) 138 addDvipdfmMap)
107 echo "f ${parameter}" >> "${S}/${PN}-config";; 139 echo "f ${parameter}" >> "${S}/${PN}-config";;
108 AddHyphen) 140 AddHyphen)
109 ewarn "Sorry, $command not implemented yet.";; 141 ewarn "Sorry, $command not implemented yet.";;
110 BuildFormat) 142 BuildFormat)
111 elog "Format $parameter already built.";; 143 einfo "Format $parameter already built.";;
112 BuildLanguageDat) 144 BuildLanguageDat)
113 elog "Language file $parameter already generated.";; 145 einfo "Language file $parameter already generated.";;
114 *) 146 *)
115 die "No rule to proccess ${command}. Please file a bug." 147 die "No rule to proccess ${command}. Please file a bug."
116 esac 148 esac
117 done 149 done
118} 150}
126 for i in texmf/fmtutil/format*.cnf; do 158 for i in texmf/fmtutil/format*.cnf; do
127 [ -f "${i}" ] && etexlinks "${i}" 159 [ -f "${i}" ] && etexlinks "${i}"
128 done 160 done
129 161
130 insinto /usr/share 162 insinto /usr/share
131 if use doc; then 163 if [ -z "${PN##*documentation*}" ] || use doc; then
132 [ -d texmf-doc ] && doins -r texmf-doc 164 [ -d texmf-doc ] && doins -r texmf-doc
133 else 165 else
134 [ -d texmf/doc ] && rm -rf texmf/doc 166 [ -d texmf/doc ] && rm -rf texmf/doc
135 [ -d texmf-dist/doc ] && rm -rf texmf-dist/doc 167 [ -d texmf-dist/doc ] && rm -rf texmf-dist/doc
136 fi 168 fi
137 169
138 [ -d texmf ] && doins -r texmf 170 [ -d texmf ] && doins -r texmf
139 [ -d texmf-dist ] && doins -r texmf-dist 171 [ -d texmf-dist ] && doins -r texmf-dist
140 [ -d tlpkg ] && doins -r tlpkg 172 [ -n "${PV##2007*}" ] && [ -d tlpkg ] && use source && doins -r tlpkg
141 173
142 insinto /var/lib/texmf 174 insinto /var/lib/texmf
143 [ -d texmf-var ] && doins -r texmf-var/* 175 [ -d texmf-var ] && doins -r texmf-var/*
144 176
145 insinto /etc/texmf/updmap.d 177 insinto /etc/texmf/updmap.d

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

  ViewVC Help
Powered by ViewVC 1.1.20