2021-01-22 16:44:05 +00:00
|
|
|
#!/usr/bin/env -S bash ../.port_include.sh
|
2022-08-21 11:43:54 +00:00
|
|
|
port='SDL2'
|
2023-08-10 22:14:50 +00:00
|
|
|
version='2.28.2'
|
2022-08-21 11:43:54 +00:00
|
|
|
useconfigure='true'
|
2023-07-10 11:10:29 +00:00
|
|
|
files=(
|
2023-08-10 22:14:50 +00:00
|
|
|
"https://github.com/libsdl-org/SDL/releases/download/release-${version}/SDL2-${version}.tar.gz 64b1102fa22093515b02ef33dd8739dee1ba57e9dbba6a092942b8bbed1a1c5e"
|
2023-07-10 11:10:29 +00:00
|
|
|
)
|
2022-08-25 01:28:40 +00:00
|
|
|
configopts=(
|
|
|
|
"-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt"
|
|
|
|
"-DPULSEAUDIO=OFF"
|
|
|
|
"-DJACK=OFF"
|
|
|
|
"-DSDL_LIBSAMPLERATE=OFF" # Disabled to prevent potential collision with host libsamplerate
|
|
|
|
"-DEXTRA_LDFLAGS=-laudio;-liconv;-ldl"
|
|
|
|
)
|
2021-10-16 13:03:00 +00:00
|
|
|
depends=("libiconv")
|
2019-09-24 06:56:39 +00:00
|
|
|
|
|
|
|
configure() {
|
2022-08-21 12:03:33 +00:00
|
|
|
mkdir -p "${PORT_BUILD_DIR}/SDL2-${version}-build"
|
|
|
|
cd "${PORT_BUILD_DIR}/SDL2-${version}-build"
|
|
|
|
cmake "${configopts[@]}" "${PORT_BUILD_DIR}/SDL2-${version}"
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "${PORT_BUILD_DIR}/SDL2-${version}-build"
|
|
|
|
make "${makeopts[@]}"
|
2019-09-24 06:56:39 +00:00
|
|
|
}
|
2019-12-25 22:18:08 +00:00
|
|
|
|
|
|
|
install() {
|
2022-08-21 12:03:33 +00:00
|
|
|
cd "${PORT_BUILD_DIR}/SDL2-${version}-build"
|
|
|
|
make install
|
2019-12-25 22:18:08 +00:00
|
|
|
}
|