serenity/Ports/readline/package.sh
Jelle Raaijmakers 7c2976e006 Ports: Make sed work on macOS
The ports `libvorbis`, `readline` and `timidity` would not install on
macOS as a result of using `sed -i` without an extension provided. GNU
sed is available through Homebrew, but it does not replace `sed` by
default.

Instead, provide a new `sed_in_place` function that calls `sed` with the
right arguments.
2023-01-09 22:36:50 +00:00

20 lines
745 B
Bash
Executable file

#!/usr/bin/env -S bash ../.port_include.sh
port=readline
version=8.1.2
useconfigure=true
config_sub_paths=("support/config.sub")
use_fresh_config_sub=true
files="https://ftpmirror.gnu.org/gnu/readline/readline-${version}.tar.gz readline-${version}.tar.gz 7589a2381a8419e68654a47623ce7dfcb756815c8fee726b98f90bf668af7bc6"
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_in_place '/^Requires.private:/s/termcap//' "${SERENITY_INSTALL_ROOT}/usr/local/lib/pkgconfig/readline.pc"
}