1 |
Please find below a patch which will enable EAPI 6 support in |
2 |
latex-package.eclass. The main change is that it won't inherit base |
3 |
any more. |
4 |
|
5 |
Ulrich |
6 |
|
7 |
|
8 |
From 990fce89a3ec1a462399089541b67bbcc6baff87 Mon Sep 17 00:00:00 2001 |
9 |
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@g.o> |
10 |
Date: Wed, 27 Jan 2016 17:15:23 +0100 |
11 |
Subject: [PATCH] latex-package.eclass: Support EAPI 6. |
12 |
|
13 |
Don't inherit base.eclass in EAPI 6. |
14 |
|
15 |
Don't define SRC_URI and S (which was the default). |
16 |
|
17 |
Convert latex-package_has_tetex_3() to a dummy function for backwards |
18 |
compatibility and remove its documentation. |
19 |
|
20 |
Add some die commands. |
21 |
--- |
22 |
eclass/latex-package.eclass | 40 ++++++++++++++++------------------------ |
23 |
1 file changed, 16 insertions(+), 24 deletions(-) |
24 |
|
25 |
diff --git a/eclass/latex-package.eclass b/eclass/latex-package.eclass |
26 |
index 0acfcc9..f0228d5 100644 |
27 |
--- a/eclass/latex-package.eclass |
28 |
+++ b/eclass/latex-package.eclass |
29 |
@@ -1,4 +1,4 @@ |
30 |
-# Copyright 1999-2015 Gentoo Foundation |
31 |
+# Copyright 1999-2016 Gentoo Foundation |
32 |
# Distributed under the terms of the GNU General Public License v2 |
33 |
# $Id$ |
34 |
|
35 |
@@ -51,16 +51,18 @@ |
36 |
# you must either grab each file individually, or find a place to mirror an |
37 |
# archive of them. (iBiblio) |
38 |
# |
39 |
-# It inherits base. |
40 |
+# It inherits base in EAPI 5 and earlier. |
41 |
|
42 |
-inherit base |
43 |
+case ${EAPI:-0} in |
44 |
+ 0|1|2|3|4|5) inherit base ;; |
45 |
+ 6) ;; |
46 |
+ *) die "Unknown EAPI ${EAPI} for ${ECLASS}" ;; |
47 |
+esac |
48 |
|
49 |
RDEPEND="virtual/latex-base" |
50 |
DEPEND="${RDEPEND} |
51 |
>=sys-apps/texinfo-4.2-r5" |
52 |
HOMEPAGE="http://www.tug.org/" |
53 |
-SRC_URI="ftp://tug.ctan.org/macros/latex/" |
54 |
-S=${WORKDIR}/${P} |
55 |
TEXMF="/usr/share/texmf-site" |
56 |
|
57 |
# @ECLASS-VARIABLE: SUPPLIER |
58 |
@@ -69,18 +71,12 @@ TEXMF="/usr/share/texmf-site" |
59 |
# DESCRIPTION above) |
60 |
SUPPLIER="misc" |
61 |
|
62 |
-# @FUNCTION: latex-package_has_tetex3 |
63 |
-# @RETURN: true if at least one of (>=tetex-3 or >=ptex-3.1.8 or >=texlive-core-2007) is installed, else false |
64 |
-# @DESCRIPTION: |
65 |
-# It is often used to know if the current TeX installation supports gentoo's |
66 |
-# texmf-update or if the package has to do it the old way |
67 |
-latex-package_has_tetex_3() { |
68 |
- if has_version '>=app-text/tetex-3' || has_version '>=app-text/ptex-3.1.8' || has_version '>=app-text/texlive-core-2007' ; then |
69 |
- true |
70 |
- else |
71 |
- false |
72 |
- fi |
73 |
-} |
74 |
+case ${EAPI:-0} in |
75 |
+ 0|1|2|3|4|5) |
76 |
+ # Kept for backwards compatibility |
77 |
+ latex-package_has_tetex_3() { true; } |
78 |
+ ;; |
79 |
+esac |
80 |
|
81 |
# @FUNCTION: latex-package_src_doinstall |
82 |
# @USAGE: [ module ] |
83 |
@@ -130,7 +126,7 @@ latex-package_src_doinstall() { |
84 |
for i in `find . -maxdepth 1 -type f -name "*.${1}"` |
85 |
do |
86 |
einfo "Making documentation: $i" |
87 |
- texi2dvi -q -c --language=latex $i &> /dev/null |
88 |
+ texi2dvi -q -c --language=latex $i &> /dev/null || die |
89 |
done |
90 |
;; |
91 |
"tfm" | "vf" | "afm") |
92 |
@@ -190,7 +186,7 @@ latex-package_src_compile() { |
93 |
for i in `find \`pwd\` -maxdepth 1 -type f -name "*.ins"` |
94 |
do |
95 |
einfo "Extracting from $i" |
96 |
- latex --interaction=batchmode $i &> /dev/null |
97 |
+ latex --interaction=batchmode $i &> /dev/null || die |
98 |
done |
99 |
} |
100 |
|
101 |
@@ -228,11 +224,7 @@ latex-package_pkg_postrm() { |
102 |
# Rehashes the kpathsea database, according to the current TeX installation |
103 |
latex-package_rehash() { |
104 |
debug-print function $FUNCNAME $* |
105 |
- if latex-package_has_tetex_3 ; then |
106 |
- texmf-update |
107 |
- else |
108 |
- texconfig rehash |
109 |
- fi |
110 |
+ texmf-update |
111 |
} |
112 |
|
113 |
EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm |
114 |
-- |
115 |
2.7.0 |