homebrew-core/Formula/frege.rb
Alex Dunn b3ba6cc3f2 frege 3.22.524-gcc99d7e
Closes Homebrew/homebrew#38923.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-04-22 18:48:42 +08:00

26 lines
765 B
Ruby

class Frege < Formula
homepage "https://github.com/Frege/frege/"
url "https://github.com/Frege/frege/releases/download/3.22.324/frege3.22.524-gcc99d7e.jar"
version "3.22.524-gcc99d7e"
sha256 "8508f5b1f03beb69311a059e9a1684dfd0212ed1501fa96626f1e0b69363338a"
depends_on :java => "1.7+"
def install
libexec.install Dir["*"]
bin.write_jar_script libexec/"frege#{version}.jar", "fregec", "-Xss1m"
end
test do
(testpath/"test.fr").write <<-EOS
module Hello where
greeting friend = "Hello, " ++ friend ++ "!"
main args = do
println (greeting "World")
EOS
system bin/"fregec", "-d", testpath, "test.fr"
system "java", "-Xss1m", "-cp", "#{testpath}:#{libexec}/frege#{version}.jar", "Hello"
end
end