GNU bug report logs - #51627
[PATCH] gnu: st: Compile and install terminfo files.

Previous Next

Package: guix-patches;

Reported by: jgart <jgart <at> dismail.de>

Date: Sat, 6 Nov 2021 08:55:01 UTC

Severity: normal

Tags: patch

Done: Raghav Gururajan <rg <at> raghavgururajan.name>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51627 in the body.
You can then email your comments to 51627 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#51627; Package guix-patches. (Sat, 06 Nov 2021 08:55:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to jgart <jgart <at> dismail.de>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 06 Nov 2021 08:55:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: guix-patches <at> gnu.org
Cc: jgart <jgart <at> dismail.de>
Subject: [PATCH] gnu: st: Compile and install terminfo files.
Date: Sat,  6 Nov 2021 04:53:34 -0400
* gnu/packages/suckless.scm (st): Compile and install terminfo files.
[native-inputs]: ncurses's tic program is required to compile the
terminfo files.
---
 gnu/packages/suckless.scm | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
index b4855ec0a2..912ff12422 100644
--- a/gnu/packages/suckless.scm
+++ b/gnu/packages/suckless.scm
@@ -378,6 +378,9 @@ (define-public st
      `(#:tests? #f                      ; no tests
        #:make-flags
        (list (string-append "CC=" ,(cc-for-target))
+             (string-append "TERMINFO="
+                            (assoc-ref %outputs "out")
+                            "/share/terminfo")
              (string-append "PREFIX=" %output))
        #:phases
        (modify-phases %standard-phases
@@ -385,15 +388,20 @@ (define-public st
          (add-after 'unpack 'inhibit-terminfo-install
            (lambda _
              (substitute* "Makefile"
-               (("\ttic .*") ""))
-             #t)))))
+               (("\ttic .*") ""))))
+         (add-after 'install 'compile-and-install-terminfo-entry
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out  (assoc-ref outputs "out"))
+                      (terminfo (string-append out "/share/terminfo")))
+                 (invoke "tic" "-sx" "st.info" "-o" terminfo)))))))
     (inputs
      `(("libx11" ,libx11)
        ("libxft" ,libxft)
        ("fontconfig" ,fontconfig)
        ("freetype" ,freetype)))
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(("ncurses" ,ncurses)
+       ("pkg-config" ,pkg-config)))
     (home-page "https://st.suckless.org/")
     (synopsis "Simple terminal emulator")
     (description
-- 
2.33.1





Information forwarded to guix-patches <at> gnu.org:
bug#51627; Package guix-patches. (Fri, 03 Dec 2021 20:09:01 GMT) Full text and rfc822 format available.

Message #8 received at 51627 <at> debbugs.gnu.org (full text, mbox):

From: Raghav Gururajan <rg <at> raghavgururajan.name>
To: 51627 <at> debbugs.gnu.org
Cc: jgart <at> dismail.de
Date: Fri, 3 Dec 2021 15:08:24 -0500
[Message part 1 (text/plain, inline)]
Hi Jorge!

As discussed over XMPP, could you sent a revised patch?

Regards,
RG.
[OpenPGP_signature (application/pgp-signature, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#51627; Package guix-patches. (Fri, 03 Dec 2021 20:24:02 GMT) Full text and rfc822 format available.

Message #11 received at 51627 <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: 51627 <at> debbugs.gnu.org
Cc: jgart <jgart <at> dismail.de>
Subject: [PATCH v2] gnu: st: Install terminfo files.
Date: Fri,  3 Dec 2021 15:21:34 -0500
Here is version two of the patch set that adds ncurses to the native-input.

The Makefile already takes care of compiling the terminfo files as long as the
tic binary is available. The tic binary comes from the ncurse package.

* gnu/packages/suckless.scm (st)[native-inputs]: Add ncurses.
[configure-flags](TERMINFO): New flag.
[phases](inhibit-terminfo-install): Remove phase.
---
 gnu/packages/suckless.scm | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
index b4855ec0a2..fcebe894a7 100644
--- a/gnu/packages/suckless.scm
+++ b/gnu/packages/suckless.scm
@@ -378,22 +378,15 @@ (define-public st
      `(#:tests? #f                      ; no tests
        #:make-flags
        (list (string-append "CC=" ,(cc-for-target))
-             (string-append "PREFIX=" %output))
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure)
-         (add-after 'unpack 'inhibit-terminfo-install
-           (lambda _
-             (substitute* "Makefile"
-               (("\ttic .*") ""))
-             #t)))))
+             (string-append "PREFIX=" %output))))
     (inputs
      `(("libx11" ,libx11)
        ("libxft" ,libxft)
        ("fontconfig" ,fontconfig)
        ("freetype" ,freetype)))
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(("ncurses" ,ncurses)
+       ("pkg-config" ,pkg-config)))
     (home-page "https://st.suckless.org/")
     (synopsis "Simple terminal emulator")
     (description
-- 
2.34.0





Reply sent to Raghav Gururajan <rg <at> raghavgururajan.name>:
You have taken responsibility. (Fri, 03 Dec 2021 20:38:02 GMT) Full text and rfc822 format available.

Notification sent to jgart <jgart <at> dismail.de>:
bug acknowledged by developer. (Fri, 03 Dec 2021 20:38:02 GMT) Full text and rfc822 format available.

Message #16 received at 51627-done <at> debbugs.gnu.org (full text, mbox):

From: Raghav Gururajan <rg <at> raghavgururajan.name>
To: 51627-done <at> debbugs.gnu.org
Cc: jgart <at> dismail.de
Date: Fri, 3 Dec 2021 15:37:34 -0500
[Message part 1 (text/plain, inline)]
Pushed to master as 170cb4c881..19528e39bb, with new make-flag. Thanks!

Regards,
RG.
[OpenPGP_signature (application/pgp-signature, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 01 Jan 2022 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 77 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.