From 8f92ad8f9f69d3cd6d8d316f6a722d21f4a40d14 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 26 Oct 2014 22:06:53 +0100 Subject: [PATCH] Add recipe for mosh. Untested, my ISP won't let me configure my router today... --- net-misc/mosh/mosh-1.2.4.recipe | 75 +++++++++++++++++++++++ net-misc/mosh/patches/mosh-1.2.4.patchset | 57 +++++++++++++++++ 2 files changed, 132 insertions(+) create mode 100644 net-misc/mosh/mosh-1.2.4.recipe create mode 100644 net-misc/mosh/patches/mosh-1.2.4.patchset diff --git a/net-misc/mosh/mosh-1.2.4.recipe b/net-misc/mosh/mosh-1.2.4.recipe new file mode 100644 index 000000000..0b0d5800f --- /dev/null +++ b/net-misc/mosh/mosh-1.2.4.recipe @@ -0,0 +1,75 @@ +SUMMARY="Remote terminal that supports intermittent connectivity" +DESCRIPTION="Remote terminal application that allows roaming, supports \ +intermittent connectivity, and provides intelligent local echo and line \ +editing of user keystrokes. + +Mosh is a replacement for SSH. It's more robust and responsive, especially \ +over Wi-Fi, cellular, and long-distance links. + +Mosh is free software, available for GNU/Linux, FreeBSD, Solaris, Mac OS X, \ +and Android. +" +HOMEPAGE="https://mosh.mit.edu/" +REVISION="1" +LICENSE="GNU GPL v3" +COPYRIGHT="2012-2013 Keith Winstein" +ARCHITECTURES="x86" +if [ $effectiveTargetArchitecture != x86_gcc2 ]; then + # x86_gcc2 is fine as primary target architecture as long as we're building + # for a different secondary architecture. + ARCHITECTURES="$ARCHITECTURES x86_gcc2" +fi +SECONDARY_ARCHITECTURES="x86" + +SRC_URI="https://mosh.mit.edu/mosh-$portVersion.tar.gz" +CHECKSUM_SHA256="e74d0d323226046e402dd469a176075fc2013b69b0e67cea49762c957175df46" +PATCHES="mosh-1.2.4.patchset" + +PROVIDES=" + mosh$secondaryArchSuffix = $portVersion + cmd:mosh_client + cmd:mosh_server + cmd:mosh +" + +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion + lib:libcrypto$secondaryArchSuffix + lib:libgcc_s$secondaryArchSuffix + lib:libncursesw$secondaryArchSuffix + lib:libprotobuf$secondaryArchSuffix + lib:libssl$secondaryArchSuffix + lib:libstdc++$secondaryArchSuffix + lib:libz$secondaryArchSuffix +" + +BUILD_REQUIRES=" + devel:libncurses$secondaryArchSuffix + devel:libprotoc$secondaryArchSuffix + devel:libssl$secondaryArchSuffix + devel:libz$secondaryArchSuffix +" + +BUILD_PREREQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + cmd:autoconf + cmd:automake + cmd:awk + cmd:find + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix +" + +BUILD() +{ + export LDFLAGS=-lnetwork + ./autogen.sh + runConfigure ./configure --bindir=$prefix/bin + make $jobArgs +} + +INSTALL() +{ + make install +} diff --git a/net-misc/mosh/patches/mosh-1.2.4.patchset b/net-misc/mosh/patches/mosh-1.2.4.patchset new file mode 100644 index 000000000..47063bdfe --- /dev/null +++ b/net-misc/mosh/patches/mosh-1.2.4.patchset @@ -0,0 +1,57 @@ +From e5eb0d16eefdede24baf2ebd76090d85e594f774 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 26 Oct 2014 22:05:31 +0100 +Subject: Fix build on Haiku. + + +diff --git a/src/frontend/Makefile.am b/src/frontend/Makefile.am +index a0345ae..f401017 100644 +--- a/src/frontend/Makefile.am ++++ b/src/frontend/Makefile.am +@@ -1,7 +1,7 @@ + AM_CPPFLAGS = -I$(srcdir)/../statesync -I$(srcdir)/../terminal -I$(srcdir)/../network -I$(srcdir)/../crypto -I../protobufs -I$(srcdir)/../util $(TINFO_CFLAGS) $(protobuf_CFLAGS) $(OPENSSL_CFLAGS) + AM_CXXFLAGS = $(WARNING_CXXFLAGS) $(PICKY_CXXFLAGS) $(HARDEN_CFLAGS) $(MISC_CXXFLAGS) + AM_LDFLAGS = $(HARDEN_LDFLAGS) +-LDADD = ../crypto/libmoshcrypto.a ../network/libmoshnetwork.a ../statesync/libmoshstatesync.a ../terminal/libmoshterminal.a ../util/libmoshutil.a ../protobufs/libmoshprotos.a -lm $(TINFO_LIBS) $(protobuf_LIBS) $(OPENSSL_LIBS) ++LDADD = ../crypto/libmoshcrypto.a ../network/libmoshnetwork.a ../statesync/libmoshstatesync.a ../terminal/libmoshterminal.a ../util/libmoshutil.a ../protobufs/libmoshprotos.a $(TINFO_LIBS) $(protobuf_LIBS) $(OPENSSL_LIBS) + + mosh_server_LDADD = $(LDADD) $(LIBUTIL) + +diff --git a/src/frontend/mosh-server.cc b/src/frontend/mosh-server.cc +index ae2505f..f809cc0 100644 +--- a/src/frontend/mosh-server.cc ++++ b/src/frontend/mosh-server.cc +@@ -41,6 +41,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/src/util/pty_compat.cc b/src/util/pty_compat.cc +index 98fa22a..3bb1c52 100644 +--- a/src/util/pty_compat.cc ++++ b/src/util/pty_compat.cc +@@ -39,7 +39,9 @@ + #include + #include + #include ++#ifndef __HAIKU__ + #include ++#endif + #include + + #include "pty_compat.h" +@@ -92,7 +94,7 @@ pid_t my_forkpty( int *amaster, char *name, + return -1; + } + +-#ifndef _AIX ++#if !defined(_AIX) && !defined(__HAIKU__) + if ( ioctl(slave, I_PUSH, "ptem") < 0 || + ioctl(slave, I_PUSH, "ldterm") < 0 ) { + perror( "ioctl(I_PUSH)" ); +-- +1.8.3.4 +