aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/gforth.rb
diff options
context:
space:
mode:
authorSergey Klimov2013-01-01 18:36:01 -0800
committerAdam Vandenberg2013-01-03 09:18:55 -0800
commit2c5c4eeca754e505bfb76f2eb5e8f8a35c9dc28e (patch)
tree6bd76d6c5515978ed77c82ddb38d811497fc57cf /Library/Formula/gforth.rb
parent3e1ec41bf9586764aa6626bb07a1aab6f8d0338e (diff)
downloadhomebrew-2c5c4eeca754e505bfb76f2eb5e8f8a35c9dc28e.tar.bz2
gforth: fix 64-bit builds
Closes #16836. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/gforth.rb')
-rw-r--r--Library/Formula/gforth.rb25
1 files changed, 21 insertions, 4 deletions
diff --git a/Library/Formula/gforth.rb b/Library/Formula/gforth.rb
index 9f36f3f21..c870f4857 100644
--- a/Library/Formula/gforth.rb
+++ b/Library/Formula/gforth.rb
@@ -5,12 +5,29 @@ class Gforth < Formula
url 'http://www.complang.tuwien.ac.at/forth/gforth/gforth-0.7.0.tar.gz'
sha1 '5bb357268cba683f2a8c63d2a4bcab8f41cb0086'
+ depends_on :libtool
+ 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
+
def install
ENV.j1 # Parallel builds won't work
- # Install 32-bit only, even on Snow Leopard. See:
- # http://www.groupsrv.com/computers/about648918.html
- ENV['CC'] = "#{ENV.cc} -m32"
- system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}"
+ args = %W[
+ --disable-debug
+ --disable-dependency-tracking
+ --prefix=#{prefix}
+ ]
+
+ if MacOS.prefer_64_bit?
+ args << "--build=x86_64-apple-darwin#{darwin_major_version}"
+ end
+
+ system "./configure", *args
system "make" # Separate build steps.
system "make install"
end