[61558] trunk/dports/graphics

nox at macports.org nox at macports.org
Mon Dec 14 14:46:57 PST 2009


Revision: 61558
          http://trac.macports.org/changeset/61558
Author:   nox at macports.org
Date:     2009-12-14 14:46:56 -0800 (Mon, 14 Dec 2009)
Log Message:
-----------
Create new port Box2D

Box2D is a feature rich 2d rigid body physics engine, written in C++ by Erin
Catto. It has been used in many games, including Crayon Physics Deluxe, winner
of the 2008 Independent Game Festival Grand Prize.

Added Paths:
-----------
    trunk/dports/graphics/Box2D/
    trunk/dports/graphics/Box2D/Portfile
    trunk/dports/graphics/Box2D/files/
    trunk/dports/graphics/Box2D/files/patch-osx-sl.diff

Added: trunk/dports/graphics/Box2D/Portfile
===================================================================
--- trunk/dports/graphics/Box2D/Portfile	                        (rev 0)
+++ trunk/dports/graphics/Box2D/Portfile	2009-12-14 22:46:56 UTC (rev 61558)
@@ -0,0 +1,45 @@
+# $Id$
+
+PortSystem      1.0
+PortGroup       xcode 1.0
+                  
+name            Box2D
+version         2.0.2
+categories      graphics devel
+maintainers     nox openmaintainer
+license         as-is
+description     A C++ 2D physics engine for games
+
+long_description \
+    Box2D is a feature rich 2d rigid body physics engine, written in C++ by \
+    Erin Catto. It has been used in many games, including Crayon Physics \
+    Deluxe, winner of the 2008 Independent Game Festival Grand Prize.
+
+homepage        http://www.box2d.org/
+master_sites    http://download.github.com/
+distname        nox-${name}-90c3b1e
+
+checksums       md5     769b557ee2a726cc40af21a1c3110433 \
+                sha1    e9a594eb51f57790f7b1b35eeddfce3735a16ca3 \
+                rmd160  68fc37a7ffe54747a837abed36b4e970d021c0ab
+
+worksrcdir      ${distname}/Build/Xcode
+
+patch.dir       ${workpath}/${distname}
+patchfiles      patch-osx-sl.diff
+
+xcode.configuration Release
+xcode.target        "TestBed App"
+
+post-destroot {
+    set app_path "${applications_dir}/Box2D Test Bed.app"
+    set lib_path ${prefix}/lib/libBox2D.dylib
+    
+    delete ${destroot}${app_path}/Contents/MacOS/libBox2D.dylib
+    move ${destroot}${applications_dir}/libBox2D.dylib \
+            ${destroot}${lib_path}
+    system "install_name_tool -id ${lib_path} ${destroot}${lib_path}"
+    system "install_name_tool \
+            -change ${applications_dir}/libBox2D.dylib ${lib_path} \
+            \"${destroot}${app_path}/Contents/MacOS/Box2D Test Bed\""
+}


