diff options
| -rw-r--r-- | Library/Formula/sqsh.rb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Library/Formula/sqsh.rb b/Library/Formula/sqsh.rb new file mode 100644 index 000000000..765612096 --- /dev/null +++ b/Library/Formula/sqsh.rb @@ -0,0 +1,35 @@ +require 'formula' + +class Sqsh <Formula + url 'http://downloads.sourceforge.net/sourceforge/sqsh/sqsh-2.1.7.tar.gz' + homepage 'http://www.sqsh.org/' + md5 'ce929dc8e23cedccac98288d24785e2d' + + depends_on 'freetds' + depends_on 'readline' + + def options + [["--with-x", "Enable X windows support."]] + end + + def install + args = ["--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}", + "--with-readline"] + + ENV['LIBDIRS'] = Readline.new('readline').lib + ENV['INCDIRS'] = Readline.new('readline').include + + if ARGV.include? "--with-x" + args << "--with-x" + args << "--x-libraries=/usr/X11/lib" + args << "--x-includes=/usr/X11/includes" + end + + ENV['SYBASE'] = Freetds.new("freetds").prefix + system "./configure", *args + system "make", "install" + system "make", "install.man" + end +end |
