2013-01-18 13:07:23 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Clasp < Formula
|
|
|
|
homepage 'http://potassco.sourceforge.net/'
|
2014-03-27 18:26:06 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/potassco/clasp/2.1.4/clasp-2.1.4-source.tar.gz'
|
|
|
|
sha1 '4c6ec3ee2f68fd5f9b3574ebb5a8b069d65d12df'
|
2013-01-18 13:07:23 +00:00
|
|
|
|
|
|
|
option 'with-mt', 'Enable multi-thread support'
|
|
|
|
|
2014-03-06 20:40:26 +00:00
|
|
|
depends_on 'tbb' if build.with? "mt"
|
2013-01-18 13:07:23 +00:00
|
|
|
|
|
|
|
def install
|
2014-03-06 20:40:26 +00:00
|
|
|
if build.with? "mt"
|
2014-02-25 05:10:12 +00:00
|
|
|
ENV['TBB30_INSTALL_DIR'] = Formula["tbb"].opt_prefix
|
2013-01-18 13:07:23 +00:00
|
|
|
build_dir = 'build/release_mt'
|
|
|
|
else
|
|
|
|
build_dir = 'build/release'
|
|
|
|
end
|
|
|
|
|
|
|
|
args = %W[
|
|
|
|
--config=release
|
|
|
|
--prefix=#{prefix}
|
|
|
|
]
|
2014-03-06 20:40:26 +00:00
|
|
|
args << "--with-mt" if build.with? "mt"
|
2013-01-18 13:07:23 +00:00
|
|
|
|
|
|
|
bin.mkpath
|
|
|
|
system "./configure.sh", *args
|
|
|
|
|
|
|
|
cd build_dir do
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|