2011-06-25 01:48:47 +00:00
|
|
|
class Cc65 < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "6502 C compiler"
|
2015-08-03 12:55:31 +00:00
|
|
|
homepage "https://cc65.github.io/cc65/"
|
2017-08-10 13:46:03 +00:00
|
|
|
url "https://github.com/cc65/cc65/archive/V2.16.tar.gz"
|
|
|
|
sha256 "fdbbf1efbf2324658a5774fdceef4a1b202322a04f895688d95694843df76792"
|
2015-12-19 06:35:53 +00:00
|
|
|
|
|
|
|
head "https://github.com/cc65/cc65.git"
|
|
|
|
|
2015-10-12 18:56:21 +00:00
|
|
|
bottle do
|
2017-09-21 13:47:19 +00:00
|
|
|
sha256 "d0e95f0073a40ad6a7cf252c0a9ac3097fecdd7d1b8e132f3cb0314554c8e673" => :high_sierra
|
2017-08-10 13:59:29 +00:00
|
|
|
sha256 "c3e1ba0c47aa7cff0841b4aba4688d8598fbc39733cc4da9cfebbb626330e222" => :sierra
|
|
|
|
sha256 "f0c5fee3dab48fc030953717cdea847a1bd7fc040d50f34407330f190de54420" => :el_capitan
|
|
|
|
sha256 "c7b91bec2fa66f33f2c1f87a12db927ca613652e9a0e2b52848f6cc06d00acbc" => :yosemite
|
2015-10-12 18:56:21 +00:00
|
|
|
end
|
|
|
|
|
2016-09-24 15:45:48 +00:00
|
|
|
conflicts_with "grc", :because => "both install `grc` binaries"
|
2011-06-25 01:48:47 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
ENV.deparallelize
|
2014-12-03 10:06:45 +00:00
|
|
|
|
|
|
|
make_vars = ["prefix=#{prefix}", "libdir=#{share}"]
|
|
|
|
|
2017-08-10 13:46:03 +00:00
|
|
|
system "make", *make_vars
|
|
|
|
system "make", "install", *make_vars
|
2011-06-25 01:48:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
Library files have been installed to:
|
2016-01-20 21:10:07 +00:00
|
|
|
#{pkgshare}
|
2011-06-25 01:48:47 +00:00
|
|
|
EOS
|
|
|
|
end
|
2014-02-07 20:28:19 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"foo.c").write "int main (void) { return 0; }"
|
|
|
|
|
|
|
|
system bin/"cl65", "foo.c" # compile and link
|
2017-10-06 09:08:02 +00:00
|
|
|
assert_predicate testpath/"foo", :exist? # binary
|
2014-02-07 20:28:19 +00:00
|
|
|
end
|
2011-06-25 01:48:47 +00:00
|
|
|
end
|