mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-07 00:19:27 +00:00
Ports: Replace manually linking libmodplug
with a libtool patch
This commit is contained in:
parent
095eb8194e
commit
07e046cf97
|
@ -7,11 +7,3 @@ configopts=("ac_cv_c_bigendian=no")
|
|||
files="https://download.sourceforge.net/modplug-xmms/libmodplug-${version}.tar.gz libmodplug-${version}.tar.gz 457ca5a6c179656d66c01505c0d95fafaead4329b9dbaa0f997d00a3508ad9de"
|
||||
auth_type=sha256
|
||||
workdir="libmodplug-$version"
|
||||
|
||||
install() {
|
||||
run make DESTDIR=${SERENITY_INSTALL_ROOT} "${installopts[@]}" install
|
||||
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
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From 8042f44a1358f080e28e727b3deecd43b046a8f7 Mon Sep 17 00:00:00 2001
|
||||
From 05bfb2d4b183e7ab23f9c57ccea2022a46178c26 Mon Sep 17 00:00:00 2001
|
||||
From: xSlendiX <gamingxslendix@gmail.com>
|
||||
Date: Sat, 18 Sep 2021 16:19:50 +0300
|
||||
Subject: [PATCH] Include strings.h
|
||||
Subject: [PATCH 1/2] Include strings.h
|
||||
|
||||
---
|
||||
src/libmodplug/stdafx.h | 1 +
|
||||
|
|
|
@ -0,0 +1,94 @@
|
|||
From 14e9290db59b2a95ea2aa841c4799d1dba648887 Mon Sep 17 00:00:00 2001
|
||||
From: Tim Schumacher <timschumi@gmx.de>
|
||||
Date: Sun, 29 May 2022 15:01:28 +0200
|
||||
Subject: [PATCH 2/2] libtool: Enable shared library support for SerenityOS
|
||||
|
||||
For some odd reason, libtool handles the configuration for shared
|
||||
libraries entirely statically and in its configure script. If no
|
||||
shared library support is "present", building shared libraries is
|
||||
disabled entirely.
|
||||
|
||||
Fix that by just adding the appropriate configuration options for
|
||||
`serenity`. This allows us to finally create dynamic libraries
|
||||
automatically using libtool, without having to manually link the
|
||||
static library into a shared library.
|
||||
---
|
||||
configure | 34 ++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 34 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index f3d01df..01f0360 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -6573,6 +6573,10 @@ tpf*)
|
||||
os2*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
+
|
||||
+serenity*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
fi
|
||||
@@ -9867,6 +9871,10 @@ lt_prog_compiler_static=
|
||||
lt_prog_compiler_static='-Bstatic'
|
||||
;;
|
||||
|
||||
+ serenity*)
|
||||
+ lt_prog_compiler_can_build_shared=yes
|
||||
+ ;;
|
||||
+
|
||||
*)
|
||||
lt_prog_compiler_can_build_shared=no
|
||||
;;
|
||||
@@ -11385,6 +11393,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
+ serenity*)
|
||||
+ ld_shlibs=yes
|
||||
+ ;;
|
||||
+
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
@@ -12456,6 +12468,17 @@ uts4*)
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
;;
|
||||
|
||||
+serenity*)
|
||||
+ version_type=linux
|
||||
+ need_lib_prefix=no
|
||||
+ need_version=no
|
||||
+ library_names_spec='${libname}${release}${shared_ext}${versuffix} ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
|
||||
+ soname_spec='${libname}${release}${shared_ext}${major}'
|
||||
+ shlibpath_var=LD_LIBRARY_PATH
|
||||
+ shlibpath_overrides_runpath=no
|
||||
+ dynamic_linker='SerenityOS LibELF'
|
||||
+ ;;
|
||||
+
|
||||
*)
|
||||
dynamic_linker=no
|
||||
;;
|
||||
@@ -16421,6 +16444,17 @@ uts4*)
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
;;
|
||||
|
||||
+serenity*)
|
||||
+ version_type=linux
|
||||
+ need_lib_prefix=no
|
||||
+ need_version=no
|
||||
+ library_names_spec='${libname}${release}${shared_ext}${versuffix} ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
|
||||
+ soname_spec='${libname}${release}${shared_ext}${major}'
|
||||
+ shlibpath_var=LD_LIBRARY_PATH
|
||||
+ shlibpath_overrides_runpath=no
|
||||
+ dynamic_linker='SerenityOS LibELF'
|
||||
+ ;;
|
||||
+
|
||||
*)
|
||||
dynamic_linker=no
|
||||
;;
|
||||
--
|
||||
2.36.1
|
||||
|
|
@ -5,3 +5,17 @@
|
|||
Include strings.h
|
||||
|
||||
|
||||
## `0002-libtool-Enable-shared-library-support-for-SerenityOS.patch`
|
||||
|
||||
libtool: Enable shared library support for SerenityOS
|
||||
|
||||
For some odd reason, libtool handles the configuration for shared
|
||||
libraries entirely statically and in its configure script. If no
|
||||
shared library support is "present", building shared libraries is
|
||||
disabled entirely.
|
||||
|
||||
Fix that by just adding the appropriate configuration options for
|
||||
`serenity`. This allows us to finally create dynamic libraries
|
||||
automatically using libtool, without having to manually link the
|
||||
static library into a shared library.
|
||||
|
||||
|
|
Loading…
Reference in a new issue