pkgsrc/emulators/dynamips/patches/patch-aa
markd 41838bcc4d Update dynamips to 0.2.8-RC2 (from 2007)
0.2.8-RC2
* mainly a bug fix release
0.2.8-RC1
* hypervisor control protocol has been modified
* Support of the Cisco 1700 platforms, with WIC-1T, WIC-2T and
  WIC-1ENET cards
* Support of WIC-1T and WIC-2T for the 2600, 2691, 3725 and 3745.
* Support of NM-NAM and NM-CIDS interfaces.
* Plugin system
* Bug fixes.
2010-02-05 20:10:42 +00:00

51 lines
1.4 KiB
Text

$NetBSD: patch-aa,v 1.3 2010/02/05 20:10:42 markd Exp $
--- Makefile.orig 2007-10-14 08:43:07.000000000 +0000
+++ Makefile
@@ -3,7 +3,19 @@
# Replace x86 by amd64 for a build on x86_64.
# Use "nojit" for architectures that are not x86 or x86_64.
-DYNAMIPS_ARCH?=x86
+ifeq ($(shell uname -m), i386)
+ DYNAMIPS_ARCH?=x86
+else
+ifeq ($(shell uname -m), i686)
+ DYNAMIPS_ARCH?=x86
+else
+ifeq ($(shell uname -m), amd64)
+ DYNAMIPS_ARCH?=amd64
+else
+ DYNAMIPS_ARCH?=nojit
+endif
+endif
+endif
# Change this to 0 if your system doesn't support RFC 2553 extensions
HAS_RFC2553?=1
@@ -54,6 +66,16 @@ ifeq ($(shell uname), FreeBSD)
$(PTHREAD_CFLAGS) -D_FILE_OFFSET_BITS=64
LIBS=-L$(LOCALBASE)/lib -L. -ldl -lelf $(PTHREAD_LIBS) $(LDFLAGS)
else
+ifeq ($(shell uname -s), NetBSD)
+ PTHREAD_LIBS?=-pthread
+ CFLAGS+=-I${LOCALBASE}/include -I${LOCALBASE}/include/libelf ${PTHREAD_CFLAGS}
+ LIBS=-L${LOCALBASE}/lib -lelf ${PTHREAD_LIBS} ${PTHREAD_LDFLAGS} -R${LOCALBASE}/lib
+else
+ifeq ($(shell uname -s), DragonFly)
+ PTHREAD_LIBS?=-pthread
+ CFLAGS+=-I${LOCALBASE}/include -I${LOCALBASE}/include/libelf ${PTHREAD_CFLAGS}
+ LIBS=-L${LOCALBASE}/lib -lelf ${PTHREAD_LIBS} ${PTHREAD_LDFLAGS} -R${LOCALBASE}/lib
+else
ifeq ($(shell uname), Linux)
PTHREAD_LIBS?=-lpthread
# PCAP_LIB=-lpcap
@@ -85,6 +107,8 @@ endif
endif
endif
endif
+endif
+endif
PROG=dynamips$(BIN_EXT)
PACKAGE=$(PROG)-$(VERSION)