Commit 802925b1 authored by Mike Hibler's avatar Mike Hibler
Browse files

Add libtelnet port (for use by capture).

parent 6209bbbe
# New ports collection makefile for: libtelnet
# Date created: 22 May, 2012
# Whom: testbed-ops@flux.utah.edu
PORTNAME= libtelnet
PORTVERSION= 0.21
CATEGORIES= misc
MASTER_SITES= http://cloud.github.com/downloads/elanthis/libtelnet/ \
${MASTER_SITE_LOCAL}
MAINTAINER= testbed-ops@flux.utah.edu
COMMENT= Library for Telnet protocol
HAS_CONFIGURE= yes
CONFIGURE_ARGS+=--mandir=${MANPREFIX}/man
USE_GMAKE= yes
EXTRA_PATCHES= ${FILESDIR}/no-posix-source
#MAN1= telnet-chatd.1 telnet-client.1 telnet-proxy.1
MAN3= libtelnet.h.3 telnet_environ_t.3 telnet_event_t.3 \
telnet_event_t_compress_t.3 telnet_event_t_data_t.3 \
telnet_event_t_environ_t.3 telnet_event_t_error_t.3 \
telnet_event_t_iac_t.3 telnet_event_t_mssp_t.3 \
telnet_event_t_negotiate_t.3 telnet_event_t_subnegotiate_t.3 \
telnet_event_t_ttype_t.3 telnet_event_t_zmp_t.3 telnet_telopt_t.3
post-patch:
@${REINPLACE_CMD} -e '/^pkgconfigdir =/s|=.*| \
= ${PREFIX}/libdata/pkgconfig|' ${WRKSRC}/Makefile.in
# get rid of the test apps
post-install:
${RM} -f ${PREFIX}/bin/telnet-chatd
${RM} -f ${PREFIX}/bin/telnet-client
${RM} -f ${PREFIX}/bin/telnet-proxy
.include <bsd.port.mk>
SHA1 (libtelnet-0.21.tar.gz) = a86c01d16c84043fc16a3a827fe379f959dad35f
SHA256 (libtelnet-0.21.tar.gz) = 604ee03b5395ebd7a96a0ecc7149f3f25e34cdb48fc1f322724db965809ca797
--- util/telnet-chatd.c.orig 2012-03-18 15:03:53.000000000 -0600
+++ util/telnet-chatd.c 2012-05-22 11:23:44.357954465 -0600
@@ -10,12 +10,14 @@
*/
#if !defined(_WIN32)
+#ifndef __FreeBSD__
# if !defined(_POSIX_SOURCE)
# define _POSIX_SOURCE
# endif
# if !defined(_BSD_SOURCE)
# define _BSD_SOURCE
# endif
+#endif
# include <sys/socket.h>
# include <netinet/in.h>
--- util/telnet-client.c.orig 2012-03-18 15:03:53.000000000 -0600
+++ util/telnet-client.c 2012-05-22 11:23:34.773599943 -0600
@@ -9,12 +9,14 @@
* all present and future rights to this code under copyright law.
*/
+#ifndef __FreeBSD__
#if !defined(_POSIX_SOURCE)
# define _POSIX_SOURCE
#endif
#if !defined(_BSD_SOURCE)
# define _BSD_SOURCE
#endif
+#endif
#include <sys/types.h>
#include <sys/socket.h>
--- util/telnet-proxy.c.orig 2012-03-18 15:03:53.000000000 -0600
+++ util/telnet-proxy.c 2012-05-22 11:24:03.061761513 -0600
@@ -10,12 +10,14 @@
*/
#if !defined(_WIN32)
+#ifndef __FreeBSD__
# if !defined(_POSIX_SOURCE)
# define _POSIX_SOURCE
# endif
# if !defined(_BSD_SOURCE)
# define _BSD_SOURCE
# endif
+#endif
# include <sys/socket.h>
# include <netinet/in.h>
From http://github.com/elanthis/libtelnet#readme:
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.
lib/libtelnet.a
lib/libtelnet.la
lib/libtelnet.so
lib/libtelnet.so.2
libdata/pkgconfig/libtelnet.pc
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment