From 15e25b6a91b5733f4cecda6ad0f938e9f34d6bdd Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 8 Mar 2017 22:31:55 +0100 Subject: [PATCH] Add a script to rebuild SDL for easier future upgrading. --- misc/buildsrc/sdl.sh | 51 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 misc/buildsrc/sdl.sh diff --git a/misc/buildsrc/sdl.sh b/misc/buildsrc/sdl.sh new file mode 100755 index 00000000..e1e794ab --- /dev/null +++ b/misc/buildsrc/sdl.sh @@ -0,0 +1,51 @@ +#!?bin/sh + +set -ex + +builddeps=$PWD/../builddeps +buildfiles=$PWD/../buildfiles + +enter() { + rm -rf tmp + mkdir tmp + cd tmp +} + +leave() { + cd .. +} + +enter +curl -O http://libsdl.org/release/SDL2-2.0.5.dmg +7z x *.dmg +7z x *.hfs +rm -rf "$buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A" +mv SDL2/SDL2.framework/Versions/A "$buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A" +git add "$buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A" +leave + +enter +curl -O http://libsdl.org/release/SDL2-2.0.5.tar.gz +tar xvf *.tar.gz +cd SDL2*/ +LD_LIBRARY_PATH="$HOME/opt/cross_toolchain_32/x86_64-slackware-linux/i686-w64-mingw32/lib:$HOME/opt/cross_toolchain_32/libexec/gcc/i686-w64-mingw32/4.8.3" \ +./configure --host=i686-w64-mingw32 --prefix="$PWD/../32" --disable-shared --enable-static CC="$HOME/opt/cross_toolchain_32/bin/i686-w64-mingw32-gcc -g1 -mstackrealign -Wl,--dynamicbase -Wl,--nxcompat" +LD_LIBRARY_PATH="$HOME/opt/cross_toolchain_32/x86_64-slackware-linux/i686-w64-mingw32/lib:$HOME/opt/cross_toolchain_32/libexec/gcc/i686-w64-mingw32/4.8.3" \ +make +make install +sed -i 's,^prefix=.*,prefix=${0%/bin/sdl2-config},' ../32/bin/sdl2-config +rm -rf "$builddeps/win32/sdl" +mv ../32 "$builddeps/win32/sdl" +git add "$buillddeps/win32/sdl" +make clean +LD_LIBRARY_PATH="$HOME/opt/cross_toolchain_64/x86_64-slackware-linux/x86_64-w64-mingw32/lib:$HOME/opt/cross_toolchain_64/libexec/gcc/x86_64-w64-mingw32/4.8.3" \ +./configure --host=i686-w64-mingw32 --prefix="$PWD/../64" --disable-shared --enable-static CC="$HOME/opt/cross_toolchain_64/bin/x86_64-w64-mingw32-gcc -g1 -Wl,--dynamicbase -Wl,--nxcompat" +LD_LIBRARY_PATH="$HOME/opt/cross_toolchain_64/x86_64-slackware-linux/x86_64-w64-mingw32/lib:$HOME/opt/cross_toolchain_64/libexec/gcc/x86_64-w64-mingw32/4.8.3" \ +make +make install +sed -i 's,^prefix=.*,prefix=${0%/bin/sdl2-config},' ../64/bin/sdl2-config +rm -rf "$builddeps/win64/sdl" +mv ../64 "$builddeps/win64/sdl" +git add "$buillddeps/win64/sdl" +make clean +leave -- 2.39.2