1  # Copyright 19992004 Gentoo Foundation 
1  # Copyright 19992004 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/gentoox86/eclass/latexpackage.eclass,v 1.20 2004/11/07 09:19:54 usata Exp $ 
3  # $Header: /var/cvsroot/gentoox86/eclass/latexpackage.eclass,v 1.21 2004/11/12 00:33:19 usata Exp $ 
4  # 
4  # 
5  # Author Matthew Turk <satai@gentoo.org> 
5  # Author Matthew Turk <satai@gentoo.org> 
6  # 
6  # 
7  # 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 
8  # 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 
…  
…  
66  while [ "$1" ]; do 
66  while [ "$1" ]; do 
67  case $1 in 
67  case $1 in 
68  "sh") 
68  "sh") 
69  for i in `find . maxdepth 1 type f name "*.${1}"` 
69  for i in `find . maxdepth 1 type f name "*.${1}"` 
70  do 
70  do 
71  dobin $i 
71  dobin $i  die "dobin $i failed" 
72  done 
72  done 
73  ;; 
73  ;; 
74  "sty"  "cls"  "fd"  "clo"  "def"  "cfg") 
74  "sty"  "cls"  "fd"  "clo"  "def"  "cfg") 
75  for i in `find . maxdepth 1 type f name "*.${1}"` 
75  for i in `find . maxdepth 1 type f name "*.${1}"` 
76  do 
76  do 
77  insinto ${TEXMF}/tex/latex/${PN} 
77  insinto ${TEXMF}/tex/latex/${PN} 
78  doins $i 
78  doins $i  die "doins $i failed" 
79  done 
79  done 
80  ;; 
80  ;; 
81  "dvi"  "ps"  "pdf") 
81  "dvi"  "ps"  "pdf") 
82  for i in `find . maxdepth 1 type f name "*.${1}"` 
82  for i in `find . maxdepth 1 type f name "*.${1}"` 
83  do 
83  do 
84  insinto /usr/share/doc/${P} 
84  insinto /usr/share/doc/${P} 
85  doins $i 
85  doins $i  "doins $i failed" 
86  #dodoc u $i 
86  #dodoc u $i 
87  done 
87  done 
88  ;; 
88  ;; 
89  "tex"  "dtx") 
89  "tex"  "dtx") 
90  for i in `find . maxdepth 1 type f name "*.${1}"` 
90  for i in `find . maxdepth 1 type f name "*.${1}"` 
…  
…  
95  ;; 
95  ;; 
96  "tfm"  "vf"  "afm"  "pfb") 
96  "tfm"  "vf"  "afm"  "pfb") 
97  for i in `find . maxdepth 1 type f name "*.${1}"` 
97  for i in `find . maxdepth 1 type f name "*.${1}"` 
98  do 
98  do 
99  insinto ${TEXMF}/fonts/${1}/${SUPPLIER}/${PN} 
99  insinto ${TEXMF}/fonts/${1}/${SUPPLIER}/${PN} 
100  doins $i 
100  doins $i  die "doins $i failed" 
101  done 
101  done 
102  ;; 
102  ;; 
103  "ttf") 
103  "ttf") 
104  for i in `find . maxdepth 1 type f name "*.ttf"` 
104  for i in `find . maxdepth 1 type f name "*.ttf"` 
105  do 
105  do 
106  insinto ${TEXMF}/fonts/truetype/${SUPPLIER}/${PN} 
106  insinto ${TEXMF}/fonts/truetype/${SUPPLIER}/${PN} 
107  doins $i 
107  doins $i  die "doins $i failed" 
108  done 
108  done 
109  ;; 
109  ;; 
110  "bst") 
110  "bst") 
111  for i in `find . maxdepth 1 type f name "*.bst"` 
111  for i in `find . maxdepth 1 type f name "*.bst"` 
112  do 
112  do 
113  insinto ${TEXMF}/bibtex/bst/${PN} 
113  insinto ${TEXMF}/bibtex/bst/${PN} 
114  doins $i 
114  doins $i  die "doins $i failed" 
115  done 
115  done 
116  ;; 
116  ;; 
117  "styles") 
117  "styles") 
118  latexpackage_src_doinstall sty cls fd clo def cfg bst 
118  latexpackage_src_doinstall sty cls fd clo def cfg bst 
119  ;; 
119  ;; 
…  
…  
144  } 
144  } 
145  
145  
146  latexpackage_src_install() { 
146  latexpackage_src_install() { 
147  debugprint function $FUNCNAME $* 
147  debugprint function $FUNCNAME $* 
148  latexpackage_src_doinstall all 
148  latexpackage_src_doinstall all 
149  [ n "${DOCS}" ] && dodoc ${DOCS} 
149  if [ n "${DOCS}" ] ; then 


150  dodoc ${DOCS} 


151  fi 
150  } 
152  } 
151  
153  
152  latexpackage_pkg_postinst() { 
154  latexpackage_pkg_postinst() { 
153  debugprint function $FUNCNAME $* 
155  debugprint function $FUNCNAME $* 
154  latexpackage_rehash 
156  latexpackage_rehash 