diff --git a/Formula/juise.rb b/Formula/juise.rb index 085702689fcb5..f3f34ff94573d 100644 --- a/Formula/juise.rb +++ b/Formula/juise.rb @@ -1,8 +1,8 @@ class Juise < Formula desc "JUNOS user interface scripting environment" homepage "https://github.com/Juniper/juise/wiki" - url "https://github.com/Juniper/juise/releases/download/0.6.1/juise-0.6.1.tar.gz" - sha256 "5985f2b19d017a52de2a77b0246afed86d2b9227acd277113468407db11cd146" + url "https://github.com/Juniper/juise/releases/download/0.7.2/juise-0.7.2.tar.gz" + sha256 "869f18cb6095c2340872bc02235530616fcfc2e88c523c6a05238a521d0afe82" bottle do sha256 "da6dcf67dee23e98befee63f93796490a877229679e77befa25246da59756822" => :mavericks @@ -19,17 +19,24 @@ class Juise < Formula depends_on "libtool" => :build depends_on "libslax" - depends_on "libssh2" - depends_on "pcre" - depends_on "sqlite" def install - system "sh ./bin/setup.sh" if build.head? + system "sh", "./bin/setup.sh" if build.head? + + # Prevent sandbox violation where juise's `make install` tries to + # write to "/usr/local/Cellar/libslax/0.20.1/lib/slax/extensions" + # Reported 5th May 2016: https://github.com/Juniper/juise/issues/34 + inreplace "configure", + "SLAX_EXTDIR=\"`$SLAX_CONFIG --extdir | head -1`\"", + "SLAX_EXTDIR=\"#{lib}/slax/extensions\"" + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", - "--with-libssh2-prefix=#{HOMEBREW_PREFIX}", - "--with-sqlite3-prefix=#{Formula["sqlite"].opt_prefix}", "--enable-libedit" system "make", "install" end + + test do + assert_equal "libjuice version #{version}", shell_output("#{bin}/juise -V").lines.first.chomp + end end