forked from mht208/homebrew-formal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
leon.rb
28 lines (22 loc) · 958 Bytes
/
leon.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require 'formula'
class Leon < Formula
homepage 'https://leon.epfl.ch'
url 'https://github.com/epfl-lara/leon.git', :revision => "90bfec6dff7c8e09cc493aeb028c627b4ca78c4e"
version '3.0'
depends_on 'sbt'
depends_on 'z3'
def install
scala_version = `#{HOMEBREW_PREFIX}/bin/scala -version 2>&1 | awk '{print $5}' | cut -d "." -f 1 -f 2`
scala_version = scala_version.strip
(lib/"leon").install "library"
inreplace "build.sbt", 'baseDirectory.value / "library"', "file(\"#{lib}/leon\") / \"library\""
system "sbt clean compile"
system "sbt script"
(lib/"leon/target/scala-#{scala_version}").install ("target/scala-#{scala_version}/classes")
(lib/'leon/src/main').install ("src/main/resources")
(lib/'leon/unmanaged/64').install Dir["unmanaged/64/*.jar"],
Dir["unmanaged/common/*.jar"]
inreplace 'leon', "#{buildpath}", "#{lib}/leon"
bin.install 'leon'
end
end