homebrew-core/Formula/cc65.rb

36 lines
1.0 KiB
Ruby

class Cc65 < Formula
desc "6502 C compiler"
homepage "https://cc65.github.io/cc65/"
url "https://github.com/cc65/cc65/archive/V2.19.tar.gz"
sha256 "157b8051aed7f534e5093471e734e7a95e509c577324099c3c81324ed9d0de77"
license "Zlib"
head "https://github.com/cc65/cc65.git"
bottle do
sha256 "d0010fe7f4b58daea95dd57f4116668bd2bedfbd5392e73412162292034d456d" => :big_sur
sha256 "a773d68d33b81899ebe7c10d294c0d6e2c2eab9063206f787b1e8c5b8e36f437" => :catalina
sha256 "bd750ae3470b736a6b7260723ead51d6e871edc8d8607f53b670f03c84932a00" => :mojave
end
conflicts_with "grc", because: "both install `grc` binaries"
def install
system "make", "PREFIX=#{prefix}"
system "make", "install", "PREFIX=#{prefix}"
end
def caveats
<<~EOS
Library files have been installed to:
#{pkgshare}
EOS
end
test do
(testpath/"foo.c").write "int main (void) { return 0; }"
system bin/"cl65", "foo.c" # compile and link
assert_predicate testpath/"foo", :exist? # binary
end
end