From 6d7cdc135f27cec1ff013936d53bc7df7b5b8aee Mon Sep 17 00:00:00 2001 From: Olivier Cochard Date: Thu, 27 Apr 2017 09:43:41 +0000 Subject: [PATCH] Update to 0.2.16 and fix tap interface usage. PR: 218893 Submitted by: olivier Approved by: pavelivolkov@gmail.com (maintainer) Sponsored by: Orange --- emulators/dynamips-community/Makefile | 7 +++---- emulators/dynamips-community/distinfo | 5 +++-- .../dynamips-community/files/patch-CMakeLists.txt | 11 +++++++++++ .../files/patch-common_net__io.c | 15 +++++++++++++++ 4 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 emulators/dynamips-community/files/patch-CMakeLists.txt create mode 100644 emulators/dynamips-community/files/patch-common_net__io.c diff --git a/emulators/dynamips-community/Makefile b/emulators/dynamips-community/Makefile index fcb100ef677d..789315c16794 100644 --- a/emulators/dynamips-community/Makefile +++ b/emulators/dynamips-community/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= dynamips -PORTVERSION= 0.2.15 +PORTVERSION= 0.2.16 DISTVERSIONPREFIX= v CATEGORIES= emulators PKGNAMESUFFIX= -community @@ -12,8 +12,7 @@ COMMENT= Cisco 1700/2600/3600/3700/7200 Simulator LICENSE= GPLv2 -LIB_DEPENDS= libelf.so:devel/libelf \ - libuuid.so:misc/e2fsprogs-libuuid +LIB_DEPENDS= libelf.so:devel/libelf CFLAGS+= -I${PREFIX}/include/libelf @@ -55,7 +54,7 @@ do-install: ${INSTALL_MAN} ${WRKSRC}/man/hypervisor_mode.7 ${STAGEDIR}${MANPREFIX}/man/man7 @${MKDIR} ${STAGEDIR}${DOCSDIR} -.for file in README README.hypervisor RELEASE-NOTES ChangeLog MAINTAINERS +.for file in README.md README.hypervisor RELEASE-NOTES ChangeLog MAINTAINERS ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR} .endfor diff --git a/emulators/dynamips-community/distinfo b/emulators/dynamips-community/distinfo index bdabff4725ca..f51007057f1e 100644 --- a/emulators/dynamips-community/distinfo +++ b/emulators/dynamips-community/distinfo @@ -1,2 +1,3 @@ -SHA256 (GNS3-dynamips-v0.2.15_GH0.tar.gz) = 4f77a88470069dccab391ce786b633061511593efbd0a9b895e5711325eceb36 -SIZE (GNS3-dynamips-v0.2.15_GH0.tar.gz) = 839493 +TIMESTAMP = 1493198102 +SHA256 (GNS3-dynamips-v0.2.16_GH0.tar.gz) = 0fcf18d701898a77cb589bd9bad16dde436ac1ccb87516fefe07d09de1a196c0 +SIZE (GNS3-dynamips-v0.2.16_GH0.tar.gz) = 832173 diff --git a/emulators/dynamips-community/files/patch-CMakeLists.txt b/emulators/dynamips-community/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..3ace96c86f93 --- /dev/null +++ b/emulators/dynamips-community/files/patch-CMakeLists.txt @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2016-03-16 09:05:47 UTC ++++ CMakeLists.txt +@@ -32,7 +32,7 @@ include ( utils ) + include ( dependencies ) + include ( configure ) + +-if(APPLE) ++if( APPLE OR (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") ) + include_directories(include /usr/local/include/) + include_directories(include /opt/local/include/) + endif() diff --git a/emulators/dynamips-community/files/patch-common_net__io.c b/emulators/dynamips-community/files/patch-common_net__io.c new file mode 100644 index 000000000000..d0e2daa11dce --- /dev/null +++ b/emulators/dynamips-community/files/patch-common_net__io.c @@ -0,0 +1,15 @@ +--- common/net_io.c.orig 2016-03-16 09:05:47 UTC ++++ common/net_io.c +@@ -609,9 +609,11 @@ static int netio_tap_open(char *tap_devn + return(fd); + #else + int i,fd = -1; ++ char tap_fullname[NETIO_DEV_MAXLEN]; + + if (*tap_devname) { +- fd = open(tap_devname,O_RDWR); ++ snprintf(tap_fullname,NETIO_DEV_MAXLEN,"/dev/%s",tap_devname); ++ fd = open(tap_fullname,O_RDWR); + } else { + for(i=0;i<16;i++) { + snprintf(tap_devname,NETIO_DEV_MAXLEN,"/dev/tap%d",i);