homebrew-core/Formula/ngspice.rb

30 lines
773 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 'http://downloads.sourceforge.net/project/ngspice/ng-spice-rework/24/ngspice-24.tar.gz'
2012-08-30 19:50:28 +00:00
sha1 'a6bb0e65c1c07d48f1d3e4df44fc17f6262952eb'
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"
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"
system "./configure", *args
system "make install"
end
2012-09-02 08:08:44 +00:00
def test
system "#{bin}/ngspice", "-v"
end
end