2
0
Fork 0

genodePackages: symlink *.lib.so to lib*.so in depot outputs

This less about linking to lib*.so and more about the Bintools package
detecting that these actually are directories containing libraries.
This commit is contained in:
Ehmry - 2020-11-24 10:32:02 +01:00
parent 1348a45b8e
commit 143c0c5551
1 changed files with 16 additions and 2 deletions

View File

@ -223,10 +223,24 @@ let
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
rm -r depot/genodelabs/bin/${arch}/${name}/*\.build rm -r depot/genodelabs/bin/${arch}/${name}/*\.build
local outputLibDir="''${!outputLib}/lib"
find depot/genodelabs/bin/${arch}/${name} -name '*.lib.so' \ find depot/genodelabs/bin/${arch}/${name} -name '*.lib.so' \
-exec install -Dt "''${!outputLib}/lib" {} \; -delete -exec install -Dt "$outputLibDir" {} \; -delete
if [ -d "$outputLibDir" ]; then
pushd "$outputLibDir"
for src in *.lib.so; do
dst=$src
dst="''${dst#lib}"
dst="''${dst%.lib.so}"
ln -s "$src" lib"$dst".so
done
popd
fi
find depot/genodelabs/bin/${arch}/${name} -executable \ find depot/genodelabs/bin/${arch}/${name} -executable \
-exec install -Dt "''${!outputBin}/bin" {} \; -exec install -Dt "''${!outputBin}/bin" {} \;
runHook postInstall runHook postInstall
''; '';
@ -299,7 +313,7 @@ let
basePatches = [ basePatches = [
./patches/cxx-align.patch ./patches/cxx-align.patch
./patches/core-diag.patch ./patches/core-diag.patch
./patches/ld-ro.patch ./patches/ld-ro.patch
]; ];
in makePackages // depotPackages // { in makePackages // depotPackages // {