mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
Ports/readline: Build it as a shared library
This commit is contained in:
parent
29c408d9db
commit
86d71028df
3 changed files with 64 additions and 0 deletions
|
@ -7,3 +7,13 @@ config_sub_paths=("support/config.sub")
|
||||||
use_fresh_config_sub=true
|
use_fresh_config_sub=true
|
||||||
files="https://ftpmirror.gnu.org/gnu/readline/readline-${version}.tar.gz readline-${version}.tar.gz 7589a2381a8419e68654a47623ce7dfcb756815c8fee726b98f90bf668af7bc6"
|
files="https://ftpmirror.gnu.org/gnu/readline/readline-${version}.tar.gz readline-${version}.tar.gz 7589a2381a8419e68654a47623ce7dfcb756815c8fee726b98f90bf668af7bc6"
|
||||||
auth_type=sha256
|
auth_type=sha256
|
||||||
|
configopts=(
|
||||||
|
"--disable-static"
|
||||||
|
"--enable-shared"
|
||||||
|
)
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
# readline specifies termcap as a dependency in its pkgconfig file, without checking if it exists.
|
||||||
|
# Remove it manually to keep other ports from discarding readline because termcap is supposedly missing.
|
||||||
|
sed -i -e '/^Requires.private:/s/termcap//' "${SERENITY_INSTALL_ROOT}/usr/local/lib/pkgconfig/readline.pc"
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tim Schumacher <timschumi@gmx.de>
|
||||||
|
Date: Wed, 8 Jun 2022 00:30:22 +0200
|
||||||
|
Subject: [PATCH] Add SerenityOS support to the shared library scripts
|
||||||
|
|
||||||
|
This allows us to have properly named library symlinks.
|
||||||
|
---
|
||||||
|
support/shlib-install | 4 ++--
|
||||||
|
support/shobj-conf | 2 +-
|
||||||
|
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/support/shlib-install b/support/shlib-install
|
||||||
|
index 661355d..f15ec01 100755
|
||||||
|
--- a/support/shlib-install
|
||||||
|
+++ b/support/shlib-install
|
||||||
|
@@ -71,7 +71,7 @@ fi
|
||||||
|
# Cygwin installs both a dll (which must go in $BINDIR) and an implicit
|
||||||
|
# link library (in $libdir)
|
||||||
|
case "$host_os" in
|
||||||
|
-hpux*|darwin*|macosx*|linux*|solaris2*)
|
||||||
|
+hpux*|darwin*|macosx*|linux*|solaris2*|serenity*)
|
||||||
|
if [ -z "$uninstall" ]; then
|
||||||
|
chmod 755 ${INSTALLDIR}/${LIBNAME}
|
||||||
|
fi ;;
|
||||||
|
@@ -118,7 +118,7 @@ INSTALL_LINK2='${echo} cd $INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK2'
|
||||||
|
# Create symlinks to the installed library. This section is incomplete.
|
||||||
|
#
|
||||||
|
case "$host_os-$host_vendor" in
|
||||||
|
-*linux*|freebsd*|dragonfly*)
|
||||||
|
+*linux*|freebsd*|dragonfly*|serenity*)
|
||||||
|
# libname.so.M -> libname.so.M.N
|
||||||
|
${echo} ${RM} ${INSTALLDIR}/$LINK2
|
||||||
|
if [ -z "$uninstall" ]; then
|
||||||
|
diff --git a/support/shobj-conf b/support/shobj-conf
|
||||||
|
index 5a3f977..f6978ea 100644
|
||||||
|
--- a/support/shobj-conf
|
||||||
|
+++ b/support/shobj-conf
|
||||||
|
@@ -123,7 +123,7 @@ sunos5*|solaris2*)
|
||||||
|
;;
|
||||||
|
|
||||||
|
# All versions of Linux (including Gentoo/FreeBSD) or the semi-mythical GNU Hurd.
|
||||||
|
-linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*|dragonfly*)
|
||||||
|
+linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*|dragonfly*|serenity*)
|
||||||
|
SHOBJ_CFLAGS=-fPIC
|
||||||
|
SHOBJ_LD='${CC}'
|
||||||
|
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
|
8
Ports/readline/patches/ReadMe.md
Normal file
8
Ports/readline/patches/ReadMe.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Patches for readline on SerenityOS
|
||||||
|
|
||||||
|
## `0001-Add-SerenityOS-support-to-the-shared-library-scripts.patch`
|
||||||
|
|
||||||
|
Add SerenityOS support to the shared library scripts
|
||||||
|
|
||||||
|
This allows us to have properly named library symlinks.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue