From de95d18b5c4456b8757087933ee1dc81c1a6d484 Mon Sep 17 00:00:00 2001 From: Max Khon Date: Wed, 8 Mar 2006 16:55:26 +0000 Subject: - Update to 0.2.4 - Fix build on ia64 - Fix m_memalign for jemalloc - Set DYNAMIPS_ARCH on non-i386 properly Approved by: portmgr --- emulators/dynamips/Makefile | 8 +++- emulators/dynamips/distinfo | 6 +-- emulators/dynamips/files/patch-Makefile | 85 ++++++++------------------------- emulators/dynamips/files/patch-utils.c | 11 +++++ emulators/dynamips/files/patch-utils.h | 11 +++++ 5 files changed, 51 insertions(+), 70 deletions(-) create mode 100644 emulators/dynamips/files/patch-utils.c create mode 100644 emulators/dynamips/files/patch-utils.h (limited to 'emulators/dynamips') diff --git a/emulators/dynamips/Makefile b/emulators/dynamips/Makefile index 2b57cfc864f4..94273055cecc 100644 --- a/emulators/dynamips/Makefile +++ b/emulators/dynamips/Makefile @@ -6,7 +6,7 @@ # PORTNAME= dynamips -PORTVERSION= 0.2.3c +PORTVERSION= 0.2.4 CATEGORIES= emulators MASTER_SITES= http://www.ipflow.utc.fr/dynamips/ @@ -47,7 +47,11 @@ DYNAMIPS_ARCH= "nojit" .if ${OSVERSION} < 600029 # # Requires libpcap 0.9+ -MAKE_ENV= HAS_PCAP=0 +MAKE_ENV+= HAS_PCAP=0 +.endif + +.if ${OSVERSION} >= 700013 +MAKE_ENV+= HAS_POSIX_MEMALIGN=1 .endif .include diff --git a/emulators/dynamips/distinfo b/emulators/dynamips/distinfo index 9de23669370a..4a69aaf7c8e1 100644 --- a/emulators/dynamips/distinfo +++ b/emulators/dynamips/distinfo @@ -1,3 +1,3 @@ -MD5 (dynamips-0.2.3c.tar.gz) = 0202d82ee8f8879f84f3f03579d6a5ef -SHA256 (dynamips-0.2.3c.tar.gz) = d7fb998c3bc6d5aaec10acdaab6d2ba5d5a5c5dd17cb92cd3a4452d94e29d5bf -SIZE (dynamips-0.2.3c.tar.gz) = 185450 +MD5 (dynamips-0.2.4.tar.gz) = 7b5ba42bbb466cb057bba1bc855476a9 +SHA256 (dynamips-0.2.4.tar.gz) = c29154224d87bd5e73cb89a0c4ab96e64a67328fdbd15bfa36afafe0240e6c1d +SIZE (dynamips-0.2.4.tar.gz) = 193988 diff --git a/emulators/dynamips/files/patch-Makefile b/emulators/dynamips/files/patch-Makefile index 5efe9c99054e..42cbc60faef4 100644 --- a/emulators/dynamips/files/patch-Makefile +++ b/emulators/dynamips/files/patch-Makefile @@ -1,76 +1,31 @@ ---- Makefile.orig Thu Feb 2 00:08:41 2006 -+++ Makefile Tue Feb 14 01:53:31 2006 -@@ -3,26 +3,26 @@ - - # Replace x86 by amd64 for a build on x86_64. - # Use "nojit" for architectures that are not x86 or x86_64. --ARCH=x86 -+DYNAMIPS_ARCH?=x86 - - # Change this to 0 if your system doesn't support RFC 2553 extensions - HAS_RFC2553=1 - - # Change this to 1 if your system has libpcap-0.9.4 or better +--- Makefile.orig Tue Feb 14 23:54:17 2006 ++++ Makefile Wed Mar 8 22:54:11 2006 +@@ -12,6 +12,9 @@ # (WinPcap is used for Cygwin) --HAS_PCAP=1 -+HAS_PCAP?=1 + HAS_PCAP?=1 ++# Change this to 1 if your system has posix_memalign ++HAS_POSIX_MEMALIGN?=0 ++ # Current dynamips release - VERSION=0.2.3c + VERSION=0.2.4 --CC=gcc -+CC?=gcc - LD=ld - RM=rm - TAR=tar - CP=cp - LEX=flex --ARCH_INC_FILE=\"$(ARCH)_trans.h\" --CFLAGS=-g -Wall -O3 -fomit-frame-pointer -DJIT_ARCH=\"$(ARCH)\" \ -+ARCH_INC_FILE=\"$(DYNAMIPS_ARCH)_trans.h\" -+CFLAGS+=-g -Wall -O3 -fomit-frame-pointer -DJIT_ARCH=\"$(DYNAMIPS_ARCH)\" \ - -DARCH_INC_FILE=$(ARCH_INC_FILE) \ +@@ -25,14 +28,15 @@ + CFLAGS+=-g -Wall -O3 -fomit-frame-pointer -DJIT_ARCH=\"$(DYNAMIPS_ARCH)\" \ + -DARCH_INC_FILE=$(ARCH_INC_FILE) -DDYNAMIPS_VERSION=\"$(VERSION)\" \ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE \ - -DHAS_RFC2553=$(HAS_RFC2553) -@@ -30,8 +30,9 @@ +- -DHAS_RFC2553=$(HAS_RFC2553) ++ -DHAS_RFC2553=$(HAS_RFC2553) -DHAS_POSIX_MEMALIGN=$(HAS_POSIX_MEMALIGN) + PCAP_LIB=-lpcap ifeq ($(shell uname), FreeBSD) -- CFLAGS+=-I/usr/local/include -I/usr/local/include/libelf -- LIBS=-L/usr/local/lib -L. -lelf -pthread -+ PTHREAD_LIBS?=-pthread -+ CFLAGS+=-I/usr/local/include -I/usr/local/include/libelf $(PTHREAD_CFLAGS) -+ LIBS=-L/usr/local/lib -L. -lelf $(PTHREAD_LIBS) + PTHREAD_LIBS?=-pthread +- CFLAGS+=-I/usr/local/include -I/usr/local/include/libelf $(PTHREAD_CFLAGS) +- LIBS=-L/usr/local/lib -L. -lelf $(PTHREAD_LIBS) ++ LOCALBASE?=/usr/local ++ CFLAGS+=-I$(LOCALBASE)/include -I$(LOCALBASE)/include/libelf $(PTHREAD_CFLAGS) ++ LIBS=-L$(LOCALBASE)/lib -L. -lelf $(PTHREAD_LIBS) else ifeq ($(shell uname -s), Darwin) CFLAGS+=-I/usr/local/include -@@ -73,17 +74,17 @@ - #SOURCES += profiler.c - #CFLAGS += -p -DPROFILE -DPROFILE_FILE=\"$(PROG).profile\" - --ifeq ($(ARCH),x86) -+ifeq ($(DYNAMIPS_ARCH),x86) - HDR += x86-codegen.h x86_trans.h - SOURCES += x86_trans.c - endif - --ifeq ($(ARCH),amd64) -+ifeq ($(DYNAMIPS_ARCH),amd64) - HDR += x86-codegen.h amd64-codegen.h amd64_trans.h - SOURCES += amd64_trans.c - endif - --ifeq ($(ARCH),nojit) -+ifeq ($(DYNAMIPS_ARCH),nojit) - HDR += nojit_trans.h - SOURCES += nojit_trans.c - endif -@@ -123,7 +124,7 @@ - - .PHONY: microcode - microcode: -- @$(CC) -Wall -o rom2c rom2c.c $(LIBS) -+ @$(CC) -Wall $(CFLAGS) -o rom2c rom2c.c $(LIBS) - @./rom2c microcode microcode_dump.inc - - .PHONY: clean diff --git a/emulators/dynamips/files/patch-utils.c b/emulators/dynamips/files/patch-utils.c new file mode 100644 index 000000000000..970f89eb2e78 --- /dev/null +++ b/emulators/dynamips/files/patch-utils.c @@ -0,0 +1,11 @@ +--- utils.c.orig Wed Mar 8 22:53:21 2006 ++++ utils.c Wed Mar 8 22:53:37 2006 +@@ -187,7 +187,7 @@ + { + void *p; + +-#ifdef __linux__ ++#if defined(__linux__) || HAS_POSIX_MEMALIGN + if (posix_memalign((void *)&p,boundary,size)) + #else + #ifdef __CYGWIN__ diff --git a/emulators/dynamips/files/patch-utils.h b/emulators/dynamips/files/patch-utils.h new file mode 100644 index 000000000000..a8edbe606abf --- /dev/null +++ b/emulators/dynamips/files/patch-utils.h @@ -0,0 +1,11 @@ +--- utils.h.orig Fri Feb 24 06:59:58 2006 ++++ utils.h Fri Feb 24 07:00:14 2006 +@@ -34,6 +34,8 @@ + #define ARCH_BYTE_ORDER ARCH_LITTLE_ENDIAN + #elif defined(__x86_64__) + #define ARCH_BYTE_ORDER ARCH_LITTLE_ENDIAN ++#elif defined(__ia64__) ++#define ARCH_BYTE_ORDER ARCH_LITTLE_ENDIAN + #endif + + #ifndef ARCH_BYTE_ORDER -- cgit v1.2.3