aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emulators/qemu-devel/Makefile19
-rw-r--r--emulators/qemu-devel/distinfo16
-rw-r--r--emulators/qemu-devel/files/gns3-qemu-options.hx.patch11
-rw-r--r--emulators/qemu-devel/files/pcap-client-type.sed2
-rw-r--r--emulators/qemu-devel/files/pcap-patch12
5 files changed, 44 insertions, 16 deletions
diff --git a/emulators/qemu-devel/Makefile b/emulators/qemu-devel/Makefile
index 166aa463bfb7..559f04333860 100644
--- a/emulators/qemu-devel/Makefile
+++ b/emulators/qemu-devel/Makefile
@@ -13,7 +13,10 @@ MASTER_SITES= SAVANNAH:release \
MASTER_SITE_SUBDIR= qemu/:release nox/:snapshot
PKGNAMESUFFIX= -devel
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:release
-DIST_SUBDIR= qemu
+DIST_SUBDIR= qemu/${PORTVERSION}
+
+PATCH_SITES= http://code.gns3.net/qemu-patches/raw-file/0b69b9be6a8e/
+PATCH_DIST_STRIP= -p1
MAINTAINER= nox@FreeBSD.org
COMMENT= QEMU CPU Emulator - development version
@@ -33,8 +36,9 @@ OPTIONS= SAMBA "samba dependency (for -smb)" Off \
SDL "SDL/X dependency (graphical output)" On \
GNUTLS "gnutls dependency (vnc encryption)" On \
CURL "libcurl dependency (remote images)" On \
- PCAP "pcap dependency (networking with bpf)" On \
CDROM_DMA "IDE CDROM DMA" On \
+ PCAP "pcap dependency (networking with bpf)" On \
+ GNS3 "gns3 patches (udp, promiscuous multicast)" Off \
ADD_AUDIO "Emulate more audio hardware (experimental!)" Off \
ALL_TARGETS "Also build bsd-user targets (for testing)" Off
@@ -50,6 +54,16 @@ IGNORE= bsd-user targets not tested on sparc64
.endif
.endif
+.if defined(WITH_GNS3)
+PATCHFILES+= hw_e1000_c.patch
+PATCHFILES+= net_c.patch
+PATCHFILES+= net_h.patch
+PATCHFILES+= net_udp_c.patch
+PATCHFILES+= net_udp_h.patch
+PATCHFILES+= Makefile_objs.patch
+EXTRA_PATCHES+= ${FILESDIR}/gns3-qemu-options.hx.patch
+.endif
+
WITHOUT_CPU_CFLAGS=yes #to avoid problems with register allocation
CFLAGS:= ${CFLAGS:C/-fno-tree-vrp//}
CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC} --enable-docs \
@@ -132,6 +146,7 @@ post-patch:
.if defined(WITH_PCAP)
@cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/pcap-patch
+ @${REINPLACE_CMD} -f ${FILESDIR}/pcap-client-type.sed ${WRKSRC}/net.h
.endif
.if defined(WITHOUT_CDROM_DMA)
@cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/cdrom-dma-patch
diff --git a/emulators/qemu-devel/distinfo b/emulators/qemu-devel/distinfo
index 3e099794638b..9aece31ab509 100644
--- a/emulators/qemu-devel/distinfo
+++ b/emulators/qemu-devel/distinfo
@@ -1,2 +1,14 @@
-SHA256 (qemu/qemu-0.14.1.tar.gz) = 33ceae3fbe516f2cbb151dc98d16c8ccfec74b1056674ad715e75a2f7fed45c3
-SIZE (qemu/qemu-0.14.1.tar.gz) = 5439697
+SHA256 (qemu/0.14.1/qemu-0.14.1.tar.gz) = 33ceae3fbe516f2cbb151dc98d16c8ccfec74b1056674ad715e75a2f7fed45c3
+SIZE (qemu/0.14.1/qemu-0.14.1.tar.gz) = 5439697
+SHA256 (qemu/0.14.1/hw_e1000_c.patch) = a9c8f29b8493ac62526b2ed4078b3e69c8e9c709a049f4fa11765ce37067e5a5
+SIZE (qemu/0.14.1/hw_e1000_c.patch) = 407
+SHA256 (qemu/0.14.1/net_c.patch) = 612f443bcfd37c921c973e904b527688ec1bee0ef6fc43f994ef41ff5a737a49
+SIZE (qemu/0.14.1/net_c.patch) = 1032
+SHA256 (qemu/0.14.1/net_h.patch) = 9b7c38b646c8ac3f1bf39bc627a30c863585efb381988d3e17e3b1190dd475b9
+SIZE (qemu/0.14.1/net_h.patch) = 272
+SHA256 (qemu/0.14.1/net_udp_c.patch) = 6cbe5b229381db94fb6865bb53741217f914749723eea734917143f6db457a51
+SIZE (qemu/0.14.1/net_udp_c.patch) = 4115
+SHA256 (qemu/0.14.1/net_udp_h.patch) = e43853ba86689cb9ace6a177f891ab8536f6fbce21c7e9fa3ee0d5b25c47b463
+SIZE (qemu/0.14.1/net_udp_h.patch) = 1518
+SHA256 (qemu/0.14.1/Makefile_objs.patch) = 7bfed73dfa87b78fd9b3231c1664ff9c871e8b38009b82bf9311573cbb679d58
+SIZE (qemu/0.14.1/Makefile_objs.patch) = 371
diff --git a/emulators/qemu-devel/files/gns3-qemu-options.hx.patch b/emulators/qemu-devel/files/gns3-qemu-options.hx.patch
new file mode 100644
index 000000000000..da8bf2903aa4
--- /dev/null
+++ b/emulators/qemu-devel/files/gns3-qemu-options.hx.patch
@@ -0,0 +1,11 @@
+--- a/qemu-options.hx
++++ b/qemu-options.hx
+@@ -1050,6 +1050,8 @@ DEF("net", HAS_ARG, QEMU_OPTION_net,
+ " connect the user mode network stack to VLAN 'n', configure its\n"
+ " DHCP server and enabled optional services\n"
+ #endif
++ "-net udp[,vlan=n],sport=sport,dport=dport,daddr=host\n"
++ " connect the vlan 'n' to a udp host (for dynamips/pemu/GNS3)\n"
+ #ifdef _WIN32
+ "-net tap[,vlan=n][,name=str],ifname=name\n"
+ " connect the host TAP network interface to VLAN 'n'\n"
diff --git a/emulators/qemu-devel/files/pcap-client-type.sed b/emulators/qemu-devel/files/pcap-client-type.sed
new file mode 100644
index 000000000000..cf593878e5d4
--- /dev/null
+++ b/emulators/qemu-devel/files/pcap-client-type.sed
@@ -0,0 +1,2 @@
+/^ NET_CLIENT_TYPE_DUMP$/i\
+\ NET_CLIENT_TYPE_PCAP,
diff --git a/emulators/qemu-devel/files/pcap-patch b/emulators/qemu-devel/files/pcap-patch
index 137f54e42331..0b9fecc89a39 100644
--- a/emulators/qemu-devel/files/pcap-patch
+++ b/emulators/qemu-devel/files/pcap-patch
@@ -85,18 +85,6 @@
if test "$slirp" = "yes" ; then
echo "CONFIG_SLIRP=y" >> $config_host_mak
QEMU_INCLUDES="-I\$(SRC_PATH)/slirp $QEMU_INCLUDES"
---- net.h.orig 2010-01-29 14:36:00.000000000 -0500
-+++ net.h 2010-01-29 14:36:00.000000000 -0500
-@@ -33,7 +33,8 @@ typedef enum {
- NET_CLIENT_TYPE_TAP,
- NET_CLIENT_TYPE_SOCKET,
- NET_CLIENT_TYPE_VDE,
-- NET_CLIENT_TYPE_DUMP
-+ NET_CLIENT_TYPE_DUMP,
-+ NET_CLIENT_TYPE_PCAP
- } net_client_type;
-
- typedef int (NetCanReceive)(VLANClientState *);
Index: net.c
@@ -37,6 +37,11 @@
#include "qemu_socket.h"