1 |
Functions moved to kde.org: |
2 |
- _kde_is_unreleased |
3 |
- _calculate_src_uri |
4 |
- _calculate_live_repo |
5 |
- kde5_pkg_nofetch |
6 |
- kde5_src_unpack |
7 |
|
8 |
Variables moved to kde.org: |
9 |
- KDE_BUILD_TYPE |
10 |
- KDE_SELINUX_MODULE |
11 |
- KDE_UNRELEASED |
12 |
- HOMEPAGE |
13 |
|
14 |
Variables deprecated: |
15 |
- KDE_SUBSLOT (define SLOT in ebuild) |
16 |
- KMNAME (use KDE_ORG_NAME in kde.org.eclass instead) |
17 |
|
18 |
--- a/eclass/kde5.eclass |
19 |
+++ b/eclass/kde5.eclass |
20 |
@@ -25,6 +25,12 @@ |
21 |
if [[ -z ${_KDE5_ECLASS} ]]; then |
22 |
_KDE5_ECLASS=1 |
23 |
|
24 |
+# Propagate KMNAME to kde.org.eclass |
25 |
+# PORTING: Use KDE_ORG_NAME from kde.org.eclass instead |
26 |
+if [[ -z ${KDE_ORG_NAME} ]]; then |
27 |
+ KDE_ORG_NAME=${KMNAME:=$PN} |
28 |
+fi |
29 |
+ |
30 |
# @ECLASS-VARIABLE: VIRTUALX_REQUIRED |
31 |
# @DESCRIPTION: |
32 |
# For proper description see virtualx.eclass manpage. |
33 |
@@ -32,17 +38,13 @@ _KDE5_ECLASS=1 |
34 |
# for tests you should proceed with setting VIRTUALX_REQUIRED=test. |
35 |
: ${VIRTUALX_REQUIRED:=manual} |
36 |
|
37 |
-inherit cmake-utils flag-o-matic kde5-functions virtualx xdg |
38 |
- |
39 |
-if [[ ${KDE_BUILD_TYPE} = live ]]; then |
40 |
- inherit git-r3 |
41 |
-fi |
42 |
+inherit cmake-utils flag-o-matic kde.org kde5-functions virtualx xdg |
43 |
|
44 |
if [[ -v KDE_GCC_MINIMAL ]]; then |
45 |
EXPORT_FUNCTIONS pkg_pretend |
46 |
fi |
47 |
|
48 |
-EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure |
49 |
src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm |
50 |
+EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_test |
51 |
src_install pkg_preinst pkg_postinst pkg_postrm |
52 |
|
53 |
# @ECLASS-VARIABLE: ECM_KDEINSTALLDIRS |
54 |
# @DESCRIPTION: |
55 |
@@ -127,37 +129,19 @@ if [[ ${CATEGORY} = kde-frameworks ]]; then |
56 |
fi |
57 |
: ${KDE_TEST:=false} |
58 |
|
59 |
-# @ECLASS-VARIABLE: KDE_SELINUX_MODULE |
60 |
-# @DESCRIPTION: |
61 |
-# If set to "none", do nothing. |
62 |
-# For any other value, add selinux to IUSE, and depending on that useflag |
63 |
-# add a dependency on sec-policy/selinux-${KDE_SELINUX_MODULE} to (R)DEPEND. |
64 |
-: ${KDE_SELINUX_MODULE:=none} |
65 |
- |
66 |
# @ECLASS-VARIABLE: KDE_SUBSLOT |
67 |
# @DESCRIPTION: |
68 |
# If set to "false", do nothing. |
69 |
# If set to "true", add a subslot to the package, where subslot is either |
70 |
# defined as major.minor version for kde-*/ categories or ${PV} if other. |
71 |
# For any other value, that value will be used as subslot. |
72 |
+# PORTING: no replacement, define in ebuild |
73 |
: ${KDE_SUBSLOT:=false} |
74 |
|
75 |
-# @ECLASS-VARIABLE: KDE_UNRELEASED |
76 |
-# @INTERNAL |
77 |
-# @DESCRIPTION |
78 |
-# An array of $CATEGORY-$PV pairs of packages that are unreleased upstream. |
79 |
-# Any package matching this will have fetch restriction enabled, and receive |
80 |
-# a proper error message via pkg_nofetch. |
81 |
-KDE_UNRELEASED=( ) |
82 |
- |
83 |
-HOMEPAGE="https://kde.org/" |
84 |
+# PORTING: LICENSE no longer set by eclass, define in ebuild |
85 |
LICENSE="GPL-2" |
86 |
- |
87 |
-SLOT=5 |
88 |
- |
89 |
-if [[ ${CATEGORY} = kde-frameworks ]]; then |
90 |
- KDE_SUBSLOT=true |
91 |
-fi |
92 |
+# PORTING: SLOT no longer set by eclass except for kde-frameworks |
93 |
+[[ ${CATEGORY} = kde-frameworks ]] || SLOT=5 |
94 |
|
95 |
case ${KDE_SUBSLOT} in |
96 |
false) ;; |
97 |
@@ -245,154 +229,10 @@ case ${KDE_TEST} in |
98 |
;; |
99 |
esac |
100 |
|
101 |
-case ${KDE_SELINUX_MODULE} in |
102 |
- none) ;; |
103 |
- *) |
104 |
- IUSE+=" selinux" |
105 |
- RDEPEND+=" selinux? ( sec-policy/selinux-${KDE_SELINUX_MODULE} )" |
106 |
- ;; |
107 |
-esac |
108 |
- |
109 |
DEPEND+=" ${COMMONDEPEND}" |
110 |
RDEPEND+=" ${COMMONDEPEND}" |
111 |
unset COMMONDEPEND |
112 |
|
113 |
-if [[ -n ${KMNAME} && ${KMNAME} != ${PN} && ${KDE_BUILD_TYPE} = release ]]; |
114 |
then |
115 |
- S=${WORKDIR}/${KMNAME}-${PV} |
116 |
-fi |
117 |
- |
118 |
-_kde_is_unreleased() { |
119 |
- local pair |
120 |
- for pair in "${KDE_UNRELEASED[@]}" ; do |
121 |
- if [[ "${pair}" = "${CATEGORY}-${PV}" ]]; then |
122 |
- return 0 |
123 |
- fi |
124 |
- done |
125 |
- |
126 |
- return 1 |
127 |
-} |
128 |
- |
129 |
-# Determine fetch location for released tarballs |
130 |
-_calculate_src_uri() { |
131 |
- debug-print-function ${FUNCNAME} "$@" |
132 |
- |
133 |
- local _kmname |
134 |
- |
135 |
- if [[ -n ${KMNAME} ]]; then |
136 |
- _kmname=${KMNAME} |
137 |
- else |
138 |
- _kmname=${PN} |
139 |
- fi |
140 |
- |
141 |
- case ${PN} in |
142 |
- kdelibs4support | \ |
143 |
- kdewebkit | \ |
144 |
- khtml | \ |
145 |
- kjs | \ |
146 |
- kjsembed | \ |
147 |
- kmediaplayer | \ |
148 |
- kross) |
149 |
- _kmname="portingAids/${_kmname}" |
150 |
- ;; |
151 |
- kdesignerplugin) |
152 |
- [[ ${PV} = 5.6[01].* ]] || _kmname="portingAids/${_kmname}" |
153 |
- ;; |
154 |
- esac |
155 |
- |
156 |
- case ${CATEGORY} in |
157 |
- kde-apps) |
158 |
- case ${PV} in |
159 |
- ??.?.[6-9]? | ??.??.[6-9]? ) |
160 |
- SRC_URI="mirror://kde/unstable/applications/$ |
161 |
{PV}/src/${_kmname}-${PV}.tar.xz" |
162 |
- RESTRICT+=" mirror" |
163 |
- ;; |
164 |
- *) |
165 |
- SRC_URI="mirror://kde/stable/applications/${PV}/ |
166 |
src/${_kmname}-${PV}.tar.xz" ;; |
167 |
- esac |
168 |
- ;; |
169 |
- kde-frameworks) |
170 |
- SRC_URI="mirror://kde/stable/frameworks/${PV%.*}/${_kmname}- |
171 |
${PV}.tar.xz" ;; |
172 |
- kde-plasma) |
173 |
- local plasmapv=$(ver_cut 1-3) |
174 |
- |
175 |
- case ${PV} in |
176 |
- 5.?.[6-9]? | 5.??.[6-9]? ) |
177 |
- # Plasma 5 beta releases |
178 |
- SRC_URI="mirror://kde/unstable/plasma/$ |
179 |
{plasmapv}/${_kmname}-${PV}.tar.xz" |
180 |
- RESTRICT+=" mirror" |
181 |
- ;; |
182 |
- *) |
183 |
- # Plasma 5 stable releases |
184 |
- SRC_URI="mirror://kde/stable/plasma/${plasmapv}/ |
185 |
${_kmname}-${PV}.tar.xz" ;; |
186 |
- esac |
187 |
- ;; |
188 |
- esac |
189 |
- |
190 |
- if [[ ${PN} = kdevelop* ]]; then |
191 |
- case ${PV} in |
192 |
- *.*.[6-9]? ) |
193 |
- SRC_URI="mirror://kde/unstable/kdevelop/${PV}/src/$ |
194 |
{_kmname}-${PV}.tar.xz" |
195 |
- RESTRICT+=" mirror" |
196 |
- ;; |
197 |
- *) |
198 |
- SRC_URI="mirror://kde/stable/kdevelop/${PV}/src/$ |
199 |
{_kmname}-${PV}.tar.xz" ;; |
200 |
- esac |
201 |
- fi |
202 |
- |
203 |
- if _kde_is_unreleased ; then |
204 |
- RESTRICT+=" fetch" |
205 |
- fi |
206 |
-} |
207 |
- |
208 |
-# Determine fetch location for live sources |
209 |
-_calculate_live_repo() { |
210 |
- debug-print-function ${FUNCNAME} "$@" |
211 |
- |
212 |
- SRC_URI="" |
213 |
- |
214 |
- # @ECLASS-VARIABLE: EGIT_MIRROR |
215 |
- # @DESCRIPTION: |
216 |
- # This variable allows easy overriding of default kde mirror service |
217 |
- # (anongit) with anything else you might want to use. |
218 |
- EGIT_MIRROR=${EGIT_MIRROR:=https://anongit.kde.org} |
219 |
- |
220 |
- local _kmname |
221 |
- |
222 |
- # @ECLASS-VARIABLE: EGIT_REPONAME |
223 |
- # @DESCRIPTION: |
224 |
- # This variable allows overriding of default repository |
225 |
- # name. Specify only if this differ from PN and KMNAME. |
226 |
- if [[ -n ${EGIT_REPONAME} ]]; then |
227 |
- # the repository and kmname different |
228 |
- _kmname=${EGIT_REPONAME} |
229 |
- elif [[ -n ${KMNAME} ]]; then |
230 |
- _kmname=${KMNAME} |
231 |
- else |
232 |
- _kmname=${PN} |
233 |
- fi |
234 |
- |
235 |
- if [[ ${PV} == ??.??.49.9999 && ${CATEGORY} = kde-apps ]]; then |
236 |
- EGIT_BRANCH="Applications/$(ver_cut 1-2)" |
237 |
- fi |
238 |
- |
239 |
- if [[ ${PV} != 9999 && ${CATEGORY} = kde-plasma ]]; then |
240 |
- EGIT_BRANCH="Plasma/$(ver_cut 1-2)" |
241 |
- fi |
242 |
- |
243 |
- if [[ ${PV} != 9999 && ${PN} = kdevelop* ]]; then |
244 |
- EGIT_BRANCH="$(ver_cut 1-2)" |
245 |
- fi |
246 |
- |
247 |
- EGIT_REPO_URI="${EGIT_MIRROR}/${_kmname}" |
248 |
-} |
249 |
- |
250 |
-case ${KDE_BUILD_TYPE} in |
251 |
- live) _calculate_live_repo ;; |
252 |
- *) _calculate_src_uri ;; |
253 |
-esac |
254 |
- |
255 |
-debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}" |
256 |
- |
257 |
# @FUNCTION: kde5_pkg_pretend |
258 |
# @DESCRIPTION: |
259 |
# Checks if the active compiler meets the minimum version requirements. |
260 |
@@ -410,49 +250,12 @@ kde5_pkg_setup() { |
261 |
_check_gcc_version |
262 |
} |
263 |
|
264 |
-# @FUNCTION: kde5_pkg_nofetch |
265 |
-# @DESCRIPTION: |
266 |
-# Intended for use in the KDE overlay. If this package matches something in |
267 |
-# KDE_UNRELEASED, display a giant warning that the package has not yet been |
268 |
-# released upstream and should not be used. |
269 |
-kde5_pkg_nofetch() { |
270 |
- if ! _kde_is_unreleased ; then |
271 |
- return |
272 |
- fi |
273 |
- |
274 |
- eerror " _ _ _ _ ____ _____ _ _____ _ ____ _____ ____ " |
275 |
- eerror "| | | | \ | | _ \| ____| | | ____| / \ / ___|| ____| _ \ " |
276 |
- eerror "| | | | \| | |_) | _| | | | _| / _ \ \___ \| _| | | | |" |
277 |
- eerror "| |_| | |\ | _ <| |___| |___| |___ / ___ \ ___) | |___| |_| |" |
278 |
- eerror " \___/|_| \_|_| \_\_____|_____|_____/_/ \_\____/|_____|____/ " |
279 |
- eerror " " |
280 |
- eerror " ____ _ ____ _ __ _ ____ _____ " |
281 |
- eerror "| _ \ / \ / ___| |/ / / \ / ___| ____|" |
282 |
- eerror "| |_) / _ \| | | ' / / _ \| | _| _| " |
283 |
- eerror "| __/ ___ \ |___| . \ / ___ \ |_| | |___ " |
284 |
- eerror "|_| /_/ \_\____|_|\_\/_/ \_\____|_____|" |
285 |
- eerror |
286 |
- eerror "${CATEGORY}/${P} has not been released to the public yet" |
287 |
- eerror "and is only available to packagers right now." |
288 |
- eerror "" |
289 |
- eerror "This is not a bug. Please do not file bugs or contact upstream |
290 |
about this." |
291 |
- eerror "" |
292 |
- eerror "Please consult the upstream release schedule to see when this " |
293 |
- eerror "package is scheduled to be released:" |
294 |
- eerror "https://community.kde.org/Schedules" |
295 |
-} |
296 |
- |
297 |
# @FUNCTION: kde5_src_unpack |
298 |
# @DESCRIPTION: |
299 |
# Unpack the sources, automatically handling both release and live ebuilds. |
300 |
kde5_src_unpack() { |
301 |
debug-print-function ${FUNCNAME} "$@" |
302 |
- |
303 |
- if [[ ${KDE_BUILD_TYPE} = live ]]; then |
304 |
- git-r3_src_unpack |
305 |
- else |
306 |
- default |
307 |
- fi |
308 |
+ kde.org_src_unpack |
309 |
} |
310 |
|
311 |
# @FUNCTION: kde5_src_prepare |