Property changes on: trunk/dports/graphics/Box2D/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/graphics/Box2D/files/patch-osx-sl.diff
===================================================================
--- trunk/dports/graphics/Box2D/files/patch-osx-sl.diff	                        (rev 0)
+++ trunk/dports/graphics/Box2D/files/patch-osx-sl.diff	2009-12-14 22:46:56 UTC (rev 61558)
@@ -0,0 +1,167 @@
+diff --git Build/Xcode/Box2D.xcodeproj/project.pbxproj Build/Xcode/Box2D.xcodeproj/project.pbxproj
+index 8097370..931079c 100644
+--- Build/Xcode/Box2D.xcodeproj/project.pbxproj
++++ Build/Xcode/Box2D.xcodeproj/project.pbxproj
+@@ -3,7 +3,7 @@
+ 	archiveVersion = 1;
+ 	classes = {
+ 	};
+-	objectVersion = 42;
++	objectVersion = 45;
+ 	objects = {
+ 
+ /* Begin PBXBuildFile section */
+@@ -152,6 +152,7 @@
+ 		3638A4350D8095EE00E28AD1 /* b2Shape.h in Headers */ = {isa = PBXBuildFile; fileRef = 3638A42F0D8095EE00E28AD1 /* b2Shape.h */; };
+ 		3638A43A0D80964800E28AD1 /* b2Collision.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3638A4390D80964800E28AD1 /* b2Collision.cpp */; };
+ 		3638A43D0D8096BF00E28AD1 /* b2Math.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3638A43C0D8096BF00E28AD1 /* b2Math.cpp */; };
++		9032787C10D6CAF800BE5A10 /* TriangleMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB2D5B530F1D0F6100E9A1D3 /* TriangleMesh.cpp */; };
+ 		BB2D5B0A0F1D0E8800E9A1D3 /* b2EdgeShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB2D5B080F1D0E8800E9A1D3 /* b2EdgeShape.cpp */; };
+ 		BB2D5B0B0F1D0E8800E9A1D3 /* b2EdgeShape.h in Headers */ = {isa = PBXBuildFile; fileRef = BB2D5B090F1D0E8800E9A1D3 /* b2EdgeShape.h */; };
+ 		BB2D5B100F1D0EB700E9A1D3 /* b2EdgeAndCircleContact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB2D5B0C0F1D0EB700E9A1D3 /* b2EdgeAndCircleContact.cpp */; };
+@@ -336,7 +337,7 @@
+ 		276AE26E0CF0A434003B103D /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = /System/Library/Frameworks/GLUT.framework; sourceTree = "<absolute>"; };
+ 		276AE26F0CF0A434003B103D /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
+ 		276AE2A60CF0B3DB003B103D /* manual.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; name = manual.html; path = ../../Documentation/manual.html; sourceTree = "<group>"; };
+-		276AE3B50CF0F0E2003B103D /* TestBed App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "TestBed App.app"; sourceTree = BUILT_PRODUCTS_DIR; };
++		276AE3B50CF0F0E2003B103D /* Box2D Test Bed.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Box2D Test Bed.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 		276AE3B70CF0F0E2003B103D /* TestBed App-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TestBed App-Info.plist"; sourceTree = "<group>"; };
+ 		276AE4510CF0F72B003B103D /* TestBed.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = TestBed.icns; sourceTree = "<group>"; };
+ 		32BAE0B70371A74B00C91783 /* Box2D_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Box2D_Prefix.pch; sourceTree = "<group>"; };
+@@ -450,7 +451,7 @@
+ 				D2AAC09D05546B4700DB518D /* libBox2D.dylib */,
+ 				276AE1A40CF0253B003B103D /* HelloWorld */,
+ 				276AE1E20CF0265F003B103D /* TestBed */,
+-				276AE3B50CF0F0E2003B103D /* TestBed App.app */,
++				276AE3B50CF0F0E2003B103D /* Box2D Test Bed.app */,
+ 			);
+ 			name = Products;
+ 			sourceTree = "<group>";
+@@ -897,7 +898,7 @@
+ 			);
+ 			name = "TestBed App";
+ 			productName = "TestBed App";
+-			productReference = 276AE3B50CF0F0E2003B103D /* TestBed App.app */;
++			productReference = 276AE3B50CF0F0E2003B103D /* Box2D Test Bed.app */;
+ 			productType = "com.apple.product-type.application";
+ 		};
+ 		D2AAC09C05546B4700DB518D /* Box2D */ = {
+@@ -923,7 +924,7 @@
+ 		0867D690FE84028FC02AAC07 /* Project object */ = {
+ 			isa = PBXProject;
+ 			buildConfigurationList = 1DEB916408733D950010E9CD /* Build configuration list for PBXProject "Box2D" */;
+-			compatibilityVersion = "Xcode 2.4";
++			compatibilityVersion = "Xcode 3.0";
+ 			hasScannedForEncodings = 1;
+ 			mainGroup = 0867D691FE84028FC02AAC07 /* Box2D */;
+ 			productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */;
+@@ -1001,6 +1002,7 @@
+ 				276AE2670CF0A2A9003B103D /* quaternion.cpp in Sources */,
+ 				D8965C630D83188D00D09555 /* Biped.cpp in Sources */,
+ 				D8965C640D83188D00D09555 /* BipedDef.cpp in Sources */,
++				9032787C10D6CAF800BE5A10 /* TriangleMesh.cpp in Sources */,
+ 			);
+ 			runOnlyForDeploymentPostprocessing = 0;
+ 		};
+@@ -1158,11 +1160,14 @@
+ 			isa = XCBuildConfiguration;
+ 			baseConfigurationReference = 5073E0C609E734A800EC74B6 /* Box2DProj.xcconfig */;
+ 			buildSettings = {
++				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ 				GCC_WARN_CHECK_SWITCH_STATEMENTS = NO;
+ 				GCC_WARN_UNUSED_VARIABLE = YES;
++				"MACOSX_DEPLOYMENT_TARGET[arch=x86_64]" = 10.5;
+ 				PREBINDING = NO;
+-				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
++				SDKROOT = macosx10.4;
++				"SDKROOT[arch=x86_64]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+ 			};
+ 			name = Debug;
+ 		};
+@@ -1170,17 +1175,17 @@
+ 			isa = XCBuildConfiguration;
+ 			baseConfigurationReference = 5073E0C609E734A800EC74B6 /* Box2DProj.xcconfig */;
+ 			buildSettings = {
+-				ARCHS = (
+-					ppc,
+-					i386,
+-				);
++				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ 				GCC_AUTO_VECTORIZATION = YES;
+ 				GCC_UNROLL_LOOPS = YES;
++				"GCC_VERSION[sdk=macosx10.4][arch=*]" = 4.0;
+ 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ 				GCC_WARN_CHECK_SWITCH_STATEMENTS = NO;
+ 				GCC_WARN_UNUSED_VARIABLE = YES;
++				"MACOSX_DEPLOYMENT_TARGET[arch=x86_64]" = 10.5;
+ 				PREBINDING = NO;
+-				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
++				SDKROOT = macosx10.4;
++				"SDKROOT[arch=x86_64]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+ 			};
+ 			name = Release;
+ 		};
+@@ -1274,16 +1279,8 @@
+ 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ 				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ 				GCC_MODEL_TUNING = G5;
+-				GCC_PRECOMPILE_PREFIX_HEADER = NO;
+-				GCC_PREFIX_HEADER = Box2D_Prefix.pch;
+ 				INFOPLIST_FILE = "TestBed App-Info.plist";
+ 				INSTALL_PATH = "$(HOME)/Applications";
+-				OTHER_LDFLAGS = (
+-					"-framework",
+-					Foundation,
+-					"-framework",
+-					AppKit,
+-				);
+ 				PREBINDING = NO;
+ 				PRODUCT_NAME = "Box2D Test Bed";
+ 				WRAPPER_EXTENSION = app;
+diff --git Contrib/glui/algebra3.cpp Contrib/glui/algebra3.cpp
+index ddc18f4..75555ae 100644
+--- Contrib/glui/algebra3.cpp
++++ Contrib/glui/algebra3.cpp
+@@ -1170,16 +1170,16 @@ void mat3::print(FILE *file, const char *name) const
+ {
+     int i, j;
+ 
+-    fprintf( stderr, "%s:\n", name );
++    fprintf( file, "%s:\n", name );
+ 
+     for( i = 0; i < 3; i++ )
+     {
+-        fprintf( stderr, "   " );
++        fprintf( file, "   " );
+         for( j = 0; j < 3; j++ )
+         {
+-            fprintf( stderr, "%f  ", v[i][j] );
++            fprintf( file, "%f  ", v[i][j] );
+         }
+-        fprintf( stderr, "\n" );
++        fprintf( file, "\n" );
+     }
+ }
+ 
+@@ -1350,16 +1350,16 @@ void mat4::print(FILE *file, const char *name) const
+ {
+     int i, j;
+ 
+-    fprintf( stderr, "%s:\n", name );
++    fprintf( file, "%s:\n", name );
+ 
+     for( i = 0; i < 4; i++ )
+     {
+-        fprintf( stderr, "   " );
++        fprintf( file, "   " );
+         for( j = 0; j < 4; j++ )
+         {
+-            fprintf( stderr, "%f  ", v[i][j] );
++            fprintf( file, "%f  ", v[i][j] );
+         }
+-        fprintf( stderr, "\n" );
++        fprintf( file, "\n" );
+     }
+ }
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091214/b75ddea4/attachment-0001.html>


More information about the macports-changes mailing list