kde5.extra-cmake-modules: propagate build inputs correctly
This commit is contained in:
parent
de842765be
commit
98bb89b9d0
@ -4,8 +4,7 @@ _ecmSetXdgDirs() {
|
|||||||
addToSearchPathOnce NIX_WRAP_XDG_CONFIG_DIRS "$1/etc/xdg"
|
addToSearchPathOnce NIX_WRAP_XDG_CONFIG_DIRS "$1/etc/xdg"
|
||||||
}
|
}
|
||||||
|
|
||||||
_ecmPropagateSharedData() {
|
_ecmSharePaths=( \
|
||||||
local sharedPaths=( \
|
|
||||||
"config.cfg" \
|
"config.cfg" \
|
||||||
"kconf_update" \
|
"kconf_update" \
|
||||||
"kservices5" \
|
"kservices5" \
|
||||||
@ -18,15 +17,35 @@ _ecmPropagateSharedData() {
|
|||||||
"interfaces" \
|
"interfaces" \
|
||||||
"services" \
|
"services" \
|
||||||
"system-services" )
|
"system-services" )
|
||||||
for dir in ${sharedPaths[@]}; do
|
|
||||||
|
_ecmPropagateNative() {
|
||||||
|
for dir in ${_ecmSharePaths[@]}; do
|
||||||
if [ -d "$1/share/$dir" ]; then
|
if [ -d "$1/share/$dir" ]; then
|
||||||
addToSearchPathOnce NIX_WRAP_XDG_DATA_DIRS "$1/share"
|
propagateOnce propagatedNativeBuildInputs "$1"
|
||||||
|
if [ -z "$crossConfig" ]; then
|
||||||
propagateOnce propagatedUserEnvPkgs "$1"
|
propagateOnce propagatedUserEnvPkgs "$1"
|
||||||
|
addToSearchPathOnce NIX_WRAP_XDG_DATA_DIRS "$1/share"
|
||||||
|
fi
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
envHooks+=(_ecmSetXdgDirs _ecmPropagate)
|
||||||
|
|
||||||
|
_ecmPropagate() {
|
||||||
|
for dir in ${_ecmSharePaths[@]}; do
|
||||||
|
if [ -d "$1/share/$dir" ]; then
|
||||||
|
propagateOnce propagatedBuildInputs "$1"
|
||||||
|
propagateOnce propagatedUserEnvPkgs "$1"
|
||||||
|
addToSearchPathOnce NIX_WRAP_XDG_DATA_DIRS "$1/share"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
crossEnvHooks+=(_ecmPropagate)
|
||||||
|
|
||||||
_ecmConfig() {
|
_ecmConfig() {
|
||||||
# Because we need to use absolute paths here, we must set *all* the paths.
|
# Because we need to use absolute paths here, we must set *all* the paths.
|
||||||
cmakeFlags+=" -DKDE_INSTALL_EXECROOTDIR=${!outputBin}"
|
cmakeFlags+=" -DKDE_INSTALL_EXECROOTDIR=${!outputBin}"
|
||||||
@ -70,5 +89,4 @@ _ecmConfig() {
|
|||||||
cmakeFlags+=" -DKDE_INSTALL_AUTOSTARTDIR=${!outputLib}/etc/xdg/autostart"
|
cmakeFlags+=" -DKDE_INSTALL_AUTOSTARTDIR=${!outputLib}/etc/xdg/autostart"
|
||||||
}
|
}
|
||||||
|
|
||||||
envHooks+=(_ecmSetXdgDirs _ecmPropagateSharedData)
|
|
||||||
preConfigureHooks+=(_ecmConfig)
|
preConfigureHooks+=(_ecmConfig)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user