Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AArch64/build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ cd /image
./openssl.sh
./qt.sh
./sdl.sh
./sdl3.sh
./portaudio.sh
./jack.sh
../Linux/ysfx.sh
48 changes: 48 additions & 0 deletions AArch64/sdl3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash

source ./common.sh clang
source ../common/clone-sdl3.sh

export CFLAGS="${CFLAGS:-} -DSDL_DYNAMIC_API=0"
export CXXFLAGS="${CXXFLAGS:-} -DSDL_DYNAMIC_API=0"

cmake -S SDL3-$SDL3_VERSION -B sdl3-build \
-GNinja \
-DCMAKE_TOOLCHAIN_FILE="$CMAKE_TOOLCHAIN" \
-DSDL_STATIC=1 \
-DSDL_SHARED=0 \
-DBUILD_SHARED_LIBS=0 \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX/SDL3" \
-DSDL_JOYSTICK=1 \
-DSDL_HAPTIC=1 \
-DSDL_HIDAPI=1 \
-DSDL_HIDAPI_JOYSTICK=1 \
-DSDL_POWER=1 \
-DSDL_SENSOR=1 \
-DSDL_AUDIO=0 \
-DSDL_VIDEO=0 \
-DSDL_RENDER=0 \
-DSDL_CAMERA=0 \
-DSDL_GPU=0 \
-DSDL_DIALOG=0 \
-DSDL_TRAY=0 \
-DSDL_DBUS=0 \
-DSDL_LIBUDEV=1 \
-DSDL_OPENGL=0 \
-DSDL_OPENGLES=0 \
-DSDL_VULKAN=0 \
-DSDL_PIPEWIRE=0 \
-DSDL_PULSEAUDIO=0 \
-DSDL_WAYLAND=0 \
-DSDL_X11=0 \
-DSDL_UNIX_CONSOLE_BUILD=1 \
-DSDL_IBUS=0 \
-DSDL_TEST_LIBRARY=0 \
-DSDL_TESTS=0 \
-DSDL_EXAMPLES=0 \
-DSDL_INSTALL_CPACK=0

