mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 17:31:58 -05:00
Ports: Replace manually linking libtiff
with a libtool patch
This commit is contained in:
parent
bd7bcd2407
commit
e3b29ef61c
3 changed files with 111 additions and 7 deletions
|
@ -2,14 +2,8 @@
|
|||
port=libtiff
|
||||
version=4.3.0
|
||||
useconfigure=true
|
||||
configopts=("--disable-static" "--enable-shared")
|
||||
workdir="tiff-$version"
|
||||
files="http://download.osgeo.org/libtiff/tiff-${version}.tar.gz tiff-${version}.tar.gz 0e46e5acb087ce7d1ac53cf4f56a09b221537fc86dfc5daaad1c2e89e1b37ac8"
|
||||
auth_type="sha256"
|
||||
depends=("libjpeg" "zstd" "xz")
|
||||
|
||||
install() {
|
||||
run make DESTDIR=${SERENITY_INSTALL_ROOT} "${installopts[@]}" install
|
||||
${CC} -shared -o ${SERENITY_INSTALL_ROOT}/usr/local/lib/libtiff.so -Wl,-soname,libtiff.so -Wl,--whole-archive ${SERENITY_INSTALL_ROOT}/usr/local/lib/libtiff.a -Wl,--no-whole-archive -lzstd -llzma -ljpeg
|
||||
${CC} -shared -o ${SERENITY_INSTALL_ROOT}/usr/local/lib/libtiffxx.so -Wl,-soname,libtiffxx.so -Wl,--whole-archive ${SERENITY_INSTALL_ROOT}/usr/local/lib/libtiffxx.a -Wl,--no-whole-archive -lzstd -llzma -ljpeg
|
||||
rm -f ${SERENITY_INSTALL_ROOT}/usr/local/lib/libtiff.la ${SERENITY_INSTALL_ROOT}/usr/local/lib/libtiffxx.la
|
||||
}
|
||||
|
|
|
@ -0,0 +1,94 @@
|
|||
From 9f36cd059f2ea7ae5233519fd7f486850d623014 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 | 34 ++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 34 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 1d9918f..e1e8caa 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -6439,6 +6439,10 @@ tpf*)
|
||||
os2*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
+
|
||||
+serenity*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
fi
|
||||
@@ -10022,6 +10026,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
|
||||
;;
|
||||
@@ -11544,6 +11552,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
+ serenity*)
|
||||
+ ld_shlibs=yes
|
||||
+ ;;
|
||||
+
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
@@ -12624,6 +12636,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
|
||||
;;
|
||||
@@ -17019,6 +17042,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/libtiff/patches/ReadMe.md
Normal file
16
Ports/libtiff/patches/ReadMe.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Patches for libtiff 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