Skip to content

Commit

Permalink
smlsharp-4.0.0 revision 1
Browse files Browse the repository at this point in the history
Use llvm@11 instead of llvm@9, as pointed out by Issue #1.
  • Loading branch information
uenoB committed Apr 8, 2021
1 parent 04e1910 commit fc8be5e
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions Formula/smlsharp.rb
Original file line number Diff line number Diff line change
@@ -1,34 +1,27 @@
class Smlsharp < Formula
desc "Standard ML compiler with practical extensions"
homepage "http://www.pllab.riec.tohoku.ac.jp/smlsharp/"
homepage "https://smlsharp.github.io/"
url "https://github.com/smlsharp/smlsharp/releases/download/v4.0.0/smlsharp-4.0.0.tar.gz"
sha256 "0b44fb1f369f7cfced197c68f0d3102e940dbe5288adc3bdf618a5a3ec3165db"
version "4.0.0"
license "BSD-3-Clause"
license "MIT"
revision 1

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

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

def install
opt_llvm = Formula["llvm@9"].opt_prefix
opt_llvm_bin = Formula["llvm@9"].opt_bin
opt_llvm = Formula["llvm@11"].opt_prefix
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 fc8be5e

Please sign in to comment.