1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:47:44 +00:00

Ports: Fix dynamic load of libmodplug by SDL2_mixer

The configure script for `SDL2_mixer` was trying to find the shared
library for `libmodplug` in the wrong directories and with the wrong
filename. This installs the shared library as `libmodplug.so.1` and
symlinks to it from `libmodplug.so`, and instructs the `SDL2_mixer`
build to search for it in `/usr/local/lib`.

Fixes the build for ports Super-Mario, freeciv and dungeonrush.
This commit is contained in:
Jelle Raaijmakers 2022-01-07 23:24:04 +01:00 committed by Linus Groh
parent b7cf84f542
commit 2a85abb15d
2 changed files with 9 additions and 2 deletions

View file

@ -9,6 +9,8 @@ workdir="libmodplug-$version"
install() {
run make DESTDIR=${SERENITY_INSTALL_ROOT} "${installopts[@]}" install
${CC} -shared -o ${SERENITY_INSTALL_ROOT}/usr/local/lib/libmodplug.so -Wl,-soname,libmodplug.so -Wl,--whole-archive ${SERENITY_INSTALL_ROOT}/usr/local/lib/libmodplug.a -Wl,--no-whole-archive
rm -f ${SERENITY_INSTALL_ROOT}/usr/local/lib/libmodplug.la
MODPLUG_LIBDIR="${SERENITY_INSTALL_ROOT}/usr/local/lib"
${CC} -shared -o ${MODPLUG_LIBDIR}/libmodplug.so.1 -Wl,-soname,libmodplug.so -Wl,--whole-archive ${MODPLUG_LIBDIR}/libmodplug.a -Wl,--no-whole-archive
ln -rsf ${MODPLUG_LIBDIR}/libmodplug.so.1 ${MODPLUG_LIBDIR}/libmodplug.so
rm -f ${MODPLUG_LIBDIR}/libmodplug.la
}