homebrew-core/Formula/sagittarius-scheme.rb

34 lines
992 B
Ruby
Raw Normal View History

class SagittariusScheme < Formula
desc "Free Scheme implementation supporting R6RS and R7RS"
homepage "https://bitbucket.org/ktakashi/sagittarius-scheme/wiki/Home"
url "https://bitbucket.org/ktakashi/sagittarius-scheme/downloads/sagittarius-0.7.0.tar.gz"
sha256 "365ccb0c0779717b04111ea86962d24a4841c07289426003f24782295fbe4658"
head "https://bitbucket.org/ktakashi/sagittarius-scheme", :using => :hg
option "without-docs", "Build without HTML docs"
depends_on "cmake" => :build
depends_on "libffi"
depends_on "bdw-gc"
def install
arch = MacOS.prefer_64_bit? ? "x86_64" : "x86"
args = std_cmake_args
args += %W[
-DCMAKE_SYSTEM_NAME=darwin
-DFFI_LIBRARY_DIR=#{Formula["libffi"].lib}
-DCMAKE_SYSTEM_PROCESSOR=#{arch}
]
system "cmake", *args
system "make", "doc" if build.with? "docs"
system "make", "install"
end
test do
assert_equal "4", shell_output("#{bin}/sagittarius -e '(display (+ 1 3))(exit)'")
end
end