kde5.kservice: propagate service and service type inputs
This commit is contained in:
parent
02c3ae154d
commit
cfd70eac9d
1 changed files with 14 additions and 40 deletions
|
@ -1,43 +1,17 @@
|
||||||
addServicePkg() {
|
_propagateServices() {
|
||||||
local propagated
|
if [ -d "$1/share/kservices5" ]; then
|
||||||
for dir in "share/kservices5" "share/kservicetypes5"; do
|
propagateOnce propagatedUserEnvPkgs "$1"
|
||||||
if [[ -d "$1/$dir" ]]; then
|
addToSearchPathOnce XDG_DATA_DIRS "$1/share"
|
||||||
propagated=
|
fi
|
||||||
for pkg in $propagatedBuildInputs; do
|
|
||||||
if [[ "z$pkg" == "z$1" ]]; then
|
|
||||||
propagated=1
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [[ -z $propagated ]]; then
|
|
||||||
propagatedBuildInputs="$propagatedBuildInputs $1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
propagated=
|
|
||||||
for pkg in $propagatedUserEnvPkgs; do
|
|
||||||
if [[ "z$pkg" == "z$1" ]]; then
|
|
||||||
propagated=1
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [[ -z $propagated ]]; then
|
|
||||||
propagatedUserEnvPkgs="$propagatedUserEnvPkgs $1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
envHooks+=(addServicePkg)
|
_propagateServiceTypes() {
|
||||||
|
if [ -d "$1/share/kservicetypes5" ]; then
|
||||||
local propagated
|
propagateOnce propagatedUserEnvPkgs "$1"
|
||||||
for pkg in $propagatedBuildInputs; do
|
addToSearchPathOnce XDG_DATA_DIRS "$1/share"
|
||||||
if [[ "z$pkg" == "z@out@" ]]; then
|
|
||||||
propagated=1
|
|
||||||
break
|
|
||||||
fi
|
fi
|
||||||
done
|
}
|
||||||
if [[ -z $propagated ]]; then
|
|
||||||
propagatedBuildInputs="$propagatedBuildInputs @out@"
|
envHooks+=(_propagateServices _propagateServiceTypes)
|
||||||
fi
|
|
||||||
|
propagateOnce propagatedBuildInputs "@out@"
|
||||||
|
|
Loading…
Reference in a new issue