[60951] trunk/dports/devel

stromnov at macports.org stromnov at macports.org
Sun Nov 29 12:15:38 PST 2009


Revision: 60951
          http://trac.macports.org/changeset/60951
Author:   stromnov at macports.org
Date:     2009-11-29 12:15:37 -0800 (Sun, 29 Nov 2009)
Log Message:
-----------
box2d: New port.

Added Paths:
-----------
    trunk/dports/devel/box2d/
    trunk/dports/devel/box2d/Portfile
    trunk/dports/devel/box2d/files/
    trunk/dports/devel/box2d/files/patch-Source-Makefile.diff

Added: trunk/dports/devel/box2d/Portfile
===================================================================
--- trunk/dports/devel/box2d/Portfile	                        (rev 0)
+++ trunk/dports/devel/box2d/Portfile	2009-11-29 20:15:37 UTC (rev 60951)
@@ -0,0 +1,59 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem          1.0
+
+name                box2d
+version             2.0.1
+categories          devel
+
+maintainers         stromnov openmaintainer
+
+description         Box2D Physics Engine
+
+long_description    ${description}
+
+platforms           darwin
+
+homepage            http://www.box2d.org/
+master_sites        sourceforge:box2d
+distname            Box2D_v${version}
+use_zip             yes
+
+checksums           md5     d50faffbfa52a284466e91fc1eda2a3a \
+                    sha1    27a1a0bd08c81bbf661fa008645ee5c538bb2767 \
+                    rmd160  4a1e4b62c814b9a562d1ca6b580bfec83a7ad8a9
+
+patchfiles          patch-Source-Makefile.diff
+
+worksrcdir          ${distname}/Box2D
+
+use_configure       no
+
+build.args-append   -C Source
+
+post-patch {
+    reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/Source/Makefile
+    reinplace "s|@@COMPATIBILITY_VERSION@@|2.0.0|g" ${worksrcpath}/Source/Makefile
+    reinplace "s|@@VERSION@@|${version}|g" ${worksrcpath}/Source/Makefile
+}
+
+destroot {
+    xinstall -m 644 -W ${worksrcpath}/Source/Gen/float \
+        libbox2d.a ${destroot}${prefix}/lib/
+    xinstall -m 755 -W ${worksrcpath}/Source/Gen/float \
+        libbox2d.dylib ${destroot}${prefix}/lib/
+
+    xinstall -m 755 -d ${destroot}${prefix}/include/box2d/
+    xinstall -m 644 -W ${worksrcpath}/Include \
+        Box2D.h ${destroot}${prefix}/include/box2d/
+    reinplace "s|\.\./Source/||g" ${destroot}${prefix}/include/box2d/Box2D.h
+
+    foreach incdir {Collision Collision/Shapes Common Dynamics Dynamics/Contacts Dynamics/Joints} {
+        xinstall -m 755 -d ${destroot}${prefix}/include/box2d/${incdir}
+        eval xinstall -m 644 [glob ${worksrcpath}/Source/${incdir}/*.h] \
+            ${destroot}${prefix}/include/box2d/${incdir}
+    }
+}
+
+livecheck.regex     "(?i)<title>box2d Box2D version (.*) released.*</title>"


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

Added: trunk/dports/devel/box2d/files/patch-Source-Makefile.diff
===================================================================
--- trunk/dports/devel/box2d/files/patch-Source-Makefile.diff	                        (rev 0)
+++ trunk/dports/devel/box2d/files/patch-Source-Makefile.diff	2009-11-29 20:15:37 UTC (rev 60951)
@@ -0,0 +1,46 @@
+--- Source/Makefile.orig	2009-11-29 21:44:12.000000000 +0300
++++ Source/Makefile	2009-11-29 21:45:12.000000000 +0300
+@@ -1,10 +1,11 @@
+-TARGETS= Gen/float/libbox2d.a Gen/fixed/libbox2d.a
++TARGETS= Gen/float/libbox2d.dylib Gen/float/libbox2d.a
+ 
+ ifdef DEVKITPRO
+ TARGETS += Gen/nds-float/lib/libbox2d.a Gen/nds-fixed/lib/libbox2d.a
+ endif
+ 
+-CXXFLAGS=	-g -O2
++CXXFLAGS+=	-g -O2
++CXX?=c++
+ 
+ SOURCES = \
+ 	./Dynamics/b2Body.cpp \
+@@ -54,7 +55,6 @@
+ else
+ 
+ -include $(addprefix Gen/float/,$(SOURCES:.cpp=.d))
+--include $(addprefix Gen/fixed/,$(SOURCES:.cpp=.d))
+ 
+ ifdef DEVKITPRO
+ -include $(addprefix Gen/nds-fixed/,$(SOURCES:.cpp=.d))
+@@ -65,16 +65,19 @@
+ 
+ Gen/float/%.o:		%.cpp
+ 	@mkdir -p $(dir $@)
+-	c++ $(CXXFLAGS) -c -o $@ $<
++	$(CXX) $(CXXFLAGS) -c -o $@ $<
+ 
+ 
+ Gen/float/libbox2d.a:	$(addprefix Gen/float/,$(SOURCES:.cpp=.o))
+ 	ar cr $@ $^
+ 	ranlib $@ 
+ 
++Gen/float/libbox2d.dylib:	$(addprefix Gen/float/,$(SOURCES:.cpp=.o))
++	$(CXX) $^ -dynamiclib -compatibility_version @@COMPATIBILITY_VERSION@@ -current_version @@VERSION@@ -install_name @@PREFIX@@/lib/libbox2d.dylib -o $@
++
+ Gen/float/%.d:		%.cpp
+ 	@mkdir -p $(dir $@)
+-	c++ -MM -MT $(@:.d=.o) $(CXXFLAGS) -o $@ $<
++	$(CXX) -MM -MT $(@:.d=.o) $(CXXFLAGS) -o $@ $<
+ 
+ 
+ Gen/fixed/%.o:		%.cpp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091129/88f1cc67/attachment.html>


More information about the macports-changes mailing list