diff --git a/Ports/ncurses/patches/0002-Disable-mixed-case-directory-names-when-building-on-.patch b/Ports/ncurses/patches/0002-Disable-mixed-case-directory-names-when-building-on-.patch new file mode 100644 index 0000000000..67630eb3eb --- /dev/null +++ b/Ports/ncurses/patches/0002-Disable-mixed-case-directory-names-when-building-on-.patch @@ -0,0 +1,32 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: SeekingBlues +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 diff --git a/Ports/ncurses/patches/ReadMe.md b/Ports/ncurses/patches/ReadMe.md index 295686d84a..1cd0b2b83a 100644 --- a/Ports/ncurses/patches/ReadMe.md +++ b/Ports/ncurses/patches/ReadMe.md @@ -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. +