summaryrefslogtreecommitdiff
path: root/Ports/ncurses
diff options
context:
space:
mode:
authorSeekingBlues <seekingblues@gmail.com>2022-06-19 18:41:26 +0800
committerLinus Groh <mail@linusgroh.de>2022-06-19 19:50:23 +0100
commitdafea57fe2d2634237d94bdcfbb83e2faddae72f (patch)
tree56d0a0be71c94a55cc8fd7a7b6b76803d78d657b /Ports/ncurses
parent0a989d1bfd6627ec453a9a0863508261adcd4884 (diff)
downloadserenity-dafea57fe2d2634237d94bdcfbb83e2faddae72f.zip
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.
Diffstat (limited to 'Ports/ncurses')
-rw-r--r--Ports/ncurses/patches/0002-Disable-mixed-case-directory-names-when-building-on-.patch32
-rw-r--r--Ports/ncurses/patches/ReadMe.md14
2 files changed, 46 insertions, 0 deletions
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 <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
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.
+