homebrew-core/Formula/yasm.rb
2014-10-19 18:49:34 +01:00

54 lines
1.4 KiB
Ruby

require 'formula'
class Yasm < Formula
homepage 'http://yasm.tortall.net/'
url "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz"
sha256 "3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f"
bottle do
cellar :any
revision 1
sha1 "86705ca09a33d0ba81000cadef9afe46a2072a70" => :yosemite
sha1 "670a8b4722cfa032e7b0abcc618d54d0c32631bf" => :mavericks
sha1 "772d7dbb840d3beb794980d1386f86db1cfd5bb4" => :mountain_lion
end
head do
url 'https://github.com/yasm/yasm.git'
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "gettext"
end
resource "cython" do
url "http://cython.org/release/Cython-0.20.2.tar.gz"
sha1 "e3fd4c32bdfa4a388cce9538417237172c656d55"
end
depends_on :python => :optional
def install
args = %W[
--disable-debug
--prefix=#{prefix}
]
if build.with? "python"
ENV.prepend_create_path "PYTHONPATH", buildpath+"lib/python2.7/site-packages"
resource("cython").stage do
system "python", "setup.py", "build", "install", "--prefix=#{buildpath}"
end
args << '--enable-python'
args << '--enable-python-bindings'
end
# https://github.com/Homebrew/homebrew/pull/19593
ENV.deparallelize
system './autogen.sh' if build.head?
system './configure', *args
system 'make install'
end
end