|
|
1 | # Copyright 1999-2002 Gentoo Technologies, Inc. |
|
|
2 | # Distributed under the terms of the GNU General Public License v2 |
| 1 | # Author Matthew Turk <satai@gentoo.org> |
3 | # Author Matthew Turk <satai@gentoo.org> |
|
|
4 | # $Header: /var/cvsroot/gentoo-x86/eclass/latex-package.eclass,v 1.12 2003/02/08 03:09:16 satai Exp $ |
| 2 | # |
5 | # |
| 3 | # This eClass is designed to be easy to use and implement. The vast majority of |
6 | # This eClass is designed to be easy to use and implement. The vast majority of |
| 4 | # LaTeX packages will only need to define SRC_URI (and sometimes S) for a |
7 | # LaTeX packages will only need to define SRC_URI (and sometimes S) for a |
| 5 | # successful installation. If fonts need to be installed, then the variable |
8 | # successful installation. If fonts need to be installed, then the variable |
| 6 | # SUPPLIER must also be defined. |
9 | # SUPPLIER must also be defined. |
| … | |
… | |
| 43 | |
46 | |
| 44 | inherit base |
47 | inherit base |
| 45 | INHERITED="$INHERITED $ECLASS" |
48 | INHERITED="$INHERITED $ECLASS" |
| 46 | |
49 | |
| 47 | newdepend ">=app-text/tetex-1.0.7 |
50 | newdepend ">=app-text/tetex-1.0.7 |
| 48 | >=sys-apps/texinfo-4.2-r5" |
51 | >=sys-apps/texinfo-4.2-r5" |
| 49 | ECLASS=latex-package |
52 | ECLASS=latex-package |
| 50 | HOMEPAGE="http://www.tug.org/" |
53 | HOMEPAGE="http://www.tug.org/" |
| 51 | SRC_URI="ftp://tug.ctan.org/macros/latex/" |
54 | SRC_URI="ftp://tug.ctan.org/macros/latex/" |
| 52 | S=${WORKDIR}/${P} |
55 | S=${WORKDIR}/${P} |
| 53 | TEXMF="/usr/share/texmf" |
56 | TEXMF="/usr/share/texmf" |
| … | |
… | |
| 80 | insinto /usr/share/doc/${P} |
83 | insinto /usr/share/doc/${P} |
| 81 | doins $i |
84 | doins $i |
| 82 | #dodoc -u $i |
85 | #dodoc -u $i |
| 83 | done |
86 | done |
| 84 | ;; |
87 | ;; |
| 85 | "tex" | "dtx") |
88 | "tex" | "dtx") |
| 86 | for i in `find . -maxdepth 1 -type f -name "*.${1}"` |
89 | for i in `find . -maxdepth 1 -type f -name "*.${1}"` |
| 87 | do |
90 | do |
| 88 | echo "Making documentation: $i" |
91 | einfo "Making documentation: $i" |
| 89 | texi2dvi -q -c --language=latex $i |
92 | texi2dvi -q -c --language=latex $i &> /dev/null |
| 90 | done |
93 | done |
| 91 | ;; |
94 | ;; |
| 92 | "tfm" | "vf" | "afm" | "pfb") |
95 | "tfm" | "vf" | "afm" | "pfb") |
| 93 | for i in `find . -maxdepth 1 -type f -name "*.${1}"` |
96 | for i in `find . -maxdepth 1 -type f -name "*.${1}"` |
| 94 | do |
97 | do |
| 95 | insinto ${TEXMF}/fonts/${1}/${SUPPLIER}/${PN} |
98 | insinto ${TEXMF}/fonts/${1}/${SUPPLIER}/${PN} |
| 96 | doins $i |
99 | doins $i |
| … | |
… | |
| 126 | latex-package_src_compile() { |
129 | latex-package_src_compile() { |
| 127 | debug-print function $FUNCNAME $* |
130 | debug-print function $FUNCNAME $* |
| 128 | cd ${S} |
131 | cd ${S} |
| 129 | for i in `find \`pwd\` -maxdepth 1 -type f -name "*.ins"` |
132 | for i in `find \`pwd\` -maxdepth 1 -type f -name "*.ins"` |
| 130 | do |
133 | do |
| 131 | echo "Extracting from $i" |
134 | einfo "Extracting from $i" |
| 132 | latex --interaction=batchmode $i > /dev/null |
135 | latex --interaction=batchmode $i &> /dev/null |
| 133 | done |
136 | done |
| 134 | } |
137 | } |
| 135 | |
138 | |
| 136 | latex-package_src_install() { |
139 | latex-package_src_install() { |
| 137 | debug-print function $FUNCNAME $* |
140 | debug-print function $FUNCNAME $* |