forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
latex-package: remove old EAPIs support
Signed-off-by: Mikle Kolyada <[email protected]>
- Loading branch information
Showing
1 changed file
with
20 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
# @AUTHOR: | ||
# Matthew Turk <[email protected]> | ||
# Martin Ehmsen <[email protected]> | ||
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 | ||
# @SUPPORTED_EAPIS: 7 | ||
# @BLURB: An eclass for easy installation of LaTeX packages | ||
# @DESCRIPTION: | ||
# This eClass is designed to be easy to use and implement. The vast majority of | ||
|
@@ -53,18 +53,15 @@ | |
# | ||
# It inherits base and eutils in EAPI 5 and earlier. | ||
|
||
case ${EAPI:-0} in | ||
0|1|2|3|4|5) inherit base eutils ;; | ||
esac | ||
|
||
RDEPEND="virtual/latex-base" | ||
DEPEND="${RDEPEND} | ||
>=sys-apps/texinfo-4.2-r5" | ||
|
||
case ${EAPI:-0} in | ||
0|1|2|3|4|5|6) ;; | ||
7) BDEPEND="${DEPEND}"; DEPEND="" ;; | ||
*) die "${ECLASS}: Unknown EAPI ${EAPI}" ;; | ||
*) die "${EAPI} is not supported" ;; | ||
esac | ||
|
||
HOMEPAGE="http://www.tug.org/" | ||
TEXMF="/usr/share/texmf-site" | ||
|
||
|
@@ -81,14 +78,6 @@ SUPPLIER="misc" | |
# must be set after inherit, as it gets automatically cleared otherwise. | ||
LATEX_DOC_ARGUMENTS="" | ||
|
||
# Kept for backwards compatibility | ||
latex-package_has_tetex_3() { | ||
case ${EAPI:-0} in | ||
0|1|2|3|4|5) return 0 ;; | ||
*) die "${FUNCNAME} no longer supported in EAPI ${EAPI}" ;; | ||
esac | ||
} | ||
|
||
# @FUNCTION: latex-package_src_doinstall | ||
# @USAGE: [ module ] | ||
# @DESCRIPTION: | ||
|
@@ -105,34 +94,31 @@ latex-package_src_doinstall() { | |
|
||
# This actually follows the directions for a "single-user" system | ||
# at http://www.ctan.org/installationadvice/ modified for gentoo. | ||
[ -z "$1" ] && latex-package_src_install all | ||
[[ -z $1 ]] && latex-package_src_install all | ||
|
||
while [ "$1" ]; do | ||
while [[ $1 ]]; do | ||
case $1 in | ||
"sh") | ||
for i in `find . -maxdepth 1 -type f -name "*.${1}"` | ||
do | ||
dobin $i || die "dobin $i failed" | ||
dobin ${i} || die "dobin $i failed" | ||
done | ||
;; | ||
"sty" | "cls" | "fd" | "clo" | "def" | "cfg") | ||
for i in `find . -maxdepth 1 -type f -name "*.${1}"` | ||
do | ||
insinto ${TEXMF}/tex/latex/${PN} | ||
doins $i || die "doins $i failed" | ||
doins ${i} | ||
done | ||
;; | ||
"dvi" | "ps" | "pdf") | ||
for i in `find . -maxdepth 1 -type f -name "*.${1}"` | ||
do | ||
insinto /usr/share/doc/${PF} | ||
doins $i || die "doins $i failed" | ||
doins ${i} | ||
dosym /usr/share/doc/${PF}/$(basename ${i}) ${TEXMF}/doc/latex/${PN}/${i} | ||
case "${EAPI:-0}" in | ||
0|1|2|3) ;; | ||
*) | ||
# prevent compression of symlink target | ||
docompress -x /usr/share/doc/${PF}/$(basename ${i}) | ||
docompress -x /usr/share/doc/${PF}/$(basename ${i}) | ||
;; | ||
esac | ||
done | ||
|
@@ -141,13 +127,13 @@ latex-package_src_doinstall() { | |
if ! in_iuse doc || use doc ; then | ||
for i in `find . -maxdepth 1 -type f -name "*.${1}"` | ||
do | ||
[ -n "${LATEX_PACKAGE_SKIP}" ] && has ${i##*/} ${LATEX_PACKAGE_SKIP} && continue | ||
einfo "Making documentation: $i" | ||
[[-n ${LATEX_PACKAGE_SKIP} ]] && has ${i##*/} ${LATEX_PACKAGE_SKIP} && continue | ||
einfo "Making documentation: ${i}" | ||
if pdflatex ${LATEX_DOC_ARGUMENTS} --halt-on-error --interaction=nonstopmode $i ; then | ||
pdflatex ${LATEX_DOC_ARGUMENTS} --halt-on-error --interaction=nonstopmode $i || die | ||
else | ||
einfo "pdflatex failed, trying texi2dvi" | ||
texi2dvi -q -c --language=latex $i || die | ||
texi2dvi -q -c --language=latex ${i} || die | ||
fi | ||
done | ||
fi | ||
|
@@ -156,28 +142,27 @@ latex-package_src_doinstall() { | |
for i in `find . -maxdepth 1 -type f -name "*.${1}"` | ||
do | ||
insinto ${TEXMF}/fonts/${1}/${SUPPLIER}/${PN} | ||
doins $i || die "doins $i failed" | ||
doins ${i} | ||
done | ||
;; | ||
"pfb") | ||
for i in `find . -maxdepth 1 -type f -name "*.pfb"` | ||
do | ||
insinto ${TEXMF}/fonts/type1/${SUPPLIER}/${PN} | ||
doins $i || die "doins $i failed" | ||
done | ||
doins ${i} | ||
;; | ||
"ttf") | ||
for i in `find . -maxdepth 1 -type f -name "*.ttf"` | ||
do | ||
insinto ${TEXMF}/fonts/truetype/${SUPPLIER}/${PN} | ||
doins $i || die "doins $i failed" | ||
doins ${i} | ||
done | ||
;; | ||
"bst") | ||
for i in `find . -maxdepth 1 -type f -name "*.bst"` | ||
do | ||
insinto ${TEXMF}/bibtex/bst/${PN} | ||
doins $i || die "doins $i failed" | ||
doins ${i} | ||
done | ||
;; | ||
"styles") | ||
|
@@ -208,8 +193,8 @@ latex-package_src_compile() { | |
debug-print function $FUNCNAME $* | ||
for i in `find \`pwd\` -maxdepth 1 -type f -name "*.ins"` | ||
do | ||
einfo "Extracting from $i" | ||
latex --halt-on-error --interaction=nonstopmode $i || die | ||
einfo "Extracting from ${i}" | ||
latex --halt-on-error --interaction=nonstopmode ${i} || die | ||
done | ||
} | ||
|
||
|
@@ -219,7 +204,7 @@ latex-package_src_compile() { | |
latex-package_src_install() { | ||
debug-print function $FUNCNAME $* | ||
latex-package_src_doinstall all | ||
if [ -n "${DOCS}" ] ; then | ||
if [[ -n ${DOCS} ]] ; then | ||
dodoc ${DOCS} | ||
fi | ||
} | ||
|