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/'
|
2014-02-27 14:19:55 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/26/ngspice-26.tar.gz'
|
2014-02-15 17:25:07 +00:00
|
|
|
sha1 '7c043c604b61f76ad1941defeeac6331efc48ad2'
|
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"
|
|
|
|
|
2014-03-06 20:40:26 +00:00
|
|
|
depends_on :x11 if MacOS::X11.installed? or build.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
|
|
|
|
]
|
2014-03-06 20:40:26 +00:00
|
|
|
args << "--enable-x" if build.with? "x"
|
|
|
|
args << "--enable-xspice" if build.with? "xspice"
|
2012-04-06 18:43:12 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
2010-10-31 20:41:34 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
2014-02-23 21:31:41 +00:00
|
|
|
test do
|
2012-09-02 08:08:44 +00:00
|
|
|
system "#{bin}/ngspice", "-v"
|
|
|
|
end
|
2010-10-31 20:41:34 +00:00
|
|
|
end
|