Skip to content

Commit

Permalink
smlsharp-4.0.0 revision 2
Browse files Browse the repository at this point in the history
Use llvm@12 and refer to it through /usr/local/opt/llvm@12.
  • Loading branch information
uenoB committed Apr 22, 2021
1 parent fc8be5e commit cc08222
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Formula/smlsharp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,31 @@ class Smlsharp < Formula
sha256 "0b44fb1f369f7cfced197c68f0d3102e940dbe5288adc3bdf618a5a3ec3165db"
version "4.0.0"
license "MIT"
revision 1
revision 2

bottle do
root_url "https://github.com/smlsharp/repos/raw/main/homebrew"
sha256 big_sur: "39998a174c53d856b267e531645c0dc81337991af181e60efe4be6a4e253b6e3"
sha256 big_sur: "5a71f04d57ac27cece90983cb041a5bdd9ae6aca2612da0bd5137317d1490bd5"
end

depends_on "llvm@11"
depends_on "llvm@12"
depends_on "massivethreads"
depends_on "gmp"
depends_on "xz" => :build

def install
opt_llvm = Formula["llvm@11"].opt_prefix
opt_llvm = Formula["llvm@12"].opt_prefix.sub(/llvm\z/, "llvm@12")
opt_llvm_bin = opt_llvm/"bin"
system "./configure", "--prefix=#{prefix}", "--with-llvm=#{opt_llvm}"
system "make", "stage"
system "make", "all"
inreplace "src/config.mk" do |s|
s.sub! /^LLC =.*$/, "LLC = #{opt_llvm_bin}/llc"
s.sub! /^OPT =.*$/, "OPT = #{opt_llvm_bin}/opt"
s.sub! /^LLVM_AS =.*$/, "LLVM_AS = #{opt_llvm_bin}/llvm-as"
s.sub! /^LLVM_DIS =.*$/, "LLVM_DIS = #{opt_llvm_bin}/llvm-dis"
end
system "make", "-t"
system "make", "install"
end

Expand Down

0 comments on commit cc08222

Please sign in to comment.