1 |
- BDEPEND instead of DEPEND (partially reverts commit 595611085bc5) |
2 |
- Document TEXMF |
3 |
- Create symlinks with dosym -r |
4 |
- Use debug-print-function |
5 |
|
6 |
Signed-off-by: Ulrich Müller <ulm@g.o> |
7 |
--- |
8 |
v3: Use BDEPEND instead of RDEPEND also in EAPI 7 |
9 |
|
10 |
eclass/latex-package.eclass | 41 +++++++++++++++++++++---------------- |
11 |
1 file changed, 23 insertions(+), 18 deletions(-) |
12 |
|
13 |
diff --git a/eclass/latex-package.eclass b/eclass/latex-package.eclass |
14 |
index bee04b607de1..784254aecf4f 100644 |
15 |
--- a/eclass/latex-package.eclass |
16 |
+++ b/eclass/latex-package.eclass |
17 |
@@ -7,7 +7,7 @@ |
18 |
# @AUTHOR: |
19 |
# Matthew Turk <satai@g.o> |
20 |
# Martin Ehmsen <ehmsen@g.o> |
21 |
-# @SUPPORTED_EAPIS: 7 |
22 |
+# @SUPPORTED_EAPIS: 7 8 |
23 |
# @BLURB: An eclass for easy installation of LaTeX packages |
24 |
# @DESCRIPTION: |
25 |
# This eClass is designed to be easy to use and implement. The vast majority of |
26 |
@@ -51,21 +51,24 @@ |
27 |
# you must either grab each file individually, or find a place to mirror an |
28 |
# archive of them. (iBiblio) |
29 |
|
30 |
+case ${EAPI} in |
31 |
+ 7) inherit eapi8-dosym ;; |
32 |
+ 8) ;; |
33 |
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; |
34 |
+esac |
35 |
+ |
36 |
if [[ -z ${_LATEX_PACKAGE_ECLASS} ]]; then |
37 |
_LATEX_PACKAGE_ECLASS=1 |
38 |
|
39 |
RDEPEND="virtual/latex-base" |
40 |
-DEPEND="${RDEPEND} |
41 |
+BDEPEND="${RDEPEND} |
42 |
>=sys-apps/texinfo-4.2-r5" |
43 |
|
44 |
-case ${EAPI:-0} in |
45 |
- [0-6]) |
46 |
- die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;; |
47 |
- 7) ;; |
48 |
- *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" ;; |
49 |
-esac |
50 |
- |
51 |
HOMEPAGE="http://www.tug.org/" |
52 |
+ |
53 |
+# @ECLASS_VARIABLE: TEXMF |
54 |
+# @DESCRIPTION: |
55 |
+# Top-level installation path. |
56 |
TEXMF="/usr/share/texmf-site" |
57 |
|
58 |
# @ECLASS_VARIABLE: SUPPLIER |
59 |
@@ -90,7 +93,7 @@ LATEX_DOC_ARGUMENTS="" |
60 |
# It installs the files found in the current directory to the standard locations |
61 |
# for a TeX installation |
62 |
latex-package_src_doinstall() { |
63 |
- debug-print function $FUNCNAME $* |
64 |
+ debug-print-function "${FUNCNAME}" "$@" |
65 |
|
66 |
# Avoid generating font cache outside of the sandbox |
67 |
export VARTEXFONTS="${T}/fonts" |
68 |
@@ -118,7 +121,9 @@ latex-package_src_doinstall() { |
69 |
while IFS= read -r -d '' i; do |
70 |
insinto /usr/share/doc/${PF} |
71 |
doins "${i}" |
72 |
- dosym "/usr/share/doc/${PF}/$(basename "${i}")" \ |
73 |
+ local dosym=dosym |
74 |
+ [[ ${EAPI} == 7 ]] && dosym=dosym8 |
75 |
+ ${dosym} -r "/usr/share/doc/${PF}/$(basename "${i}")" \ |
76 |
"${TEXMF}/doc/latex/${PN}/${i}" |
77 |
docompress -x "/usr/share/doc/${PF}/$(basename "${i}")" |
78 |
done < <(find -maxdepth 1 -type f -name "*.${1}" -print0) |
79 |
@@ -200,7 +205,7 @@ latex-package_src_doinstall() { |
80 |
# Calls latex for each *.ins in the current directory in order to generate the |
81 |
# relevant files that will be installed |
82 |
latex-package_src_compile() { |
83 |
- debug-print function $FUNCNAME $* |
84 |
+ debug-print-function "${FUNCNAME}" "$@" |
85 |
while IFS= read -r -d '' i; do |
86 |
einfo "Extracting from ${i}" |
87 |
latex --halt-on-error --interaction=nonstopmode "${i}" || die |
88 |
@@ -211,7 +216,7 @@ latex-package_src_compile() { |
89 |
# @DESCRIPTION: |
90 |
# Installs the package |
91 |
latex-package_src_install() { |
92 |
- debug-print function $FUNCNAME $* |
93 |
+ debug-print-function "${FUNCNAME}" "$@" |
94 |
latex-package_src_doinstall all |
95 |
einstalldocs |
96 |
} |
97 |
@@ -221,7 +226,7 @@ latex-package_src_install() { |
98 |
# Calls latex-package_rehash to ensure the TeX installation is consistent with |
99 |
# the kpathsea database |
100 |
latex-package_pkg_postinst() { |
101 |
- debug-print function $FUNCNAME $* |
102 |
+ debug-print-function "${FUNCNAME}" "$@" |
103 |
latex-package_rehash |
104 |
} |
105 |
|
106 |
@@ -230,7 +235,7 @@ latex-package_pkg_postinst() { |
107 |
# Calls latex-package_rehash to ensure the TeX installation is consistent with |
108 |
# the kpathsea database |
109 |
latex-package_pkg_postrm() { |
110 |
- debug-print function $FUNCNAME $* |
111 |
+ debug-print-function "${FUNCNAME}" "$@" |
112 |
latex-package_rehash |
113 |
} |
114 |
|
115 |
@@ -238,10 +243,10 @@ latex-package_pkg_postrm() { |
116 |
# @DESCRIPTION: |
117 |
# Rehashes the kpathsea database, according to the current TeX installation |
118 |
latex-package_rehash() { |
119 |
- debug-print function $FUNCNAME $* |
120 |
+ debug-print-function "${FUNCNAME}" "$@" |
121 |
texmf-update |
122 |
} |
123 |
|
124 |
-EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm |
125 |
- |
126 |
fi |
127 |
+ |
128 |
+EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm |
129 |
-- |
130 |
2.35.2 |