[46735] trunk/dports/devel
snc at macports.org
snc at macports.org
Wed Feb 11 06:22:37 PST 2009
Revision: 46735
http://trac.macports.org/changeset/46735
Author: snc at macports.org
Date: 2009-02-11 06:22:33 -0800 (Wed, 11 Feb 2009)
Log Message:
-----------
after adding cmake portgroup, created chipmunk, ticket #17900
Added Paths:
-----------
trunk/dports/devel/chipmunk/
trunk/dports/devel/chipmunk/Portfile
trunk/dports/devel/chipmunk/files/
trunk/dports/devel/chipmunk/files/patch-CMakeLists.diff
trunk/dports/devel/chipmunk/files/patch-Demo-CMakeLists.diff
trunk/dports/devel/chipmunk/files/patch-ruby-CMakeLists.diff
Added: trunk/dports/devel/chipmunk/Portfile
===================================================================
--- trunk/dports/devel/chipmunk/Portfile (rev 0)
+++ trunk/dports/devel/chipmunk/Portfile 2009-02-11 14:22:33 UTC (rev 46735)
@@ -0,0 +1,39 @@
+# -*- 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
+PortGroup cmake 1.0
+
+name chipmunk
+version 4.1.0
+categories devel
+maintainers fs.ei.tum.de:jonas openmaintainer
+description Fast and lightweight 2D rigid body physics library in C
+long_description ${description}
+platforms darwin
+homepage http://wiki.slembcke.net/main/published/Chipmunk
+master_sites http://files.slembcke.net/chipmunk/release/
+distname Chipmunk-${version}
+extract.suffix .tgz
+checksums md5 804d0e478f2a27a1d272fa07e41480ba \
+ sha1 c5da0977e6bba110d13ea98dc89743726daab90d \
+ rmd160 0e1714bc744cdb478f53d7f65924dff3c4c58440
+
+patchfiles patch-Demo-CMakeLists.diff \
+ patch-ruby-CMakeLists.diff \
+ patch-CMakeLists.diff
+
+use_parallel_build yes
+
+configure.args-append ../${distname} \
+ -DCMAKE_INSTALL_PREFIX=${prefix} \
+ -DCMAKE_OSX_SYSROOT=${sysroot}
+
+variant demos description "compile and install a demo application" {
+ configure.args-append -DBUILD_DEMOS=ON
+}
+
+variant ruby description "compile and install the ruby extension" {
+ configure.args-append -DBUILD_RUBY_EXT=ON
+ depends_lib-append port:ruby
+}
Property changes on: trunk/dports/devel/chipmunk/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/devel/chipmunk/files/patch-CMakeLists.diff
===================================================================
--- trunk/dports/devel/chipmunk/files/patch-CMakeLists.diff (rev 0)
+++ trunk/dports/devel/chipmunk/files/patch-CMakeLists.diff 2009-02-11 14:22:33 UTC (rev 46735)
@@ -0,0 +1,18 @@
+--- CMakeLists.txt.orig 2009-01-06 19:31:05.000000000 +0100
++++ CMakeLists.txt 2009-01-06 19:33:22.000000000 +0100
+@@ -2,6 +2,14 @@
+
+ SET(CMAKE_C_FLAGS_RELEASE "-O3 -ffast-math -std=gnu99")
+
+-SUBDIRS(src Demo)
++add_subdirectory(src)
++
++if(BUILD_DEMOS)
++ add_subdirectory(Demo)
++endif(BUILD_DEMOS)
++
++if(BUILD_RUBY_EXT)
++ add_subdirectory(ruby)
++endif(BUILD_RUBY_EXT)
+
+ SET (CMAKE_BUILD_TYPE Release)
Added: trunk/dports/devel/chipmunk/files/patch-Demo-CMakeLists.diff
===================================================================
--- trunk/dports/devel/chipmunk/files/patch-Demo-CMakeLists.diff (rev 0)
+++ trunk/dports/devel/chipmunk/files/patch-Demo-CMakeLists.diff 2009-02-11 14:22:33 UTC (rev 46735)
@@ -0,0 +1,21 @@
+--- Demo/CMakeLists.txt.orig 2009-01-06 19:44:06.000000000 +0100
++++ Demo/CMakeLists.txt 2009-01-06 19:46:13.000000000 +0100
+@@ -34,7 +34,8 @@
+ #examples: ITKCommon, VTKRendering, etc
+ SET(Libraries
+ #list libraries here
+-GL glut
++${OPENGL_LIBRARIES}
++${GLUT_LIBRARIES}
+ )
+
+ #LINK_DIRECTORIES(${CHIPMUNK_SOURCE_DIR}/build/source)
+@@ -49,6 +50,8 @@
+
+ TARGET_LINK_LIBRARIES(${CurrentExe} ${Libraries} chipmunk_static)
+
++install(TARGETS ${CurrentExe} RUNTIME DESTINATION bin)
++
+ #the following line is an example of how to add a test to your project.
+ #Testname is the title for this particular test. ExecutableToRun is the
+ #program which will be running this test. It can either be a part of this
Added: trunk/dports/devel/chipmunk/files/patch-ruby-CMakeLists.diff
===================================================================
--- trunk/dports/devel/chipmunk/files/patch-ruby-CMakeLists.diff (rev 0)
+++ trunk/dports/devel/chipmunk/files/patch-ruby-CMakeLists.diff 2009-02-11 14:22:33 UTC (rev 46735)
@@ -0,0 +1,27 @@
+--- /dev/null 2009-01-06 19:53:23.000000000 +0100
++++ ruby/CMakeLists.txt 2009-01-06 20:00:47.000000000 +0100
+@@ -0,0 +1,24 @@
++find_package(Ruby REQUIRED)
++
++file(GLOB ruby_ext_source_files "*.c")
++
++set(ruby_ext_include_dirs
++ ${CHIPMUNK_SOURCE_DIR}/src
++ ${RUBY_INCLUDE_PATH}
++)
++
++set(ruby_ext_libraries
++ chipmunk_static
++ ${RUBY_LIBRARY}
++)
++
++include_directories(${ruby_ext_include_dirs})
++add_library(ruby_ext MODULE ${ruby_ext_source_files})
++target_link_libraries(ruby_ext ${ruby_ext_libraries})
++
++set_target_properties(ruby_ext PROPERTIES OUTPUT_NAME chipmunk PREFIX "") # else the name would be libruby_ext
++if(APPLE)
++ set_target_properties(ruby_ext PROPERTIES SUFFIX ".bundle") # else it get's .so, even if the type ls module!
++endif(APPLE)
++
++install(TARGETS ruby_ext DESTINATION ${RUBY_SITEARCH_DIR})
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090211/bfeeb66b/attachment.html>
More information about the macports-changes
mailing list