From db620b33d05bd5d93c9f385fb7cadca1cfa6cb435c0be423210c6e6c79539316 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 24 Jun 2012 01:02:36 +0000 Subject: [PATCH] Resurrect classic patches from myself (putty-0.58 package) OBS-URL: https://build.opensuse.org/package/show/X11:Utilities/putty?expand=0&rev=5 --- putty-02-remove-gtk1.diff | 3 + putty-03-config.diff | 162 ++++++++++++++++++++++++++++++++++++++ putty.spec | 48 ++++++++--- 3 files changed, 200 insertions(+), 13 deletions(-) create mode 100644 putty-03-config.diff diff --git a/putty-02-remove-gtk1.diff b/putty-02-remove-gtk1.diff index 4bdad43..85158bf 100644 --- a/putty-02-remove-gtk1.diff +++ b/putty-02-remove-gtk1.diff @@ -1,3 +1,6 @@ + +Remove GTK1 lines from configure.ac to be able to run autoreconf. + --- unix/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/putty-03-config.diff b/putty-03-config.diff new file mode 100644 index 0000000..cbf4e8b --- /dev/null +++ b/putty-03-config.diff @@ -0,0 +1,162 @@ + +* Put 3DES off as insecure. +* Always use "linux" terminal type. This resolves some + strange key combos +* Set standard colors and use a more legilible font size + +--- + settings.c | 51 ++++++++++++++++++++++++++++++++++----------------- + unix/gtkwin.c | 2 +- + windows/windefs.c | 4 ++-- + 3 files changed, 37 insertions(+), 20 deletions(-) + +Index: putty-0.62/settings.c +=================================================================== +--- putty-0.62.orig/settings.c ++++ putty-0.62/settings.c +@@ -12,8 +12,8 @@ + static const struct keyvalwhere ciphernames[] = { + { "aes", CIPHER_AES, -1, -1 }, + { "blowfish", CIPHER_BLOWFISH, -1, -1 }, +- { "3des", CIPHER_3DES, -1, -1 }, + { "WARN", CIPHER_WARN, -1, -1 }, ++ { "3des", CIPHER_3DES, -1, -1 }, + { "arcfour", CIPHER_ARCFOUR, -1, -1 }, + { "des", CIPHER_DES, -1, -1 } + }; +@@ -611,7 +611,7 @@ void load_open_settings(void *sesskey, C + } + gppi(sesskey, "TCPNoDelay", 1, &cfg->tcp_nodelay); + gppi(sesskey, "TCPKeepalives", 0, &cfg->tcp_keepalives); +- gpps(sesskey, "TerminalType", "xterm", cfg->termtype, ++ gpps(sesskey, "TerminalType", "linux", cfg->termtype, + sizeof(cfg->termtype)); + gpps(sesskey, "TerminalSpeed", "38400,38400", cfg->termspeed, + sizeof(cfg->termspeed)); +@@ -716,10 +716,10 @@ void load_open_settings(void *sesskey, C + gppi(sesskey, "PassiveTelnet", 0, &cfg->passive_telnet); + gppi(sesskey, "BackspaceIsDelete", 1, &cfg->bksp_is_delete); + gppi(sesskey, "RXVTHomeEnd", 0, &cfg->rxvt_homeend); +- gppi(sesskey, "LinuxFunctionKeys", 0, &cfg->funky_type); ++ gppi(sesskey, "LinuxFunctionKeys", 1, &cfg->funky_type); + gppi(sesskey, "NoApplicationKeys", 0, &cfg->no_applic_k); + gppi(sesskey, "NoApplicationCursors", 0, &cfg->no_applic_c); +- gppi(sesskey, "NoMouseReporting", 0, &cfg->no_mouse_rep); ++ gppi(sesskey, "NoMouseReporting", 1, &cfg->no_mouse_rep); + gppi(sesskey, "NoRemoteResize", 0, &cfg->no_remote_resize); + gppi(sesskey, "NoAltScreen", 0, &cfg->no_alt_screen); + gppi(sesskey, "NoRemoteWinTitle", 0, &cfg->no_remote_wintitle); +@@ -740,9 +740,9 @@ void load_open_settings(void *sesskey, C + gppi(sesskey, "ApplicationKeypad", 0, &cfg->app_keypad); + gppi(sesskey, "NetHackKeypad", 0, &cfg->nethack_keypad); + gppi(sesskey, "AltF4", 1, &cfg->alt_f4); +- gppi(sesskey, "AltSpace", 0, &cfg->alt_space); ++ gppi(sesskey, "AltSpace", 1, &cfg->alt_space); + gppi(sesskey, "AltOnly", 0, &cfg->alt_only); +- gppi(sesskey, "ComposeKey", 0, &cfg->compose_key); ++ gppi(sesskey, "ComposeKey", 1, &cfg->compose_key); + gppi(sesskey, "CtrlAltKeys", 1, &cfg->ctrlaltkeys); + gppi(sesskey, "TelnetKey", 0, &cfg->telnet_keyboard); + gppi(sesskey, "TelnetRet", 1, &cfg->telnet_newline); +@@ -751,12 +751,12 @@ void load_open_settings(void *sesskey, C + gpps(sesskey, "Answerback", "PuTTY", cfg->answerback, + sizeof(cfg->answerback)); + gppi(sesskey, "AlwaysOnTop", 0, &cfg->alwaysontop); +- gppi(sesskey, "FullScreenOnAltEnter", 0, &cfg->fullscreenonaltenter); ++ gppi(sesskey, "FullScreenOnAltEnter", 1, &cfg->fullscreenonaltenter); + gppi(sesskey, "HideMousePtr", 0, &cfg->hide_mouseptr); + gppi(sesskey, "SunkenEdge", 0, &cfg->sunken_edge); + gppi(sesskey, "WindowBorder", 1, &cfg->window_border); +- gppi(sesskey, "CurType", 0, &cfg->cursor_type); +- gppi(sesskey, "BlinkCur", 0, &cfg->blink_cur); ++ gppi(sesskey, "CurType", 1, &cfg->cursor_type); ++ gppi(sesskey, "BlinkCur", 1, &cfg->blink_cur); + /* pedantic compiler tells me I can't use &cfg->beep as an int * :-) */ + gppi(sesskey, "Beep", 1, &cfg->beep); + gppi(sesskey, "BeepInd", 0, &cfg->beep_ind); +@@ -790,10 +790,10 @@ void load_open_settings(void *sesskey, C + gppi(sesskey, "CRImpliesLF", 0, &cfg->crhaslf); + gppi(sesskey, "DisableArabicShaping", 0, &cfg->arabicshaping); + gppi(sesskey, "DisableBidi", 0, &cfg->bidi); +- gppi(sesskey, "WinNameAlways", 1, &cfg->win_name_always); ++ gppi(sesskey, "WinNameAlways", 0, &cfg->win_name_always); + gpps(sesskey, "WinTitle", "", cfg->wintitle, sizeof(cfg->wintitle)); + gppi(sesskey, "TermWidth", 80, &cfg->width); +- gppi(sesskey, "TermHeight", 24, &cfg->height); ++ gppi(sesskey, "TermHeight", 25, &cfg->height); + gppfont(sesskey, "Font", &cfg->font); + gppi(sesskey, "FontQuality", FQ_DEFAULT, &cfg->font_quality); + gppi(sesskey, "FontVTMode", VT_UNICODE, (int *) &cfg->vtmode); +@@ -805,11 +805,28 @@ void load_open_settings(void *sesskey, C + + for (i = 0; i < 22; i++) { + static const char *const defaults[] = { +- "187,187,187", "255,255,255", "0,0,0", "85,85,85", "0,0,0", +- "0,255,0", "0,0,0", "85,85,85", "187,0,0", "255,85,85", +- "0,187,0", "85,255,85", "187,187,0", "255,255,85", "0,0,187", +- "85,85,255", "187,0,187", "255,85,255", "0,187,187", +- "85,255,255", "187,187,187", "255,255,255" ++ "170,170,170", /* default foreground */ ++ "255,255,255", /* default bold foreground */ ++ "0,0,0", /* default background */ ++ "85,85,85", /* default bold background */ ++ "0,0,0", /* cursor text */ ++ "192,192,224", /* cursor color */ ++ "0,0,0", /* black */ ++ "85,85,85", /* black bold */ ++ "170,0,0", /* red */ ++ "255,0,0", /* red bold */ ++ "0,170,0", /* green */ ++ "0,255,0", /* green bold */ ++ "170,85,0", /* brown */ ++ "255,255,0", /* yellow bold */ ++ "0,0,170", /* blue */ ++ "0,0,255", /* blue bold */ ++ "170,0,170", /* magenta */ ++ "255,0,255", /* magenta bold */ ++ "0,170,170", /* cyan */ ++ "0,255,255", /* cyan bold */ ++ "170,170,170", /* white */ ++ "255,255,255", /* white bold */ + }; + char buf[20], buf2[30]; + int c0, c1, c2; +@@ -855,7 +872,7 @@ void load_open_settings(void *sesskey, C + * The empty default for LineCodePage will be converted later + * into a plausible default for the locale. + */ +- gpps(sesskey, "LineCodePage", "", cfg->line_codepage, ++ gpps(sesskey, "LineCodePage", "UTF-8", cfg->line_codepage, + sizeof(cfg->line_codepage)); + gppi(sesskey, "CJKAmbigWide", 0, &cfg->cjk_ambig_wide); + gppi(sesskey, "UTF8Override", 1, &cfg->utf8_override); +Index: putty-0.62/unix/gtkwin.c +=================================================================== +--- putty-0.62.orig/unix/gtkwin.c ++++ putty-0.62/unix/gtkwin.c +@@ -145,7 +145,7 @@ FontSpec platform_default_fontspec(const + { + FontSpec ret; + if (!strcmp(name, "Font")) +- strcpy(ret.name, "server:fixed"); ++ strcpy(ret.name, "client:Monospace 14"); + else + *ret.name = '\0'; + return ret; +Index: putty-0.62/windows/windefs.c +=================================================================== +--- putty-0.62.orig/windows/windefs.c ++++ putty-0.62/windows/windefs.c +@@ -10,10 +10,10 @@ FontSpec platform_default_fontspec(const + { + FontSpec ret; + if (!strcmp(name, "Font")) { +- strcpy(ret.name, "Courier New"); ++ strcpy(ret.name, "Lucida Console"); + ret.isbold = 0; + ret.charset = ANSI_CHARSET; +- ret.height = 10; ++ ret.height = 14; + } else { + ret.name[0] = '\0'; + } diff --git a/putty.spec b/putty.spec index 67acbc3..c617bac 100644 --- a/putty.spec +++ b/putty.spec @@ -1,16 +1,38 @@ -Name: putty -Version: 0.62 -Release: 0 -Group: System/X11/Utilities -Summary: GTK-based terminal emulator program -License: MIT -URL: http://www.chiark.greenend.org.uk/~sgtatham/putty/ +# +# spec file for package putty +# +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. -Source: %name-%version.tar.bz2 -Patch1: putty-01-werror.diff -Patch2: putty-02-remove-gtk1.diff -BuildRoot: %_tmppath/%name-%version-build -BuildRequires: autoconf, automake, krb5-devel, gtk2-devel +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: putty +Version: 0.62 +Release: 0 +Summary: GTK-based terminal emulator program +License: MIT +Group: System/X11/Utilities +Url: http://www.chiark.greenend.org.uk/~sgtatham/putty/ + +Source: %name-%version.tar.bz2 +Patch1: putty-01-werror.diff +Patch2: putty-02-remove-gtk1.diff +Patch3: putty-03-config.diff +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gtk2-devel +BuildRequires: krb5-devel %description PuTTY is a terminal emulator application which can act as a client @@ -19,7 +41,7 @@ serial console client. %prep %setup -q -%patch -P 1 -P 2 -p1 +%patch -P 1 -P 2 -P 3 -p1 %build pushd unix/;