+ release-libs-compile)
+ release_common
+ arch=$1
+ makeflags=$2
+ host=$3
+ (
+ verbose cd "$d0/d0_blind_id"
+ verbose ./autogen.sh
+ verbose ./configure --enable-static --disable-shared \
+ --host="$host" \
+ --prefix="$d0/misc/builddeps/$arch/d0_blind_id"
+ verbose make clean
+ verbose eval make "$makeflags"
+ verbose make install
+ )
+ ;;
+ release-libs-linux64)
+ release_common
+ # TODO schroot support for libs so we can LTO this
+ verbose "$SELF" release-libs-compile linux64 \
+ 'CC="gcc -m64"' \
+ x86_64-pc-linux-gnu
+ ;;
+ release-dlls-compile)
+ release_common
+ arch=$1
+ buildpath=$2
+ targetdir=$3
+ verbose mkdir -p "$targetdir"
+ (
+ cd "$d0/misc/buildsrc"
+ verbose ./dlls.sh clean "$buildpath"
+ verbose ./dlls.sh all "$buildpath" "$arch"
+ )
+ verbose cp -v $buildpath/out/$arch/* "$targetdir"
+
+ # SDL2
+ verbose mkdir -p "$d0/misc/builddeps/$arch/"
+ verbose rsync --delete -avP "$buildpath/pkg/$arch/sdl" "$d0/misc/builddeps/$arch/"
+ # PKG_CONFIG HACK: avoids needing to modify sdl2-config
+ verbose printf '#!/bin/sh\nprintf ../../../.deps/lib\n' > "$d0/misc/builddeps/$arch/sdl/libdir_hack.sh"
+ verbose chmod +x "$d0/misc/builddeps/$arch/sdl/libdir_hack.sh"
+ ;;
+ release-dlls-win32)
+ release_common
+ verbose "$SELF" release-dlls-compile win32 /tmp/dlls Xonotic/bin32
+ ;;
+ release-dlls-win64)
+ release_common
+ verbose "$SELF" release-dlls-compile win64 /tmp/dlls Xonotic/bin64
+ ;;
+ release-libs-osx)
+ release_common
+ verbose mkdir -p "$d0/misc/builddeps/osx"
+ (
+ verbose cd "$d0/misc/builddeps/osx"
+ verbose rm -rf sdl SDL2
+ verbose wget https://libsdl.org/release/SDL2-2.28.5.dmg
+ verbose 7z x *.dmg
+ # 7z still fails to extract working symlinks from any archive format, hackaround:
+ verbose ln -sf $(cat SDL2/SDL2.framework/Versions/Current) SDL2/SDL2.framework/Versions/Current
+ verbose ln -sf $(cat SDL2/SDL2.framework/Headers) SDL2/SDL2.framework/Headers
+ verbose ln -sf $(cat SDL2/SDL2.framework/Resources) SDL2/SDL2.framework/Resources
+ verbose ln -sf $(cat SDL2/SDL2.framework/SDL2) SDL2/SDL2.framework/SDL2
+ # THE HEADERS ARE NOT IN A SUBDIRECTORY CALLED SDL2
+ # YET SDL2/ WAS ADDED TO ALL THE INCLUDES, WHY?!?
+ # OLD VERSIONS WITHOUT IT WORKED
+ verbose sed -i "s/#include <SDL2\//#include </g" SDL2/SDL2.framework/Versions/Current/Headers/*.h
+ # The dirs are extracted with 700 permissions which breaks the rsync updater
+ find SDL2 -type d -exec chmod 755 {} \;
+ # macOS prefers dylibs be marked executable (this one has no file extension)
+ verbose chmod 755 SDL2/SDL2.framework/Versions/Current/SDL2
+ )
+ cp -R "$d0/misc/builddeps/osx/SDL2/SDL2.framework" Xonotic/Xonotic.app/Contents/Frameworks/
+ ;;
+ release-libs)
+ release_common
+ verbose "$SELF" release-libs-linux64
+ verbose "$SELF" release-dlls-win32
+ verbose "$SELF" release-dlls-win64
+ verbose "$SELF" release-libs-osx
+ verbose rm -rf /tmp/dlls
+ ;;