summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorJan Malakhovski <oxij@oxij.org>2013-03-17 12:24:49 +0000
committerJan Malakhovski <oxij@oxij.org>2013-03-17 12:24:49 +0000
commit16972d2415af915ed1aaa9e20dfc352f5486a0fc (patch)
treeca14a8175727726e2aa2fab9d44bbc2a639d2222 /pkgs/tools
parent8acaea6d5717866133ad00e3f6f05ef7b84be176 (diff)
downloadnixlib-16972d2415af915ed1aaa9e20dfc352f5486a0fc.tar
nixlib-16972d2415af915ed1aaa9e20dfc352f5486a0fc.tar.gz
nixlib-16972d2415af915ed1aaa9e20dfc352f5486a0fc.tar.bz2
nixlib-16972d2415af915ed1aaa9e20dfc352f5486a0fc.tar.lz
nixlib-16972d2415af915ed1aaa9e20dfc352f5486a0fc.tar.xz
nixlib-16972d2415af915ed1aaa9e20dfc352f5486a0fc.tar.zst
nixlib-16972d2415af915ed1aaa9e20dfc352f5486a0fc.zip
screen: fix some annoying bugs by importing patches from ArchLinux
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/misc/screen/default.nix3
-rw-r--r--pkgs/tools/misc/screen/screen-4.0.3-caption-colors.patch25
-rw-r--r--pkgs/tools/misc/screen/screen-4.0.3-long-term.patch29
3 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/tools/misc/screen/default.nix b/pkgs/tools/misc/screen/default.nix
index 2a5256761926..2a3f53d67417 100644
--- a/pkgs/tools/misc/screen/default.nix
+++ b/pkgs/tools/misc/screen/default.nix
@@ -8,6 +8,9 @@ stdenv.mkDerivation rec {
     sha256 = "0xvckv1ia5pjxk7fs4za6gz2njwmfd54sc464n8ab13096qxbw3q";
   };
 
+  patches = [ ./screen-4.0.3-caption-colors.patch
+              ./screen-4.0.3-long-term.patch ];
+
   preConfigure = ''
     configureFlags="--enable-telnet --enable-pam --infodir=$out/share/info --mandir=$out/share/man --with-sys-screenrc=/etc/screenrc"
     sed -i -e "s|/usr/local|/non-existent|g" -e "s|/usr|/non-existent|g" configure Makefile.in */Makefile.in
diff --git a/pkgs/tools/misc/screen/screen-4.0.3-caption-colors.patch b/pkgs/tools/misc/screen/screen-4.0.3-caption-colors.patch
new file mode 100644
index 000000000000..14365dc81c1b
--- /dev/null
+++ b/pkgs/tools/misc/screen/screen-4.0.3-caption-colors.patch
@@ -0,0 +1,25 @@
+# Source:
+# https://projects.archlinux.org/svntogit/packages.git/plain/screen/trunk/screen-4.0.3-caption-colors.patch
+# modified by hand for nixpkgs
+
+From e6a28cf8bfdac15faa6c267bf476ddcaddf48d67 Mon Sep 17 00:00:00 2001
+From: Sadrul Habib Chowdhury <sadrul@users.sourceforge.net>
+Date: Tue, 26 Jan 2010 20:17:26 +0000
+Subject: Accommodate more color changes in the caption.
+
+---
+diff --git a/src/screen.c b/src/screen.c
+index b1c3dfb..2cceae0 100644
+--- a/screen.c
++++ b/screen.c
+@@ -2204,7 +2204,7 @@ static const char months[] = "JanFebMarAprMayJunJulAugSepOctNovDec";
+ #endif
+ 
+ static char winmsg_buf[MAXSTR];
+-#define MAX_WINMSG_REND 16	/* rendition changes */
++#define MAX_WINMSG_REND 256	/* rendition changes */
+ static int winmsg_rend[MAX_WINMSG_REND];
+ static int winmsg_rendpos[MAX_WINMSG_REND];
+ static int winmsg_numrend;
+--
+cgit v0.8.3.4
diff --git a/pkgs/tools/misc/screen/screen-4.0.3-long-term.patch b/pkgs/tools/misc/screen/screen-4.0.3-long-term.patch
new file mode 100644
index 000000000000..f94f9da8ac4a
--- /dev/null
+++ b/pkgs/tools/misc/screen/screen-4.0.3-long-term.patch
@@ -0,0 +1,29 @@
+# Source:
+# https://projects.archlinux.org/svntogit/packages.git/plain/screen/trunk/screen-4.0.3-long-term.patch
+
+# This fixes long terminal names handling, e.g. TERM=rxvt-unicode-256colors works
+# as expected.
+diff -Naur screen-4.0.3-orig//display.h screen-4.0.3/display.h
+--- screen-4.0.3-orig//display.h	2003-07-02 00:01:42.000000000 +1000
++++ screen-4.0.3/display.h	2010-12-03 20:19:23.826671689 +1000
+@@ -85,7 +85,7 @@
+   struct win *d_other;		/* pointer to other window */
+   int   d_nonblock;		/* -1 don't block if obufmax reached */
+ 				/* >0: block after nonblock secs */
+-  char  d_termname[20 + 1];	/* $TERM */
++  char  d_termname[40 + 1];	/* $TERM */
+   char	*d_tentry;		/* buffer for tgetstr */
+   char	d_tcinited;		/* termcap inited flag */
+   int	d_width, d_height;	/* width/height of the screen */
+diff -Naur screen-4.0.3-orig//screen.h screen-4.0.3/screen.h
+--- screen-4.0.3-orig//screen.h	2003-08-22 22:28:43.000000000 +1000
++++ screen-4.0.3/screen.h	2010-12-03 20:19:43.163338333 +1000
+@@ -202,7 +202,7 @@
+ 	  char preselect[20];
+ 	  int esc;		/* his new escape character unless -1 */
+ 	  int meta_esc;		/* his new meta esc character unless -1 */
+-	  char envterm[20 + 1];	/* terminal type */
++	  char envterm[40 + 1];	/* terminal type */
+ 	  int encoding;		/* encoding of display */
+ 	}
+       attach;