X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=misc%2Ftools%2Fall%2Frelease.subr;h=b15141dc860a2949329e101ccde89f60232c8de1;hb=HEAD;hp=a784991855c2c091421a56d48eeae6b5fdccf9bc;hpb=25b539acb116e1bd6b8308602139f0a364c5a8e0;p=xonotic%2Fxonotic.git diff --git a/misc/tools/all/release.subr b/misc/tools/all/release.subr index a7849918..b64e0484 100644 --- a/misc/tools/all/release.subr +++ b/misc/tools/all/release.subr @@ -217,6 +217,7 @@ case "$cmd" in depsdir=$6 targetfiles=$7 schroot= + makeflags="$makeflags VCREVISION=$(git -C "$d0/darkplaces" describe --always --dirty='~' 2>/dev/null || echo FIXME)" set -x if [ -z "$targetfiles" ]; then exit @@ -228,7 +229,7 @@ case "$cmd" in esac case " $HOSTS_THAT_ARE_SCHROOT " in *\ $host\ *) - schroot="schroot -c $host --" + schroot="schroot -c $host --preserve-environment --" ;; esac case " $HOSTS_THAT_ARE_MYSELF $HOSTS_THAT_ARE_SCHROOT " in @@ -289,14 +290,15 @@ case "$cmd" in --host="$host" \ --prefix="$d0/misc/builddeps/$arch/d0_blind_id" verbose make clean - verbose make "$makeflags" + 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 -flto=auto"' \ + 'CC="gcc -m64"' \ x86_64-pc-linux-gnu ;; release-dlls-compile) @@ -306,13 +308,18 @@ case "$cmd" in targetdir=$3 verbose mkdir -p "$targetdir" ( - cd "misc/buildsrc" + 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 @@ -322,11 +329,36 @@ case "$cmd" in 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