[98018] trunk/dports/benchmarks/iozone

ryandesign at macports.org ryandesign at macports.org
Sat Sep 22 02:01:45 PDT 2012


Revision: 98018
          http://trac.macports.org//changeset/98018
Author:   ryandesign at macports.org
Date:     2012-09-22 02:01:45 -0700 (Sat, 22 Sep 2012)
Log Message:
-----------
iozone: fix build error "expected a platform name, e.g., 'macosx'" on Mountain Lion (#35654)

Modified Paths:
--------------
    trunk/dports/benchmarks/iozone/Portfile

Added Paths:
-----------
    trunk/dports/benchmarks/iozone/files/
    trunk/dports/benchmarks/iozone/files/patch-__APPLE__.diff

Modified: trunk/dports/benchmarks/iozone/Portfile
===================================================================
--- trunk/dports/benchmarks/iozone/Portfile	2012-09-22 08:55:31 UTC (rev 98017)
+++ trunk/dports/benchmarks/iozone/Portfile	2012-09-22 09:01:45 UTC (rev 98018)
@@ -29,6 +29,8 @@
 extract.pre_args
 worksrcdir       ${distname}/src/current
 
+patchfiles       patch-__APPLE__.diff
+
 use_configure    no
 build.target     macosx
 build.args       CC=${configure.cc} \

Added: trunk/dports/benchmarks/iozone/files/patch-__APPLE__.diff
===================================================================
--- trunk/dports/benchmarks/iozone/files/patch-__APPLE__.diff	                        (rev 0)
+++ trunk/dports/benchmarks/iozone/files/patch-__APPLE__.diff	2012-09-22 09:01:45 UTC (rev 98018)
@@ -0,0 +1,63 @@
+--- iozone.c.orig	2012-05-10 00:14:12.000000000 -0500
++++ iozone.c	2012-09-22 03:58:12.000000000 -0500
+@@ -70,7 +70,7 @@
+ #include <windows.h>
+ #include <errno.h>
+ #else
+-#if defined(linux) || defined(solaris) || defined(macosx) || defined(__AIX__) || defined(FreeBSD) || defined(_HPUX_SOURCE) || defined(__OpenBSD__) || defined(__DragonFly__)
++#if defined(linux) || defined(solaris) || defined(__APPLE__) || defined(__AIX__) || defined(FreeBSD) || defined(_HPUX_SOURCE) || defined(__OpenBSD__) || defined(__DragonFly__)
+ #include <errno.h>
+ #else
+ extern  int errno;   /* imported for errors */
+@@ -12114,7 +12114,7 @@
+ 
+ 	size1=l_max(size,page_size);
+ 	size1=(size1 +page_size) & ~(page_size-1);
+-#if defined(bsd4_2) && !defined(macosx)
++#if defined(bsd4_2) && !defined(__APPLE__)
+ 	if((tfd = creat("mmap.tmp", 0666))<0)
+ 	{
+ 		printf("Unable to create tmp file\n");
+@@ -18927,7 +18927,7 @@
+ #endif
+ #endif
+ 
+-#if defined(bsd4_2) && !defined(macosx)
++#if defined(bsd4_2) && !defined(__APPLE__)
+ 	 pa = (char *)mmap( 0,&filebytes, (int)prot, 
+ 	 		(int)mflags, (int)fd, 0);
+ #else
+--- libbif.c.orig	2012-05-10 00:14:12.000000000 -0500
++++ libbif.c	2012-09-22 03:57:54.000000000 -0500
+@@ -27,7 +27,7 @@
+ #include <string.h>
+ #endif
+ 
+-#if defined(linux) || defined(__DragonFly__) || defined(macosx)
++#if defined(linux) || defined(__DragonFly__) || defined(__APPLE__)
+ #include <unistd.h>
+ #include <stdlib.h>
+ #endif
+--- makefile.orig	2012-05-10 00:14:12.000000000 -0500
++++ makefile	2012-09-22 03:57:44.000000000 -0500
+@@ -905,7 +905,7 @@
+ 	@echo ""
+ 	@echo "Building fileop for MAC OS X"
+ 	@echo ""
+-	$(CC) -Wall -c -O -Dmacosx $(CFLAGS) fileop.c -o fileop_macosx.o
++	$(CC) -Wall -c -O $(CFLAGS) fileop.c -o fileop_macosx.o
+ 
+ fileop_linux-ia64.o:	fileop.c
+ 	@echo ""
+@@ -1364,9 +1364,9 @@
+ 	@echo ""
+ 	@echo "Build iozone for MacOSX"
+ 	@echo ""
+-	$(CC) -c -O -Dunix -Dbsd4_2 -Dmacosx -DHAVE_ANSIC_C -DNO_THREADS \
++	$(CC) -c -O -Dunix -Dbsd4_2 -DHAVE_ANSIC_C -DNO_THREADS \
+ 		-DNAME='"macosx"' -DSHARED_MEM $(CFLAGS) iozone.c -o iozone_macosx.o
+-	$(CC) -c -O -Dunix -Dbsd4_2 -Dmacosx -DHAVE_ANSIC_C -DNO_THREADS \
++	$(CC) -c -O -Dunix -Dbsd4_2 -DHAVE_ANSIC_C -DNO_THREADS \
+ 		-DSHARED_MEM $(CFLAGS) libbif.c -o libbif.o
+ 
+ iozone_openbsd.o:	iozone.c libbif.c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120922/7f339576/attachment.html>


More information about the macports-changes mailing list