summaryrefslogtreecommitdiff
path: root/security/putty
diff options
context:
space:
mode:
authorroy <roy>2009-02-25 18:08:01 +0000
committerroy <roy>2009-02-25 18:08:01 +0000
commit05c190818f2046ec182f67c373c3aa74b11f98c0 (patch)
treef052b4b2c23ce320f4937082837cdcfbf4897bc8 /security/putty
parente7f1580e41027eb96e9c9ae42ac0206acc4cc430 (diff)
downloadpkgsrc-05c190818f2046ec182f67c373c3aa74b11f98c0.tar.gz
Add patches so that the home/end keys work on BSD servers as well as Linux
Diffstat (limited to 'security/putty')
-rw-r--r--security/putty/Makefile5
-rw-r--r--security/putty/distinfo5
-rw-r--r--security/putty/patches/patch-al28
-rw-r--r--security/putty/patches/patch-am48
-rw-r--r--security/putty/patches/patch-an29
5 files changed, 112 insertions, 3 deletions
diff --git a/security/putty/Makefile b/security/putty/Makefile
index e61c10f605e..2477a0c307e 100644
--- a/security/putty/Makefile
+++ b/security/putty/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.18 2008/06/12 02:14:45 joerg Exp $
+# $NetBSD: Makefile,v 1.19 2009/02/25 18:08:01 roy Exp $
#
DISTNAME= putty-0.60
+PKGNAME= putty-0.60nb1
CATEGORIES= security
MASTER_SITES= http://the.earth.li/~sgtatham/putty/0.60/
@@ -12,7 +13,7 @@ COMMENT= Free implementation of Telnet and SSH for Win32 and Unix platforms
PKG_DESTDIR_SUPPORT= user-destdir
USE_TOOLS+= gmake
-BUILD_DIRS= ${WRKSRC}/unix
+BUILD_DIRS= unix
MAKE_FILE= Makefile.gtk
MAKE_FLAGS+= mandir=${PREFIX}/${PKGMANDIR}
diff --git a/security/putty/distinfo b/security/putty/distinfo
index 308b5ce677c..ff2e81ab93b 100644
--- a/security/putty/distinfo
+++ b/security/putty/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2007/10/13 09:14:16 obache Exp $
+$NetBSD: distinfo,v 1.8 2009/02/25 18:08:01 roy Exp $
SHA1 (putty-0.60.tar.gz) = 8d99f8f1077b7ab25f014126b5d812a1ad55ce37
RMD160 (putty-0.60.tar.gz) = 9c56ee4d2d05f5b1079c65f19a5d9d06b596aba3
@@ -12,3 +12,6 @@ SHA1 (patch-ag) = 2012609deff68e4931538b1a987c02b532bf04be
SHA1 (patch-ai) = 3965e71c222d7db61d5d852dedf8fb3ec082c9a1
SHA1 (patch-aj) = 7c22c5cb2c41445fa70dfff9e6d756af444daf06
SHA1 (patch-ak) = 2ca42d1ea913505d7d265a3fde71e09aa292d75f
+SHA1 (patch-al) = dd8d49697806d9087b9691c3bb48fe32b70a77e1
+SHA1 (patch-am) = 4dc40f37310f8bcebee3e41bb684c89bae9323e3
+SHA1 (patch-an) = 8411855d0a21b0ddb490384990003a3cfc58edcf
diff --git a/security/putty/patches/patch-al b/security/putty/patches/patch-al
new file mode 100644
index 00000000000..98c81f4d8fd
--- /dev/null
+++ b/security/putty/patches/patch-al
@@ -0,0 +1,28 @@
+$NetBSD: patch-al,v 1.1 2009/02/25 18:08:01 roy Exp $
+
+Make the home/end keys work on BSD servers as well as Linux ones
+
+Index: windows/window.c
+===================================================================
+--- windows/window.c (revision 8466)
++++ windows/window.c (working copy)
+@@ -4189,8 +4189,17 @@
+ p += sprintf((char *) p, "\x1BO%c", code + 'P' - 11);
+ return p - output;
+ }
+- if (cfg.rxvt_homeend && (code == 1 || code == 4)) {
+- p += sprintf((char *) p, code == 1 ? "\x1B[H" : "\x1BOw");
++ /* Home/End */
++ if (code == 1 || code == 4) {
++ /* Send the correct XTerm or rxvt codes for home/end
++ * We used to send ^[1~ and [4~ for Xterm,
++ * but those are Linux console */
++ const char *he;
++ if (cfg.rxvt_homeend)
++ he = code == 1 ? "\x1B[7~" : "\x1B[8~";
++ else
++ he = code == 1 ? "\x1BOH" : "\x1BOF";
++ p += sprintf((char *) p, he);
+ return p - output;
+ }
+ if (code) {
diff --git a/security/putty/patches/patch-am b/security/putty/patches/patch-am
new file mode 100644
index 00000000000..e3f20caa757
--- /dev/null
+++ b/security/putty/patches/patch-am
@@ -0,0 +1,48 @@
+$NetBSD: patch-am,v 1.1 2009/02/25 18:08:01 roy Exp $
+
+Make the home/end keys work on BSD servers as well as Linux ones
+
+Index: terminal.c
+===================================================================
+--- terminal.c (revision 8466)
++++ terminal.c (working copy)
+@@ -6131,13 +6131,6 @@
+ }
+ }
+
+- /* RXVT Home/End */
+- if (term->cfg.rxvt_homeend &&
+- (keysym == PK_HOME || keysym == PK_END)) {
+- p += sprintf((char *) p, keysym == PK_HOME ? "\x1B[H" : "\x1BOw");
+- goto done;
+- }
+-
+ if (term->vt52_mode) {
+ int xkey;
+
+@@ -6158,11 +6151,23 @@
+ goto done;
+ }
+
++ /* Home/End */
++ if (keysym == PK_HOME || keysym == PK_END) {
++ /* Send the correct XTerm or rxvt codes for home/end
++ * We used to send ^[1~ and [4~ for Xterm,
++ * but those are Linux console */
++ const char *he;
++ if (term->cfg.rxvt_homeend)
++ he = keysym == PK_HOME ? "\x1B[7~" : "\x1B[8~";
++ else
++ he = keysym == PK_HOME ? "\x1BOH" : "\x1BOF";
++ p += sprintf((char *) p, he);
++ goto done;
++ }
++
+ switch (keysym) {
+- case PK_HOME: code = 1; break;
+ case PK_INSERT: code = 2; break;
+ case PK_DELETE: code = 3; break;
+- case PK_END: code = 4; break;
+ case PK_PAGEUP: code = 5; break;
+ case PK_PAGEDOWN: code = 6; break;
+ default: code = 0; break; /* else gcc warns `enum value not used' */
diff --git a/security/putty/patches/patch-an b/security/putty/patches/patch-an
new file mode 100644
index 00000000000..398024755b1
--- /dev/null
+++ b/security/putty/patches/patch-an
@@ -0,0 +1,29 @@
+$NetBSD: patch-an,v 1.1 2009/02/25 18:08:01 roy Exp $
+
+Make the home/end keys work on BSD servers as well as Linux ones
+
+Index: unix/gtkwin.c
+===================================================================
+--- unix/gtkwin.c (revision 8466)
++++ unix/gtkwin.c (working copy)
+@@ -979,9 +979,17 @@
+ use_ucsoutput = FALSE;
+ goto done;
+ }
+- if (inst->cfg.rxvt_homeend && (code == 1 || code == 4)) {
+- end = 1 + sprintf(output+1, code == 1 ? "\x1B[H" : "\x1BOw");
+- use_ucsoutput = FALSE;
++ /* Home/End */
++ if (code == 1 || code == 4) {
++ /* Send the correct XTerm or rxvt codes for home/end
++ * We used to send ^[1~ and [4~ for Xterm,
++ * but those are Linux console */
++ const char *he;
++ if (inst->cfg.rxvt_homeend)
++ he = code == 1 ? "\x1B[7~" : "\x1B[8~";
++ else
++ he = code == 1 ? "\x1BOH" : "\x1BOF";
++ end = 1 + sprintf(output+1, he);
+ goto done;
+ }
+ if (code) {