homebrew-core/Formula/bullet.rb
Juan Sebastian Casallas 565fe6d42e Bullet: Update to 2.79
-Updated the url to download the latest tgz.
-Added version number since brew might get confused by the tgz's name.
-Changed from md5 to sha1, since sha1 checksums are provided by bullet:
http://code.google.com/p/bullet/downloads/detail?name=bullet-2.79-rev2440.tgz

Closes Homebrew/homebrew#8093.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-10-13 09:49:35 -07:00

44 lines
1.3 KiB
Ruby

require 'formula'
class Bullet < Formula
url 'http://bullet.googlecode.com/files/bullet-2.79-rev2440.tgz'
homepage 'http://bulletphysics.org/wordpress/'
sha1 '49b4b362a0c8d279e32b946ef9578b1dd8c5987c'
version '2.79'
depends_on 'cmake' => :build
def options
[
['--framework' , "Build Frameworks"],
['--universal' , "Build in universal mode"],
['--shared' , "Build shared libraries"],
['--build-demo' , "Build demo applications"],
['--build-extra', "Build extra library"]
]
end
def install
args = []
if ARGV.include? "--framework"
args << "-DBUILD_SHARED_LIBS=ON" << "-DFRAMEWORK=ON"
args << "-DCMAKE_INSTALL_PREFIX=#{prefix}/Frameworks"
args << "-DCMAKE_INSTALL_NAME_DIR=#{prefix}/Frameworks"
else
args << "-DBUILD_SHARED_LIBS=ON" if ARGV.include? "--shared"
args << "-DCMAKE_INSTALL_PREFIX=#{prefix}"
end
args << "-DCMAKE_OSX_ARCHITECTURES='i386;x86_64'" if ARGV.build_universal?
args << "-DBUILD_DEMOS=OFF" if not ARGV.include? "--build-demo"
args << "-DBUILD_EXTRAS=OFF" if not ARGV.include? "--build-extra"
system "cmake", *args
system "make"
system "make install"
prefix.install 'Demos' if ARGV.include? "--build-demo"
prefix.install 'Extras' if ARGV.include? "--build-extra"
end
end