| 1 | # Copyright 1999-2002 Gentoo Technologies, Inc. |
1 | # Copyright 1999-2003 Gentoo Technologies, Inc. |
| 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/latex-package.eclass,v 1.17 2004/04/10 13:02:38 usata Exp $ |
|
|
4 | # |
| 3 | # Author Matthew Turk <satai@gentoo.org> |
5 | # 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 $ |
|
|
| 5 | # |
6 | # |
| 6 | # This eClass is designed to be easy to use and implement. The vast majority of |
7 | # This eClass is designed to be easy to use and implement. The vast majority of |
| 7 | # LaTeX packages will only need to define SRC_URI (and sometimes S) for a |
8 | # LaTeX packages will only need to define SRC_URI (and sometimes S) for a |
| 8 | # successful installation. If fonts need to be installed, then the variable |
9 | # successful installation. If fonts need to be installed, then the variable |
| 9 | # SUPPLIER must also be defined. |
10 | # SUPPLIER must also be defined. |
| … | |
… | |
| 34 | # The eClass automatically takes care of rehashing TeX's cache (ls-lR) after |
35 | # The eClass automatically takes care of rehashing TeX's cache (ls-lR) after |
| 35 | # installation and after removal, as well as creating final documentation from |
36 | # installation and after removal, as well as creating final documentation from |
| 36 | # TeX files that come with the source. Note that we break TeX layout standards |
37 | # TeX files that come with the source. Note that we break TeX layout standards |
| 37 | # by placing documentation in /usr/share/doc/${PN} |
38 | # by placing documentation in /usr/share/doc/${PN} |
| 38 | # |
39 | # |
| 39 | # For examples of basic installations, check out app-text/latex-aastex and |
40 | # For examples of basic installations, check out dev-tex/aastex and |
| 40 | # app-text/latex-leaflet. |
41 | # dev-tex/leaflet . |
| 41 | # |
42 | # |
| 42 | # NOTE: The CTAN "directory grab" function creates files with different MD5 |
43 | # NOTE: The CTAN "directory grab" function creates files with different MD5 |
| 43 | # signatures EVERY TIME. For this reason, if you are grabbing from the CTAN, |
44 | # signatures EVERY TIME. For this reason, if you are grabbing from the CTAN, |
| 44 | # you must either grab each file individually, or find a place to mirror an |
45 | # you must either grab each file individually, or find a place to mirror an |
| 45 | # archive of them. (iBiblio) |
46 | # archive of them. (iBiblio) |
| 46 | |
47 | |
| 47 | inherit base |
48 | inherit base |
| 48 | INHERITED="$INHERITED $ECLASS" |
49 | INHERITED="$INHERITED $ECLASS" |
| 49 | |
50 | |
| 50 | newdepend ">=app-text/tetex-1.0.7 |
51 | DEPEND="virtual/tetex |
| 51 | >=sys-apps/texinfo-4.2-r5" |
52 | >=sys-apps/texinfo-4.2-r5" |
| 52 | ECLASS=latex-package |
53 | ECLASS=latex-package |
| 53 | HOMEPAGE="http://www.tug.org/" |
54 | HOMEPAGE="http://www.tug.org/" |
| 54 | SRC_URI="ftp://tug.ctan.org/macros/latex/" |
55 | SRC_URI="ftp://tug.ctan.org/macros/latex/" |
| 55 | S=${WORKDIR}/${P} |
56 | S=${WORKDIR}/${P} |
| 56 | TEXMF="/usr/share/texmf" |
57 | TEXMF="/usr/share/texmf" |
| … | |
… | |
| 104 | do |
105 | do |
| 105 | insinto ${TEXMF}/fonts/truetype/${SUPPLIER}/${PN} |
106 | insinto ${TEXMF}/fonts/truetype/${SUPPLIER}/${PN} |
| 106 | doins $i |
107 | doins $i |
| 107 | done |
108 | done |
| 108 | ;; |
109 | ;; |
|
|
110 | "bst") |
|
|
111 | for i in `find . -maxdepth 1 -type f -name "*.bst"` |
|
|
112 | do |
|
|
113 | insinto ${TEXMF}/bibtex/bst/${PN} |
|
|
114 | doins $i |
|
|
115 | done |
|
|
116 | ;; |
| 109 | "styles") |
117 | "styles") |
| 110 | latex-package_src_doinstall sty cls fd clo def |
118 | latex-package_src_doinstall sty cls fd clo def bst |
| 111 | ;; |
119 | ;; |
| 112 | "doc") |
120 | "doc") |
| 113 | latex-package_src_doinstall tex dtx dvi ps pdf |
121 | latex-package_src_doinstall tex dtx dvi ps pdf |
| 114 | ;; |
122 | ;; |
| 115 | "fonts") |
123 | "fonts") |
| … | |
… | |
| 126 | done |
134 | done |
| 127 | } |
135 | } |
| 128 | |
136 | |
| 129 | latex-package_src_compile() { |
137 | latex-package_src_compile() { |
| 130 | debug-print function $FUNCNAME $* |
138 | debug-print function $FUNCNAME $* |
| 131 | cd ${S} |
|
|
| 132 | for i in `find \`pwd\` -maxdepth 1 -type f -name "*.ins"` |
139 | for i in `find \`pwd\` -maxdepth 1 -type f -name "*.ins"` |
| 133 | do |
140 | do |
| 134 | einfo "Extracting from $i" |
141 | einfo "Extracting from $i" |
| 135 | latex --interaction=batchmode $i &> /dev/null |
142 | latex --interaction=batchmode $i &> /dev/null |
| 136 | done |
143 | done |
| 137 | } |
144 | } |
| 138 | |
145 | |
| 139 | latex-package_src_install() { |
146 | latex-package_src_install() { |
| 140 | debug-print function $FUNCNAME $* |
147 | debug-print function $FUNCNAME $* |
| 141 | cd ${S} |
|
|
| 142 | latex-package_src_doinstall all |
148 | latex-package_src_doinstall all |
| 143 | } |
149 | } |
| 144 | |
150 | |
| 145 | latex-package_pkg_postinst() { |
151 | latex-package_pkg_postinst() { |
| 146 | debug-print function $FUNCNAME $* |
152 | debug-print function $FUNCNAME $* |