/[gentoo-x86]/eclass/latex-package.eclass
Gentoo

Diff of /eclass/latex-package.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.5 Revision 1.6
42# archive of them. (iBiblio) 42# archive of them. (iBiblio)
43 43
44inherit base 44inherit base
45INHERITED="$INHERITED $ECLASS" 45INHERITED="$INHERITED $ECLASS"
46 46
47newdepend ">=app-text/tetex-1.0.7" 47newdepend ">=app-text/tetex-1.0.7
48 >=sys-apps/texinfo-4.2-r5"
48ECLASS=latex-package 49ECLASS=latex-package
49HOMEPAGE="http://www.tug.org/" 50HOMEPAGE="http://www.tug.org/"
50SRC_URI="ftp://tug.ctan.org/macros/latex/" 51SRC_URI="ftp://tug.ctan.org/macros/latex/"
51S=${WORKDIR}/${P} 52S=${WORKDIR}/${P}
52TEXMF="/usr/share/texmf" 53TEXMF="/usr/share/texmf"
71 do 72 do
72 insinto ${TEXMF}/tex/latex/${PN} 73 insinto ${TEXMF}/tex/latex/${PN}
73 doins $i 74 doins $i
74 done 75 done
75 ;; 76 ;;
76 "dvi" | "ps" | "pdf" | "tex" | "dtx") 77 "dvi" | "ps" | "pdf")
77 for i in `find . -maxdepth 1 -type f -name "*.${1}"` 78 for i in `find . -maxdepth 1 -type f -name "*.${1}"`
78 do 79 do
79 dodoc $i 80 dodoc $i
80 done 81 done
81 ;; 82 ;;
83 "tex" | "dtx")
84 for i in `find . -maxdepth 1 -type f -name "*.${1}"`
85 do
86 texi2dvi -q -c --language=latex $i
87 done
88 ;;
82 "tfm" | "vf" | "afm" | "pfb") 89 "tfm" | "vf" | "afm" | "pfb")
83 for i in `find . -maxdepth 1 -type f -name "*.${1}"` 90 for i in `find . -maxdepth 1 -type f -name "*.${1}"`
84 do 91 do
85 insinto ${TEXMF}/fonts/${1}/${SUPPLIER}/${PN} 92 insinto ${TEXMF}/fonts/${1}/${SUPPLIER}/${PN}
86 doins $i 93 doins $i
95 ;; 102 ;;
96 "styles") 103 "styles")
97 latex-package_src_doinstall sty cls fd clo def 104 latex-package_src_doinstall sty cls fd clo def
98 ;; 105 ;;
99 "doc") 106 "doc")
100 latex-package_src_doinstall dvi ps pdf tex dtx 107 latex-package_src_doinstall tex dtx dvi ps pdf
101 ;; 108 ;;
102 "fonts") 109 "fonts")
103 latex-package_src_doinstall tfm vg afm pfb ttf 110 latex-package_src_doinstall tfm vg afm pfb ttf
104 ;; 111 ;;
105 "bin") 112 "bin")
130} 137}
131 138
132latex-package_pkg_postinst() { 139latex-package_pkg_postinst() {
133 debug-print function $FUNCNAME $* 140 debug-print function $FUNCNAME $*
134 latex-package_rehash 141 latex-package_rehash
135 if [ ! -e /usr/doc/latex/${PN} ] ; then return ; fi
136 cd /usr/share/doc/${PN}
137 latex-package_make_documentation
138} 142}
139 143
140latex-package_pkg_postrm() { 144latex-package_pkg_postrm() {
141 debug-print function $FUNCNAME $* 145 debug-print function $FUNCNAME $*
142 latex-package_rehash 146 latex-package_rehash
145latex-package_rehash() { 149latex-package_rehash() {
146 debug-print function $FUNCNAME $* 150 debug-print function $FUNCNAME $*
147 texconfig rehash 151 texconfig rehash
148} 152}
149 153
150latex-package_make_documentation() {
151 debug-print function $FUNCNAME $*
152 for i in `find \`pwd\` -maxdepth 1 -type f -name "*.[dt]tex"`
153 do
154 echo "Making Documentation: $i"
155 latex --interaction=batchmode $i > /dev/null
156 # And we don't want any leftovers...
157 for ext in aux toc log
158 do
159 rm ${i}.${ext}
160 done
161 done
162 echo "Completed."
163}
164
165EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm 154EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20