Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/kde:master commit in: eclass/
Date: Tue, 24 Dec 2019 21:35:37
Message-Id: 1577223035.57a68c464a7d9effa0b2f16d6291a25a0b563e52.asturm@gentoo
1 commit: 57a68c464a7d9effa0b2f16d6291a25a0b563e52
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 24 21:27:36 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 24 21:30:35 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=57a68c46
7
8 kde5-functions.eclass: Drop obsolete eclass
9
10 No more development, remaining ebuilds in Gentoo repo only.
11
12 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
13
14 eclass/kde5-functions.eclass | 238 -------------------------------------------
15 1 file changed, 238 deletions(-)
16
17 diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass
18 deleted file mode 100644
19 index bbb8d6d90f..0000000000
20 --- a/eclass/kde5-functions.eclass
21 +++ /dev/null
22 @@ -1,238 +0,0 @@
23 -# Copyright 1999-2019 Gentoo Authors
24 -# Distributed under the terms of the GNU General Public License v2
25 -
26 -# @ECLASS: kde5-functions.eclass
27 -# @MAINTAINER:
28 -# kde@g.o
29 -# @SUPPORTED_EAPIS: 7
30 -# @BLURB: Common ebuild functions for packages based on KDE Frameworks 5.
31 -# @DESCRIPTION:
32 -# This eclass contains functions shared by the other KDE eclasses and forms
33 -# part of their public API.
34 -#
35 -# This eclass must not be inherited directly by an ebuild.
36 -
37 -if [[ -z ${_KDE5_FUNCTIONS_ECLASS} ]]; then
38 -_KDE5_FUNCTIONS_ECLASS=1
39 -
40 -case ${EAPI} in
41 - 7) ;;
42 - *) die "EAPI=${EAPI:-0} is not supported" ;;
43 -esac
44 -
45 -# @ECLASS-VARIABLE: QT_MINIMAL
46 -# @DESCRIPTION:
47 -# Minimum version of Qt to require. This affects add_qt_dep.
48 -: ${QT_MINIMAL:=5.12.3}
49 -
50 -# @ECLASS-VARIABLE: FRAMEWORKS_MINIMAL
51 -# @DESCRIPTION:
52 -# Minimum version of Frameworks to require. This affects add_frameworks_dep.
53 -: ${FRAMEWORKS_MINIMAL:=5.60.0}
54 -
55 -# @ECLASS-VARIABLE: PLASMA_MINIMAL
56 -# @DESCRIPTION:
57 -# Minimum version of Plasma to require. This affects add_plasma_dep.
58 -: ${PLASMA_MINIMAL:=5.15.5}
59 -
60 -# @ECLASS-VARIABLE: KDE_APPS_MINIMAL
61 -# @DESCRIPTION:
62 -# Minimum version of KDE Applications to require. This affects add_kdeapps_dep.
63 -: ${KDE_APPS_MINIMAL:=19.04.3}
64 -
65 -# @FUNCTION: _add_category_dep
66 -# @INTERNAL
67 -# @DESCRIPTION:
68 -# Implementation of add_plasma_dep, add_frameworks_dep, add_kdeapps_dep,
69 -# and finally, add_qt_dep.
70 -_add_category_dep() {
71 - debug-print-function ${FUNCNAME} "$@"
72 -
73 - local category=${1}
74 - local package=${2}
75 - local use=${3}
76 - local version=${4}
77 - local slot=${5}
78 -
79 - if [[ -n ${use} ]] ; then
80 - local use="[${use}]"
81 - fi
82 -
83 - if [[ -n ${version} ]] ; then
84 - local operator=">="
85 - local version="-${version}"
86 - fi
87 -
88 - if [[ -n ${slot} ]] ; then
89 - slot=":${slot}"
90 - elif [[ ${SLOT%\/*} = 5 ]] ; then
91 - slot=":${SLOT%\/*}"
92 - fi
93 -
94 - echo " ${operator}${category}/${package}${version}${slot}${use}"
95 -}
96 -
97 -# @FUNCTION: add_frameworks_dep
98 -# @USAGE: <package name> [USE flags] [minimum version] [slot + operator]
99 -# @DESCRIPTION:
100 -# Create proper dependency for kde-frameworks/ dependencies.
101 -# This takes 1 to 4 arguments. The first being the package name, the optional
102 -# second is additional USE flags to append, and the optional third is the
103 -# version to use instead of the automatic version (use sparingly). In addition,
104 -# the optional fourth argument defines slot+operator instead of automatic slot
105 -# (use even more sparingly).
106 -# The output of this should be added directly to DEPEND/RDEPEND, and may be
107 -# wrapped in a USE conditional (but not an || conditional without an extra set
108 -# of parentheses).
109 -# PORTING: no replacement
110 -add_frameworks_dep() {
111 - debug-print-function ${FUNCNAME} "$@"
112 -
113 - if [[ $# -gt 4 ]]; then
114 - die "${FUNCNAME} was called with too many arguments"
115 - fi
116 -
117 - local version
118 -
119 - if [[ -n ${3} ]]; then
120 - version=${3}
121 - elif [[ ${CATEGORY} = kde-frameworks ]]; then
122 - version=$(ver_cut 1-2)
123 - elif [[ -z ${3} ]] ; then
124 - version=${FRAMEWORKS_MINIMAL}
125 - fi
126 -
127 - _add_category_dep kde-frameworks "${1}" "${2}" "${version}" "${4}"
128 -}
129 -
130 -# @FUNCTION: add_plasma_dep
131 -# @USAGE: <package name> [USE flags] [minimum version] [slot + operator]
132 -# @DESCRIPTION:
133 -# Create proper dependency for kde-plasma/ dependencies.
134 -# This takes 1 to 4 arguments. The first being the package name, the optional
135 -# second is additional USE flags to append, and the optional third is the
136 -# version to use instead of the automatic version (use sparingly). In addition,
137 -# the optional fourth argument defines slot+operator instead of automatic slot
138 -# (use even more sparingly).
139 -# The output of this should be added directly to DEPEND/RDEPEND, and may be
140 -# wrapped in a USE conditional (but not an || conditional without an extra set
141 -# of parentheses).
142 -# PORTING: no replacement
143 -add_plasma_dep() {
144 - debug-print-function ${FUNCNAME} "$@"
145 -
146 - if [[ $# -gt 4 ]]; then
147 - die "${FUNCNAME} was called with too many arguments"
148 - fi
149 -
150 - local version
151 -
152 - if [[ -n ${3} ]]; then
153 - version=${3}
154 - elif [[ ${CATEGORY} = kde-plasma ]]; then
155 - version=$(ver_cut 1-3)
156 - elif [[ -z ${3} ]] ; then
157 - version=${PLASMA_MINIMAL}
158 - fi
159 -
160 - _add_category_dep kde-plasma "${1}" "${2}" "${version}" "${4}"
161 -}
162 -
163 -# @FUNCTION: add_kdeapps_dep
164 -# @USAGE: <package name> [USE flags] [minimum version] [slot + operator]
165 -# @DESCRIPTION:
166 -# Create proper dependency for kde-apps/ dependencies.
167 -# This takes 1 to 4 arguments. The first being the package name, the optional
168 -# second is additional USE flags to append, and the optional third is the
169 -# version to use instead of the automatic version (use sparingly). In addition,
170 -# the optional fourth argument defines slot+operator instead of automatic slot
171 -# (use even more sparingly).
172 -# The output of this should be added directly to DEPEND/RDEPEND, and may be
173 -# wrapped in a USE conditional (but not an || conditional without an extra set
174 -# of parentheses).
175 -# PORTING: no replacement
176 -add_kdeapps_dep() {
177 - debug-print-function ${FUNCNAME} "$@"
178 -
179 - if [[ $# -gt 4 ]]; then
180 - die "${FUNCNAME} was called with too many arguments"
181 - fi
182 -
183 - local version
184 -
185 - if [[ -n ${3} ]]; then
186 - version=${3}
187 - elif [[ ${CATEGORY} = kde-apps ]]; then
188 - version=$(ver_cut 1-3)
189 - elif [[ -z ${3} ]] ; then
190 - version=${KDE_APPS_MINIMAL}
191 - fi
192 -
193 - _add_category_dep kde-apps "${1}" "${2}" "${version}" "${4}"
194 -}
195 -
196 -# @FUNCTION: add_qt_dep
197 -# @USAGE: <package name> [USE flags] [minimum version] [slot + operator]
198 -# @DESCRIPTION:
199 -# Create proper dependency for dev-qt/ dependencies.
200 -# This takes 1 to 4 arguments. The first being the package name, the optional
201 -# second is additional USE flags to append, and the optional third is the
202 -# version to use instead of the automatic version (use sparingly). In addition,
203 -# the optional fourth argument defines slot+operator instead of automatic slot
204 -# (use even more sparingly).
205 -# The output of this should be added directly to DEPEND/RDEPEND, and may be
206 -# wrapped in a USE conditional (but not an || conditional without an extra set
207 -# of parentheses).
208 -# PORTING: no replacement
209 -add_qt_dep() {
210 - debug-print-function ${FUNCNAME} "$@"
211 -
212 - if [[ $# -gt 4 ]]; then
213 - die "${FUNCNAME} was called with too many arguments"
214 - fi
215 -
216 - local version=${3}
217 - local slot=${4}
218 -
219 - if [[ -z ${version} ]]; then
220 - version=${QT_MINIMAL}
221 - fi
222 - if [[ -z ${slot} ]]; then
223 - slot="5"
224 - fi
225 -
226 - _add_category_dep dev-qt "${1}" "${2}" "${version}" "${slot}"
227 -}
228 -
229 -# @FUNCTION: punt_bogus_dep
230 -# @USAGE: <prefix> <dependency>
231 -# @DESCRIPTION:
232 -# Removes a specified dependency from a find_package call with multiple components.
233 -# PORTING: Use ecm_punt_bogus_dep from ecm.eclass instead.
234 -punt_bogus_dep() {
235 - local prefix=${1}
236 - local dep=${2}
237 -
238 - if [[ ! -e "CMakeLists.txt" ]]; then
239 - return
240 - fi
241 -
242 - pcregrep -Mni "(?s)find_package\s*\(\s*${prefix}[^)]*?${dep}.*?\)" CMakeLists.txt > "${T}/bogus${dep}"
243 -
244 - # pcregrep returns non-zero on no matches/error
245 - if [[ $? != 0 ]] ; then
246 - return
247 - fi
248 -
249 - local length=$(wc -l "${T}/bogus${dep}" | cut -d " " -f 1)
250 - local first=$(head -n 1 "${T}/bogus${dep}" | cut -d ":" -f 1)
251 - local last=$(( ${length} + ${first} - 1))
252 -
253 - sed -e "${first},${last}s/${dep}//" -i CMakeLists.txt || die
254 -
255 - if [[ ${length} = 1 ]] ; then
256 - sed -e "/find_package\s*(\s*${prefix}\(\s\+\(REQUIRED\|CONFIG\|COMPONENTS\|\${[A-Z0-9_]*}\)\)\+\s*)/Is/^/# removed by kde5-functions.eclass - /" -i CMakeLists.txt || die
257 - fi
258 -}
259 -
260 -fi