aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJoel Gibson2015-03-17 16:00:57 +1100
committerMike McQuaid2015-03-18 13:17:03 +0000
commit86aa271470a74eafbb6e19344820f752508ebf7d (patch)
tree2b5895eff4522b16361ff2fe33a15c40faa17483 /Library
parent35245fd53e77bb57b7c8ac7a22889fd33e8e02f6 (diff)
downloadhomebrew-86aa271470a74eafbb6e19344820f752508ebf7d.tar.bz2
tcc: add cross option
Adds a --with-cross option to enable the cross compilers. Closes #37784. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/tcc.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/Library/Formula/tcc.rb b/Library/Formula/tcc.rb
index c63137bde..26c71deba 100644
--- a/Library/Formula/tcc.rb
+++ b/Library/Formula/tcc.rb
@@ -5,11 +5,19 @@ class Tcc < Formula
url 'http://download.savannah.gnu.org/releases/tinycc/tcc-0.9.26.tar.bz2'
sha1 '7110354d3637d0e05f43a006364c897248aed5d0'
+ option "with-cross", "Build all cross compilers"
+
def install
+ args = %W[
+ --prefix=#{prefix}
+ --source-path=#{buildpath}
+ --sysincludepaths=/usr/local/include:#{MacOS.sdk_path}/usr/include:{B}/include
+ ]
+
+ args << "--enable-cross" if build.with? "cross"
+
ENV.j1
- system "./configure", "--prefix=#{prefix}",
- "--source-path=#{buildpath}",
- "--sysincludepaths=/usr/local/include:#{MacOS.sdk_path}/usr/include:{B}/include"
+ system "./configure", *args
system "make"
system "make", "install"
system "make", "test"