xonotic: fix audio

This fixes #26117.

Also allow easy switching to debug/profiling builds.
This commit is contained in:
Linus Heckemann 2017-05-28 15:13:44 +01:00
parent d0f2361bc1
commit cf456b9a8a

View File

@ -27,11 +27,16 @@ stdenv.mkDerivation rec {
sourceRoot = "Xonotic/source/darkplaces"; sourceRoot = "Xonotic/source/darkplaces";
# "debug", "release", "profile"
target = "release";
dontStrip = target != "release";
buildPhase = '' buildPhase = ''
DP_FS_BASEDIR="$out/share/xonotic" DP_FS_BASEDIR="$out/share/xonotic"
make DP_FS_BASEDIR=$DP_FS_BASEDIR cl-release make DP_FS_BASEDIR=$DP_FS_BASEDIR cl-${target}
make DP_FS_BASEDIR=$DP_FS_BASEDIR sdl-release make DP_FS_BASEDIR=$DP_FS_BASEDIR sdl-${target}
make DP_FS_BASEDIR=$DP_FS_BASEDIR sv-release make DP_FS_BASEDIR=$DP_FS_BASEDIR sv-${target}
''; '';
enableParallelBuilding = true; enableParallelBuilding = true;
@ -52,8 +57,16 @@ stdenv.mkDerivation rec {
dontPatchELF = true; dontPatchELF = true;
postFixup = '' postFixup = ''
patchelf --add-needed ${curl.out}/lib/libcurl.so $out/bin/xonotic-dedicated patchelf --add-needed ${curl.out}/lib/libcurl.so $out/bin/xonotic-dedicated
patchelf --add-needed ${curl.out}/lib/libcurl.so $out/bin/xonotic-sdl patchelf \
patchelf --add-needed ${curl.out}/lib/libcurl.so $out/bin/xonotic-glx --add-needed ${curl.out}/lib/libcurl.so \
--add-needed ${libvorbis}/lib/libvorbisfile.so \
--add-needed ${libvorbis}/lib/libvorbis.so \
$out/bin/xonotic-glx
patchelf \
--add-needed ${curl.out}/lib/libcurl.so \
--add-needed ${libvorbis}/lib/libvorbisfile.so \
--add-needed ${libvorbis}/lib/libvorbis.so \
$out/bin/xonotic-sdl
''; '';
meta = { meta = {