mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:07:45 +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:
parent
b7cf84f542
commit
2a85abb15d
2 changed files with 9 additions and 2 deletions
|
@ -7,6 +7,7 @@ auth_type=sha256
|
||||||
depends=("libmodplug" "libvorbis" "SDL2")
|
depends=("libmodplug" "libvorbis" "SDL2")
|
||||||
|
|
||||||
configure() {
|
configure() {
|
||||||
|
export LIBS="-L${SERENITY_INSTALL_ROOT}/usr/local/lib"
|
||||||
run ./configure \
|
run ./configure \
|
||||||
--host="${SERENITY_ARCH}-pc-serenity" \
|
--host="${SERENITY_ARCH}-pc-serenity" \
|
||||||
--with-sdl-prefix="${SERENITY_INSTALL_ROOT}/usr/local" \
|
--with-sdl-prefix="${SERENITY_INSTALL_ROOT}/usr/local" \
|
||||||
|
@ -15,6 +16,10 @@ configure() {
|
||||||
EXTRA_LDFLAGS="-lgui -lgfx -lipc -lcore -lcompression"
|
EXTRA_LDFLAGS="-lgui -lgfx -lipc -lcore -lcompression"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
post_configure() {
|
||||||
|
unset LIBS
|
||||||
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
run make -k
|
run make -k
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,8 @@ workdir="libmodplug-$version"
|
||||||
|
|
||||||
install() {
|
install() {
|
||||||
run make DESTDIR=${SERENITY_INSTALL_ROOT} "${installopts[@]}" 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
|
MODPLUG_LIBDIR="${SERENITY_INSTALL_ROOT}/usr/local/lib"
|
||||||
rm -f ${SERENITY_INSTALL_ROOT}/usr/local/lib/libmodplug.la
|
${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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue