Ports/ncurses: Disable mixed-case directory names when building on macOS

Since macOS's filesystem is case-insensitive, its `tic` only generates
terminfo directory names that are hex numbers instead of letters, such
as 78/xterm instead of x/xterm. However, the configure script still
enables the mixed-case directory name feature by default. As a result,
ncurses will fail when trying to find terminfo entries like x/xterm if
they are generated on macOS.

It seems like there is no way to change the behavior of `tic` to create
alphabetical directories, so we can only disable this option explicitly.
This commit is contained in:
SeekingBlues 2022-06-19 18:41:26 +08:00 committed by Linus Groh
parent 0a989d1bfd
commit dafea57fe2
Notes: sideshowbarker 2024-07-17 10:04:27 +09:00
2 changed files with 46 additions and 0 deletions

View file

@ -0,0 +1,32 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: SeekingBlues <seekingblues@gmail.com>
Date: Sun, 19 Jun 2022 18:36:27 +0800
Subject: [PATCH] Disable mixed-case directory names when building on macOS
Since macOS's filesystem is case-insensitive, its `tic` only generates
terminfo directory names that are hex numbers instead of letters, such
as 78/xterm instead of x/xterm. However, the configure script still
enables the mixed-case directory name feature by default. As a result,
ncurses will fail when trying to find terminfo entries like x/xterm if
they are generated on macOS.
It seems like there is no way to change the behavior of `tic` to create
alphabetical directories, so we can only disable this option explicitly.
---
configure | 3 +++
1 file changed, 3 insertions(+)
diff --git a/configure b/configure
index 31bbb85..478eabd 100755
--- a/configure
+++ b/configure
@@ -4361,6 +4361,9 @@ if test "$cross_compiling" = yes ; then
cf_cv_mixedcase=yes
;;
esac
+ if test "$(uname)" = Darwin; then
+ cf_cv_mixedcase=no
+ fi
else
rm -f conftest CONFTEST
echo test >conftest

View file

@ -5,3 +5,17 @@
Teach configure about serenity
## `0002-Disable-mixed-case-directory-names-when-building-on-.patch`
Disable mixed-case directory names when building on macOS
Since macOS's filesystem is case-insensitive, its `tic` only generates
terminfo directory names that are hex numbers instead of letters, such
as 78/xterm instead of x/xterm. However, the configure script still
enables the mixed-case directory name feature by default. As a result,
ncurses will fail when trying to find terminfo entries like x/xterm if
they are generated on macOS.
It seems like there is no way to change the behavior of `tic` to create
alphabetical directories, so we can only disable this option explicitly.