Fix terminfo path on case-insensitive filesystems

* eat.el (eat--terminfo-path): New variable.
* eat.el (eat-term-terminfo-directory): Change default value to
'PACKAGE-ROOT/terminfo/'.
* Makefile (terminfo): Don't depend on other targets.  Make
directory 'terminfo'.  Write terminfo to both 'e' and
'65' (hexadecimal number of ASCII 'e') directories.
* Makefile (e/eat-mono e/eat-color eat-256color e/eat-truecolor):
Remove target.
* README.org (Quelpa): Update recipe.
This commit is contained in:
Akib Azmain Turja 2022-12-21 01:02:03 +06:00
parent 510f8b565c
commit 764b075255
No known key found for this signature in database
GPG key ID: 5535FCF54D88616B
11 changed files with 32 additions and 14 deletions

View file

@ -35,7 +35,23 @@ html: eat.html
pdf: eat.pdf
terminfo: e/eat-mono e/eat-color eat-256color e/eat-truecolor
terminfo: eat.ti
test -d terminfo || mkdir terminfo
env TERMINFO=./terminfo $(TIC) -x eat.ti
# We don't know which directory was created, it depend on the
# case-sensitivity of the file-system. So make sure both are created.
test -d terminfo/e || mkdir terminfo/e
test -d terminfo/65 || mkdir terminfo/65
if test terminfo/e/eat-mono -nt terminfo/65/eat-mono ; \
then \
cp terminfo/e/eat-mono terminfo/e/eat-color \
terminfo/e/eat-256color terminfo/e/eat-truecolor \
terminfo/65 ; \
else \
cp terminfo/65/eat-mono terminfo/65/eat-color \
terminfo/65/eat-256color terminfo/65/eat-truecolor \
terminfo/e ; \
fi
check: eat.el
$(EMACS) -batch -l eat.el -l eat-tests.el \
@ -49,9 +65,6 @@ changelog:
eat.elc: eat.el
$(EMACS) -batch --eval '(byte-compile-file "eat.el")'
e/eat-mono e/eat-color eat-256color e/eat-truecolor: eat.ti
env TERMINFO=. $(TIC) -x eat.ti
eat.info: eat.texi gpl.texi fdl.texi
$(TEXI2INFO) eat.texi

View file

@ -90,7 +90,8 @@ put something like the following in your init file:
(quelpa '(eat :fetcher git
:url "/home/akib/projects/emacs-eat"
:files ("*.el" ("term" "term/*.el") "*.texi"
"*.ti" ("e" "e/*")
"*.ti" ("terminfo/e" "terminfo/e/*")
("terminfo/65" "terminfo/65/*")
("integration" "integration/*")
(:exclude ".dir-locals.el" "*-tests.el"))))
#+end_src

22
eat.el
View file

@ -339,20 +339,26 @@ This value is used by terminal programs to identify the terminal."
(defvar eat--install-path nil
"Path to directory where Eat is installed.")
(defvar eat--terminfo-path nil
"Path to directory where Terminfo databases are installed.")
(defvar eat--shell-integration-path nil
"Path to directory where shell integration scripts are installed.")
(setq eat--install-path
(copy-sequence (file-name-directory
(or load-file-name buffer-file-name))))
(defvar eat-term-terminfo-directory)
(defvar eat-term-shell-integration-directory)
(let ((old-install-path eat--install-path)
(let ((old-terminfo-path eat--terminfo-path)
(old-shell-integration-path eat--shell-integration-path))
(setq eat--install-path
(copy-sequence (file-name-directory
(or load-file-name buffer-file-name))))
(setq eat--terminfo-path
(expand-file-name "terminfo" eat--install-path))
(setq eat--shell-integration-path
(expand-file-name "integration" eat--install-path))
(defcustom eat-term-terminfo-directory eat--install-path
(defcustom eat-term-terminfo-directory eat--terminfo-path
"Directory where required terminfo databases can be found.
This value is used by terminal programs to find the terminfo databases
@ -360,8 +366,6 @@ that describe the capabilities of the terminal."
:type 'directory
:group 'eat-term)
(defvar eat--term-shell-integration-directory)
(defcustom eat-term-shell-integration-directory
eat--shell-integration-path
"Directory where Eat shell integration scripts can be found.
@ -372,8 +376,8 @@ This value is exposed to terminal programs as
:group 'eat-ui
:group 'eat-eshell)
(when (eq eat-term-terminfo-directory old-install-path)
(setq eat-term-terminfo-directory eat--install-path))
(when (eq eat-term-terminfo-directory old-terminfo-path)
(setq eat-term-terminfo-directory eat--terminfo-path))
(when (eq eat-term-shell-integration-directory
old-shell-integration-path)
(setq eat-term-shell-integration-directory

BIN
terminfo/e/eat-256color Normal file

Binary file not shown.

BIN
terminfo/e/eat-color Normal file

Binary file not shown.

BIN
terminfo/e/eat-mono Normal file

Binary file not shown.

BIN
terminfo/e/eat-truecolor Normal file

Binary file not shown.