cmake --build sdl3-build
cmake --build sdl3-build --target install/strip
1 change: 1 addition & 0 deletions Linux/build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ build_media() {
./ffmpeg.sh
./fftw.sh
./sdl.sh
./sdl3.sh
./portaudio.sh
./jack.sh
./pipewire.sh
Expand Down
47 changes: 47 additions & 0 deletions Linux/sdl3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

source ./common.sh clang
source ./common/clone-sdl3.sh

export CFLAGS="${CFLAGS:-} -DSDL_DYNAMIC_API=0"
export CXXFLAGS="${CXXFLAGS:-} -DSDL_DYNAMIC_API=0"

cmake -S SDL3-$SDL3_VERSION -B sdl3-build \
-GNinja \
-DSDL_STATIC=1 \
-DSDL_SHARED=0 \
-DBUILD_SHARED_LIBS=0 \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX/SDL3" \
-DSDL_JOYSTICK=1 \
-DSDL_HAPTIC=1 \
-DSDL_HIDAPI=1 \
-DSDL_HIDAPI_JOYSTICK=1 \
-DSDL_POWER=1 \
-DSDL_SENSOR=1 \
-DSDL_AUDIO=0 \
-DSDL_VIDEO=0 \
-DSDL_RENDER=0 \
-DSDL_CAMERA=0 \
-DSDL_GPU=0 \
-DSDL_DIALOG=0 \
-DSDL_TRAY=0 \
-DSDL_DBUS=0 \
-DSDL_LIBUDEV=1 \
-DSDL_OPENGL=0 \
-DSDL_OPENGLES=0 \
-DSDL_VULKAN=0 \
-DSDL_PIPEWIRE=0 \
-DSDL_PULSEAUDIO=0 \
-DSDL_WAYLAND=0 \
-DSDL_X11=0 \
-DSDL_UNIX_CONSOLE_BUILD=1 \
-DSDL_IBUS=0 \
-DSDL_TEST_LIBRARY=0 \
-DSDL_TESTS=0 \
-DSDL_EXAMPLES=0 \
-DSDL_INSTALL_CPACK=0

cmake --build sdl3-build
cmake --build sdl3-build --target install/strip
1 change: 1 addition & 0 deletions MSYS/all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ build_media() {
./fftw.sh
./portaudio.sh
./sdl.sh
./sdl3.sh
./faust.sh
./jack.sh
./dnssd.sh
Expand Down
42 changes: 42 additions & 0 deletions MSYS/sdl3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

source ./common.sh
source ../common/clone-sdl3.sh

rm -rf sdl3-build
mkdir sdl3-build

export CFLAGS="${CFLAGS:-} -DSDL_DYNAMIC_API=0"
export CXXFLAGS="${CXXFLAGS:-} -DSDL_DYNAMIC_API=0"

cmake -S SDL3-$SDL3_VERSION -B sdl3-build \
-GNinja \
-DSDL_STATIC=1 \
-DSDL_SHARED=0 \
-DBUILD_SHARED_LIBS=0 \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX_CMAKE/SDL3 \
-DSDL_JOYSTICK=1 \
-DSDL_HAPTIC=1 \
-DSDL_HIDAPI=1 \
-DSDL_HIDAPI_JOYSTICK=1 \
-DSDL_POWER=1 \
-DSDL_SENSOR=1 \
-DSDL_AUDIO=0 \
-DSDL_VIDEO=1 \
-DSDL_RENDER=0 \
-DSDL_CAMERA=0 \
-DSDL_GPU=0 \
-DSDL_DIALOG=0 \
-DSDL_TRAY=0 \
-DSDL_OPENGL=0 \
-DSDL_OPENGLES=0 \
-DSDL_VULKAN=0 \
-DSDL_TEST_LIBRARY=0 \
-DSDL_TESTS=0 \
-DSDL_EXAMPLES=0 \
-DSDL_INSTALL_CPACK=0

cmake --build sdl3-build
cmake --build sdl3-build --target install/strip
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ The dependencies are built statically on every platform and very up-to-date
- PortAudio
- FFTW
- JACK
- SDL
- SDL2 and SDL3

15 changes: 15 additions & 0 deletions common/clone-sdl3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash -eu

source ../common/versions.sh

if command -v gsed; then
SED=gsed
else
SED=sed
fi

if [[ ! -d SDL3-$SDL3_VERSION ]]; then
curl -ksSLOJ "https://github.com/libsdl-org/SDL/releases/download/release-$SDL3_VERSION/SDL3-$SDL3_VERSION.tar.gz"
tar xzf SDL3-$SDL3_VERSION.tar.gz
$SED -i '/error Nope/d' "SDL3-$SDL3_VERSION/src/dynapi/SDL_dynapi.h"
fi
9 changes: 9 additions & 0 deletions common/versions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# SDL2 is transitional: libossia's joystick/game-controller/audio backends and
# its find_package(SDL2) still speak the SDL2 API, so an SDL3-only SDK would flip
# OSSIA_ENABLE_SDL off and drop the joystick protocol and the SDL audio engine
# from the releases -- silently, since score_assert_feature is a no-op today.
# Both SDLs are therefore installed side by side ($INSTALL_PREFIX/SDL2 and
# $INSTALL_PREFIX/SDL3) so an SDK tag stays consumable by today's score while the
# port happens in libossia. Drop SDL_VERSION and every sdl.sh once libossia is on
# SDL3.
export SDL_VERSION=2.32.10
export SDL3_VERSION=3.4.14
export FFMPEG_VERSION=8.1
# emsdk pin for the WASM SDK. Must match Qt's QT_EMCC_RECOMMENDED_VERSION for
# $QT_VERSION (qtbase/cmake/QtPublicWasmToolchainHelpers.cmake); still 5.0.5 on
Expand Down
1 change: 1 addition & 0 deletions macOS/all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ build_media() {
# ./sndfile.sh
# ./portaudio.sh
./sdl.sh
./sdl3.sh
./jack.sh
./faust.sh # needs llvm-config from the core's $INSTALL_PREFIX/llvm-libs
./ysfx.sh
Expand Down
47 changes: 47 additions & 0 deletions macOS/sdl3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash -eu

source ./common.sh
source ../common/clone-sdl3.sh

export CFLAGS="${CFLAGS:-} -fno-fast-math -DSDL_DYNAMIC_API=0"
export CXXFLAGS="${CXXFLAGS:-} -fno-fast-math -DSDL_DYNAMIC_API=0"

xcrun cmake \
-S SDL3-$SDL3_VERSION \
-B sdl3-build \
-GNinja \
-DSDL_STATIC=1 \
-DSDL_SHARED=0 \
-DSDL_FRAMEWORK=0 \
-DBUILD_SHARED_LIBS=0 \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DCMAKE_DISABLE_PRECOMPILE_HEADERS=1 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_OSX_SYSROOT=$MACOS_SYSROOT \
-DCMAKE_OSX_DEPLOYMENT_TARGET=$MACOS_VERSION \
-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX/SDL3 \
-DSDL_JOYSTICK=1 \
-DSDL_HAPTIC=1 \
-DSDL_HIDAPI=1 \
-DSDL_HIDAPI_JOYSTICK=1 \
-DSDL_POWER=1 \
-DSDL_SENSOR=1 \
-DSDL_AUDIO=0 \
-DSDL_VIDEO=0 \
-DSDL_RENDER=0 \
-DSDL_CAMERA=0 \
-DSDL_GPU=0 \
-DSDL_DIALOG=0 \
-DSDL_TRAY=0 \
-DSDL_METAL=0 \
-DSDL_OPENGL=0 \
-DSDL_OPENGLES=0 \
-DSDL_VULKAN=0 \
-DSDL_TEST_LIBRARY=0 \
-DSDL_TESTS=0 \
-DSDL_EXAMPLES=0 \
-DSDL_INSTALL_CPACK=0 \
$CMAKE_ADDITIONAL_FLAGS

xcrun cmake --build sdl3-build
xcrun cmake --build sdl3-build --target install/strip
Loading