2011-03-10 05:11:03 +00:00
|
|
|
class Box2d < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "2D physics engine for games"
|
2015-08-03 12:55:31 +00:00
|
|
|
homepage "http://www.box2d.org/"
|
2015-08-07 19:38:36 +00:00
|
|
|
url "https://github.com/erincatto/Box2D/archive/v2.3.1.tar.gz"
|
|
|
|
sha256 "2c61505f03ef403b54cf0e510d83d6f567e37882ad79b5b2d486acbc7d5eedea"
|
|
|
|
head "https://github.com/erincatto/Box2D.git"
|
2010-12-02 02:57:44 +00:00
|
|
|
|
2015-08-08 03:03:03 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2016-02-23 15:15:12 +00:00
|
|
|
sha256 "967e9f17c6133f253be1be4f845899160af7c8cc8d072e41b176d9c636911a19" => :el_capitan
|
2015-08-08 03:03:03 +00:00
|
|
|
sha256 "1559be0d79e66e8074a051f36db5bbf21a9d556013803cce7e04184bd28028a9" => :yosemite
|
|
|
|
sha256 "40effd7d4952d37d15e7b34da4b9c207956b1d79bdd856f9f03307ecf52a5b3f" => :mavericks
|
|
|
|
sha256 "143949e28a0b74432015b56f6372682ce69cfb451ccd82a3f4b1fb1c69e24310" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2015-08-03 12:55:31 +00:00
|
|
|
depends_on "cmake" => :build
|
2010-12-02 02:57:44 +00:00
|
|
|
|
|
|
|
def install
|
2015-08-07 19:38:36 +00:00
|
|
|
cd "Box2D" do
|
2014-04-17 04:10:11 +00:00
|
|
|
system "cmake", "-DBOX2D_INSTALL=ON",
|
|
|
|
"-DBOX2D_BUILD_SHARED=ON",
|
|
|
|
"-DBOX2D_BUILD_EXAMPLES=OFF",
|
|
|
|
*std_cmake_args
|
2015-08-03 12:55:31 +00:00
|
|
|
system "make", "install"
|
2011-11-07 07:20:34 +00:00
|
|
|
end
|
2015-08-07 19:38:36 +00:00
|
|
|
libexec.install "Box2D/HelloWorld"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system ENV.cxx, "-L#{lib}", "-lbox2d",
|
|
|
|
libexec/"HelloWorld/HelloWorld.cpp", "-o", testpath/"test"
|
|
|
|
system "./test"
|
2010-12-02 02:57:44 +00:00
|
|
|
end
|
|
|
|
end
|