mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 10:05:32 +00:00
Ports: Replace manually linking libxml2
with a libtool patch
This commit is contained in:
parent
9213ed85f0
commit
834e0ee614
|
@ -6,12 +6,4 @@ use_fresh_config_sub=true
|
|||
files="https://download.gnome.org/sources/libxml2/2.9/libxml2-${version}.tar.xz libxml2-${version}.tar.xz 276130602d12fe484ecc03447ee5e759d0465558fbc9d6bd144e3745306ebf0e"
|
||||
auth_type=sha256
|
||||
depends=("libiconv" "xz")
|
||||
configopts=("--with-sysroot=${SERENITY_INSTALL_ROOT}" "--prefix=/usr/local" "--without-python")
|
||||
|
||||
install() {
|
||||
run make DESTDIR="${SERENITY_INSTALL_ROOT}" install
|
||||
|
||||
# Link shared library
|
||||
run ${SERENITY_ARCH}-pc-serenity-gcc -shared -o ${SERENITY_INSTALL_ROOT}/usr/local/lib/libxml2.so -Wl,-soname,libxml2.so -Wl,--whole-archive ${SERENITY_INSTALL_ROOT}/usr/local/lib/libxml2.a -Wl,--no-whole-archive -llzma
|
||||
rm -f ${SERENITY_INSTALL_ROOT}/usr/local/lib/libxml2.la
|
||||
}
|
||||
configopts=("--with-sysroot=${SERENITY_INSTALL_ROOT}" "--prefix=/usr/local" "--without-python" "--disable-static" "--enable-shared")
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
From 897e1d8be1554c6588941574e620a90600b024d0 Mon Sep 17 00:00:00 2001
|
||||
From: Tim Schumacher <timschumi@gmx.de>
|
||||
Date: Sun, 29 May 2022 15:01:28 +0200
|
||||
Subject: [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.
|
||||
---
|
||||
configure | 23 +++++++++++++++++++++++
|
||||
1 file changed, 23 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 6156015..cfd0935 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -6148,6 +6148,10 @@ tpf*)
|
||||
os2*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
+
|
||||
+serenity*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
fi
|
||||
@@ -9300,6 +9304,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
|
||||
;;
|
||||
@@ -10822,6 +10830,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
+ serenity*)
|
||||
+ ld_shlibs=yes
|
||||
+ ;;
|
||||
+
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
@@ -11902,6 +11914,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
|
||||
|
16
Ports/libxml2/patches/ReadMe.md
Normal file
16
Ports/libxml2/patches/ReadMe.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Patches for libxml2 on SerenityOS
|
||||
|
||||
## `0001-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