summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikle Kolyada <zlogene@gentoo.org>2020-01-20 00:35:58 +0300
committerMikle Kolyada <zlogene@gentoo.org>2020-01-20 12:34:00 +0300
commit487a775183d1f62734c80d67e9e49a21292adab7 (patch)
tree51d5c5d178ea88c2818086fb1466f214e5f572f3 /eclass/latex-package.eclass
parentapp-text/pelican: version bump to 4.2.0 (diff)
downloadgentoo-487a775183d1f62734c80d67e9e49a21292adab7.tar.gz
gentoo-487a775183d1f62734c80d67e9e49a21292adab7.tar.bz2
gentoo-487a775183d1f62734c80d67e9e49a21292adab7.zip
latex-package: remove old EAPIs support
Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
Diffstat (limited to 'eclass/latex-package.eclass')
-rw-r--r--eclass/latex-package.eclass55
1 files changed, 20 insertions, 35 deletions
diff --git a/eclass/latex-package.eclass b/eclass/latex-package.eclass
index 1a684ef00a66..17b937683acf 100644
--- a/eclass/latex-package.eclass
+++ b/eclass/latex-package.eclass
@@ -7,7 +7,7 @@
# @AUTHOR:
# Matthew Turk <satai@gentoo.org>
# Martin Ehmsen <ehmsen@gentoo.org>
-# @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
}