From 1eccf83490dbf8ea86e8a91d704e0aa0d49cdf9c Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Fri, 5 Oct 2018 19:37:35 +0300 Subject: [PATCH] new package: putty A terminal integrated SSH/Telnet client. --- x11-packages/putty/build.sh | 13 +++++++++++++ .../putty/putty-0.70_unix_uxmisc.c.patch | 19 +++++++++++++++++++ .../putty/putty-0.70_unix_uxnet.c.patch | 12 ++++++++++++ .../putty/putty-0.70_unix_uxnoise.c.patch | 12 ++++++++++++ .../putty/putty-0.70_unix_uxpgnt.c.patch | 12 ++++++++++++ .../putty/putty-0.70_unix_uxproxy.c.patch | 12 ++++++++++++ .../putty/putty-0.70_unix_uxshare.c.patch | 12 ++++++++++++ 7 files changed, 92 insertions(+) create mode 100644 x11-packages/putty/build.sh create mode 100644 x11-packages/putty/putty-0.70_unix_uxmisc.c.patch create mode 100644 x11-packages/putty/putty-0.70_unix_uxnet.c.patch create mode 100644 x11-packages/putty/putty-0.70_unix_uxnoise.c.patch create mode 100644 x11-packages/putty/putty-0.70_unix_uxpgnt.c.patch create mode 100644 x11-packages/putty/putty-0.70_unix_uxproxy.c.patch create mode 100644 x11-packages/putty/putty-0.70_unix_uxshare.c.patch diff --git a/x11-packages/putty/build.sh b/x11-packages/putty/build.sh new file mode 100644 index 000000000..0b8213f92 --- /dev/null +++ b/x11-packages/putty/build.sh @@ -0,0 +1,13 @@ +TERMUX_PKG_MAINTAINER="Leonid Plyushch @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" +} diff --git a/x11-packages/putty/putty-0.70_unix_uxmisc.c.patch b/x11-packages/putty/putty-0.70_unix_uxmisc.c.patch new file mode 100644 index 000000000..f02b403f9 --- /dev/null +++ b/x11-packages/putty/putty-0.70_unix_uxmisc.c.patch @@ -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); + } diff --git a/x11-packages/putty/putty-0.70_unix_uxnet.c.patch b/x11-packages/putty/putty-0.70_unix_uxnet.c.patch new file mode 100644 index 000000000..e46531788 --- /dev/null +++ b/x11-packages/putty/putty-0.70_unix_uxnet.c.patch @@ -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 + + /* diff --git a/x11-packages/putty/putty-0.70_unix_uxnoise.c.patch b/x11-packages/putty/putty-0.70_unix_uxnoise.c.patch new file mode 100644 index 000000000..e357c89a1 --- /dev/null +++ b/x11-packages/putty/putty-0.70_unix_uxnoise.c.patch @@ -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); diff --git a/x11-packages/putty/putty-0.70_unix_uxpgnt.c.patch b/x11-packages/putty/putty-0.70_unix_uxpgnt.c.patch new file mode 100644 index 000000000..3c7d5aff4 --- /dev/null +++ b/x11-packages/putty/putty-0.70_unix_uxpgnt.c.patch @@ -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"; + diff --git a/x11-packages/putty/putty-0.70_unix_uxproxy.c.patch b/x11-packages/putty/putty-0.70_unix_uxproxy.c.patch new file mode 100644 index 000000000..fe5b077b5 --- /dev/null +++ b/x11-packages/putty/putty-0.70_unix_uxproxy.c.patch @@ -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); + } + diff --git a/x11-packages/putty/putty-0.70_unix_uxshare.c.patch b/x11-packages/putty/putty-0.70_unix_uxshare.c.patch new file mode 100644 index 000000000..8935f2c6b --- /dev/null +++ b/x11-packages/putty/putty-0.70_unix_uxshare.c.patch @@ -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 +