Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/kde-sunset:master commit in: eclass/
Date: Mon, 30 Nov 2020 02:19:34
Message-Id: 1606702758.6f225f0386aded38ad9217f03f234d7d5738480c.asturm@gentoo
1 commit: 6f225f0386aded38ad9217f03f234d7d5738480c
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 30 02:14:42 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 30 02:19:18 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/kde-sunset.git/commit/?id=6f225f03
7
8 kde*eclass: Cleanup KDE3 era
9
10 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
11
12 eclass/kde-functions.eclass | 672 --------------------------------------------
13 eclass/kde-meta.eclass | 463 ------------------------------
14 eclass/kde.eclass | 614 ----------------------------------------
15 3 files changed, 1749 deletions(-)
16
17 diff --git a/eclass/kde-functions.eclass b/eclass/kde-functions.eclass
18 deleted file mode 100644
19 index 32ada14b..00000000
20 --- a/eclass/kde-functions.eclass
21 +++ /dev/null
22 @@ -1,672 +0,0 @@
23 -# Copyright 1999-2020 Gentoo Authors
24 -# Distributed under the terms of the GNU General Public License v2
25 -
26 -# @ECLASS: kde-functions.eclass
27 -# @MAINTAINER:
28 -# kde@g.o
29 -# Original author Dan Armak <danarmak@g.o>
30 -#
31 -# @BLURB: This contains everything except things that modify ebuild variables and
32 -# @DESCRIPTION:
33 -# This contains everything except things that modify ebuild variables
34 -# and functions (e.g. $P, src_compile() etc.)
35 -
36 -inherit qt3 eutils
37 -
38 -# map of the monolithic->split ebuild derivation; used to build deps describing
39 -# the relationships between them
40 -KDE_DERIVATION_MAP='
41 -kde-apps/kdeaccessibility kde-base/kbstateapplet
42 -kde-apps/kdeaccessibility kde-base/kdeaccessibility-iconthemes
43 -kde-apps/kdeaccessibility kde-apps/kmag
44 -kde-apps/kdeaccessibility kde-apps/kmousetool
45 -kde-apps/kdeaccessibility kde-apps/kmouth
46 -kde-apps/kdeaccessibility kde-base/kttsd
47 -kde-apps/kdeaccessibility kde-base/ksayit
48 -kde-base/kdeaddons kde-base/atlantikdesigner
49 -kde-base/kdeaddons kde-base/kaddressbook-plugins
50 -kde-base/kdeaddons kde-base/kate-plugins
51 -kde-base/kdeaddons kde-base/kdeaddons-docs-konq-plugins
52 -kde-base/kdeaddons kde-base/kdeaddons-kfile-plugins
53 -kde-base/kdeaddons kde-base/kicker-applets
54 -kde-base/kdeaddons kde-base/knewsticker-scripts
55 -kde-base/kdeaddons kde-apps/konq-plugins
56 -kde-base/kdeaddons kde-base/konqueror-akregator
57 -kde-base/kdeaddons kde-base/ksig
58 -kde-base/kdeaddons kde-base/noatun-plugins
59 -kde-base/kdeaddons kde-base/renamedlg-audio
60 -kde-base/kdeaddons kde-base/renamedlg-images
61 -kde-base/kdeadmin kde-apps/kcron
62 -kde-base/kdeadmin kde-base/kdat
63 -kde-base/kdeadmin kde-base/kdeadmin-kfile-plugins
64 -kde-base/kdeadmin kde-base/knetworkconf
65 -kde-base/kdeadmin kde-base/kpackage
66 -kde-base/kdeadmin kde-base/ksysv
67 -kde-base/kdeadmin kde-apps/kuser
68 -kde-base/kdeadmin kde-base/lilo-config
69 -kde-base/kdeadmin kde-base/secpolicy
70 -kde-base/kdeartwork kde-apps/kdeartwork-emoticons
71 -kde-base/kdeartwork kde-base/kdeartwork-icewm-themes
72 -kde-base/kdeartwork kde-apps/kdeartwork-iconthemes
73 -kde-base/kdeartwork kde-apps/kdeartwork-kscreensaver
74 -kde-base/kdeartwork kde-base/kdeartwork-kwin-styles
75 -kde-base/kdeartwork kde-base/kdeartwork-kworldclock
76 -kde-base/kdeartwork kde-base/kdeartwork-kworldwatch
77 -kde-base/kdeartwork kde-base/kdeartwork-sounds
78 -kde-base/kdeartwork kde-apps/kdeartwork-styles
79 -kde-base/kdeartwork kde-apps/kdeartwork-wallpapers
80 -kde-base/kdebase kde-plasma/drkonqi
81 -kde-base/kdebase kde-base/kappfinder
82 -kde-base/kdebase kde-apps/kate
83 -kde-base/kdebase kde-base/kcheckpass
84 -kde-base/kdebase kde-base/kcminit
85 -kde-base/kdebase kde-apps/kcontrol
86 -kde-base/kdebase kde-base/kdcop
87 -kde-base/kdebase kde-apps/kdebase-data
88 -kde-base/kdebase kde-apps/kdebase-kioslaves
89 -kde-base/kdebase kde-base/kdebase-startkde
90 -kde-base/kdebase kde-base/kdebugdialog
91 -kde-base/kdebase kde-apps/kdepasswd
92 -kde-base/kdebase kde-base/kdeprint
93 -kde-base/kdebase kde-base/kdesktop
94 -kde-base/kdebase kde-apps/kdesu
95 -kde-base/kdebase kde-apps/kdialog
96 -kde-base/kdebase kde-base/kdm
97 -kde-base/kdebase kde-apps/kfind
98 -kde-base/kdebase kde-apps/khelpcenter
99 -kde-base/kdebase kde-base/khotkeys
100 -kde-base/kdebase kde-base/kicker
101 -kde-base/kdebase kde-base/klipper
102 -kde-base/kdebase kde-base/kmenuedit
103 -kde-base/kdebase kde-apps/knetattach
104 -kde-base/kdebase kde-apps/konqueror
105 -kde-base/kdebase kde-apps/konsole
106 -kde-base/kdebase kde-base/kpager
107 -kde-base/kdebase kde-base/kpersonalizer
108 -kde-base/kdebase kde-apps/kreadconfig
109 -kde-base/kdebase kde-plasma/kscreensaver
110 -kde-base/kdebase kde-base/ksmserver
111 -kde-base/kdebase kde-base/ksplashml
112 -kde-base/kdebase kde-apps/kstart
113 -kde-base/kdebase kde-base/ksysguard
114 -kde-base/kdebase kde-base/ksystraycmd
115 -kde-base/kdebase kde-base/ktip
116 -kde-base/kdebase kde-base/kwin
117 -kde-base/kdebase kde-base/kxkb
118 -kde-base/kdebase kde-apps/libkonq
119 -kde-base/kdebase kde-apps/nsplugins
120 -kde-base/kdebindings kde-base/dcopc
121 -kde-base/kdebindings kde-base/dcopjava
122 -kde-base/kdebindings kde-base/dcopperl
123 -kde-base/kdebindings kde-base/dcoppython
124 -kde-base/kdebindings kde-base/kalyptus
125 -kde-base/kdebindings kde-base/kdejava
126 -kde-base/kdebindings kde-base/kjsembed
127 -kde-base/kdebindings kde-base/korundum
128 -kde-base/kdebindings kde-base/pykde
129 -kde-base/kdebindings kde-base/qtjava
130 -kde-base/kdebindings kde-base/qtruby
131 -kde-base/kdebindings kde-base/qtsharp
132 -kde-base/kdebindings kde-base/smoke
133 -kde-base/kdebindings kde-base/xparts
134 -kde-base/kdeedu kde-apps/blinken
135 -kde-base/kdeedu kde-apps/kalzium
136 -kde-base/kdeedu kde-apps/kanagram
137 -kde-base/kdeedu kde-apps/kbruch
138 -kde-base/kdeedu kde-base/kdeedu-applnk
139 -kde-base/kdeedu kde-base/keduca
140 -kde-base/kdeedu kde-apps/kgeography
141 -kde-base/kdeedu kde-apps/khangman
142 -kde-base/kdeedu kde-apps/kig
143 -kde-base/kdeedu kde-apps/kiten
144 -kde-base/kdeedu kde-base/klatin
145 -kde-base/kdeedu kde-apps/klettres
146 -kde-base/kdeedu kde-base/kmathtool
147 -kde-base/kdeedu kde-base/kmessedwords
148 -kde-base/kdeedu kde-apps/kmplot
149 -kde-base/kdeedu kde-base/kpercentage
150 -kde-base/kdeedu sci-astronomy/kstars
151 -kde-base/kdeedu kde-apps/ktouch
152 -kde-base/kdeedu kde-apps/kturtle
153 -kde-base/kdeedu kde-base/kverbos
154 -kde-base/kdeedu kde-base/kvoctrain
155 -kde-base/kdeedu kde-apps/kwordquiz
156 -kde-base/kdeedu kde-apps/libkdeedu
157 -kde-base/kdegames kde-base/atlantik
158 -kde-base/kdegames kde-base/kasteroids
159 -kde-base/kdegames kde-apps/katomic
160 -kde-base/kdegames kde-base/kbackgammon
161 -kde-base/kdegames kde-base/kbattleship
162 -kde-base/kdegames kde-apps/kblackbox
163 -kde-base/kdegames kde-apps/kbounce
164 -kde-base/kdegames kde-base/kenolaba
165 -kde-base/kdegames kde-base/kfouleggs
166 -kde-base/kdegames kde-apps/kgoldrunner
167 -kde-base/kdegames kde-apps/kjumpingcube
168 -kde-base/kdegames kde-apps/klickety
169 -kde-base/kdegames kde-apps/klines
170 -kde-base/kdegames kde-apps/kmahjongg
171 -kde-base/kdegames kde-apps/kmines
172 -kde-base/kdegames kde-apps/knetwalk
173 -kde-base/kdegames kde-base/kolf
174 -kde-base/kdegames kde-apps/konquest
175 -kde-base/kdegames kde-apps/kpat
176 -kde-base/kdegames kde-base/kpoker
177 -kde-base/kdegames kde-apps/kreversi
178 -kde-base/kdegames kde-base/ksame
179 -kde-base/kdegames kde-apps/kshisen
180 -kde-base/kdegames kde-base/ksirtet
181 -kde-base/kdegames kde-base/ksmiletris
182 -kde-base/kdegames kde-base/ksnake
183 -kde-base/kdegames kde-base/ksokoban
184 -kde-base/kdegames kde-apps/kspaceduel
185 -kde-base/kdegames kde-base/ktron
186 -kde-base/kdegames kde-apps/ktuberling
187 -kde-base/kdegames kde-base/kwin4
188 -kde-base/kdegames kde-apps/libkdegames
189 -kde-base/kdegames kde-base/libksirtet
190 -kde-base/kdegames kde-apps/lskat
191 -kde-base/kdegraphics kde-apps/kamera
192 -kde-base/kdegraphics kde-base/kcoloredit
193 -kde-base/kdegraphics kde-base/kdegraphics-kfile-plugins
194 -kde-base/kdegraphics kde-base/kdvi
195 -kde-base/kdegraphics kde-base/kfax
196 -kde-base/kdegraphics kde-apps/kgamma
197 -kde-base/kdegraphics kde-base/kghostview
198 -kde-base/kdegraphics kde-base/kiconedit
199 -kde-base/kdegraphics kde-base/kmrml
200 -kde-base/kdegraphics kde-apps/kolourpaint
201 -kde-base/kdegraphics kde-base/kooka
202 -kde-base/kdegraphics kde-base/kpdf
203 -kde-base/kdegraphics kde-base/kpovmodeler
204 -kde-base/kdegraphics kde-apps/kruler
205 -kde-base/kdegraphics kde-apps/ksnapshot
206 -kde-base/kdegraphics kde-base/ksvg
207 -kde-base/kdegraphics kde-base/kuickshow
208 -kde-base/kdegraphics kde-base/kview
209 -kde-base/kdegraphics kde-base/kviewshell
210 -kde-base/kdegraphics kde-base/libkscan
211 -kde-base/kdemultimedia kde-base/akode
212 -kde-base/kdemultimedia kde-base/artsplugin-akode
213 -kde-base/kdemultimedia kde-base/artsplugin-audiofile
214 -kde-base/kdemultimedia kde-base/artsplugin-mpeglib
215 -kde-base/kdemultimedia kde-base/artsplugin-mpg123
216 -kde-base/kdemultimedia kde-base/artsplugin-xine
217 -kde-base/kdemultimedia kde-apps/juk
218 -kde-base/kdemultimedia kde-base/kaboodle
219 -kde-base/kdemultimedia kde-base/kaudiocreator
220 -kde-base/kdemultimedia kde-base/kdemultimedia-arts
221 -kde-base/kdemultimedia kde-base/kdemultimedia-kappfinder-data
222 -kde-base/kdemultimedia kde-base/kdemultimedia-kfile-plugins
223 -kde-base/kdemultimedia kde-base/kdemultimedia-kioslaves
224 -kde-base/kdemultimedia kde-base/kmid
225 -kde-base/kdemultimedia kde-apps/kmix
226 -kde-base/kdemultimedia kde-base/krec
227 -kde-base/kdemultimedia kde-apps/kscd
228 -kde-base/kdemultimedia kde-apps/libkcddb
229 -kde-base/kdemultimedia kde-base/mpeglib
230 -kde-base/kdemultimedia kde-base/noatun
231 -kde-base/kdenetwork kde-base/dcoprss
232 -kde-base/kdenetwork kde-apps/kdenetwork-filesharing
233 -kde-base/kdenetwork kde-base/kdenetwork-kfile-plugins
234 -kde-base/kdenetwork kde-base/kdict
235 -kde-base/kdenetwork kde-base/kdnssd
236 -kde-base/kdenetwork kde-apps/kget
237 -kde-base/kdenetwork kde-base/knewsticker
238 -kde-base/kdenetwork kde-apps/kopete
239 -kde-base/kdenetwork kde-base/kpf
240 -kde-base/kdenetwork kde-apps/kppp
241 -kde-base/kdenetwork kde-apps/krdc
242 -kde-base/kdenetwork kde-apps/krfb
243 -kde-base/kdenetwork kde-base/ksirc
244 -kde-base/kdenetwork kde-base/ktalkd
245 -kde-base/kdenetwork kde-base/kwifimanager
246 -kde-base/kdenetwork kde-base/librss
247 -kde-base/kdenetwork kde-base/lisa
248 -kde-base/kdepim kde-apps/akregator
249 -kde-base/kdepim kde-base/certmanager
250 -kde-base/kdepim kde-apps/kaddressbook
251 -kde-base/kdepim kde-apps/kalarm
252 -kde-base/kdepim kde-base/kandy
253 -kde-base/kdepim kde-base/karm
254 -kde-base/kdepim kde-base/kdepim-kioslaves
255 -kde-base/kdepim kde-apps/kdepim-kresources
256 -kde-base/kdepim kde-apps/kdepim-wizards
257 -kde-base/kdepim kde-base/kitchensync
258 -kde-base/kdepim kde-apps/kmail
259 -kde-base/kdepim kde-base/kmailcvt
260 -kde-base/kdepim kde-apps/knode
261 -kde-base/kdepim kde-apps/knotes
262 -kde-base/kdepim kde-base/kode
263 -kde-base/kdepim kde-apps/konsolekalendar
264 -kde-base/kdepim kde-apps/kontact
265 -kde-base/kdepim kde-base/kontact-specialdates
266 -kde-base/kdepim kde-apps/korganizer
267 -kde-base/kdepim kde-base/korn
268 -kde-base/kdepim kde-base/kpilot
269 -kde-base/kdepim kde-base/ksync
270 -kde-base/kdepim kde-apps/ktnef
271 -kde-base/kdepim kde-base/libkcal
272 -kde-base/kdepim kde-base/libkdenetwork
273 -kde-base/kdepim kde-base/libkdepim
274 -kde-base/kdepim kde-base/libkholidays
275 -kde-base/kdepim kde-base/libkmime
276 -kde-base/kdepim kde-base/libkpgp
277 -kde-base/kdepim kde-base/libkpimexchange
278 -kde-base/kdepim kde-base/libkpimidentities
279 -kde-base/kdepim kde-base/libksieve
280 -kde-base/kdepim kde-base/mimelib
281 -kde-base/kdepim kde-base/networkstatus
282 -kde-base/kdesdk kde-base/cervisia
283 -kde-base/kdesdk kde-apps/kapptemplate
284 -kde-base/kdesdk kde-base/kbabel
285 -kde-base/kdesdk kde-base/kbugbuster
286 -kde-base/kdesdk kde-apps/kcachegrind
287 -kde-base/kdesdk kde-base/kdesdk-kfile-plugins
288 -kde-base/kdesdk kde-apps/kdesdk-kioslaves
289 -kde-base/kdesdk kde-base/kdesdk-misc
290 -kde-base/kdesdk kde-base/kdesdk-scripts
291 -kde-base/kdesdk kde-base/kmtrace
292 -kde-base/kdesdk kde-apps/kompare
293 -kde-base/kdesdk kde-base/kspy
294 -kde-base/kdesdk kde-base/kuiviewer
295 -kde-base/kdesdk kde-apps/umbrello
296 -kde-base/kdetoys kde-apps/amor
297 -kde-base/kdetoys kde-base/eyesapplet
298 -kde-base/kdetoys kde-base/fifteenapplet
299 -kde-base/kdetoys kde-base/kmoon
300 -kde-base/kdetoys kde-base/kodo
301 -kde-base/kdetoys kde-apps/kteatime
302 -kde-base/kdetoys kde-apps/ktux
303 -kde-base/kdetoys kde-base/kweather
304 -kde-base/kdetoys kde-base/kworldclock
305 -kde-base/kdetoys kde-base/kworldwatch
306 -kde-base/kdeutils kde-apps/ark
307 -kde-base/kdeutils kde-apps/kcalc
308 -kde-base/kdeutils kde-apps/kcharselect
309 -kde-base/kdeutils kde-base/kdelirc
310 -kde-base/kdeutils kde-apps/kdf
311 -kde-base/kdeutils kde-base/kedit
312 -kde-base/kdeutils kde-apps/kfloppy
313 -kde-base/kdeutils kde-apps/kgpg
314 -kde-base/kdeutils kde-base/khexedit
315 -kde-base/kdeutils app-text/kjots
316 -kde-base/kdeutils kde-base/klaptopdaemon
317 -kde-base/kdeutils kde-base/kmilo
318 -kde-base/kdeutils kde-base/kregexpeditor
319 -kde-base/kdeutils kde-base/ksim
320 -kde-base/kdeutils kde-apps/ktimer
321 -kde-base/kdeutils kde-apps/kwalletmanager
322 -kde-base/kdeutils kde-base/superkaramba
323 -kde-base/kdewebdev kde-base/kfilereplace
324 -kde-base/kdewebdev kde-apps/kimagemapeditor
325 -kde-base/kdewebdev kde-apps/klinkstatus
326 -kde-base/kdewebdev kde-apps/kommander
327 -kde-base/kdewebdev kde-base/kxsldbg
328 -kde-base/kdewebdev kde-base/quanta
329 -app-office/koffice app-office/karbon
330 -app-office/koffice app-office/kchart
331 -app-office/koffice app-office/kexi
332 -app-office/koffice app-office/kformula
333 -app-office/koffice app-office/kivio
334 -app-office/koffice app-office/koffice-data
335 -app-office/koffice app-office/koffice-libs
336 -app-office/koffice app-office/koffice-meta
337 -app-office/koffice app-office/koshell
338 -app-office/koffice app-office/kplato
339 -app-office/koffice app-office/kpresenter
340 -app-office/koffice media-gfx/krita
341 -app-office/koffice app-office/kspread
342 -app-office/koffice app-office/kugar
343 -app-office/koffice app-office/kword
344 -'
345 -
346 -# @FUNCTION: get-parent-package
347 -# @USAGE: < name of split-ebuild >
348 -# @DESCRIPTION:
349 -# accepts 1 parameter, the name of a split ebuild; echoes the name of its mother package
350 -get-parent-package() {
351 - local parent child
352 - while read parent child; do
353 - if [[ ${child} == $1 ]]; then
354 - echo ${parent}
355 - return 0
356 - fi
357 - done <<EOF
358 -$KDE_DERIVATION_MAP
359 -EOF
360 - die "Package $1 not found in KDE_DERIVATION_MAP, please report bug"
361 -}
362 -
363 -# @FUNCTION: get-child-packages
364 -# @USAGE: < name of monolithic package >
365 -# @DESCRIPTION:
366 -# accepts 1 parameter, the name of a monolithic package; echoes the names of all ebuilds derived from it
367 -get-child-packages() {
368 - local parent child
369 - while read parent child; do
370 - [[ ${parent} == $1 ]] && echo -n "${child} "
371 - done <<EOF
372 -$KDE_DERIVATION_MAP
373 -EOF
374 -}
375 -
376 -# @FUNCTION: is-parent-package
377 -# @USAGE: < name >
378 -# @RETURN: 0 if <name> is a parent package, otherwise 1
379 -is-parent-package() {
380 - local parent child
381 - while read parent child; do
382 - [[ "${parent}" == "$1" ]] && return 0
383 - done <<EOF
384 -$KDE_DERIVATION_MAP
385 -EOF
386 - return 1
387 -}
388 -
389 -# ---------------------------------------------------------------
390 -# kde/qt directory management etc. functions, was kde-dirs.ebuild
391 -# ---------------------------------------------------------------
392 -
393 -# @FUNCTION: need-kde
394 -# @USAGE: < version >
395 -# @DESCRIPTION:
396 -# Sets the correct DEPEND and RDEPEND for the needed kde < version >. Also takes
397 -# care of the correct Qt-version and correct RDEPEND handling.
398 -need-kde() {
399 - debug-print-function $FUNCNAME "$@"
400 -
401 - KDEVER="$1"
402 -
403 - # determine install locations
404 - set-kdedir ${KDEVER}
405 -
406 - if [[ "${RDEPEND-unset}" != "unset" ]]; then
407 - x_DEPEND="${RDEPEND}"
408 - else
409 - x_DEPEND="${DEPEND}"
410 - fi
411 - if [[ "${KDEBASE}" == "true" ]]; then
412 - # If we're a kde-base package, we need at least our own version of kdelibs.
413 - # Note: we only set RDEPEND if it is already set, otherwise
414 - # we break packages relying on portage copying RDEPEND from DEPEND.
415 - DEPEND="${DEPEND} ~kde-frameworks/kdelibs-$PV"
416 - RDEPEND="${x_DEPEND} ~kde-frameworks/kdelibs-${PV}"
417 - else
418 - # Things outside kde-base need a minimum version,
419 - # but kde-frameworks/kdelibs:kde-4 mustn't satisfy it.
420 - min-kde-ver ${KDEVER}
421 - DEPEND="${DEPEND} =kde-frameworks/kdelibs-3.5*"
422 - RDEPEND="${x_DEPEND} =kde-frameworks/kdelibs-3.5*"
423 - fi
424 -
425 - qtver-from-kdever ${KDEVER}
426 - need-qt ${selected_version}
427 -
428 - if [[ "${KDEBASE}" == "true" ]]; then
429 - SLOT="$KDEMAJORVER.$KDEMINORVER"
430 - else
431 - : ${SLOT="0"}
432 - fi
433 -}
434 -
435 -# @FUNCTION: set-kdedir
436 -# @USAGE: < version >
437 -# @DESCRIPTION:
438 -# Sets the right directories for the kde <version> wrt what kind of package will
439 -# be installed, e. g. third-party-apps, kde-base-packages, ...
440 -set-kdedir() {
441 - debug-print-function $FUNCNAME "$@"
442 -
443 -
444 - # set install location:
445 - # - 3rd party apps go into /usr, and have SLOT="0".
446 - # - kde-base category ebuilds go into /usr/kde/$MAJORVER.$MINORVER,
447 - # and have SLOT="$MAJORVER.$MINORVER".
448 - # - kde-base category cvs ebuilds have major version 5 and go into
449 - # /usr/kde/cvs; they have SLOT="cvs".
450 - # - Backward-compatibility exceptions: all kde2 packages (kde-base or otherwise)
451 - # go into /usr/kde/2. kde 3.0.x goes into /usr/kde/3 (and not 3.0).
452 - # - kde-base category ebuilds always depend on their exact matching version of
453 - # kdelibs and link against it. Other ebuilds link aginst the latest one found.
454 - # - This function exports $PREFIX (location to install to) and $KDEDIR
455 - # (location of kdelibs to link against) for all ebuilds.
456 - #
457 - # -- Overrides - deprecated but working for now: --
458 - # - If $KDEPREFIX is defined (in the profile or env), it overrides everything
459 - # and both base and 3rd party kde stuff goes in there.
460 - # - If $KDELIBSDIR is defined, the kdelibs installed in that location will be
461 - # used, even by kde-base packages.
462 -
463 - # get version elements
464 - IFSBACKUP="$IFS"
465 - IFS=".-_"
466 - for x in $1; do
467 - if [[ -z "$KDEMAJORVER" ]]; then KDEMAJORVER=$x
468 - else if [[ -z "$KDEMINORVER" ]]; then KDEMINORVER=$x
469 - else if [[ -z "$KDEREVISION" ]]; then KDEREVISION=$x
470 - fi; fi; fi
471 - done
472 - [[ -z "$KDEMINORVER" ]] && KDEMINORVER="0"
473 - [[ -z "$KDEREVISION" ]] && KDEREVISION="0"
474 - IFS="$IFSBACKUP"
475 - debug-print "$FUNCNAME: version breakup: KDEMAJORVER=$KDEMAJORVER KDEMINORVER=$KDEMINORVER KDEREVISION=$KDEREVISION"
476 -
477 - # install prefix
478 - if [[ -n "$KDEPREFIX" ]]; then
479 - export PREFIX="$KDEPREFIX"
480 - else
481 - if [[ -z ${KDEBASE} || ${KDEBASE} != "true" ]]; then
482 - PREFIX="/usr/kde/3.5"
483 - else
484 - case $KDEMAJORVER.$KDEMINORVER in
485 - 3*) export PREFIX="/usr/kde/3.5";;
486 - 5.0) export PREFIX="/usr/kde/svn";;
487 - *) die "failed to set PREFIX";;
488 - esac
489 - fi
490 - fi
491 -
492 - # kdelibs location
493 - if [[ -n "$KDELIBSDIR" ]]; then
494 - export KDEDIR="$KDELIBSDIR"
495 - else
496 - if [[ -z ${KDEBASE} || ${KDEBASE} != "true" ]]; then
497 - # find the latest kdelibs installed
498 - for x in /usr/kde/{svn,3.5} "${PREFIX}" \
499 - "${KDE3LIBSDIR}" "${KDELIBSDIR}" "${KDE3DIR}" "${KDEDIR}" /usr/kde/*; do
500 - if [[ -f "${x}/include/kwin.h" ]]; then
501 - debug-print found
502 - export KDEDIR="$x"
503 - break
504 - fi
505 - done
506 - else
507 - # kde-base ebuilds must always use the exact version of kdelibs they came with
508 - case $KDEMAJORVER.$KDEMINORVER in
509 - 3*) export KDEDIR="/usr/kde/3.5";;
510 - 5.0) export KDEDIR="/usr/kde/svn";;
511 - *) die "failed to set KDEDIR";;
512 - esac
513 - fi
514 - fi
515 -
516 - debug-print "$FUNCNAME: Will use the kdelibs installed in $KDEDIR, and install into $PREFIX."
517 -}
518 -
519 -# @FUNCTION: need-qt
520 -# @USAGE: < version >
521 -# @DESCRIPTION:
522 -# Sets the DEPEND and RDEPEND for Qt <version>.
523 -need-qt() {
524 - debug-print-function $FUNCNAME "${@}"
525 -
526 - QTVER="$1"
527 -
528 - QT=qt
529 -
530 - if [[ "${RDEPEND-unset}" != "unset" ]]; then
531 - x_DEPEND="${RDEPEND}"
532 - else
533 - x_DEPEND="${DEPEND}"
534 - fi
535 -
536 - case ${QTVER} in
537 - 3*) DEPEND="${DEPEND} =dev-qt/qt-meta-3*"
538 - RDEPEND="${RDEPEND} =dev-qt/qt-meta-3*"
539 - ;;
540 - *) echo "!!! error: $FUNCNAME() called with invalid parameter: \"$QTVER\", please report bug" && exit 1;;
541 - esac
542 -
543 -}
544 -
545 -# @FUNCTION: set-qtdir
546 -# @DESCRIPTION:
547 -# This function is not needed anymore.
548 -set-qtdir() {
549 - :
550 -}
551 -
552 -# @FUNCTION: qtver-from-kdever
553 -# @USAGE: < kde-version >
554 -# @DESCRIPTION:
555 -# returns minimal qt version needed for specified kde version
556 -qtver-from-kdever() {
557 - debug-print-function $FUNCNAME "$@"
558 -
559 - local ver
560 -
561 - case $1 in
562 - 3.1*) ver=3.1;;
563 - 3.2*) ver=3.2;;
564 - 3.3*) ver=3.3;;
565 - 3.4*) ver=3.3;;
566 - 3.5*) ver=3.3;;
567 - 3*) ver=3.0.5;;
568 - 5) ver=3.3;; # cvs version
569 - *) echo "!!! error: $FUNCNAME called with invalid parameter: \"$1\", please report bug" && exit 1;;
570 - esac
571 -
572 - selected_version="$ver"
573 -
574 -}
575 -
576 -min-kde-ver() {
577 - debug-print-function $FUNCNAME "$@"
578 -
579 - case $1 in
580 - 3.0*) selected_version="3.0";;
581 - 3.1*) selected_version="3.1";;
582 - 3.2*) selected_version="3.2";;
583 - 3.3*) selected_version="3.3";;
584 - 3.4*) selected_version="3.4";;
585 - 3.5*) selected_version="3.5";;
586 - 3*) selected_version="3.0";;
587 - 5) selected_version="5";;
588 - *) echo "!!! error: $FUNCNAME() called with invalid parameter: \"$1\", please report bug" && exit 1;;
589 - esac
590 -
591 -}
592 -
593 -# @FUNCTION: kde_sandbox_patch
594 -# @USAGE: < dir > [ dir ] [ dir ] [...]
595 -# @DESCRIPTION:
596 -# generic makefile sed for sandbox compatibility. for some reason when the kde makefiles (of many packages
597 -# and versions) try to chown root and chmod 4755 some binaries (after installing, target install-exec-local),
598 -# they do it to the files in $(bindir), not $(DESTDIR)/$(bindir). Most of these have been fixed in latest cvs
599 -# but a few remain here and there.
600 -#
601 -# Pass a list of dirs to sed, Makefile.{am,in} in these dirs will be sed'ed.
602 -# This should be harmless if the makefile doesn't need fixing.
603 -kde_sandbox_patch() {
604 - debug-print-function $FUNCNAME "$@"
605 -
606 - while [[ -n "$1" ]]; do
607 - # can't use dosed, because it only works for things in ${D}, not ${S}
608 - cd $1
609 - for x in Makefile.am Makefile.in Makefile
610 - do
611 - if [[ -f "$x" ]]; then
612 - echo Running sed on $x
613 - cp $x ${x}.orig
614 - sed -e 's: $(bindir): $(DESTDIR)/$(bindir):g' -e 's: $(kde_datadir): $(DESTDIR)/$(kde_datadir):g' -e 's: $(TIMID_DIR): $(DESTDIR)/$(TIMID_DIR):g' ${x}.orig > ${x}
615 - rm ${x}.orig
616 - fi
617 - done
618 - shift
619 - done
620 -
621 -}
622 -
623 -# @FUNCTION: kde_remove_flag
624 -# @USAGE: < dir > < flag >
625 -# @DESCRIPTION:
626 -# remove an optimization flag from a specific subdirectory's makefiles.
627 -# currently kdebase and koffice use it to compile certain subdirs without
628 -# -fomit-frame-pointer which breaks some things.
629 -kde_remove_flag() {
630 - debug-print-function $FUNCNAME "$@"
631 -
632 - cd "${S}"/${1} || die "cd to '${S}/${1}' failed."
633 - [[ -n "$2" ]] || die "missing argument to kde_remove_flag"
634 -
635 - cp Makefile Makefile.orig
636 - sed -e "/CFLAGS/ s/${2}//g
637 -/CXXFLAGS/ s/${2}//g" Makefile.orig > Makefile
638 -
639 - cd "${OLDPWD}"
640 -
641 -}
642 -
643 -buildsycoca() {
644 - [[ $EBUILD_PHASE != postinst ]] && [[ $EBUILD_PHASE != postrm ]] && \
645 - die "buildsycoca() has to be calles in pkg_postinst() and pkg_postrm()."
646 -
647 - if [[ -x ${KDEDIR}/bin/kbuildsycoca ]] && [[ -z ${ROOT} || ${ROOT} == "/" ]] ; then
648 - # First of all, make sure that the /usr/share/services directory exists
649 - # and it has the right permissions
650 - mkdir -p /usr/share/services
651 - chown root:0 /usr/share/services
652 - chmod 0755 /usr/share/services
653 -
654 - ebegin "Running kbuildsycoca to build global database"
655 - # Filter all KDEDIRs not belonging to the current SLOT from XDG_DATA_DIRS
656 - # before running kbuildsycoca. This makes sure they don't show up in the
657 - # 3.5 K-menu unless the user manually adds them.
658 - XDG_DATA_DIRS="/usr/share:${KDEDIR}/share:/usr/local/share"
659 - "${KDEDIR}"/bin/kbuildsycoca --global --noincremental &> /dev/null
660 - eend $?
661 - fi
662 -}
663 -
664 -postprocess_desktop_entries() {
665 - [[ $EBUILD_PHASE != preinst ]] && [[ $EBUILD_PHASE != install ]] && \
666 - die "postprocess_desktop_entries() has to be called in src_install() or pkg_preinst()."
667 -
668 - if [[ -d ${D}${PREFIX}/share/applnk ]] ; then
669 - # min/max depth is _important_ as it excludes legacy KDE stuff. Moving it would cause breakage.
670 - local desktop_entries="$(find "${D}${PREFIX}/share/applnk" -mindepth 2 -maxdepth 2 \
671 - -name '*\.desktop' -not -path '*.hidden*' 2>/dev/null)"
672 -
673 - if [[ -n ${desktop_entries} ]]; then
674 - for entry in ${desktop_entries} ; do
675 - if ! [[ -f "${D}${PREFIX}"/share/applications/kde/${entry##*/} ]] ; then
676 - dodir "${PREFIX}"/share/applications/kde
677 - mv ${entry} "${D}${PREFIX}"/share/applications/kde
678 - fi
679 - done
680 - fi
681 - fi
682 -
683 - validate_desktop_entries "${PREFIX}"/share/applications
684 -}
685 -
686 -# is this ebuild part of the KDE SC? kde-base/ or kde-apps/ are only hints
687 -if [[ "${CATEGORY}" == "kde-base" || "${CATEGORY}" == "kde-apps" ]]; then
688 - debug-print "${ECLASS}: KDEBASE ebuild recognized"
689 - KDEBASE=${KDEBASE:=true}
690 - if [[ ${KDEBASE} == "true" ]]; then
691 - export KDEBASE
692 - export KDEREVISION
693 - fi
694 -fi
695
696 diff --git a/eclass/kde-meta.eclass b/eclass/kde-meta.eclass
697 deleted file mode 100644
698 index 570efd6c..00000000
699 --- a/eclass/kde-meta.eclass
700 +++ /dev/null
701 @@ -1,463 +0,0 @@
702 -# Copyright 1999-2009 Gentoo Foundation
703 -# Distributed under the terms of the GNU General Public License v2
704 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde-meta.eclass,v 1.91 2009/10/15 22:18:17 abcd Exp $
705 -
706 -# @ECLASS: kde-meta.eclass
707 -# @MAINTAINER:
708 -# kde@g.o
709 -#
710 -# Original authors:
711 -# Dan Armak <danarmak@g.o>
712 -# Simone Gotti <motaboy@g.o>
713 -# @BLURB: This is the kde-meta eclass which supports broken-up kde-base packages.
714 -# @DESCRIPTION:
715 -# This is the kde-meta eclass which supports broken-up kde-base packages.
716 -
717 -
718 -inherit kde multilib
719 -
720 -# only broken-up ebuilds can use this eclass
721 -if [[ -z "$KMNAME" ]]; then
722 - die "kde-meta.eclass inherited but KMNAME not defined - broken ebuild"
723 -fi
724 -
725 -# Replace the $myPx mess - it was ugly as well as not general enough for 3.4.0-rc1
726 -# The following code should set TARBALLVER (the version in the tarball's name)
727 -# and TARBALLDIRVER (the version of the toplevel directory inside the tarball).
728 -case "$PV" in
729 - 3.5.0_beta2) TARBALLDIRVER="3.4.92"; TARBALLVER="3.4.92" ;;
730 - 3.5.0_rc1) TARBALLDIRVER="3.5.0"; TARBALLVER="3.5.0_rc1" ;;
731 - *) TARBALLDIRVER="$PV"; TARBALLVER="$PV" ;;
732 -esac
733 -if [[ "${KMNAME}" = "koffice" ]]; then
734 - case "$PV" in
735 - 1.6_beta1) TARBALLDIRVER="1.5.91"; TARBALLVER="1.5.91" ;;
736 - 1.6_rc1) TARBALLDIRVER="1.5.92"; TARBALLVER="1.5.92" ;;
737 - 1.6.3_p*) TARBALLDIRVER="1.6.3"; TARBALLVER="${PV}" ;;
738 - esac
739 -fi
740 -
741 -TARBALL="$KMNAME-$TARBALLVER.tar.bz2"
742 -
743 -# BEGIN adapted from kde-dist.eclass, code for older versions removed for cleanness
744 -if [[ "$KDEBASE" = "true" ]]; then
745 - unset SRC_URI
746 -
747 - need-kde $PV
748 -
749 - DESCRIPTION="KDE ${PV} - "
750 - HOMEPAGE="http://www.kde.org/"
751 - LICENSE="GPL-2"
752 - SLOT="$KDEMAJORVER.$KDEMINORVER"
753 -
754 - # Main tarball for normal downloading style
755 - # Note that we set SRC_PATH, and add it to SRC_URI later on
756 - case "$PV" in
757 - 3.5.0_*) SRC_PATH="mirror://kde/unstable/${PV/.0_/-}/src/$TARBALL" ;;
758 - 3.5_*) SRC_PATH="mirror://kde/unstable/${PV/_/-}/src/$TARBALL" ;;
759 - 3.5.0) SRC_PATH="mirror://kde/stable/3.5/src/$TARBALL" ;;
760 - 3*) SRC_PATH="mirror://kde/stable/$TARBALLVER/src/$TARBALL" ;;
761 - *) die "$ECLASS: Error: unrecognized version $PV, could not set SRC_URI" ;;
762 - esac
763 -
764 -elif [[ "$KMNAME" == "koffice" ]]; then
765 - SRC_PATH="mirror://kde/stable/koffice-$PV/src/koffice-$PV.tar.bz2"
766 - case $PV in
767 - 1.3.5)
768 - SRC_PATH="mirror://kde/stable/koffice-$PV/src/koffice-$PV.tar.bz2"
769 - ;;
770 - 1.6_beta1)
771 - SRC_PATH="mirror://kde/unstable/koffice-${PV/_/-}/koffice-${TARBALLVER}.tar.bz2"
772 - ;;
773 - 1.6.3_p*) SRC_PATH="mirror://gentoo/${TARBALL}"
774 - ;;
775 - *)
776 - # Identify beta and rc versions by underscore
777 - if [[ ${PV/_/} != ${PV} ]]; then
778 - SRC_PATH="mirror://kde/unstable/koffice-${PV/_/-}/src/koffice-${TARBALLVER}.tar.bz2"
779 - fi
780 - ;;
781 - esac
782 -fi
783 -
784 -SRC_URI="$SRC_URI $SRC_PATH"
785 -
786 -debug-print "$ECLASS: finished, SRC_URI=$SRC_URI"
787 -
788 -# Add a blocking dep on the package we're derived from
789 -if [[ "${KMNAME}" != "koffice" ]]; then
790 - DEPEND="${DEPEND} !=$(get-parent-package ${CATEGORY}/${PN})-${SLOT}*"
791 - RDEPEND="${RDEPEND} !=$(get-parent-package ${CATEGORY}/${PN})-${SLOT}*"
792 -else
793 - case ${EAPI:-0} in
794 - 0)
795 - # EAPIs without SLOT dependencies.
796 - IFSBACKUP="$IFS"
797 - IFS=".-_"
798 - for x in ${PV}; do
799 - if [[ -z "$KOFFICEMAJORVER" ]]; then KOFFICEMAJORVER=$x
800 - else if [[ -z "$KOFFICEMINORVER" ]]; then KOFFICEMINORVER=$x
801 - else if [[ -z "$KOFFICEREVISION" ]]; then KOFFICEREVISION=$x
802 - fi; fi; fi
803 - done
804 - [[ -z "$KOFFICEMINORVER" ]] && KOFFICEMINORVER="0"
805 - [[ -z "$KOFFICEREVISION" ]] && KOFFICEREVISION="0"
806 - IFS="$IFSBACKUP"
807 - DEPEND="${DEPEND} !=$(get-parent-package ${CATEGORY}/${PN})-${KOFFICEMAJORVER}.${KOFFICEMINORVER}*"
808 - RDEPEND="${RDEPEND} !=$(get-parent-package ${CATEGORY}/${PN})-${KOFFICEMAJORVER}.${KOFFICEMINORVER}*"
809 - ;;
810 - # EAPIs with SLOT dependencies.
811 - *)
812 - [[ -z ${SLOT} ]] && SLOT="0"
813 - DEPEND="${DEPEND} !$(get-parent-package ${CATEGORY}/${PN}):${SLOT}"
814 - RDEPEND="${RDEPEND} !$(get-parent-package ${CATEGORY}/${PN}):${SLOT}"
815 - ;;
816 - esac
817 -fi
818 -
819 -# @ECLASS-VARIABLE: KMNAME
820 -# @DESCRIPTION:
821 -# Name of the metapackage (eg kdebase, kdepim). Must be set before inheriting
822 -# this eclass, since it affects $SRC_URI. This variable MUST be set.
823 -
824 -# @ECLASS-VARIABLE: KMNOMODULE
825 -# @DESCRIPTION:
826 -# Unless set to "true", then KMMODULE will be not defined and so also the docs.
827 -# Useful when we want to installs subdirs of a subproject, like plugins, and we
828 -# have to mark the topsubdir ad KMEXTRACTONLY.
829 -
830 -# @ECLASS-VARIABLE: KMMODULE
831 -# @DESCRIPTION:
832 -# Defaults to $PN. Specify one subdirectory of KMNAME. Is treated exactly like items in KMEXTRA.
833 -# Fex., the ebuild name of kdebase/l10n is kdebase-l10n, because just 'l10n' would be too confusing.
834 -# Do not include the same item in more than one of KMMODULE, KMMEXTRA, KMCOMPILEONLY, KMEXTRACTONLY, KMCOPYLIB.
835 -
836 -# @ECLASS-VARIABLE: KMNODOCS
837 -# @DESCRIPTION:
838 -# Unless set to "true", 'doc/$KMMODULE' is added to KMEXTRA. Set for packages that don't have docs.
839 -
840 -# @ECLASS-VARIABLE: KMEXTRA
841 -# @DESCRIPTION:
842 -# Specify files/dirs to extract, compile and install. $KMMODULE is added to
843 -# KMEXTRA automatically. So is doc/$KMMODULE (unless $KMNODOCS==true). Makefiles
844 -# are created automagically to compile/install the correct files. Observe these
845 -# rules:
846 -#
847 -# - Don't specify the same file in more than one of three variables (KMEXTRA,
848 -# KMCOMPILEONLY, and KMEXTRACTONLY)
849 -# - When using KMEXTRA, remember to add the doc/foo dir for the extra dirs if one exists.
850 -# - KMEXTRACTONLY take effect over an entire directory tree, you can override it defining
851 -#
852 -# KMEXTRA, KMCOMPILEONLY for every subdir that must have a different behavior.
853 -# eg. you have this tree:
854 -# foo/bar
855 -# foo/bar/baz1
856 -# foo/bar/baz1/taz
857 -# foo/bar/baz2
858 -# If you define:
859 -# KMEXTRACTONLY=foo/bar and KMEXTRA=foo/bar/baz1
860 -# then the only directory compiled will be foo/bar/baz1 and not foo/bar/baz1/taz (also if it's a subdir of a KMEXTRA) or foo/bar/baz2
861 -#
862 -# IMPORTANT!!! you can't define a KMCOMPILEONLY SUBDIR if its parents are defined as KMEXTRA or KMMODULE. or it will be installed anywhere. To avoid this probably are needed some chenges to the generated Makefile.in.
863 -# Do not include the same item in more than one of KMMODULE, KMMEXTRA, KMCOMPILEONLY, KMEXTRACTONLY, KMCOPYLIB.
864 -
865 -# @ECLASS-VARIABLE: KMCOMPILEONLY
866 -# @DESCRIPTION:
867 -# Please see KMEXTRA
868 -
869 -# @ECLASS-VARIABLE: KMEXTRACTONLY
870 -# @DESCRIPTION:
871 -# Please see KMEXTRA
872 -
873 -# @ECLASS-VARIABLE: KMCOPYLIB
874 -# @DESCRIPTION:
875 -# Contains an even number of $IFS (i.e. whitespace) -separated words.
876 -# Each two consecutive words, libname and dirname, are considered. symlinks are created under $S/$dirname
877 -# pointing to $PREFIX/lib/libname*.
878 -# Do not include the same item in more than one of KMMODULE, KMMEXTRA, KMCOMPILEONLY, KMEXTRACTONLY, KMCOPYLIB.
879 -
880 -
881 -# ====================================================
882 -
883 -# @FUNCTION: create_fullpaths
884 -# @DESCRIPTION:
885 -# create a full path vars, and remove ALL the endings "/"
886 -create_fullpaths() {
887 - for item in $KMMODULE; do
888 - KMMODULEFULLPATH="$KMMODULEFULLPATH ${S}/${item%/}"
889 - done
890 - for item in $KMEXTRA; do
891 - KMEXTRAFULLPATH="$KMEXTRAFULLPATH ${S}/${item%/}"
892 - done
893 - for item in $KMCOMPILEONLY; do
894 - KMCOMPILEONLYFULLPATH="$KMCOMPILEONLYFULLPATH ${S}/${item%/}"
895 - done
896 - for item in $KMEXTRACTONLY; do
897 - KMEXTRACTONLYFULLPATH="$KMEXTRACTONLYFULLPATH ${S}/${item%/}"
898 - done
899 -}
900 -
901 -# @FUNCTION: change_makefiles
902 -# @USAGE: < dir > < isextractonly >
903 -# @DESCRIPTION:
904 -# Creates Makefile.am files in directories where we didn't extract the originals.
905 -# $isextractonly: true if the parent dir was defined as KMEXTRACTONLY
906 -# Recurses through $S and all subdirs. Creates Makefile.am with SUBDIRS=<list of existing subdirs>
907 -# or just empty all:, install: targets if no subdirs exist.
908 -change_makefiles() {
909 - debug-print-function $FUNCNAME "$@"
910 - local dirlistfullpath dirlist directory isextractonly
911 -
912 - cd "${1}"
913 - debug-print "We are in ${PWD}"
914 -
915 - # check if the dir is defined as KMEXTRACTONLY or if it was defined is KMEXTRACTONLY in the parent dir, this is valid only if it's not also defined as KMMODULE, KMEXTRA or KMCOMPILEONLY. They will ovverride KMEXTRACTONLY, but only in the current dir.
916 - isextractonly="false"
917 - if ( ( has "$1" $KMEXTRACTONLYFULLPATH || [[ $2 = "true" ]] ) && \
918 - ( ! has "$1" $KMMODULEFULLPATH $KMEXTRAFULLPATH $KMCOMPILEONLYFULLPATH ) ); then
919 - isextractonly="true"
920 - fi
921 - debug-print "isextractonly = $isextractonly"
922 -
923 - dirlistfullpath=
924 - for item in *; do
925 - if [[ -d "${item}" && "${item}" != "CVS" && "${S}/${item}" != "${S}/admin" ]]; then
926 - # add it to the dirlist, with the FULL path and an ending "/"
927 - dirlistfullpath="$dirlistfullpath ${1}/${item}"
928 - fi
929 - done
930 - debug-print "dirlist = $dirlistfullpath"
931 -
932 - for directory in $dirlistfullpath; do
933 -
934 - if ( has "$1" $KMEXTRACTONLYFULLPATH || [[ $2 = "true" ]] ); then
935 - change_makefiles $directory 'true'
936 - else
937 - change_makefiles $directory 'false'
938 - fi
939 - # come back to our dir
940 - cd $1
941 - done
942 -
943 - cd $1
944 - debug-print "Come back to ${PWD}"
945 - debug-print "dirlist = $dirlistfullpath"
946 - if [[ $isextractonly = "true" ]] || [[ ! -f Makefile.am ]] ; then
947 - # if this is a latest subdir
948 - if [[ -z "$dirlistfullpath" ]]; then
949 - debug-print "dirlist is empty => we are in the latest subdir"
950 - echo 'all:' > Makefile.am
951 - echo 'install:' >> Makefile.am
952 - echo '.PHONY: all' >> Makefile.am
953 - else # it's not a latest subdir
954 - debug-print "We aren't in the latest subdir"
955 - # remove the ending "/" and the full path"
956 - for directory in $dirlistfullpath; do
957 - directory=${directory%/}
958 - directory=${directory##*/}
959 - dirlist="$dirlist $directory"
960 - done
961 - echo "SUBDIRS=$dirlist" > Makefile.am
962 - fi
963 - fi
964 -}
965 -
966 -set_common_variables() {
967 - # Overridable module (subdirectory) name, with default value
968 - if [[ "$KMNOMODULE" != "true" ]] && [[ -z "$KMMODULE" ]]; then
969 - KMMODULE=$PN
970 - fi
971 -
972 - # Unless disabled, docs are also extracted, compiled and installed
973 - DOCS=""
974 - if [[ "$KMNOMODULE" != "true" ]] && [[ "$KMNODOCS" != "true" ]]; then
975 - DOCS="doc/$KMMODULE"
976 - fi
977 -}
978 -
979 -# @FUNCTION: kde-meta_src_unpack
980 -# @USAGE: [ unpack ] [ makefiles ]
981 -# @DESCRIPTION:
982 -# This has function sections now. Call unpack, apply any patches not in $PATCHES,
983 -# then call makefiles.
984 -kde-meta_src_unpack() {
985 - debug-print-function $FUNCNAME "$@"
986 -
987 - set_common_variables
988 -
989 - sections="$@"
990 - [[ -z "$sections" ]] && sections="unpack makefiles"
991 - for section in $sections; do
992 - case $section in
993 - unpack)
994 -
995 - # kdepim packages all seem to rely on libkdepim/kdepimmacros.h
996 - # also, all kdepim Makefile.am's reference doc/api/Doxyfile.am
997 - if [[ "$KMNAME" == "kdepim" ]]; then
998 - KMEXTRACTONLY="$KMEXTRACTONLY libkdepim/kdepimmacros.h doc/api"
999 - fi
1000 -
1001 - # Create final list of stuff to extract
1002 - extractlist=""
1003 - for item in admin Makefile.am Makefile.am.in configure.in.in configure.in.mid configure.in.bot \
1004 - acinclude.m4 aclocal.m4 AUTHORS COPYING INSTALL README NEWS ChangeLog \
1005 - $KMMODULE $KMEXTRA $KMCOMPILEONLY $KMEXTRACTONLY $DOCS
1006 - do
1007 - extractlist="$extractlist $KMNAME-$TARBALLDIRVER/${item%/}"
1008 - done
1009 -
1010 - # $KMTARPARAMS is also available for an ebuild to use; currently used by kturtle
1011 - TARFILE=$DISTDIR/$TARBALL
1012 - KMTARPARAMS="$KMTARPARAMS -j"
1013 - cd "${WORKDIR}"
1014 -
1015 - echo ">>> Unpacking parts of ${TARBALL} to ${WORKDIR}"
1016 - # Note that KMTARPARAMS is also used by an ebuild
1017 - tar -xpf $TARFILE $KMTARPARAMS $extractlist 2> /dev/null
1018 -
1019 - [[ -n ${A/${TARBALL}/} ]] && unpack ${A/${TARBALL}/}
1020 -
1021 - # Avoid syncing if possible
1022 - # No idea what the above comment means...
1023 - if [[ -n "$RAWTARBALL" ]]; then
1024 - rm -f "${T}"/$RAWTARBALL
1025 - fi
1026 -
1027 - # Default $S is based on $P not $myP; rename the extracted dir to fit $S
1028 - mv $KMNAME-$TARBALLDIRVER $P || die "mv $KMNAME-$TARBallDIRVER failed."
1029 - S="${WORKDIR}"/${P}
1030 -
1031 - # Copy over KMCOPYLIB items
1032 - libname=""
1033 - for x in $KMCOPYLIB; do
1034 - if [[ "$libname" == "" ]]; then
1035 - libname=$x
1036 - else
1037 - dirname=$x
1038 - cd "${S}"
1039 - mkdir -p ${dirname}
1040 - cd ${dirname}
1041 - search_path=$(echo "${PREFIX}"/$(get_libdir)/{,kde3/{,plugins/{designer,styles}}})
1042 - if [[ ! "$(find ${search_path} -maxdepth 1 -name "${libname}*" 2>/dev/null)" == "" ]]; then
1043 - echo "Symlinking library ${libname} under ${PREFIX}/$(get_libdir)/ in source dir"
1044 - ln -s "${PREFIX}"/$(get_libdir)/${libname}* .
1045 - else
1046 - die "Can't find library ${libname} under ${PREFIX}/$(get_libdir)/"
1047 - fi
1048 - libname=""
1049 - fi
1050 - done
1051 -
1052 - # Don't add a param here without looking at its implementation.
1053 - kde_src_unpack
1054 -
1055 - # kdebase: Remove the installation of the "startkde" and "kde3" scripts.
1056 - if [[ "$KMNAME" == "kdebase" ]]; then
1057 - sed -i -e s:"bin_SCRIPTS = startkde.*"::g "${S}"/Makefile.am.in
1058 - fi
1059 -
1060 - ;;
1061 - makefiles)
1062 -
1063 - case ${EAPI:-0} in
1064 - 0|1) kde-meta_src_prepare ;;
1065 - esac
1066 -
1067 - ;;
1068 - esac
1069 - done
1070 -
1071 - # for ebuilds with extended src_unpack
1072 - cd "${S}"
1073 -}
1074 -
1075 -# @FUNCTION: kde-meta_src_prepare
1076 -# @DESCRIPTION:
1077 -# Source tree preparation compatible with eapi 2
1078 -kde-meta_src_prepare() {
1079 - debug-print-function $FUNCNAME "$@"
1080 -
1081 - set_common_variables
1082 -
1083 - case ${EAPI:-0} in
1084 - 0|1) ;; # Don't call kde_src_prepare, as kde_src_unpack already did so
1085 - *) kde_src_prepare ;;
1086 - esac
1087 -
1088 - # Create Makefile.am files
1089 - create_fullpaths
1090 - change_makefiles "${S}" "false"
1091 -}
1092 -
1093 -# @FUNCTION: kde-meta_src_configure
1094 -# @DESCRIPTION:
1095 -# Configure stub for eapi 2
1096 -kde-meta_src_configure() {
1097 - debug-print-function $FUNCNAME "$@"
1098 -
1099 - set_common_variables
1100 -
1101 - if [[ "$KMNAME" == "kdebase" ]]; then
1102 - # bug 82032: the configure check for java is unnecessary as well as broken
1103 - myconf="$myconf --without-java"
1104 - fi
1105 -
1106 - if [[ "$KMNAME" == "kdegames" ]]; then
1107 - # make sure games are not installed with setgid bit, as it is a security risk.
1108 - myconf="$myconf --disable-setgid"
1109 - fi
1110 -
1111 - # Make sure kde_src_configure is run in EAPI >= 2
1112 - case ${EAPI:-0} in
1113 - 0|1) ;;
1114 - *) kde_src_configure ;;
1115 - esac
1116 -}
1117 -
1118 -# @FUNCTION: kde-meta_src_compile
1119 -# @DESCRIPTION:
1120 -# Does some checks before it invokes kde_src_compile
1121 -kde-meta_src_compile() {
1122 - debug-print-function $FUNCNAME "$@"
1123 - case ${EAPI:-0} in
1124 - 0|1) kde-meta_src_configure ;;
1125 - esac
1126 - kde_src_compile "$@"
1127 -}
1128 -
1129 -# @FUNCTION: kde-meta_src_install
1130 -# @USAGE: [ make ] [ dodoc ] [ all ]
1131 -# @DESCRIPTION:
1132 -# The kde-meta src_install function
1133 -kde-meta_src_install() {
1134 - debug-print-function $FUNCNAME "$@"
1135 -
1136 - set_common_variables
1137 -
1138 - if [[ "$1" == "" ]]; then
1139 - kde-meta_src_install make dodoc
1140 - fi
1141 - while [[ -n "$1" ]]; do
1142 - case $1 in
1143 - make)
1144 - for dir in $KMMODULE $KMEXTRA $DOCS; do
1145 - if [[ -d "${S}"/$dir ]]; then
1146 - cd "${S}"/$dir
1147 - emake DESTDIR="${D}" destdir="${D}" install || die "emake install failed."
1148 - fi
1149 - done
1150 - ;;
1151 - dodoc)
1152 - kde_src_install dodoc
1153 - ;;
1154 - all)
1155 - kde-meta_src_install make dodoc
1156 - ;;
1157 - esac
1158 - shift
1159 - done
1160 -}
1161 -case ${EAPI:-0} in
1162 - 0|1) EXPORT_FUNCTIONS src_unpack src_compile src_install;;
1163 - 2|3|4|5) EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install;;
1164 -esac
1165
1166 diff --git a/eclass/kde.eclass b/eclass/kde.eclass
1167 deleted file mode 100644
1168 index 8bf71e2a..00000000
1169 --- a/eclass/kde.eclass
1170 +++ /dev/null
1171 @@ -1,614 +0,0 @@
1172 -# Copyright 1999-2008 Gentoo Foundation
1173 -# Distributed under the terms of the GNU General Public License v2
1174 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde.eclass,v 1.223 2009/05/12 12:55:46 tampakrap Exp $
1175 -
1176 -# @ECLASS: kde.eclass
1177 -# @MAINTAINER:
1178 -# kde@g.o
1179 -#
1180 -# original author Dan Armak <danarmak@g.o>
1181 -#
1182 -# Revisions Caleb Tennis <caleb@g.o>
1183 -# @BLURB: The kde eclass is inherited by all kde-* eclasses.
1184 -# @DESCRIPTION:
1185 -# This eclass is inherited by all kde-* eclasses. Few ebuilds inherit straight from here.
1186 -
1187 -[[ -z ${WANT_AUTOMAKE} ]] && WANT_AUTOMAKE="1.9"
1188 -
1189 -inherit base eutils kde-functions flag-o-matic libtool autotools
1190 -
1191 -DESCRIPTION="Based on the $ECLASS eclass"
1192 -HOMEPAGE="http://www.kde.org/"
1193 -IUSE="debug elibc_FreeBSD"
1194 -
1195 -#CYKER - KLUDGE KLUDGE KLUDGE FUCK YOU kde-apps
1196 -if [[ ${CATEGORY} == "kde-base" || "${CATEGORY}" == "kde-apps" ]]; then
1197 - if [[ ${PV##*.} -lt 10 ]] ; then
1198 - # Keep old ebuilds as is
1199 - IUSE="${IUSE} kdeenablefinal"
1200 - else
1201 - # Don't use --enable-final anymore. Does only cause problems for users and
1202 - # as an unwelcome extra invalid bug reports, without any reasonable benefit.
1203 -
1204 - # Get the aRts dependencies right - finally.
1205 - case "${PN}" in
1206 - blinken|juk|kalarm|kanagram|kbounce|kcontrol|konq-plugins|kscd|kscreensaver|kttsd|kwifimanager|kdelibs) ARTS_REQUIRED="" ;;
1207 - artsplugin-*|kaboodle|kasteroids|kdemultimedia-arts|kolf|krec|ksayit|noatun*) ARTS_REQUIRED="yes" ;;
1208 - *) ARTS_REQUIRED="never" ;;
1209 - esac
1210 - fi
1211 -fi
1212 -
1213 -if [[ ${ARTS_REQUIRED} != "yes" && ${ARTS_REQUIRED} != "never" && ${PN} != "arts" ]]; then
1214 - IUSE="${IUSE} arts"
1215 -fi
1216 -
1217 -# @ECLASS-VARIABLE: KDE_S
1218 -# @DESCRIPTION:
1219 -# Like the 'normal' ${S} this variable takes the path to the temporary build
1220 -# directory. If unset ${S} will be used.
1221 -
1222 -# @ECLASS-VARIABLE: USE_KEG_PACKAGING
1223 -# @DESCRIPTION:
1224 -# Set USE_KEG_PACKAGING=1 before inheriting if the package use extragear-like
1225 -# packaging and then supports ${LANGS} and ${LANGS_DOC} variables. By default
1226 -# translations are found in the po subdirectory of ${S}. Set KEG_PO_DIR to
1227 -# override this default.
1228 -if [[ -n ${USE_KEG_PACKAGING} && -n "${LANGS}${LANGS_DOC}" ]]; then
1229 - for lang in ${LANGS} ${LANGS_DOC}; do
1230 - IUSE="${IUSE} linguas_${lang}"
1231 - done
1232 -fi
1233 -
1234 -DEPEND="sys-devel/make
1235 - virtual/pkgconfig
1236 - dev-lang/perl"
1237 -
1238 -if [[ ${CATEGORY} != "kde-base" ]] || [[ ${CATEGORY} == "kde-base" && ${PV##*.} -lt 10 ]] ; then
1239 - DEPEND="${DEPEND}
1240 - x11-libs/libXt
1241 - x11-base/xorg-proto"
1242 - RDEPEND="xinerama? ( x11-libs/libXinerama )"
1243 - IUSE="${IUSE} xinerama"
1244 -else
1245 - RDEPEND=""
1246 -fi
1247 -
1248 -if [[ ${ARTS_REQUIRED} == "yes" ]]; then
1249 - DEPEND="${DEPEND} kde-base/arts"
1250 - RDEPEND="${RDEPEND} kde-base/arts"
1251 -elif [[ ${ARTS_REQUIRED} != "never" && ${PN} != "arts" ]]; then
1252 - DEPEND="${DEPEND} arts? ( kde-base/arts )"
1253 - RDEPEND="${RDEPEND} arts? ( kde-base/arts )"
1254 -fi
1255 -
1256 -# overridden in other places like kde-dist, kde-source and some individual ebuilds
1257 -SLOT="0"
1258 -
1259 -# @ECLASS-VARIABLE: ARTS_REQUIRED
1260 -# @DESCRIPTION:
1261 -# Is aRTs-support required or not? Possible values are 'yes', 'never'. Otherwise
1262 -# leave this variable unset. This results in an arts USE flag.
1263 -
1264 -# @FUNCTION: kde_pkg_setup
1265 -# @DESCRIPTION:
1266 -# Some basic test about arts-support. It also filters some compiler flags
1267 -kde_pkg_setup() {
1268 - if [[ ${PN} != "arts" ]] && [[ ${PN} != "kdelibs" ]] ; then
1269 - if [[ ${ARTS_REQUIRED} == 'yes' ]] || \
1270 - ( [[ ${ARTS_REQUIRED} != "never" ]] && use arts ) ; then
1271 - if ! built_with_use =kde-frameworks/kdelibs-3.5* arts ; then
1272 - if has arts ${IUSE} && use arts; then
1273 - eerror "You are trying to compile ${CATEGORY}/${PF} with the \"arts\" USE flag enabled."
1274 - else
1275 - eerror "The package ${CATEGORY}/${PF} you're trying to merge requires aRTs."
1276 - fi
1277 - eerror "However, $(best_version =kde-frameworks/kdelibs-3.5*) was compiled with the arts USE flag disabled."
1278 - eerror
1279 - if has arts ${IUSE} && use arts; then
1280 - eerror "You must either disable this USE flag, or recompile"
1281 - else
1282 - eerror "To build this package you have to recompile"
1283 - fi
1284 - eerror "$(best_version =kde-frameworks/kdelibs-3.5*) with the arts USE flag enabled."
1285 - die "kdelibs missing arts"
1286 - fi
1287 - fi
1288 - fi
1289 -
1290 - if [[ "${PN}" = "kdelibs" ]]; then
1291 - use doc && if ! built_with_use =dev-qt/qt-meta-3* doc ; then
1292 - eerror "Building kdelibs with the doc USE flag requires qt to be built with the doc USE flag."
1293 - eerror "Please re-emerge qt-3 with this USE flag enabled."
1294 - fi
1295 - fi
1296 -
1297 - # Let filter visibility flags that will *really* hurt your KDE
1298 - # _experimental_ support for this is enabled by kdehiddenvisibility useflag
1299 - filter-flags -fvisibility=hidden -fvisibility-inlines-hidden
1300 -}
1301 -
1302 -# @FUNCTION: kde_src_unpack
1303 -# @DESCRIPTION:
1304 -# This function unpacks the sources.
1305 -# For EAPI 0 and 1 it allso runs kde_src_prepare.
1306 -kde_src_unpack() {
1307 - debug-print-function $FUNCNAME "$@"
1308 - [[ -z "$*" ]] || die "$FUNCNAME no longer supports stages."
1309 - [[ -z "${KDE_S}" ]] && KDE_S="${S}"
1310 - # Don't use base_src_unpack, as that will call base_src_prepare
1311 - # in the wrong place
1312 - [[ -d "${KDE_S}" ]] || unpack ${A}
1313 - case ${EAPI:-0} in
1314 - 0|1) kde_src_prepare ;;
1315 - esac
1316 -}
1317 -
1318 -# @FUNCTION: kde_src_prepare
1319 -# @DESCRIPTION:
1320 -# This function patches the sources. The patches need to be named
1321 -# $PN-$PV-*{diff,patch}
1322 -#
1323 -# This function also handles the linguas if extragear-like packaging is enabled.
1324 -# (See USE_KEG_PACKAGING)
1325 -kde_src_prepare() {
1326 - debug-print-function $FUNCNAME "$@"
1327 - local PATCHDIR="${WORKDIR}/patches/"
1328 -
1329 - # Unpack first and deal with KDE patches after examing possible patch sets.
1330 - # To be picked up, patches need to be named $PN-$PV-*{diff,patch} and be
1331 - # placed in $PATCHDIR. Monolithic ebuilds will use the split ebuild patches.
1332 - if [[ -d "${PATCHDIR}" ]] ; then
1333 - local packages p f
1334 - if is-parent-package ${CATEGORY}/${PN} ; then
1335 - packages="$(get-child-packages ${CATEGORY}/${PN})"
1336 - packages="${packages//${CATEGORY}\//} ${PN}"
1337 - else
1338 - packages="${PN}"
1339 - fi
1340 - if [[ -n ${PATCHES[@]} && $(declare -p PATCHES) != 'declare -a '* ]]; then
1341 - PATCHES=(${PATCHES})
1342 - fi
1343 - for p in ${packages}; do
1344 - for f in "${PATCHDIR}"/${p}-${PV}-*{diff,patch}; do
1345 - [[ -e ${f} ]] && PATCHES+=("${f}")
1346 - done
1347 - if [[ "${KDEBASE}" == "true" ]]; then
1348 - for f in "${PATCHDIR}"/${p}-${SLOT}-*{diff,patch}; do
1349 - [[ -e ${f} ]] && PATCHES+=("${f}")
1350 - done
1351 - fi
1352 - done
1353 - fi
1354 -
1355 - base_src_prepare
1356 -
1357 - # if extragear-like packaging is enabled, set the translations and the
1358 - # documentation depending on LINGUAS settings
1359 - if [[ -n ${USE_KEG_PACKAGING} ]]; then
1360 - if [[ -z ${LINGUAS} ]]; then
1361 - einfo "You can drop some of the translations of the interface and"
1362 - einfo "documentation by setting the \${LINGUAS} variable to the"
1363 - einfo "languages you want installed."
1364 - einfo
1365 - einfo "Enabling all languages"
1366 - else
1367 - # we sanitise LINGUAS to avoid issues when a user specifies the same
1368 - # linguas twice. bug #215016.
1369 - local sanitised_linguas=$(echo "${LINGUAS}" | tr '[[:space:]]' '\n' | sort | uniq)
1370 - if [[ -n ${LANGS} ]]; then
1371 - MAKE_PO=$(echo "${sanitised_linguas} ${LANGS}" | tr '[[:space:]]' '\n' | sort | uniq -d | tr '\n' ' ')
1372 - einfo "Enabling translations for: ${MAKE_PO}"
1373 - sed -i -e "s:^SUBDIRS[ \t]*=.*:SUBDIRS = ${MAKE_PO}:" "${KDE_S}/${KEG_PO_DIR:-po}/Makefile.am" \
1374 - || die "sed for locale failed"
1375 - rm -f "${KDE_S}/configure"
1376 - fi
1377 -
1378 - if [[ -n ${LANGS_DOC} ]]; then
1379 - MAKE_DOC=$(echo "${sanitised_linguas} ${LANGS_DOC}" | tr '[[:space:]]' '\n' | sort | uniq -d | tr '\n' ' ')
1380 - einfo "Enabling documentation for: ${MAKE_DOC}"
1381 - [[ -n ${MAKE_DOC} ]] && [[ -n ${DOC_DIR_SUFFIX} ]] && MAKE_DOC=$(echo "${MAKE_DOC}" | tr '\n' ' ') && MAKE_DOC="${MAKE_DOC// /${DOC_DIR_SUFFIX} }"
1382 - sed -i -e "s:^SUBDIRS[ \t]*=.*:SUBDIRS = ${MAKE_DOC} ${PN}:" \
1383 - "${KDE_S}/doc/Makefile.am" || die "sed for locale failed"
1384 - rm -f "${KDE_S}/configure"
1385 - fi
1386 - fi
1387 - fi
1388 -
1389 - # fix the 'languageChange undeclared' bug group: touch all .ui files, so that the
1390 - # makefile regenerate any .cpp and .h files depending on them.
1391 - cd "${KDE_S}"
1392 - debug-print "$FUNCNAME: Searching for .ui files in ${PWD}"
1393 - UIFILES="$(find . -name '*.ui' -print)"
1394 - debug-print "$FUNCNAME: .ui files found:"
1395 - debug-print "$UIFILES"
1396 - # done in two stages, because touch doens't have a silent/force mode
1397 - if [[ -n "$UIFILES" ]]; then
1398 - debug-print "$FUNCNAME: touching .ui files..."
1399 - touch $UIFILES
1400 - fi
1401 -
1402 - if [[ -d "${WORKDIR}/admin" ]] && [[ -d "${KDE_S}/admin" ]]; then
1403 - ebegin "Updating admin/ directory..."
1404 - rm -rf "${KDE_S}/admin" "${KDE_S}/configure" || die "Unable to remove old admin/ directory"
1405 - ln -s "${WORKDIR}/admin" "${KDE_S}/admin" || die "Unable to symlink the new admin/ directory"
1406 - eend 0
1407 - fi
1408 -
1409 - # >=autoconf-archive-2016.03.20 tries to include
1410 - # ax_cxx_compile_stdcxx.m4 which these old kde packages seek in ${S}.
1411 - # Create a symlink so we don't break the build.
1412 - if [[ -f "/usr/share/aclocal/ax_cxx_compile_stdcxx.m4" ]] ; then
1413 - ln -s /usr/share/aclocal/ax_cxx_compile_stdcxx.m4 "${S}" || die
1414 - fi
1415 -}
1416 -
1417 -# @FUNCTION: kde_src_configure
1418 -# @USAGE: [ myconf ] [ configure ] [ all ]
1419 -# @DESCRIPTION:
1420 -# This function compiles the sources. It takes care of "cannot write to .kde
1421 -# or .qt"-problem due to sandbox and some other sandbox issues.
1422 -#
1423 -# If no argument is given, all is assumed.
1424 -kde_src_configure() {
1425 - debug-print-function $FUNCNAME "$@"
1426 -
1427 - [[ -z "$1" ]] && kde_src_configure all
1428 -
1429 - [[ -z "${KDE_S}" ]] && KDE_S="${S}"
1430 - cd "${KDE_S}"
1431 -
1432 - export kde_widgetdir="$KDEDIR/$(get_libdir)/kde3/plugins/designer"
1433 -
1434 - # fix the sandbox errors "can't writ to .kde or .qt" problems.
1435 - # this is a fake homedir that is writeable under the sandbox, so that the build process
1436 - # can do anything it wants with it.
1437 - REALHOME="$HOME"
1438 - mkdir -p "${T}"/fakehome/.kde
1439 - mkdir -p "${T}"/fakehome/.qt
1440 - export HOME="${T}"/fakehome
1441 - addwrite "${QTDIR}/etc/settings"
1442 -
1443 - # Fix bug 96177: if KDEROOTHOME is defined, the ebuild accesses the real homedir via it, and not our exported $HOME
1444 - unset KDEHOME
1445 - unset KDEROOTHOME
1446 -
1447 - # things that should access the real homedir
1448 - [[ -d "$REALHOME/.ccache" ]] && ln -sf "$REALHOME/.ccache" "$HOME/"
1449 -
1450 - while [[ "$1" ]]; do
1451 -
1452 - case $1 in
1453 - myconf)
1454 - debug-print-section myconf
1455 - if [[ ${CATEGORY} != "kde-base" ]] || [[ ${CATEGORY} == "kde-base" && ${PV##*.} -lt 10 ]] ; then
1456 - myconf+=" --with-x --enable-mitshm $(use_with xinerama) --with-qt-dir=${QTDIR} --enable-mt --with-qt-libraries=${QTDIR}/$(get_libdir)"
1457 - else
1458 - myconf+=" --with-qt-dir=${QTDIR} --enable-mt --with-qt-libraries=${QTDIR}/$(get_libdir)"
1459 - fi
1460 - # calculate dependencies separately from compiling, enables ccache to work on kde compiles
1461 - myconf="$myconf --disable-dependency-tracking"
1462 - if use debug ; then
1463 - myconf="$myconf --enable-debug=full --with-debug"
1464 - else
1465 - myconf="$myconf --disable-debug --without-debug"
1466 - fi
1467 - if has kdeenablefinal ${IUSE}; then
1468 - myconf="$myconf $(use_enable kdeenablefinal final)"
1469 - fi
1470 - if [[ ${ARTS_REQUIRED} == "never" ]]; then
1471 - myconf="$myconf --without-arts"
1472 - elif [[ ${ARTS_REQUIRED} != 'yes' && ${PN} != "arts" ]]; then
1473 - # This might break some external package until
1474 - # ARTS_REQUIRED="yes" is set on them, KDE 3.2 is no more
1475 - # supported anyway.
1476 - myconf="$myconf $(use_with arts)"
1477 - fi
1478 - debug-print "$FUNCNAME: myconf: set to ${myconf}"
1479 - ;;
1480 - configure)
1481 - debug-print-section configure
1482 - debug-print "$FUNCNAME::configure: myconf=$myconf"
1483 -
1484 - export WANT_AUTOMAKE
1485 -
1486 - # rebuild configure script, etc
1487 - # This can happen with e.g. a cvs snapshot
1488 - if [[ ! -f "./configure" ]]; then
1489 - # This is needed to fix building with autoconf 2.60.
1490 - # Many thanks to who preferred such a stupid check rather
1491 - # than a working arithmetic comparison.
1492 - if [[ -f admin/cvs.sh ]]; then
1493 - sed -i -e '/case $AUTO\(CONF\|HEADER\)_VERSION in/,+1 s/2\.5/2.[56]/g' \
1494 - admin/cvs.sh
1495 - fi
1496 -
1497 - # Replace the detection script with a dummy, let our wrappers do the work
1498 - if [[ -f admin/detect-autoconf.sh ]]; then
1499 - cat - > admin/detect-autoconf.sh <<EOF
1500 -#!/bin/sh
1501 -export AUTOCONF="autoconf"
1502 -export AUTOHEADER="autoheader"
1503 -export AUTOM4TE="autom4te"
1504 -export AUTOMAKE="automake"
1505 -export ACLOCAL="aclocal"
1506 -export WHICH="which"
1507 -EOF
1508 - fi
1509 -
1510 - # Make build succeed with >=autoconf-2.65, see http://tinyurl.com/yc4nbhq
1511 - if [[ -f admin/acinclude.m4.in ]] && \
1512 - [[ ! -f ${T}/acinclude.m4.in ]]; then
1513 - cp admin/acinclude.m4.in "${T}"
1514 - einfo "Patching admin/acinclude.m4.in"
1515 - patch -f --ignore-whitespace admin/acinclude.m4.in <<'EOF'
1516 ---- admin/acinclude.m4.in
1517 -+++ admin/acinclude.m4.in
1518 -@@ -3081,6 +3081,13 @@
1519 - fi
1520 - ])
1521 -
1522 -+AC_DEFUN([GENTOO_DUMMY_CFLAGS],
1523 -+[
1524 -+ dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
1525 -+ CFLAGS=" $CFLAGS"
1526 -+])
1527 -+AC_BEFORE([GENTOO_DUMMY_CFLAGS],[AC_PROG_CC])
1528 -+
1529 - AC_DEFUN([AC_CHECK_COMPILERS],
1530 - [
1531 - AC_ARG_ENABLE(debug,
1532 -@@ -3141,12 +3148,10 @@
1533 - [kde_use_profiling="no"]
1534 - )
1535 -
1536 -- dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
1537 -- CFLAGS=" $CFLAGS"
1538 --
1539 -- AC_PROG_CC
1540 -+ AC_REQUIRE([GENTOO_DUMMY_CFLAGS])
1541 -+ AC_REQUIRE([AC_PROG_CC])
1542 -
1543 -- AC_PROG_CPP
1544 -+ AC_REQUIRE([AC_PROG_CPP])
1545 -
1546 - if test "$GCC" = "yes"; then
1547 - if test "$kde_use_debug_code" != "no"; then
1548 -@@ -3176,7 +3181,7 @@
1549 -
1550 - CXXFLAGS=" $CXXFLAGS"
1551 -
1552 -- AC_PROG_CXX
1553 -+ AC_REQUIRE([AC_PROG_CXX])
1554 -
1555 - KDE_CHECK_FOR_BAD_COMPILER
1556 -
1557 -EOF
1558 - if [[ $? != 0 ]]; then
1559 - ewarn "Failed to patch admin/acinclude.m4.in"
1560 - cp "${T}/acinclude.m4.in" admin/acinclude.m4.in
1561 - fi
1562 - fi
1563 - for x in Makefile.cvs admin/Makefile.common; do
1564 - if [[ -f "$x" && -z "$makefile" ]]; then makefile="$x"; fi
1565 - done
1566 - if [[ -f "$makefile" ]]; then
1567 - debug-print "$FUNCNAME: configure: generating configure script, running make -f $makefile"
1568 - emake -f $makefile
1569 - fi
1570 - [[ -f "./configure" ]] || die "no configure script found, generation unsuccessful"
1571 - fi
1572 -
1573 - export PATH="${KDEDIR}/bin:${PATH}"
1574 -
1575 - # configure doesn't need to know about the other KDEs installed.
1576 - # in fact, if it does, it sometimes tries to use the wrong dcopidl, etc.
1577 - # due to the messed up way configure searches for things
1578 - export KDEDIRS="${PREFIX}:${KDEDIR}"
1579 -
1580 - # Visiblity stuff is broken. Just disable it when it's present.
1581 - export kde_cv_prog_cxx_fvisibility_hidden=no
1582 -
1583 - if has kdehiddenvisibility ${IUSE} && use kdehiddenvisibility; then
1584 - if [[ $(gcc-major-version)$(gcc-minor-version) -ge 41 ]]; then
1585 - if [[ ${PN} != "kdelibs" && ${PN} != "arts" ]] && \
1586 - ! fgrep -q "#define __KDE_HAVE_GCC_VISIBILITY" "${KDEDIR}/include/kdemacros.h"; then
1587 -
1588 - eerror "You asked to enable hidden visibility, but your kdelibs was"
1589 - eerror "built without its support. Please rebuild kdelibs with the"
1590 - eerror "kdehiddenvisibility useflag enabled."
1591 - die "kdelibs without hidden visibility"
1592 - else
1593 - unset kde_cv_prog_cxx_fvisibility_hidden
1594 - myconf="$myconf $(use_enable kdehiddenvisibility gcc-hidden-visibility)"
1595 - fi
1596 - else
1597 - eerror "You're trying to enable hidden visibility, but"
1598 - eerror "you are using an old GCC version. Hidden visibility"
1599 - eerror "can be enabled only with GCC 4.1 and later."
1600 - fi
1601 - fi
1602 -
1603 - # If we're in a kde-base ebuild, set the prefixed directories to
1604 - # override the ones set by econf.
1605 - if [[ -n ${PREFIX} && ${PREFIX} != "/usr" ]]; then
1606 - myconf="${myconf} --prefix=${PREFIX}
1607 - --mandir=${PREFIX}/share/man
1608 - --infodir=${PREFIX}/share/info
1609 - --datadir=${PREFIX}/share
1610 - --sysconfdir=${PREFIX}/etc"
1611 - fi
1612 -
1613 - # Use libsuffix to keep KDE happy, the --libdir parameter get
1614 - # still honored.
1615 - if [[ $(get_libdir) != "lib" ]] ; then
1616 - myconf="${myconf} --enable-libsuffix=$(get_libdir | sed s/lib//)"
1617 - fi
1618 -
1619 - export PATH="${KDEDIR}/bin:${PATH}"
1620 -
1621 - # The configure checks for kconfig_compiler do not respect PATH
1622 - export KCONFIG_COMPILER="${KDEDIR}/bin/kconfig_compiler"
1623 -
1624 - # Sometimes it doesn't get the include and library paths right,
1625 - # so hints them.
1626 - if [[ -z ${PREFIX} || ${PREFIX} != ${KDEDIR} ]]; then
1627 - myconf="${myconf} --with-extra-includes=${KDEDIR}/include
1628 - --with-extra-libs=${KDEDIR}/$(get_libdir)"
1629 - fi
1630 -
1631 - if grep "cope with newer libtools" "${KDE_S}/admin/ltconfig" &> /dev/null; then
1632 - einfo "Removing the dummy ltconfig file."
1633 - rm "${KDE_S}/admin/ltconfig"
1634 - fi
1635 -
1636 - use elibc_FreeBSD && myconf="${myconf} --disable-pie"
1637 -
1638 - elibtoolize
1639 - econf ${myconf}
1640 -
1641 - # Seems ./configure add -O2 by default but hppa don't want that but we need -ffunction-sections
1642 - if [[ "${ARCH}" = "hppa" ]]
1643 - then
1644 - einfo "Fixing Makefiles"
1645 - find "${KDE_S}" -name Makefile -print0 | xargs -0 sed -i -e \
1646 - 's:-O2:-ffunction-sections:g'
1647 - fi
1648 - ;;
1649 - all)
1650 - debug-print-section all
1651 - kde_src_configure myconf configure
1652 - ;;
1653 - esac
1654 -
1655 - shift
1656 - done
1657 -
1658 -}
1659 -# @FUNCTION: kde_src_compile
1660 -# @USAGE: [ myconf ] [ configure ] [ make ] [ all ]
1661 -# @DESCRIPTION:
1662 -# This function compiles the sources. It takes care of "cannot write to .kde
1663 -# or .qt"-problem due to sandbox and some other sandbox issues.
1664 -#
1665 -# If no argument is given, all is assumed.
1666 -kde_src_compile() {
1667 - debug-print-function $FUNCNAME "$@"
1668 -
1669 - [[ -z "$1" ]] && kde_src_compile all
1670 -
1671 - [[ -z "${KDE_S}" ]] && KDE_S="${S}"
1672 - cd "${KDE_S}"
1673 - while [[ "$1" ]]; do
1674 - case $1 in
1675 - make)
1676 - debug-print-section make
1677 - emake || die "died running emake, $FUNCNAME:make"
1678 - ;;
1679 - all)
1680 - case ${EAPI:-0} in
1681 - 0|1) kde_src_configure all ;;
1682 - esac
1683 - kde_src_compile make
1684 - ;;
1685 - *)
1686 - case ${EAPI:-0} in
1687 - 0|1) kde_src_configure $1 ;;
1688 - esac
1689 - ;;
1690 - esac
1691 -
1692 - shift
1693 - done
1694 -}
1695 -
1696 -# @FUNCTION: kde_src_install
1697 -# @USAGE: [ make ] [ dodoc ] [ all ]
1698 -# @DESCRIPTION:
1699 -# This installs the software, including the right handling of the
1700 -# "/usr/share/doc/kde"-dir, but it only installs AUTHORS, ChangeLog*, README*,
1701 -# NEWS, and TODO (if available) as docs.
1702 -#
1703 -# If no argument is given, all is assumed
1704 -kde_src_install() {
1705 - debug-print-function $FUNCNAME "$@"
1706 -
1707 - [[ -z "$1" ]] && kde_src_install all
1708 -
1709 - [[ -z ${KDE_S} ]] && KDE_S="${S}"
1710 - cd "${KDE_S}"
1711 -
1712 - # Ensure that KDE binaries take precedence
1713 - export PATH="${KDEDIR}/bin:${PATH}"
1714 -
1715 - while [[ "$1" ]]; do
1716 -
1717 - case $1 in
1718 - make)
1719 - debug-print-section make
1720 - emake install DESTDIR="${D}" destdir="${D}" || die "died running make install, $FUNCNAME:make"
1721 - ;;
1722 - dodoc)
1723 - debug-print-section dodoc
1724 - for doc in AUTHORS ChangeLog* README* NEWS TODO; do
1725 - [[ -s "$doc" ]] && dodoc $doc
1726 - done
1727 - ;;
1728 - all)
1729 - debug-print-section all
1730 - kde_src_install make dodoc
1731 - ;;
1732 - esac
1733 -
1734 - shift
1735 - done
1736 -
1737 - if [[ ${KDEBASE} == "true" && "${PN}" != "arts" && -d "${D}"/usr/share/doc/${PF} ]]; then
1738 - # work around bug #97196
1739 - dodir /usr/share/doc/kde && \
1740 - mv "${D}"/usr/share/doc/${PF} "${D}"/usr/share/doc/kde/ || \
1741 - die "Failed to move docs to kde/ failed."
1742 - fi
1743 -}
1744 -
1745 -# @FUNCTION: slot_rebuild
1746 -# @USAGE: [ list_of_packages_to_check ]
1747 -# @RETURN: False, if no rebuild is required
1748 -# @DESCRIPTION:
1749 -# Unneeded and therefore deprecated for a long, long time now. Ebuilds are still
1750 -# referencing it, so replacing with a stub.
1751 -# Looks for packages in the supplied list of packages which have not been linked
1752 -# against this kde SLOT. It does this by looking for lib*.la files that doesn't
1753 -# contain the current ${KDEDIR}. If it finds any thus broken packages it prints
1754 -# eerrors and return True.
1755 -#
1756 -# Thanks to Carsten Lohrke in bug 98425.
1757 -slot_rebuild() {
1758 - :
1759 -}
1760 -
1761 -# @FUNCTION: kde_pkg_preinst
1762 -# @DESCRIPTION:
1763 -# Calls postprocess_desktop_entries
1764 -kde_pkg_preinst() {
1765 - postprocess_desktop_entries
1766 -}
1767 -
1768 -# @FUNCTION: kde_pkg_postinst
1769 -# @DESCRIPTION:
1770 -# Calls buildsycoca
1771 -kde_pkg_postinst() {
1772 - buildsycoca
1773 -}
1774 -
1775 -# @FUNCTION: kde_pkg_postrm
1776 -# @DESCRIPTION:
1777 -# Calls buildsycoca
1778 -kde_pkg_postrm() {
1779 - buildsycoca
1780 -}
1781 -
1782 -case ${EAPI:-0} in
1783 - 0|1) EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst pkg_postrm pkg_preinst;;
1784 - 2|3|4|5) EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_install pkg_postinst pkg_postrm pkg_preinst;;
1785 -esac