mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Ports: Replace manually linking libtheora
with a libtool patch
This commit is contained in:
parent
6d20f2aaa1
commit
bd7bcd2407
Notes:
sideshowbarker
2024-07-17 20:19:08 +09:00
Author: https://github.com/timschumi Commit: https://github.com/SerenityOS/serenity/commit/bd7bcd2407 Pull-request: https://github.com/SerenityOS/serenity/pull/14178 Reviewed-by: https://github.com/linusg ✅
3 changed files with 94 additions and 14 deletions
|
@ -2,21 +2,9 @@
|
|||
port=libtheora
|
||||
version=1.1.1
|
||||
useconfigure=true
|
||||
configopts=()
|
||||
use_fresh_config_sub=true
|
||||
files="https://ftp.osuosl.org/pub/xiph/releases/theora/libtheora-${version}.tar.bz2 libtheora-${version}.tar.bz2 b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc"
|
||||
auth_type="sha256"
|
||||
depends=("libvorbis")
|
||||
configopts=("--disable-examples")
|
||||
|
||||
build_shared() {
|
||||
local name=$1
|
||||
${CC} -shared -o ${SERENITY_INSTALL_ROOT}/usr/local/lib/${name}.so -Wl,-soname,${name}.so -Wl,--whole-archive ${SERENITY_INSTALL_ROOT}/usr/local/lib/${name}.a -Wl,--no-whole-archive
|
||||
rm -f ${SERENITY_INSTALL_ROOT}/usr/local/lib/${name}.la
|
||||
}
|
||||
|
||||
install() {
|
||||
run make DESTDIR=${SERENITY_INSTALL_ROOT} "${installopts[@]}" install
|
||||
build_shared libtheora
|
||||
build_shared libtheoradec
|
||||
build_shared libtheoraenc
|
||||
}
|
||||
configopts=("--disable-examples" "--disable-static" "--enable-shared")
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
From 8c634afaee47bbf9a3fffc0452b740d040a4df98 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 9703bcb..548051c 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5643,6 +5643,10 @@ sysv4 | sysv4.3*)
|
||||
tpf*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
+
|
||||
+serenity*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
fi
|
||||
@@ -8216,6 +8220,10 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
|
||||
lt_prog_compiler_static='-Bstatic'
|
||||
;;
|
||||
|
||||
+ serenity*)
|
||||
+ lt_prog_compiler_can_build_shared=yes
|
||||
+ ;;
|
||||
+
|
||||
*)
|
||||
lt_prog_compiler_can_build_shared=no
|
||||
;;
|
||||
@@ -9540,6 +9548,10 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
+ serenity*)
|
||||
+ ld_shlibs=yes
|
||||
+ ;;
|
||||
+
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
@@ -10475,6 +10487,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/libtheora/patches/ReadMe.md
Normal file
16
Ports/libtheora/patches/ReadMe.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Patches for libtheora 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