kservice: propagate service providers

This commit is contained in:
Thomas Tuegel 2015-10-18 11:57:50 -05:00
parent e2383b1f08
commit 03ed16a1c4
2 changed files with 47 additions and 2 deletions

View File

@ -4,9 +4,11 @@
kdeFramework {
name = "kservice";
setupHook = ./setup-hook.sh;
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [ kcoreaddons kcrash kdbusaddons ];
propagatedBuildInputs = [ kconfig ki18n kwindowsystem ];
buildInputs = [ kcrash kdbusaddons ];
propagatedBuildInputs = [ kconfig kcoreaddons ki18n kwindowsystem ];
propagatedUserEnvPkgs = [ kcoreaddons ];
patches = [
./0001-qdiriterator-follow-symlinks.patch
./0002-no-canonicalize-path.patch

View File

@ -0,0 +1,43 @@
addServicePkg() {
local propagated
for dir in "share/kservices5" "share/kservicetypes5"; do
if [[ -d "$1/$dir" ]]; then
propagated=
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)
local propagated
for pkg in $propagatedBuildInputs; do
if [[ "z$pkg" == "z@out@" ]]; then
propagated=1
break
fi
done
if [[ -z $propagated ]]; then
propagatedBuildInputs="$propagatedBuildInputs @out@"
fi