commit:     41a08abd3d38f05509245a82d65d7503de8e3661
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  4 17:32:17 2019 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Mon Nov  4 17:42:04 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41a08abd

texlive-module.eclass: code cleanup

Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 eclass/texlive-module.eclass | 58 ++++++++------------------------------------
 1 file changed, 10 insertions(+), 48 deletions(-)

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index bd338ee625c..52b26cdca4d 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -6,7 +6,7 @@
 # [email protected]
 # @AUTHOR:
 # Original Author: Alexis Ballier <[email protected]>
-# @SUPPORTED_EAPIS: 3 4 5 6 7
+# @SUPPORTED_EAPIS: 7
 # @BLURB: Provide generic install functions so that modular texlive's texmf 
ebuild will only have to inherit this eclass
 # @DESCRIPTION:
 # Purpose: Provide generic install functions so that modular texlive's texmf 
ebuilds will
@@ -24,7 +24,7 @@
 # bash array.
 
 # @ECLASS-VARIABLE: TEXLIVE_MODULE_CONTENTS
-# @REQUIRED 
+# @REQUIRED
 # @DESCRIPTION:
 # The list of packages that will be installed. This variable will be expanded 
to
 # SRC_URI:
@@ -68,17 +68,10 @@
 # Information to display about the package.
 # e.g. for enabling/disabling a feature
 
-# @ECLASS-VARIABLE: PATCHES
-# @DESCRIPTION:
-# Array variable specifying any patches to be applied.
-
 case "${EAPI:-0}" in
-       0|1|2)
+       0|1|2|3|4|5|6)
                die "EAPI='${EAPI}' is not supported anymore"
                ;;
-       3|4|5)
-               inherit texlive-common eutils
-               ;;
        *)
                inherit texlive-common
                ;;
@@ -92,19 +85,12 @@ IUSE="source"
 
 # Starting from TeX Live 2009, upstream provides .tar.xz modules.
 PKGEXT=tar.xz
-case "${EAPI:-0}" in
-       0|1|2|3|4|5|6)
-               DEPEND="${COMMON_DEPEND}
-                       app-arch/xz-utils"
-               ;;
-       *)
-               # We do not need anything from SYSROOT:
-               #   Everything is built from the texlive install in /
-               #   Generated files are noarch
-               BDEPEND="${COMMON_DEPEND}
-                       app-arch/xz-utils"
-               ;;
-esac
+
+# We do not need anything from SYSROOT:
+#   Everything is built from the texlive install in /
+#   Generated files are noarch
+BDEPEND="${COMMON_DEPEND}
+       app-arch/xz-utils"
 
 for i in ${TEXLIVE_MODULE_CONTENTS}; do
        SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.${PKGEXT}"
@@ -164,22 +150,6 @@ texlive-module_src_unpack() {
        done
 }
 
-# @FUNCTION: texlive-module_src_prepare
-# @DESCRIPTION:
-# Apply patches from the PATCHES array and user patches, if any.
-
-texlive-module_src_prepare() {
-       case "${EAPI:-0}" in
-               0|1|2|3|4|5)
-                       [[ ${#PATCHES[@]} -gt 0 ]] && epatch "${PATCHES[@]}"
-                       epatch_user
-                       ;;
-               *)
-                       die "texlive-module_src_prepare is not to be used in 
EAPI ${EAPI}"
-                       ;;
-       esac
-}
-
 # @FUNCTION: texlive-module_add_format
 # @DESCRIPTION:
 # Creates/appends to a format.${PN}.cnf file for fmtutil.
@@ -429,12 +399,4 @@ texlive-module_pkg_postrm() {
        etexmf-update
 }
 
-case "${EAPI:-0}" in
-       0|1|2|3|4|5)
-               EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install 
\
-                       pkg_postinst pkg_postrm
-               ;;
-       *)
-               EXPORT_FUNCTIONS src_unpack src_compile src_install 
pkg_postinst pkg_postrm
-               ;;
-esac
+EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm

Reply via email to