mirror of
https://github.com/RGBCube/serenity
synced 2025-07-29 10:47:36 +00:00
Ports: Update formatting to be consistent with other ports
This commit updates the formatting for all ports to be updated in this PR in one go, to keep those changes centralized.
This commit is contained in:
parent
349996f7f2
commit
50758181a3
72 changed files with 595 additions and 399 deletions
|
@ -1,16 +1,16 @@
|
|||
#!/usr/bin/env -S bash ../.port_include.sh
|
||||
port=ncurses
|
||||
version=6.3
|
||||
useconfigure=true
|
||||
port='ncurses'
|
||||
version='6.3'
|
||||
useconfigure='true'
|
||||
configopts=(
|
||||
"--enable-pc-files"
|
||||
"--enable-sigwinch"
|
||||
"--enable-term-driver"
|
||||
"--with-pkg-config=/usr/local/lib/pkgconfig"
|
||||
"--with-pkg-config-libdir=/usr/local/lib/pkgconfig"
|
||||
"--with-shared"
|
||||
"--without-ada"
|
||||
"--enable-widec"
|
||||
'--enable-pc-files'
|
||||
'--enable-sigwinch'
|
||||
'--enable-term-driver'
|
||||
'--with-pkg-config=/usr/local/lib/pkgconfig'
|
||||
'--with-pkg-config-libdir=/usr/local/lib/pkgconfig'
|
||||
'--with-shared'
|
||||
'--without-ada'
|
||||
'--enable-widec'
|
||||
)
|
||||
files=(
|
||||
"https://invisible-mirror.net/archives/ncurses/ncurses-${version}.tar.gz#97fc51ac2b085d4cde31ef4d2c3122c21abc217e9090a43a30fc5ec21684e059"
|
||||
|
@ -20,7 +20,7 @@ check_tic_version() {
|
|||
local tic_path="$1"
|
||||
|
||||
# "ncurses A.B.C" -> "A.B.C" -> "A"
|
||||
local major_version="$($tic_path -V | cut -d ' ' -f2 | cut -d '.' -f1)"
|
||||
local major_version="$("${tic_path}" -V | cut -d ' ' -f2 | cut -d '.' -f1)"
|
||||
|
||||
[ "$major_version" -ge 6 ]
|
||||
}
|
||||
|
@ -35,18 +35,18 @@ get_tic_path() {
|
|||
# and https://lists.gnu.org/archive/html/bug-ncurses/2019-07/msg00020.html.
|
||||
|
||||
if command -v tic >/dev/null; then
|
||||
if check_tic_version "tic"; then
|
||||
echo "tic"
|
||||
if check_tic_version 'tic'; then
|
||||
echo 'tic'
|
||||
return 0
|
||||
else
|
||||
# Check for Homebrew installation.
|
||||
if command -v brew >/dev/null; then
|
||||
local cellar_path=$(brew --cellar ncurses)
|
||||
local highest_version=$(ls "$cellar_path" | head -1)
|
||||
local tic_path="$cellar_path/$highest_version/bin/tic"
|
||||
local cellar_path="$(brew --cellar ncurses)"
|
||||
local highest_version="$(ls "${cellar_path}" | head -1)"
|
||||
local tic_path="${cellar_path}/${highest_version}/bin/tic"
|
||||
|
||||
if check_tic_version "$tic_path"; then
|
||||
echo "$tic_path"
|
||||
if check_tic_version "${tic_path}"; then
|
||||
echo "${tic_path}"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
@ -57,20 +57,20 @@ get_tic_path() {
|
|||
}
|
||||
|
||||
pre_configure() {
|
||||
export CPPFLAGS="-P"
|
||||
export CPPFLAGS='-P'
|
||||
}
|
||||
|
||||
install() {
|
||||
local tic_path=$(get_tic_path)
|
||||
local tic_path="$(get_tic_path)"
|
||||
if [ ! $? ]; then
|
||||
echo "Error: installing cross-compiled ncurses requires locally installed ncurses >= 6.0"
|
||||
echo 'Error: installing cross-compiled ncurses requires locally installed ncurses >= 6.0'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Using $tic_path from $($tic_path -V)"
|
||||
echo "Using ${tic_path} from $(${tic_path} -V)"
|
||||
|
||||
export TIC_PATH="$tic_path"
|
||||
run make DESTDIR=$DESTDIR "${installopts[@]}" install
|
||||
export TIC_PATH="${tic_path}"
|
||||
run make DESTDIR="${DESTDIR}" "${installopts[@]}" install
|
||||
}
|
||||
|
||||
post_install() {
|
||||
|
@ -81,7 +81,7 @@ post_install() {
|
|||
|
||||
# Compatibility symlinks for non-w libraries.
|
||||
for lib in form menu ncurses ncurses++ panel tinfo tic curses; do
|
||||
ln -svf lib${lib}w.so "${SERENITY_INSTALL_ROOT}/usr/local/lib/lib${lib}.so"
|
||||
ln -svf "lib${lib}w.so" "${SERENITY_INSTALL_ROOT}/usr/local/lib/lib${lib}.so"
|
||||
done
|
||||
|
||||
# Compatibility symlink for the include folder.
|
||||
|
@ -92,6 +92,6 @@ post_install() {
|
|||
# Compatibility symlink for ports that expect `/usr/local/include/curses.h` and friends.
|
||||
# FIXME: Is there a logical explanation for all of this? If so, we should clean it up at some point.
|
||||
for file in $(ls "${SERENITY_INSTALL_ROOT}/usr/local/include/ncursesw"); do
|
||||
ln -svf ncursesw/${file} "${SERENITY_INSTALL_ROOT}/usr/local/include/${file}"
|
||||
ln -svf "ncursesw/${file}" "${SERENITY_INSTALL_ROOT}/usr/local/include/${file}"
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue