1 |
Signed-off-by: David Michael <fedora.dm0@×××××.com> |
2 |
--- |
3 |
|
4 |
Hi, |
5 |
|
6 |
Maybe the banned functions can be dropped? I don't see a removal date, |
7 |
and it's been over half a year since they were made unusable. |
8 |
|
9 |
Thanks. |
10 |
|
11 |
David |
12 |
|
13 |
eclass/qmake-utils.eclass | 14 +++++++------- |
14 |
1 file changed, 7 insertions(+), 7 deletions(-) |
15 |
|
16 |
diff --git a/eclass/qmake-utils.eclass b/eclass/qmake-utils.eclass |
17 |
index 0d49eb94382..d726b362029 100644 |
18 |
--- a/eclass/qmake-utils.eclass |
19 |
+++ b/eclass/qmake-utils.eclass |
20 |
@@ -1,174 +1,174 @@ |
21 |
-# Copyright 1999-2020 Gentoo Authors |
22 |
+# Copyright 1999-2021 Gentoo Authors |
23 |
# Distributed under the terms of the GNU General Public License v2 |
24 |
|
25 |
# @ECLASS: qmake-utils.eclass |
26 |
# @MAINTAINER: |
27 |
# qt@g.o |
28 |
# @AUTHOR: |
29 |
# Davide Pesavento <pesa@g.o> |
30 |
-# @SUPPORTED_EAPIS: 7 |
31 |
+# @SUPPORTED_EAPIS: 7 8 |
32 |
# @BLURB: Common functions for qmake-based packages. |
33 |
# @DESCRIPTION: |
34 |
# Utility eclass providing wrapper functions for Qt5 qmake. |
35 |
# |
36 |
# This eclass does not set any metadata variables nor export any phase |
37 |
# functions. It can be inherited safely. |
38 |
|
39 |
-if [[ -z ${_QMAKE_UTILS_ECLASS} ]]; then |
40 |
-_QMAKE_UTILS_ECLASS=1 |
41 |
- |
42 |
case ${EAPI} in |
43 |
- 7) ;; |
44 |
- *) die "EAPI=${EAPI:-0} is not supported" ;; |
45 |
+ 7|8) ;; |
46 |
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; |
47 |
esac |
48 |
|
49 |
+if [[ -z ${_QMAKE_UTILS_ECLASS} ]]; then |
50 |
+_QMAKE_UTILS_ECLASS=1 |
51 |
+ |
52 |
inherit toolchain-funcs |
53 |
|
54 |
# @FUNCTION: _qmake-utils_banned_func |
55 |
# @INTERNAL |
56 |
# @DESCRIPTION: |
57 |
# Banned functions are banned. |
58 |
_qmake-utils_banned_func() { |
59 |
die "${FUNCNAME[1]} is banned in EAPI 7 and later" |
60 |
} |
61 |
|
62 |
# @FUNCTION: qt4_get_bindir |
63 |
# @INTERNAL |
64 |
# @DESCRIPTION: |
65 |
# Banned. |
66 |
qt4_get_bindir() { |
67 |
_qmake-utils_banned_func |
68 |
} |
69 |
|
70 |
# @FUNCTION: qt4_get_headerdir |
71 |
# @INTERNAL |
72 |
# @DESCRIPTION: |
73 |
# Banned. |
74 |
qt4_get_headerdir() { |
75 |
_qmake-utils_banned_func |
76 |
} |
77 |
|
78 |
# @FUNCTION: qt4_get_libdir |
79 |
# @INTERNAL |
80 |
# @DESCRIPTION: |
81 |
# Banned. |
82 |
qt4_get_libdir() { |
83 |
_qmake-utils_banned_func |
84 |
} |
85 |
|
86 |
# @FUNCTION: qt4_get_mkspecsdir |
87 |
# @INTERNAL |
88 |
# @DESCRIPTION: |
89 |
# Banned. |
90 |
qt4_get_mkspecsdir() { |
91 |
_qmake-utils_banned_func |
92 |
} |
93 |
|
94 |
# @FUNCTION: qt4_get_plugindir |
95 |
# @INTERNAL |
96 |
# @DESCRIPTION: |
97 |
# Banned. |
98 |
qt4_get_plugindir() { |
99 |
_qmake-utils_banned_func |
100 |
} |
101 |
|
102 |
# @FUNCTION: qt5_get_bindir |
103 |
# @DESCRIPTION: |
104 |
# Echoes the directory where Qt5 binaries are installed. |
105 |
# EPREFIX is already prepended to the returned path. |
106 |
qt5_get_bindir() { |
107 |
echo ${EPREFIX}$(qt5_get_libdir)/qt5/bin |
108 |
} |
109 |
|
110 |
# @FUNCTION: qt5_get_headerdir |
111 |
# @DESCRIPTION: |
112 |
# Echoes the directory where Qt5 headers are installed. |
113 |
qt5_get_headerdir() { |
114 |
echo /usr/include/qt5 |
115 |
} |
116 |
|
117 |
# @FUNCTION: qt5_get_libdir |
118 |
# @DESCRIPTION: |
119 |
# Echoes the directory where Qt5 libraries are installed. |
120 |
qt5_get_libdir() { |
121 |
echo /usr/$(get_libdir) |
122 |
} |
123 |
|
124 |
# @FUNCTION: qt5_get_mkspecsdir |
125 |
# @DESCRIPTION: |
126 |
# Echoes the directory where Qt5 mkspecs are installed. |
127 |
qt5_get_mkspecsdir() { |
128 |
echo $(qt5_get_libdir)/qt5/mkspecs |
129 |
} |
130 |
|
131 |
# @FUNCTION: qt5_get_plugindir |
132 |
# @DESCRIPTION: |
133 |
# Echoes the directory where Qt5 plugins are installed. |
134 |
qt5_get_plugindir() { |
135 |
echo $(qt5_get_libdir)/qt5/plugins |
136 |
} |
137 |
|
138 |
# @FUNCTION: qmake-utils_find_pro_file |
139 |
# @INTERNAL |
140 |
# @DESCRIPTION: |
141 |
# Banned. |
142 |
qmake-utils_find_pro_file() { |
143 |
_qmake-utils_banned_func |
144 |
} |
145 |
|
146 |
# @FUNCTION: eqmake4 |
147 |
# @INTERNAL |
148 |
# @DESCRIPTION: |
149 |
# Banned. |
150 |
eqmake4() { |
151 |
_qmake-utils_banned_func |
152 |
} |
153 |
|
154 |
# @FUNCTION: eqmake5 |
155 |
# @USAGE: [arguments for qmake] |
156 |
# @DESCRIPTION: |
157 |
# Wrapper for Qt5's qmake. All arguments are passed to qmake. |
158 |
# |
159 |
# For recursive build systems, i.e. those based on the subdirs template, |
160 |
# you should run eqmake5 on the top-level project file only, unless you |
161 |
# have a valid reason to do otherwise. During the building, qmake will |
162 |
# be automatically re-invoked with the right arguments on every directory |
163 |
# specified inside the top-level project file. |
164 |
eqmake5() { |
165 |
debug-print-function ${FUNCNAME} "$@" |
166 |
|
167 |
ebegin "Running qmake" |
168 |
|
169 |
"$(qt5_get_bindir)"/qmake \ |
170 |
-makefile \ |
171 |
QMAKE_AR="$(tc-getAR) cqs" \ |
172 |
QMAKE_CC="$(tc-getCC)" \ |
173 |
QMAKE_LINK_C="$(tc-getCC)" \ |
174 |
QMAKE_LINK_C_SHLIB="$(tc-getCC)" \ |
175 |
QMAKE_CXX="$(tc-getCXX)" \ |
176 |
QMAKE_LINK="$(tc-getCXX)" \ |
177 |
QMAKE_LINK_SHLIB="$(tc-getCXX)" \ |
178 |
QMAKE_OBJCOPY="$(tc-getOBJCOPY)" \ |
179 |
QMAKE_RANLIB= \ |
180 |
QMAKE_STRIP= \ |
181 |
QMAKE_CFLAGS="${CFLAGS}" \ |
182 |
QMAKE_CFLAGS_RELEASE= \ |
183 |
QMAKE_CFLAGS_DEBUG= \ |
184 |
QMAKE_CXXFLAGS="${CXXFLAGS}" \ |
185 |
QMAKE_CXXFLAGS_RELEASE= \ |
186 |
QMAKE_CXXFLAGS_DEBUG= \ |
187 |
QMAKE_LFLAGS="${LDFLAGS}" \ |
188 |
QMAKE_LFLAGS_RELEASE= \ |
189 |
QMAKE_LFLAGS_DEBUG= \ |
190 |
"$@" |
191 |
|
192 |
if ! eend $? ; then |
193 |
echo |
194 |
eerror "Running qmake has failed! (see above for details)" |
195 |
eerror "This shouldn't happen - please send a bug report to https://bugs.gentoo.org/" |
196 |
echo |
197 |
die "eqmake5 failed" |
198 |
fi |
199 |
} |
200 |
|
201 |
fi |
202 |
-- |
203 |
2.31.1 |