2010-10-31 20:41:34 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Ngspice < Formula
|
2010-10-31 20:41:34 +00:00
|
|
|
homepage 'http://ngspice.sourceforge.net/'
|
2012-04-06 18:43:12 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/ngspice/ng-spice-rework/24/ngspice-24.tar.gz'
|
2012-08-30 19:50:28 +00:00
|
|
|
sha1 'a6bb0e65c1c07d48f1d3e4df44fc17f6262952eb'
|
2010-10-31 20:41:34 +00:00
|
|
|
|
2012-09-02 08:08:44 +00:00
|
|
|
option "with-x", "Build with X support"
|
2012-08-30 19:50:28 +00:00
|
|
|
option "without-xspice", "Build without x-spice extensions"
|
|
|
|
|
2012-09-02 08:08:44 +00:00
|
|
|
depends_on :x11 if MacOS::X11.installed? or build.include? "with-x"
|
2012-04-06 18:43:12 +00:00
|
|
|
|
2010-10-31 20:41:34 +00:00
|
|
|
def install
|
2012-08-30 19:50:28 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--with-editline=yes
|
|
|
|
]
|
2012-09-02 08:08:44 +00:00
|
|
|
args << "--enable-x" if build.include? "with-x"
|
2012-08-30 19:50:28 +00:00
|
|
|
args << "--enable-xspice" unless build.include? "without-xspice"
|
2012-04-06 18:43:12 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
2010-10-31 20:41:34 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
2012-09-02 08:08:44 +00:00
|
|
|
def test
|
|
|
|
system "#{bin}/ngspice", "-v"
|
|
|
|
end
|
2010-10-31 20:41:34 +00:00
|
|
|
end
|