From 8e1d715f1cdf75c4d8df6b7b17cccc2497df4174 Mon Sep 17 00:00:00 2001 From: davidkaroly <92124087+davidkaroly@users.noreply.github.com> Date: Wed, 19 Oct 2022 10:36:17 +0200 Subject: [PATCH] putty: bump to version 0.77 and enable building GUI with gtk3 (#7303) --- net-misc/putty/patches/putty-0.70.patchset | 72 ------------------- net-misc/putty/putty-0.70.recipe | 55 -------------- net-misc/putty/putty-0.77.recipe | 83 ++++++++++++++++++++++ 3 files changed, 83 insertions(+), 127 deletions(-) delete mode 100644 net-misc/putty/patches/putty-0.70.patchset delete mode 100644 net-misc/putty/putty-0.70.recipe create mode 100644 net-misc/putty/putty-0.77.recipe diff --git a/net-misc/putty/patches/putty-0.70.patchset b/net-misc/putty/patches/putty-0.70.patchset deleted file mode 100644 index 1edcd1bc3..000000000 --- a/net-misc/putty/patches/putty-0.70.patchset +++ /dev/null @@ -1,72 +0,0 @@ -From 6a0b613dbc6a2c13e34c5b3641a22ef779d65747 Mon Sep 17 00:00:00 2001 -From: begasus -Date: Tue, 2 May 2017 17:36:02 +0200 -Subject: fix build, fix gcc2 parse errors - - -diff --git a/configure.ac b/configure.ac -index 540cb64..7457342 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -141,6 +141,7 @@ if test "$gtk" = "2" -o "$gtk" = "3"; then - fi - - AC_SEARCH_LIBS([socket], [xnet]) -+AC_CHECK_LIB([network], [socket]) - - AS_IF([test "x$with_gssapi" != xno], - [AC_SEARCH_LIBS( -@@ -185,7 +186,7 @@ AS_IF([test AS_VAR_GET(x_cv_linux_so_peercred) = yes], - - if test "x$GCC" = "xyes"; then - : -- AC_SUBST(WARNINGOPTS, ['-Wall -Werror']) -+ AC_SUBST(WARNINGOPTS, ['-Wall']) - else - : - AC_SUBST(WARNINGOPTS, []) -diff --git a/unix/uxnet.c b/unix/uxnet.c -index 79f4fbc..8be48e2 100644 ---- a/unix/uxnet.c -+++ b/unix/uxnet.c -@@ -1518,12 +1518,14 @@ static char *sk_tcp_peer_info(Socket sock) - char uidbuf[64], gidbuf[64]; - sprintf(uidbuf, "%d", uid); - sprintf(gidbuf, "%d", gid); -- struct passwd *pw = getpwuid(uid); -+ { -+ struct passwd *pw = getpwuid(uid); - struct group *gr = getgrgid(gid); - return dupprintf("pid %d (%s:%s)", pid, - pw ? pw->pw_name : uidbuf, - gr ? gr->gr_name : gidbuf); - } -+ } - return NULL; - } else { - return NULL; -diff --git a/unix/uxstore.c b/unix/uxstore.c -index 1580178..3666531 100644 ---- a/unix/uxstore.c -+++ b/unix/uxstore.c -@@ -767,7 +767,8 @@ void write_random_seed(void *data, int len) - sfree(fname); - return; - } -- char *dir, *errmsg; -+ { -+ char *dir, *errmsg; - - dir = make_filename(INDEX_DIR, NULL); - if ((errmsg = make_dir_path(dir, 0700)) != NULL) { -@@ -802,6 +803,7 @@ void write_random_seed(void *data, int len) - close(fd); - sfree(fname); - } -+} - - void cleanup_all(void) - { --- -2.7.0 - diff --git a/net-misc/putty/putty-0.70.recipe b/net-misc/putty/putty-0.70.recipe deleted file mode 100644 index e1161818d..000000000 --- a/net-misc/putty/putty-0.70.recipe +++ /dev/null @@ -1,55 +0,0 @@ -SUMMARY="A Free Telnet/SSH Client" -DESCRIPTION="PPuTTY is a free implementation of SSH and Telnet for Windows \ -and Unix platforms, along with an xterm terminal emulator.\ -LEGAL WARNING: Use of PuTTY, PSCP, PSFTP and Plink is illegal in countries \ -where encryption is outlawed. We believe it is legal to use PuTTY, PSCP, \ -PSFTP and Plink in England and Wales and in many other countries, but we \ -are not lawyers, and so if in doubt you should seek legal advice before \ -downloading it. You may find useful information at cryptolaw.org, which \ -collects information on cryptography laws in many countries, but we can't \ -vouch for its correctness. \ -Use of the Telnet-only binary (PuTTYtel) is unrestricted by any \ -cryptography laws." -HOMEPAGE="https://www.chiark.greenend.org.uk/~sgtatham/putty/" -COPYRIGHT="1997-2017 Simon Tatham et al." -LICENSE="MIT" -REVISION="1" -SOURCE_URI="https://the.earth.li/~sgtatham/putty/latest/putty-$portVersion.tar.gz" -CHECKSUM_SHA256="bb8aa49d6e96c5a8e18a057f3150a1695ed99a24eef699e783651d1f24e7b0be" -PATCHES="putty-$portVersion.patchset" - -ARCHITECTURES="all" - -PROVIDES=" - putty - cmd:plink - cmd:pscp - cmd:psftp - cmd:puttygen - " -REQUIRES=" - haiku - " - -BUILD_REQUIRES=" - haiku_devel - " -BUILD_PREREQUIRES=" - cmd:aclocal - cmd:autoconf - cmd:awk - cmd:gcc - cmd:make - " - -BUILD() -{ - autoreconf - ./configure --bindir=$binDir --mandir=$manDir - make $jobArgs -} - -INSTALL() -{ - make install -} diff --git a/net-misc/putty/putty-0.77.recipe b/net-misc/putty/putty-0.77.recipe new file mode 100644 index 000000000..814d5d3be --- /dev/null +++ b/net-misc/putty/putty-0.77.recipe @@ -0,0 +1,83 @@ +SUMMARY="A Free Telnet/SSH Client" +DESCRIPTION="PPuTTY is a free implementation of SSH and Telnet for Windows \ +and Unix platforms, along with an xterm terminal emulator.\ +LEGAL WARNING: Use of PuTTY, PSCP, PSFTP and Plink is illegal in countries \ +where encryption is outlawed. We believe it is legal to use PuTTY, PSCP, \ +PSFTP and Plink in England and Wales and in many other countries, but we \ +are not lawyers, and so if in doubt you should seek legal advice before \ +downloading it. You may find useful information at cryptolaw.org, which \ +collects information on cryptography laws in many countries, but we can't \ +vouch for its correctness. \ +Use of the Telnet-only binary (PuTTYtel) is unrestricted by any \ +cryptography laws." +HOMEPAGE="https://www.chiark.greenend.org.uk/~sgtatham/putty/" +COPYRIGHT="1997-2022 Simon Tatham et al." +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://the.earth.li/~sgtatham/putty/$portVersion/putty-$portVersion.tar.gz" +CHECKSUM_SHA256="419a76f45238fd45f2c76b42438993056e74fa78374f136052aaa843085beae5" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + putty$secondaryArchSuffix = $portVersion + cmd:pageant + cmd:plink + cmd:pscp + cmd:psftp + cmd:psusan + cmd:pterm + cmd:putty + cmd:puttygen + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libatk_1.0$secondaryArchSuffix + lib:libcairo$secondaryArchSuffix + lib:libgdk_pixbuf_2.0$secondaryArchSuffix + lib:libglib_2.0$secondaryArchSuffix + lib:libgtk_3$secondaryArchSuffix + lib:libharfbuzz$secondaryArchSuffix + lib:libintl$secondaryArchSuffix + lib:libpango_1.0$secondaryArchSuffix + lib:libX11$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libgtk_3${secondaryArchSuffix} + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +defineDebugInfoPackage putty$secondaryArchSuffix \ + "$prefix"/bin/pageant \ + "$prefix"/bin/plink \ + "$prefix"/bin/pscp \ + "$prefix"/bin/psftp \ + "$prefix"/bin/psusan \ + "$prefix"/bin/pterm \ + "$prefix"/bin/putty \ + "$prefix"/bin/puttygen + +BUILD() +{ + cmake . $cmakeDirArgs \ + -DCMAKE_EXE_LINKER_FLAGS="-lnetwork" \ + -DCMAKE_BUILD_TYPE=Release + make $jobArgs +} + +INSTALL() +{ + make install + + if [ $effectiveTargetArchitecture = x86 ]; then + mv $binDir/* $prefix/bin/ + fi +}