With the patch this time ^^'

On 2015-06-09 13:04, amirou...@hypermove.net wrote:
This patch st terminal emulator from suckless.

This is my first patch!

This installs flawlessly except:

- `tic -s terminfo -s info` which fails because it try to install in
an unknown home directory. In Gentoo they install it in
/usr/share/terminfo [1]. A added a patch to avoid this issue. One has
to export TERM=xterm to make it possible to use terminal applications.

- The default config.def.h use Liberation font, this is ok. However
it's might be better to activate antialias and autohint?


[1]
https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-terms/st/st-0.5.ebuild?view=markup
From 385f7129b405d136cbbb7dbffa35bf6f62cffc93 Mon Sep 17 00:00:00 2001
From: amz3 <amirou...@hypermove.net>
Date: Sun, 7 Jun 2015 19:04:28 +0200
Subject: [PATCH] gnu: add st.

* gnu/packages/dwm.scm (st): New variable.
* gnu/packages/patches/st-0.5-do-not-install-terminfo.patch: New file.
---
 gnu/packages/dwm.scm                               | 50 +++++++++++++++++++++-
 .../patches/st-0.5-do-not-install-terminfo.patch   | 13 ++++++
 2 files changed, 62 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/st-0.5-do-not-install-terminfo.patch

diff --git a/gnu/packages/dwm.scm b/gnu/packages/dwm.scm
index 98fa122..b82297f 100644
--- a/gnu/packages/dwm.scm
+++ b/gnu/packages/dwm.scm
@@ -22,7 +22,11 @@
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
-  #:use-module (gnu packages xorg))
+  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages fonts)
+  #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages pkg-config)
+  #:use-module ((gnu packages fontutils) #:prefix font-utils:))
 
 (define-public dwm
   (package
@@ -139,3 +143,47 @@ numbers of user-defined menu items efficiently.")
     (description
      "Simple X session lock with trivial feedback on password entry.")
     (license x11)))
+
+
+(define-public st
+  (package
+    (name "st")
+    (version "0.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://dl.suckless.org/st/st-";
+                           version ".tar.gz"))
+       (patches (list (search-patch "st-0.5-do-not-install-terminfo.patch")))
+       (sha256
+        (base32
+         "0knxpzaa86pprng6hak8hx8bw22yw22rpz1ffxjpcvqlz3xdv05f"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f ; no tests
+       #:make-flags (list "CC=gcc"
+                          (string-append "PREFIX=" %output))
+       #:phases
+       (alist-delete 'configure %standard-phases)))
+    (inputs
+     `(("libx11" ,libx11)
+       ("libxft" ,libxft)
+       ("libxcomposite" ,libxcomposite)
+       ("compositeproto" ,compositeproto)
+       ("libxext" ,libxext)
+       ("xextproto" ,xextproto)
+       ("libxrender" ,libxrender)
+       ("fontconfig" ,font-utils:fontconfig)
+       ("freetype" ,font-utils:freetype)
+       ("font-liberation5" ,font-liberation)))
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("ncurses" ,ncurses)))
+    (home-page "http://st.suckless.org/";)
+    (synopsis "Simple terminal emulator")
+    (description
+     "Xterm is bloated and unmaintainable.  It has over 65K lines of code and
+      emulates obscure and obsolete terminals you will never need.  The popular
+      alternative, rxvt has only 32K lines of code.  This is just too much for
+      something as simple as a terminal emulator; it’s yet another example of
+      code complexity.  st fix that.")
+    (license x11)))
diff --git a/gnu/packages/patches/st-0.5-do-not-install-terminfo.patch b/gnu/packages/patches/st-0.5-do-not-install-terminfo.patch
new file mode 100644
index 0000000..089c423
--- /dev/null
+++ b/gnu/packages/patches/st-0.5-do-not-install-terminfo.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index 6158ab2..93cb684 100644
+--- a/Makefile
++++ b/Makefile
+@@ -48,8 +48,6 @@ install: all
+ 	@mkdir -p ${DESTDIR}${MANPREFIX}/man1
+ 	@sed "s/VERSION/${VERSION}/g" < st.1 > ${DESTDIR}${MANPREFIX}/man1/st.1
+ 	@chmod 644 ${DESTDIR}${MANPREFIX}/man1/st.1
+-	@echo Please see the README file regarding the terminfo entry of st.
+-	@tic -s st.info
+ 
+ uninstall:
+ 	@echo removing executable file from ${DESTDIR}${PREFIX}/bin
-- 
2.2.1

Reply via email to