2021-03-08 13:15:35 +01:00
|
|
|
#!/usr/bin/env -S bash ../.port_include.sh
|
|
|
|
port=SDL2_mixer
|
|
|
|
version=2.0.4
|
|
|
|
useconfigure=true
|
2022-01-08 17:02:29 +03:30
|
|
|
use_fresh_config_sub=true
|
2022-01-21 18:55:22 +01:00
|
|
|
config_sub_path=build-scripts/config.sub
|
2021-04-25 12:20:15 +02:00
|
|
|
files="https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-${version}.tar.gz SDL2_mixer-${version}.tar.gz b4cf5a382c061cd75081cf246c2aa2f9df8db04bdda8dcdc6b6cca55bede2419"
|
|
|
|
auth_type=sha256
|
2022-03-26 13:16:26 -03:00
|
|
|
depends=("libmodplug" "libmpg123" "libvorbis" "SDL2")
|
2021-03-08 13:15:35 +01:00
|
|
|
|
|
|
|
configure() {
|
2022-01-07 23:24:04 +01:00
|
|
|
export LIBS="-L${SERENITY_INSTALL_ROOT}/usr/local/lib"
|
2021-03-08 13:15:35 +01:00
|
|
|
run ./configure \
|
2021-03-11 19:50:44 +01:00
|
|
|
--host="${SERENITY_ARCH}-pc-serenity" \
|
2021-04-20 18:42:04 +03:00
|
|
|
--with-sdl-prefix="${SERENITY_INSTALL_ROOT}/usr/local" \
|
2021-12-24 14:37:05 +01:00
|
|
|
--enable-music-opus=false \
|
|
|
|
--enable-music-opus-shared=false \
|
2021-03-08 13:15:35 +01:00
|
|
|
EXTRA_LDFLAGS="-lgui -lgfx -lipc -lcore -lcompression"
|
|
|
|
}
|
|
|
|
|
2022-01-07 23:24:04 +01:00
|
|
|
post_configure() {
|
|
|
|
unset LIBS
|
|
|
|
}
|
|
|
|
|
2021-03-08 13:15:35 +01:00
|
|
|
build() {
|
|
|
|
run make -k
|
|
|
|
}
|
|
|
|
|
|
|
|
install() {
|
2021-04-20 18:42:04 +03:00
|
|
|
run make -k DESTDIR="${SERENITY_INSTALL_ROOT}" install
|
2021-04-25 08:42:41 +02:00
|
|
|
${CC} -shared -o ${SERENITY_INSTALL_ROOT}/usr/local/lib/libSDL2_mixer.so -Wl,-soname,libSDL2_mixer.so -Wl,--whole-archive ${SERENITY_INSTALL_ROOT}/usr/local/lib/libSDL2_mixer.a -Wl,--no-whole-archive -Wl,--no-as-needed -lvorbis -lvorbisfile
|
2021-04-20 18:42:04 +03:00
|
|
|
rm -f ${SERENITY_INSTALL_ROOT}/usr/local/lib/libSDL2_mixer.la
|
2021-03-08 13:15:35 +01:00
|
|
|
}
|