2010-05-28 20:45:09 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Gforth < Formula
|
2012-11-28 05:55:56 +00:00
|
|
|
homepage 'http://bernd-paysan.de/gforth.html'
|
2013-08-26 14:54:09 +00:00
|
|
|
url 'http://www.complang.tuwien.ac.at/forth/gforth/gforth-0.7.2.tar.gz'
|
|
|
|
sha256 '77db9071c2442da3215da361b71190bccb153f81f4d01e5e8bc2c2cf8ee81b48'
|
2010-05-28 20:45:09 +00:00
|
|
|
|
2014-04-11 17:36:39 +00:00
|
|
|
depends_on 'libtool' => :run
|
2013-01-02 02:36:01 +00:00
|
|
|
depends_on 'libffi'
|
|
|
|
depends_on 'pcre'
|
|
|
|
|
|
|
|
def darwin_major_version
|
|
|
|
# kern.osrelease: 11.4.2
|
|
|
|
full_version = `/usr/sbin/sysctl -n kern.osrelease`
|
|
|
|
full_version.split("\.")[0]
|
|
|
|
end
|
|
|
|
|
2010-05-28 20:45:09 +00:00
|
|
|
def install
|
2013-08-26 14:54:09 +00:00
|
|
|
ENV.deparallelize
|
2014-04-11 17:36:39 +00:00
|
|
|
args = %W[--prefix=#{prefix}]
|
2013-01-02 02:36:01 +00:00
|
|
|
|
|
|
|
if MacOS.prefer_64_bit?
|
|
|
|
args << "--build=x86_64-apple-darwin#{darwin_major_version}"
|
|
|
|
end
|
|
|
|
|
|
|
|
system "./configure", *args
|
2010-05-28 20:45:09 +00:00
|
|
|
system "make" # Separate build steps.
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|