Merge pull request #259216 from materusPL/materus/obs-studio-libcef-link

obs-studio: symlink libcef instead of copy
This commit is contained in:
Weijia Wang 2023-10-24 04:31:44 +02:00 committed by GitHub
commit 3a61a71433
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,12 +118,12 @@ stdenv.mkDerivation rec {
postUnpack = ''
mkdir -p cef/Release cef/Resources cef/libcef_dll_wrapper/
for i in ${libcef}/share/cef/*; do
cp -r $i cef/Release/
cp -r $i cef/Resources/
ln -s $i cef/Release/
ln -s $i cef/Resources/
done
cp -r ${libcef}/lib/libcef.so cef/Release/
cp -r ${libcef}/lib/libcef_dll_wrapper.a cef/libcef_dll_wrapper/
cp -r ${libcef}/include cef/
ln -s ${libcef}/lib/libcef.so cef/Release/
ln -s ${libcef}/lib/libcef_dll_wrapper.a cef/libcef_dll_wrapper/
ln -s ${libcef}/include cef/
'';
cmakeFlags = [
@ -145,6 +145,9 @@ stdenv.mkDerivation rec {
blackmagic-desktop-video
];
in ''
# Remove libcef before patchelf, otherwise it will fail
rm $out/lib/obs-plugins/libcef.so
qtWrapperArgs+=(
--prefix LD_LIBRARY_PATH : "$out/lib:${lib.makeLibraryPath wrapperLibraries}"
''${gappsWrapperArgs[@]}
@ -154,6 +157,9 @@ stdenv.mkDerivation rec {
postFixup = lib.optionalString stdenv.isLinux ''
addOpenGLRunpath $out/lib/lib*.so
addOpenGLRunpath $out/lib/obs-plugins/*.so
# Link libcef again after patchelfing other libs
ln -s ${libcef}/lib/libcef.so $out/lib/obs-plugins/libcef.so
'';
meta = with lib; {