Merge pull request #222237 from mxkrsv/xonotic-fix-libraries-not-found

xonotic: fix some "library not found" errors
This commit is contained in:
Rick van Schijndel 2023-03-26 11:52:36 +02:00 committed by GitHub
commit 8f2cffe821
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
{ lib, stdenv, fetchurl, fetchzip, makeWrapper, runCommand, makeDesktopItem
, xonotic-data, copyDesktopItems
, # required for both
unzip, libjpeg, zlib, libvorbis, curl
unzip, libjpeg, zlib, libvorbis, curl, freetype, libpng, libtheora
, # glx
libX11, libGLU, libGL, libXpm, libXext, libXxf86vm, alsa-lib
, # sdl
@ -121,14 +121,22 @@ let
patchelf \
--add-needed ${curl.out}/lib/libcurl.so \
--add-needed ${libvorbis}/lib/libvorbisfile.so \
--add-needed ${libvorbis}/lib/libvorbisenc.so \
--add-needed ${libvorbis}/lib/libvorbis.so \
--add-needed ${libGL.out}/lib/libGL.so \
--add-needed ${freetype}/lib/libfreetype.so \
--add-needed ${libpng}/lib/libpng.so \
--add-needed ${libtheora}/lib/libtheora.so \
$out/bin/xonotic-glx
'' + lib.optionalString withSDL ''
patchelf \
--add-needed ${curl.out}/lib/libcurl.so \
--add-needed ${libvorbis}/lib/libvorbisfile.so \
--add-needed ${libvorbis}/lib/libvorbisenc.so \
--add-needed ${libvorbis}/lib/libvorbis.so \
--add-needed ${freetype}/lib/libfreetype.so \
--add-needed ${libpng}/lib/libpng.so \
--add-needed ${libtheora}/lib/libtheora.so \
$out/bin/xonotic-sdl
'';
};