svn commit: r425062 - in head/devel: . libtuntap libtuntap/files

Jan Beich jbeich at FreeBSD.org
Tue Nov 1 17:46:54 UTC 2016


Author: jbeich
Date: Tue Nov  1 17:46:52 2016
New Revision: 425062
URL: https://svnweb.freebsd.org/changeset/ports/425062

Log:
  devel/libtuntap: add new port
  
  PR:		213956
  Submitted by:	Mahdi Mokhtari <mokhi64 at gmail.com>
  
  libtuntap is a library for configuring TUN or TAP devices in a portable manner.
  
  TUN and TAP are virtual networking devices which allow
  userland applications to receive packets sent to it.
  
  The userland applications can also send their own packets to the devices
  and they will be forwarded to the kernel.
  
  https://github.com/LaKabane/libtuntap

Added:
  head/devel/libtuntap/
  head/devel/libtuntap/Makefile   (contents, props changed)
  head/devel/libtuntap/distinfo   (contents, props changed)
  head/devel/libtuntap/files/
  head/devel/libtuntap/files/patch-CMakeLists.txt   (contents, props changed)
  head/devel/libtuntap/files/patch-bindings_cpp_tuntap++.cc   (contents, props changed)
  head/devel/libtuntap/pkg-descr   (contents, props changed)
  head/devel/libtuntap/pkg-plist   (contents, props changed)
Modified:
  head/devel/Makefile   (contents, props changed)

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Tue Nov  1 17:37:54 2016	(r425061)
+++ head/devel/Makefile	Tue Nov  1 17:46:52 2016	(r425062)
@@ -1404,6 +1404,7 @@
     SUBDIR += libtifiles2
     SUBDIR += libtool
     SUBDIR += libtpl
+    SUBDIR += libtuntap
     SUBDIR += libublio
     SUBDIR += libukcprog
     SUBDIR += libunicode

Added: head/devel/libtuntap/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libtuntap/Makefile	Tue Nov  1 17:46:52 2016	(r425062)
@@ -0,0 +1,32 @@
+# Created by: Mahdi Mokhtari <mokhi64 at gmail.com>
+# $FreeBSD$
+
+PORTNAME=	libtuntap
+DISTVERSION=	0.3-23
+DISTVERSIONSUFFIX=	-ga8bcade
+CATEGORIES=	devel net
+
+MAINTAINER=	mokhi64 at gmail.com
+COMMENT=	Configuring TUN or TAP devices API in a portable manner
+
+LICENSE=	MIT
+
+USES=		cmake
+USE_LDCONFIG=	yes
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	LaKabane
+
+OPTIONS_DEFINE=	CXX_WRPR TEST
+OPTIONS_SUB=	yes
+
+CXX_WRPR_DESC=	Build C++ wrapper library
+TEST_DESC=	Build regression tests
+
+CXX_WRPR_USES=		compiler:c++11-lang
+CXX_WRPR_CMAKE_BOOL=	ENABLE_CXX
+CXX_WRPR_VARS=		USE_CXXSTD=c++11
+TEST_CMAKE_BOOL=	ENABLE_REGRESS
+TEST_TEST_TARGET=	test
+
+.include <bsd.port.mk>

Added: head/devel/libtuntap/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libtuntap/distinfo	Tue Nov  1 17:46:52 2016	(r425062)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1477977157
+SHA256 (LaKabane-libtuntap-0.3-23-ga8bcade_GH0.tar.gz) = 3f2db000fa77a91ef056d996c763f7e1fc18c3529847308025629ea047d56a1d
+SIZE (LaKabane-libtuntap-0.3-23-ga8bcade_GH0.tar.gz) = 22262

Added: head/devel/libtuntap/files/patch-CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libtuntap/files/patch-CMakeLists.txt	Tue Nov  1 17:46:52 2016	(r425062)
@@ -0,0 +1,14 @@
+--- CMakeLists.txt.orig	2016-10-29 14:49:34 UTC
++++ CMakeLists.txt
+@@ -124,6 +124,11 @@ if(UNIX)
+ 	install(TARGETS tuntap DESTINATION lib)
+ 	install(TARGETS tuntap-static DESTINATION lib)
+ 	install(FILES tuntap.h DESTINATION include)
++	if(ENABLE_CXX)
++		install(TARGETS tuntap++ DESTINATION lib)
++		install(TARGETS tuntap++-static DESTINATION lib)
++		install(FILES bindings/cpp/tuntap++.hh DESTINATION include)
++	endif(ENABLE_CXX)
+ endif(UNIX)
+ 
+ include(CMakeLists.txt.local OPTIONAL)

Added: head/devel/libtuntap/files/patch-bindings_cpp_tuntap++.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libtuntap/files/patch-bindings_cpp_tuntap++.cc	Tue Nov  1 17:46:52 2016	(r425062)
@@ -0,0 +1,20 @@
+--- bindings/cpp/tuntap++.cc.orig	2016-10-29 14:49:34 UTC
++++ bindings/cpp/tuntap++.cc
+@@ -7,7 +7,7 @@
+ namespace tuntap {
+ 
+ tun::tun()
+-    : _dev{tuntap_init()}
++    : _dev(tuntap_init())
+ {
+     tuntap_start(_dev, TUNTAP_MODE_TUNNEL, TUNTAP_ID_ANY);
+ }
+@@ -84,7 +84,7 @@ tun::nonblocking(bool b)
+ }
+ 
+ tap::tap()
+-    : _dev{tuntap_init()}
++    : _dev(tuntap_init())
+ {
+     tuntap_start(_dev, TUNTAP_MODE_ETHERNET, TUNTAP_ID_ANY);
+ }

Added: head/devel/libtuntap/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libtuntap/pkg-descr	Tue Nov  1 17:46:52 2016	(r425062)
@@ -0,0 +1,9 @@
+libtuntap is a library for configuring TUN or TAP devices in a portable manner.
+
+TUN and TAP are virtual networking devices which allow
+userland applications to receive packets sent to it.
+
+The userland applications can also send their own packets to the devices
+and they will be forwarded to the kernel.
+
+WWW: https://github.com/LaKabane/libtuntap

Added: head/devel/libtuntap/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libtuntap/pkg-plist	Tue Nov  1 17:46:52 2016	(r425062)
@@ -0,0 +1,8 @@
+include/tuntap.h
+%%CXX_WRPR%%include/tuntap++.hh
+lib/libtuntap.a
+lib/libtuntap.so
+lib/libtuntap.so.2.1
+%%CXX_WRPR%%lib/libtuntap++.a
+%%CXX_WRPR%%lib/libtuntap++.so
+%%CXX_WRPR%%lib/libtuntap++.so.2.1


More information about the svn-ports-all mailing list