From 7aa4b00ca342693f433d29aa7d4993ad2d0b8f50 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Mon, 25 Dec 2023 23:18:19 +1000 Subject: [PATCH] Fetch SDL2 from upstream for Mac autobuilds --- misc/tools/all/release.subr | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/misc/tools/all/release.subr b/misc/tools/all/release.subr index 6d762e33..0f1c96d4 100644 --- a/misc/tools/all/release.subr +++ b/misc/tools/all/release.subr @@ -322,11 +322,31 @@ 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