homebrew-core/Formula/ngspice.rb

30 lines
742 B
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Ngspice < Formula
homepage 'http://ngspice.sourceforge.net/'
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'
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"
depends_on :x11 if MacOS::X11.installed? or build.with? "x"
def install
2012-08-30 19:50:28 +00:00
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
--with-editline=yes
]
args << "--enable-x" if build.with? "x"
args << "--enable-xspice" if build.with? "xspice"
system "./configure", *args
system "make install"
end
test do
2012-09-02 08:08:44 +00:00
system "#{bin}/ngspice", "-v"
end
end