···1+Index: plasma-workspace-5.5.5/startkde/startkde.cmake
2+===================================================================
3+--- plasma-workspace-5.5.5.orig/startkde/startkde.cmake
4++++ plasma-workspace-5.5.5/startkde/startkde.cmake
5+@@ -1,8 +1,36 @@
6+-#!/bin/sh
7++#!@bash@
8+ #
9+ # DEFAULT KDE STARTUP SCRIPT ( @PROJECT_VERSION@ )
10+ #
11+12++set -x
13++
14++# The KDE icon cache is supposed to update itself
15++# automatically, but it uses the timestamp on the icon
16++# theme directory as a trigger. Since in Nix the
17++# timestamp is always the same, this doesn't work. So as
18++# a workaround, nuke the icon cache on login. This isn't
19++# perfect, since it may require logging out after
20++# installing new applications to update the cache.
21++# See http://lists-archives.org/kde-devel/26175-what-when-will-icon-cache-refresh.html
22++rm -fv $HOME/.cache/icon-cache.kcache
23++
24++# Qt writes a weird ‘libraryPath’ line to
25++# ~/.config/Trolltech.conf that causes the KDE plugin
26++# paths of previous KDE invocations to be searched.
27++# Obviously using mismatching KDE libraries is potentially
28++# disastrous, so here we nuke references to the Nix store
29++# in Trolltech.conf. A better solution would be to stop
30++# Qt from doing this wackiness in the first place.
31++if [ -e $HOME/.config/Trolltech.conf ]; then
32++ @sed@ -e '/nix\\store\|nix\/store/ d' -i $HOME/.config/Trolltech.conf
33++fi
34++
35++# (NixOS) We run kbuildsycoca5 before starting the user session because things
36++# may be missing or moved if they have run nixos-rebuild and it may not be
37++# possible for them to start Konsole to run it manually!
38++@kbuildsycoca5@
39++
40+ if test "x$1" = x--failsafe; then
41+ KDE_FAILSAFE=1 # General failsafe flag
42+ KWIN_COMPOSE=N # Disable KWin's compositing
43+@@ -17,29 +45,16 @@ trap 'echo GOT SIGHUP' HUP
44+ # we have to unset this for Darwin since it will screw up KDE's dynamic-loading
45+ unset DYLD_FORCE_FLAT_NAMESPACE
46+47+-# in case we have been started with full pathname spec without being in PATH
48+-bindir=`echo "$0" | sed -n 's,^\(/.*\)/[^/][^/]*$,\1,p'`
49+-if [ -n "$bindir" ]; then
50+- qbindir=`qtpaths --binaries-dir`
51+- qdbus=$qbindir/qdbus
52+- case $PATH in
53+- $bindir|$bindir:*|*:$bindir|*:$bindir:*) ;;
54+- *) PATH=$bindir:$PATH; export PATH;;
55+- esac
56+-else
57+- qdbus=qdbus
58+-fi
59+-
60+ # Check if a KDE session already is running and whether it's possible to connect to X
61+-kcheckrunning
62++@kcheckrunning@
63+ kcheckrunning_result=$?
64+ if test $kcheckrunning_result -eq 0 ; then
65+- echo "KDE seems to be already running on this display."
66+- xmessage -geometry 500x100 "KDE seems to be already running on this display." > /dev/null 2>/dev/null
67++ echo "KDE seems to be already running on this display."
68++ @xmessage@ -geometry 500x100 "KDE seems to be already running on this display."
69+ exit 1
70+ elif test $kcheckrunning_result -eq 2 ; then
71+ echo "\$DISPLAY is not set or cannot connect to the X server."
72+- exit 1
73++ exit 1
74+ fi
75+76+ # Boot sequence:
77+@@ -57,13 +72,8 @@ fi
78+ # * Then ksmserver is started which takes control of the rest of the startup sequence
79+80+ # We need to create config folder so we can write startupconfigkeys
81+-if [ ${XDG_CONFIG_HOME} ]; then
82+- configDir=$XDG_CONFIG_HOME;
83+-else
84+- configDir=${HOME}/.config; #this is the default, http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
85+-fi
86+-
87+-mkdir -p $configDir
88++configDir=$(@qtpaths@ --writable-path GenericConfigLocation)
89++mkdir -p "$configDir"
90+91+ #This is basically setting defaults so we can use them with kstartupconfig5
92+ cat >$configDir/startupconfigkeys <<EOF
93+@@ -102,42 +112,10 @@ XftSubPixel=none
94+ EOF
95+ }
96+97+-# Make sure the Oxygen font is installed
98+-# This is necessary for setups where CMAKE_INSTALL_PREFIX
99+-# is not in /usr. fontconfig looks in /usr, ~/.fonts and
100+-# $XDG_DATA_HOME for fonts. In this case, we symlink the
101+-# Oxygen font under ${XDG_DATA_HOME} and make it known to
102+-# fontconfig
103+-
104+-usr_share="/usr/share"
105+-install_share="@KDE_INSTALL_FULL_DATADIR@"
106+-
107+-if [ ! $install_share = $usr_share ]; then
108+-
109+- if [ ${XDG_DATA_HOME} ]; then
110+- fontsDir="${XDG_DATA_HOME}/fonts"
111+- else
112+- fontsDir="${HOME}/.fonts"
113+- fi
114+-
115+- test -d $fontsDir || {
116+- mkdir -p $fontsDir
117+- }
118+-
119+- oxygenDir=$fontsDir/oxygen
120+- prefixDir="@KDE_INSTALL_FULL_DATADIR@/fonts/oxygen"
121+-
122+- # if the oxygen dir doesn't exist, create a symlink to be sure that the
123+- # Oxygen font is available to the user
124+- test -d $oxygenDir || test -d $prefixDir && {
125+- test -h $oxygenDir || ln -s $prefixDir $oxygenDir && fc-cache $oxygenDir
126+- }
127+-fi
128+-
129+-kstartupconfig5
130++@out@/bin/kstartupconfig5
131+ returncode=$?
132+ if test $returncode -ne 0; then
133+- xmessage -geometry 500x100 "kstartupconfig5 does not exist or fails. The error code is $returncode. Check your installation."
134++ @xmessage@ -geometry 500x100 "kstartupconfig5 does not exist or fails. The error code is $returncode. Check your installation."
135+ exit 1
136+ fi
137+ [ -r $configDir/startupconfig ] && . $configDir/startupconfig
138+@@ -146,9 +124,11 @@ if test "$kdeglobals_kscreen_scalefactor
139+ export QT_DEVICE_PIXEL_RATIO=$kdeglobals_kscreen_scalefactor
140+ fi
141+142++XCURSOR_PATH=~/.icons:$(echo "$XDG_DATA_DIRS" | @tr@ ":" "\n" | @sed@ 's,$,/icons,g' | @tr@ "\n" ":")
143++export XCURSOR_PATH
144++
145+ # XCursor mouse theme needs to be applied here to work even for kded or ksmserver
146+ if test -n "$kcminputrc_mouse_cursortheme" -o -n "$kcminputrc_mouse_cursorsize" ; then
147+- @EXPORT_XCURSOR_PATH@
148+149+ kapplymousetheme "$kcminputrc_mouse_cursortheme" "$kcminputrc_mouse_cursorsize"
150+ if test $? -eq 10; then
151+@@ -164,21 +144,39 @@ if test -n "$kcminputrc_mouse_cursorthem
152+ fi
153+ fi
154+155+-if test "$kcmfonts_general_forcefontdpi" -ne 0; then
156+- xrdb -quiet -merge -nocpp <<EOF
157+-Xft.dpi: $kcmfonts_general_forcefontdpi
158+-EOF
159+-fi
160++# Set a left cursor instead of the standard X11 "X" cursor, since I've heard
161++# from some users that they're confused and don't know what to do. This is
162++# especially necessary on slow machines, where starting KDE takes one or two
163++# minutes until anything appears on the screen.
164++#
165++# If the user has overwritten fonts, the cursor font may be different now
166++# so don't move this up.
167++#
168++@xsetroot@ -cursor_name left_ptr
169+170+ dl=$DESKTOP_LOCKED
171+ unset DESKTOP_LOCKED # Don't want it in the environment
172+173++# Make sure that D-Bus is running
174++# D-Bus autolaunch is broken
175++if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
176++ eval `@dbus-launch@ --sh-syntax --exit-with-session`
177++fi
178++if @qdbus@ >/dev/null 2>/dev/null; then
179++ : # ok
180++else
181++ echo 'startkde: Could not start D-Bus. Can you call qdbus?' 1>&2
182++ test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
183++ @xmessage@ -geometry 500x100 "Could not start D-Bus. Can you call qdbus?"
184++ exit 1
185++fi
186++
187+ ksplash_pid=
188+ if test -z "$dl"; then
189+ # the splashscreen and progress indicator
190+ case "$ksplashrc_ksplash_engine" in
191+ KSplashQML)
192+- ksplash_pid=`ksplashqml "${ksplashrc_ksplash_theme}" --pid`
193++ ksplash_pid=`@out@/bin/ksplashqml "${ksplashrc_ksplash_theme}" --pid`
194+ ;;
195+ None)
196+ ;;
197+@@ -201,8 +199,7 @@ fi
198+ # For anything else (that doesn't set env vars, or that needs a window manager),
199+ # better use the Autostart folder.
200+201+-# TODO: Use GenericConfigLocation once we depend on Qt 5.4
202+-scriptpath=`qtpaths --paths ConfigLocation | tr ':' '\n' | sed 's,$,/plasma-workspace,g'`
203++scriptpath=$(@qtpaths@ --paths GenericConfigLocation | tr ':' '\n' | @sed@ 's,$,/plasma-workspace,g')
204+205+ # Add /env/ to the directory to locate the scripts to be sourced
206+ for prefix in `echo $scriptpath`; do
207+@@ -232,7 +229,7 @@ usr_odir=$HOME/.fonts/kde-override
208+ usr_fdir=$HOME/.fonts
209+210+ if test -n "$KDEDIRS"; then
211+- kdedirs_first=`echo "$KDEDIRS"|sed -e 's/:.*//'`
212++ kdedirs_first=`echo "$KDEDIRS" | @sed@ -e 's/:.*//'`
213+ sys_odir=$kdedirs_first/share/fonts/override
214+ sys_fdir=$kdedirs_first/share/fonts
215+ else
216+@@ -245,23 +242,13 @@ fi
217+ # add the user's dirs to the font path, as they might simply have been made
218+ # read-only by the administrator, for whatever reason.
219+220+-test -d "$sys_odir" && xset +fp "$sys_odir"
221+-test -d "$usr_odir" && (mkfontdir "$usr_odir" ; xset +fp "$usr_odir")
222+-test -d "$usr_fdir" && (mkfontdir "$usr_fdir" ; xset fp+ "$usr_fdir")
223+-test -d "$sys_fdir" && xset fp+ "$sys_fdir"
224++test -d "$sys_odir" && @xset@ +fp "$sys_odir"
225++test -d "$usr_odir" && ( @mkfontdir@ "$usr_odir" ; @xset@ +fp "$usr_odir" )
226++test -d "$usr_fdir" && ( @mkfontdir@ "$usr_fdir" ; @xset@ fp+ "$usr_fdir" )
227++test -d "$sys_fdir" && @xset@ fp+ "$sys_fdir"
228+229+ # Ask X11 to rebuild its font list.
230+-xset fp rehash
231+-
232+-# Set a left cursor instead of the standard X11 "X" cursor, since I've heard
233+-# from some users that they're confused and don't know what to do. This is
234+-# especially necessary on slow machines, where starting KDE takes one or two
235+-# minutes until anything appears on the screen.
236+-#
237+-# If the user has overwritten fonts, the cursor font may be different now
238+-# so don't move this up.
239+-#
240+-xsetroot -cursor_name left_ptr
241++@xset@ fp rehash
242+243+ # Get Ghostscript to look into user's KDE fonts dir for additional Fontmap
244+ if test -n "$GS_LIB" ; then
245+@@ -274,26 +261,6 @@ fi
246+247+ echo 'startkde: Starting up...' 1>&2
248+249+-# Make sure that the KDE prefix is first in XDG_DATA_DIRS and that it's set at all.
250+-# The spec allows XDG_DATA_DIRS to be not set, but X session startup scripts tend
251+-# to set it to a list of paths *not* including the KDE prefix if it's not /usr or
252+-# /usr/local.
253+-if test -z "$XDG_DATA_DIRS"; then
254+- XDG_DATA_DIRS="@CMAKE_INSTALL_PREFIX@/@SHARE_INSTALL_PREFIX@:/usr/share:/usr/local/share"
255+-fi
256+-export XDG_DATA_DIRS
257+-
258+-# Make sure that D-Bus is running
259+-if $qdbus >/dev/null 2>/dev/null; then
260+- : # ok
261+-else
262+- echo 'startkde: Could not start D-Bus. Can you call qdbus?' 1>&2
263+- test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
264+- xmessage -geometry 500x100 "Could not start D-Bus. Can you call qdbus?"
265+- exit 1
266+-fi
267+-
268+-
269+ # Mark that full KDE session is running (e.g. Konqueror preloading works only
270+ # with full KDE running). The KDE_FULL_SESSION property can be detected by
271+ # any X client connected to the same X session, even if not launched
272+@@ -318,11 +285,11 @@ fi
273+ #
274+ KDE_FULL_SESSION=true
275+ export KDE_FULL_SESSION
276+-xprop -root -f KDE_FULL_SESSION 8t -set KDE_FULL_SESSION true
277++@xprop@ -root -f KDE_FULL_SESSION 8t -set KDE_FULL_SESSION true
278+279+ KDE_SESSION_VERSION=5
280+ export KDE_SESSION_VERSION
281+-xprop -root -f KDE_SESSION_VERSION 32c -set KDE_SESSION_VERSION 5
282++@xprop@ -root -f KDE_SESSION_VERSION 32c -set KDE_SESSION_VERSION 5
283+284+ KDE_SESSION_UID=`id -ru`
285+ export KDE_SESSION_UID
286+@@ -332,11 +299,11 @@ export XDG_CURRENT_DESKTOP
287+288+ # At this point all the environment is ready, let's send it to kwalletd if running
289+ if test -n "$PAM_KWALLET_LOGIN" ; then
290+- env | socat STDIN UNIX-CONNECT:$PAM_KWALLET_LOGIN
291++ env | @socat@ STDIN UNIX-CONNECT:$PAM_KWALLET_LOGIN
292+ fi
293+ # ...and also to kwalletd5
294+ if test -n "$PAM_KWALLET5_LOGIN" ; then
295+- env | socat STDIN UNIX-CONNECT:$PAM_KWALLET5_LOGIN
296++ env | @socat@ STDIN UNIX-CONNECT:$PAM_KWALLET5_LOGIN
297+ fi
298+299+ # At this point all environment variables are set, let's send it to the DBus session server to update the activation environment
300+@@ -349,18 +316,18 @@ if test $? -ne 0; then
301+ # Startup error
302+ echo 'startkde: Could not sync environment to dbus.' 1>&2
303+ test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
304+- xmessage -geometry 500x100 "Could not sync environment to dbus."
305++ @xmessage@ -geometry 500x100 "Could not sync environment to dbus."
306+ exit 1
307+ fi
308+309+ # We set LD_BIND_NOW to increase the efficiency of kdeinit.
310+ # kdeinit unsets this variable before loading applications.
311+-LD_BIND_NOW=true @CMAKE_INSTALL_FULL_LIBEXECDIR_KF5@/start_kdeinit_wrapper --kded +kcminit_startup
312++LD_BIND_NOW=true @start_kdeinit_wrapper@ --kded +kcminit_startup
313+ if test $? -ne 0; then
314+ # Startup error
315+ echo 'startkde: Could not start kdeinit5. Check your installation.' 1>&2
316+ test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
317+- xmessage -geometry 500x100 "Could not start kdeinit5. Check your installation."
318++ @xmessage@ -geometry 500x100 "Could not start kdeinit5. Check your installation."
319+ exit 1
320+ fi
321+322+@@ -379,27 +346,27 @@ test -n "$KDEWM" && KDEWM="--windowmanag
323+ # lock now and do the rest of the KDE startup underneath the locker.
324+ KSMSERVEROPTIONS=""
325+ test -n "$dl" && KSMSERVEROPTIONS=" --lockscreen"
326+-kwrapper5 @CMAKE_INSTALL_FULL_BINDIR@/ksmserver $KDEWM $KSMSERVEROPTIONS
327++@kwrapper5@ @CMAKE_INSTALL_FULL_BINDIR@/ksmserver $KDEWM $KSMSERVEROPTIONS
328+ if test $? -eq 255; then
329+ # Startup error
330+ echo 'startkde: Could not start ksmserver. Check your installation.' 1>&2
331+ test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
332+- xmessage -geometry 500x100 "Could not start ksmserver. Check your installation."
333++ @xmessage@ -geometry 500x100 "Could not start ksmserver. Check your installation."
334+ fi
335+336+-wait_drkonqi=`kreadconfig5 --file startkderc --group WaitForDrKonqi --key Enabled --default true`
337++wait_drkonqi=`@kreadconfig5@ --file startkderc --group WaitForDrKonqi --key Enabled --default true`
338+339+ if test x"$wait_drkonqi"x = x"true"x ; then
340+ # wait for remaining drkonqi instances with timeout (in seconds)
341+- wait_drkonqi_timeout=`kreadconfig5 --file startkderc --group WaitForDrKonqi --key Timeout --default 900`
342++ wait_drkonqi_timeout=`@kreadconfig5@ --file startkderc --group WaitForDrKonqi --key Timeout --default 900`
343+ wait_drkonqi_counter=0
344+- while $qdbus | grep "^[^w]*org.kde.drkonqi" > /dev/null ; do
345++ while @qdbus@ | @grep@ "^[^w]*org.kde.drkonqi" > /dev/null ; do
346+ sleep 5
347+ wait_drkonqi_counter=$((wait_drkonqi_counter+5))
348+ if test "$wait_drkonqi_counter" -ge "$wait_drkonqi_timeout" ; then
349+ # ask remaining drkonqis to die in a graceful way
350+- $qdbus | grep 'org.kde.drkonqi-' | while read address ; do
351+- $qdbus "$address" "/MainApplication" "quit"
352++ @qdbus@ | @grep@ 'org.kde.drkonqi-' | while read address ; do
353++ @qdbus@ "$address" "/MainApplication" "quit"
354+ done
355+ break
356+ fi
357+@@ -411,12 +378,12 @@ echo 'startkde: Shutting down...' 1>&2
358+ test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
359+360+ # Clean up
361+-kdeinit5_shutdown
362++@kdeinit5_shutdown@
363+364+ unset KDE_FULL_SESSION
365+-xprop -root -remove KDE_FULL_SESSION
366++@xprop@ -root -remove KDE_FULL_SESSION
367+ unset KDE_SESSION_VERSION
368+-xprop -root -remove KDE_SESSION_VERSION
369++@xprop@ -root -remove KDE_SESSION_VERSION
370+ unset KDE_SESSION_UID
371+372+ echo 'startkde: Done.' 1>&2
···45 nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ self.fixQtModuleCMakeConfig self.qmakeHook ];
4647 NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true;
48- dontFixLibtool = args.dontFixLibtool or true;
4950 outputs = args.outputs or [ "dev" "out" ];
51 setOutputFlags = args.setOutputFlags or false;
···45 nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ self.fixQtModuleCMakeConfig self.qmakeHook ];
4647 NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true;
04849 outputs = args.outputs or [ "dev" "out" ];
50 setOutputFlags = args.setOutputFlags or false;
+11
pkgs/development/libraries/qt-5/5.5/qmake-hook.sh
···53 # The destination directory must exist or moveToOutput will do nothing
54 mkdir -p "${!outputDev}/share"
55 moveToOutput "share/doc" "${!outputDev}"
0000000000056}
5758qmakeConfigurePhase() {
···53 # The destination directory must exist or moveToOutput will do nothing
54 mkdir -p "${!outputDev}/share"
55 moveToOutput "share/doc" "${!outputDev}"
56+57+ # Move libtool archives and qmake project files to $dev/lib
58+ if [ "z${!outputLib}" != "z${!outputDev}" ]; then
59+ pushd "${!outputLib}"
60+ find lib -name '*.a' -o -name '*.la' -o -name '*.prl' -print0 | \
61+ while read -r -d $'\0' file; do
62+ mkdir -p "${!outputDev}/$(dirname "$file")"
63+ mv "${!outputLib}/$file" "${!outputDev}/$file"
64+ done
65+ popd
66+ fi
67}
6869qmakeConfigurePhase() {