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