diff options
author | fhajny <fhajny@pkgsrc.org> | 2016-04-11 11:32:22 +0000 |
---|---|---|
committer | fhajny <fhajny@pkgsrc.org> | 2016-04-11 11:32:22 +0000 |
commit | 210f72b4d3f790214423654938fa823aab461ef9 (patch) | |
tree | 065ecf7529437a29a6466e67d46b14e8aa2e1114 /net | |
parent | 650bdc2aa69c611901f4404ab626879ced14c324 (diff) | |
download | pkgsrc-210f72b4d3f790214423654938fa823aab461ef9.tar.gz |
Import libtelnet-0.21 as net/libtelnet.
libtelnet provides safe and correct handling of the core TELNET
protocol. In addition to the base TELNET protocol, libtelnet also
implements the Q method of TELNET option negotiation. libtelnet
can be used for writing servers, clients, or proxies.
Diffstat (limited to 'net')
-rw-r--r-- | net/libtelnet/DESCR | 4 | ||||
-rw-r--r-- | net/libtelnet/Makefile | 26 | ||||
-rw-r--r-- | net/libtelnet/PLIST | 10 | ||||
-rw-r--r-- | net/libtelnet/distinfo | 8 | ||||
-rw-r--r-- | net/libtelnet/patches/patch-configure.ac | 14 | ||||
-rw-r--r-- | net/libtelnet/patches/patch-util_telnet-client.c | 22 |
6 files changed, 84 insertions, 0 deletions
diff --git a/net/libtelnet/DESCR b/net/libtelnet/DESCR new file mode 100644 index 00000000000..bc5301a9954 --- /dev/null +++ b/net/libtelnet/DESCR @@ -0,0 +1,4 @@ +libtelnet provides safe and correct handling of the core TELNET +protocol. In addition to the base TELNET protocol, libtelnet also +implements the Q method of TELNET option negotiation. libtelnet +can be used for writing servers, clients, or proxies. diff --git a/net/libtelnet/Makefile b/net/libtelnet/Makefile new file mode 100644 index 00000000000..be11dedc004 --- /dev/null +++ b/net/libtelnet/Makefile @@ -0,0 +1,26 @@ +# $NetBSD: Makefile,v 1.1 2016/04/11 11:32:22 fhajny Exp $ + +DISTNAME= libtelnet-0.21 +CATEGORIES= net +MASTER_SITES= ${MASTER_SITE_GITHUB:=seanmiddleditch/} + +MAINTAINER= filip@joyent.com +HOMEPAGE= http://github.com/seanmiddleditch/libtelnet/ +COMMENT= RFC-complient TELNET implementation as a C library +LICENSE= mit + +USE_LIBTOOL= yes +USE_TOOLS+= autoconf automake pkg-config +GNU_CONFIGURE= yes + +# __EXTENSIONS__ needed by patch-util_telnet-client.c +CPPFLAGS.SunOS+= -D__EXTENSIONS__ +LIBS.SunOS+= -lnsl -lsocket + +PKGCONFIG_OVERRIDE+= libtelnet.pc.in + +pre-configure: + cd ${WRKSRC} && autoreconf -i + +.include "../../devel/zlib/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/net/libtelnet/PLIST b/net/libtelnet/PLIST new file mode 100644 index 00000000000..dce6b8c8cd6 --- /dev/null +++ b/net/libtelnet/PLIST @@ -0,0 +1,10 @@ +@comment $NetBSD: PLIST,v 1.1 2016/04/11 11:32:22 fhajny Exp $ +bin/telnet-chatd +bin/telnet-client +bin/telnet-proxy +include/libtelnet.h +lib/libtelnet.la +lib/pkgconfig/libtelnet.pc +man/man1/telnet-chatd.1 +man/man1/telnet-client.1 +man/man1/telnet-proxy.1 diff --git a/net/libtelnet/distinfo b/net/libtelnet/distinfo new file mode 100644 index 00000000000..10320f22b9f --- /dev/null +++ b/net/libtelnet/distinfo @@ -0,0 +1,8 @@ +$NetBSD: distinfo,v 1.1 2016/04/11 11:32:22 fhajny Exp $ + +SHA1 (libtelnet-0.21.tar.gz) = 2101bb5689b77ae8562b07b8364e208a62d4e6f3 +RMD160 (libtelnet-0.21.tar.gz) = 81fe34610211ab5c794aea4c5e9268d275b6633a +SHA512 (libtelnet-0.21.tar.gz) = 69dc0ac4741c81d932136cd736b48a11a05cd2738da6255d6050844f50a2f16c575c747e5c758bbdbc6b1e3309ce02e4979f0002b40fed32a3711aa8f22e04f1 +Size (libtelnet-0.21.tar.gz) = 240486 bytes +SHA1 (patch-configure.ac) = 9b29ea8995eefbfbe786c9217089577d9de9850d +SHA1 (patch-util_telnet-client.c) = 0486e3b6f6d900153f449ccc24024e3915761e54 diff --git a/net/libtelnet/patches/patch-configure.ac b/net/libtelnet/patches/patch-configure.ac new file mode 100644 index 00000000000..bcb1b51b9b5 --- /dev/null +++ b/net/libtelnet/patches/patch-configure.ac @@ -0,0 +1,14 @@ +$NetBSD: patch-configure.ac,v 1.1 2016/04/11 11:32:22 fhajny Exp $ + +Backport autoconf 2.6.x fix from trunk (574eef9) + +--- configure.ac.orig 2012-03-18 21:07:49.000000000 +0000 ++++ configure.ac +@@ -8,6 +8,7 @@ AC_CONFIG_HEADERS([config.h]) + AC_CONFIG_MACRO_DIR([m4]) + AC_CONFIG_SRCDIR([libtelnet.c]) + AM_INIT_AUTOMAKE([1.9 foreign -Wall -Werror subdir-objects]) ++AM_PROG_AR + #LT_INIT([win32-dll]) + AC_LIBTOOL_WIN32_DLL + diff --git a/net/libtelnet/patches/patch-util_telnet-client.c b/net/libtelnet/patches/patch-util_telnet-client.c new file mode 100644 index 00000000000..fcac1b6b137 --- /dev/null +++ b/net/libtelnet/patches/patch-util_telnet-client.c @@ -0,0 +1,22 @@ +$NetBSD: patch-util_telnet-client.c,v 1.1 2016/04/11 11:32:22 fhajny Exp $ + +Provide workaround for a non-POSIX cfmakeraw call. + +--- util/telnet-client.c.orig 2012-03-18 21:07:49.000000000 +0000 ++++ util/telnet-client.c +@@ -199,7 +199,15 @@ int main(int argc, char **argv) { + tcgetattr(STDOUT_FILENO, &orig_tios); + atexit(_cleanup); + tios = orig_tios; ++#ifdef __sun ++ tios.c_iflag &= ~(IMAXBEL|IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); ++ tios.c_oflag &= ~OPOST; ++ tios.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); ++ tios.c_cflag &= ~(CSIZE|PARENB); ++ tios.c_cflag |= CS8; ++#else + cfmakeraw(&tios); ++#endif + tcsetattr(STDOUT_FILENO, TCSADRAIN, &tios); + + /* set input echoing on by default */ |