emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/eat 764b075255 2/4: Fix terminfo path on case-insensitive


From: ELPA Syncer
Subject: [nongnu] elpa/eat 764b075255 2/4: Fix terminfo path on case-insensitive filesystems
Date: Tue, 20 Dec 2022 14:58:43 -0500 (EST)

branch: elpa/eat
commit 764b075255875bedab13b336b1c2162900f448a6
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>

    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.
---
 Makefile                         |  21 +++++++++++++++++----
 README.org                       |   3 ++-
 eat.el                           |  22 +++++++++++++---------
 {e => terminfo/65}/eat-256color  | Bin
 {e => terminfo/65}/eat-color     | Bin
 {e => terminfo/65}/eat-mono      | Bin
 {e => terminfo/65}/eat-truecolor | Bin
 {e => terminfo/e}/eat-256color   | Bin
 {e => terminfo/e}/eat-color      | Bin
 {e => terminfo/e}/eat-mono       | Bin
 {e => terminfo/e}/eat-truecolor  | Bin
 11 files changed, 32 insertions(+), 14 deletions(-)

diff --git a/Makefile b/Makefile
index f5cedf119b..cc509b1f92 100644
--- a/Makefile
+++ b/Makefile
@@ -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
 
diff --git a/README.org b/README.org
index 9d17135abc..d1f670f2e3 100644
--- a/README.org
+++ b/README.org
@@ -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
diff --git a/eat.el b/eat.el
index a933883fae..8db6ae5a74 100644
--- a/eat.el
+++ b/eat.el
@@ -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
diff --git a/e/eat-256color b/terminfo/65/eat-256color
similarity index 100%
copy from e/eat-256color
copy to terminfo/65/eat-256color
diff --git a/e/eat-color b/terminfo/65/eat-color
similarity index 100%
copy from e/eat-color
copy to terminfo/65/eat-color
diff --git a/e/eat-mono b/terminfo/65/eat-mono
similarity index 100%
copy from e/eat-mono
copy to terminfo/65/eat-mono
diff --git a/e/eat-truecolor b/terminfo/65/eat-truecolor
similarity index 100%
copy from e/eat-truecolor
copy to terminfo/65/eat-truecolor
diff --git a/e/eat-256color b/terminfo/e/eat-256color
similarity index 100%
rename from e/eat-256color
rename to terminfo/e/eat-256color
diff --git a/e/eat-color b/terminfo/e/eat-color
similarity index 100%
rename from e/eat-color
rename to terminfo/e/eat-color
diff --git a/e/eat-mono b/terminfo/e/eat-mono
similarity index 100%
rename from e/eat-mono
rename to terminfo/e/eat-mono
diff --git a/e/eat-truecolor b/terminfo/e/eat-truecolor
similarity index 100%
rename from e/eat-truecolor
rename to terminfo/e/eat-truecolor



reply via email to

[Prev in Thread] Current Thread [Next in Thread]