new package: putty

A terminal integrated SSH/Telnet client.
This commit is contained in:
Leonid Pliushch 2018-10-05 19:37:35 +03:00 committed by Yaksh Bariya
parent 283bf776f9
commit 1eccf83490
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
7 changed files with 92 additions and 0 deletions

View File

@ -0,0 +1,13 @@
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com> @xeffyr"
TERMUX_PKG_HOMEPAGE=http://www.chiark.greenend.org.uk/~sgtatham/putty/
TERMUX_PKG_DESCRIPTION="A terminal integrated SSH/Telnet client"
TERMUX_PKG_VERSION=0.70
TERMUX_PKG_SRCURL=https://the.earth.li/~sgtatham/putty/${TERMUX_PKG_VERSION}/putty-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=bb8aa49d6e96c5a8e18a057f3150a1695ed99a24eef699e783651d1f24e7b0be
TERMUX_PKG_DEPENDS="atk, gdk-pixbuf, glib, gtk3, libandroid-glob, libandroid-shmem, libcairo-x, libx11, pango-x"
termux_step_pre_configure() {
export CFLAGS="${CFLAGS} -Wno-deprecated-declarations"
export LIBS="-landroid-glob -landroid-shmem"
}

View File

@ -0,0 +1,19 @@
diff -uNr putty-0.70/unix/uxmisc.c putty-0.70.mod/unix/uxmisc.c
--- putty-0.70/unix/uxmisc.c 2017-07-04 22:30:56.000000000 +0300
+++ putty-0.70.mod/unix/uxmisc.c 2018-10-05 20:12:00.693981290 +0300
@@ -131,7 +131,6 @@
* coping correctly with people who have su'ed.
*/
user = getlogin();
- setpwent();
if (user)
p = getpwnam(user);
else
@@ -153,7 +152,6 @@
return NULL;
ret = p->pw_name;
}
- endpwent();
return dupstr(ret);
}

View File

@ -0,0 +1,12 @@
diff -uNr putty-0.70/unix/uxnet.c putty-0.70.mod/unix/uxnet.c
--- putty-0.70/unix/uxnet.c 2017-07-04 22:30:56.000000000 +0300
+++ putty-0.70.mod/unix/uxnet.c 2018-10-05 20:12:44.594090518 +0300
@@ -30,7 +30,7 @@
#endif
#ifndef X11_UNIX_PATH
-# define X11_UNIX_PATH "/tmp/.X11-unix/X"
+# define X11_UNIX_PATH "@TERMUX_PREFIX@/tmp/.X11-unix/X"
#endif
/*

View File

@ -0,0 +1,12 @@
diff -uNr putty-0.70/unix/uxnoise.c putty-0.70.mod/unix/uxnoise.c
--- putty-0.70/unix/uxnoise.c 2017-07-04 22:30:56.000000000 +0300
+++ putty-0.70.mod/unix/uxnoise.c 2018-10-05 20:12:53.697446775 +0300
@@ -70,7 +70,7 @@
exit(1);
}
- fp = popen("ls -al /tmp 2>/dev/null", "r");
+ fp = popen("ls -al @TERMUX_PREFIX@/tmp 2>/dev/null", "r");
if (fp) {
while ( (ret = fread(buf, 1, sizeof(buf), fp)) > 0)
func(buf, ret);

View File

@ -0,0 +1,12 @@
diff -uNr putty-0.70/unix/uxpgnt.c putty-0.70.mod/unix/uxpgnt.c
--- putty-0.70/unix/uxpgnt.c 2017-07-04 22:30:56.000000000 +0300
+++ putty-0.70.mod/unix/uxpgnt.c 2018-10-05 20:13:03.107470567 +0300
@@ -153,7 +153,7 @@
/* Nothing needs doing in Unix Pageant */
}
-#define PAGEANT_DIR_PREFIX "/tmp/pageant"
+#define PAGEANT_DIR_PREFIX "@TERMUX_PREFIX@/tmp/pageant"
const char *const appname = "Pageant";

View File

@ -0,0 +1,12 @@
diff -uNr putty-0.70/unix/uxproxy.c putty-0.70.mod/unix/uxproxy.c
--- putty-0.70/unix/uxproxy.c 2017-07-04 22:30:56.000000000 +0300
+++ putty-0.70.mod/unix/uxproxy.c 2018-10-05 20:17:20.194819370 +0300
@@ -355,7 +355,7 @@
}
noncloexec(0);
noncloexec(1);
- execl("/bin/sh", "sh", "-c", cmd, (void *)NULL);
+ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", cmd, (void *)NULL);
_exit(255);
}

View File

@ -0,0 +1,12 @@
diff -uNr putty-0.70/unix/uxshare.c putty-0.70.mod/unix/uxshare.c
--- putty-0.70/unix/uxshare.c 2017-07-04 22:30:56.000000000 +0300
+++ putty-0.70.mod/unix/uxshare.c 2018-10-05 20:13:10.914157046 +0300
@@ -20,7 +20,7 @@
#include "proxy.h"
#include "ssh.h"
-#define CONNSHARE_SOCKETDIR_PREFIX "/tmp/putty-connshare"
+#define CONNSHARE_SOCKETDIR_PREFIX "@TERMUX_PREFIX@/tmp/putty-connshare"
#define SALT_FILENAME "salt"
#define SALT_SIZE 64