mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 08:56:40 +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
|
@ -7,6 +7,7 @@ auth_type=sha256
|
|||
depends=("libmodplug" "libvorbis" "SDL2")
|
||||
|
||||
configure() {
|
||||
export LIBS="-L${SERENITY_INSTALL_ROOT}/usr/local/lib"
|
||||
run ./configure \
|
||||
--host="${SERENITY_ARCH}-pc-serenity" \
|
||||
--with-sdl-prefix="${SERENITY_INSTALL_ROOT}/usr/local" \
|
||||
|
@ -15,6 +16,10 @@ configure() {
|
|||
EXTRA_LDFLAGS="-lgui -lgfx -lipc -lcore -lcompression"
|
||||
}
|
||||
|
||||
post_configure() {
|
||||
unset LIBS
|
||||
}
|
||||
|
||||
build() {
|
||||
run make -k
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue