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/"
|
2015-10-05 12:40:09 +00:00
|
|
|
url "ftp://ftp.musoftware.de/pub/uz/cc65/cc65-sources-2.13.3.tar.bz2"
|
|
|
|
sha256 "a98a1b69d3fa15551fe7d53d5bebfc5f9b2aafb9642ee14b735587a421e00468"
|
2015-12-19 06:35:53 +00:00
|
|
|
|
|
|
|
# CC65 stable has ceased to be maintained as of March 2013.
|
|
|
|
# The head build has a new home, and new maintainer, but no new stable release yet.
|
|
|
|
head "https://github.com/cc65/cc65.git"
|
|
|
|
|
2015-10-12 18:56:21 +00:00
|
|
|
bottle do
|
|
|
|
sha256 "a8d0601368f3f6c4048c63e4f785d5159c0aab3f4e3a86c49a65cd3cdf69ae53" => :el_capitan
|
|
|
|
sha256 "0320f31da62970bce189a3d6b8bdae5e595fa113eba7a37b5812e75dc6f89d72" => :yosemite
|
|
|
|
sha256 "8f56a19db5bfa9d606e7f636c3780a7e29206e0f9b845365f91550f58e46d2b4" => :mavericks
|
|
|
|
end
|
|
|
|
|
2015-08-03 12:55:31 +00:00
|
|
|
conflicts_with "grc", :because => "both install `grc` binaries"
|
2011-06-25 01:48:47 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
ENV.deparallelize
|
|
|
|
ENV.no_optimization
|
2014-12-03 10:06:45 +00:00
|
|
|
|
|
|
|
make_vars = ["prefix=#{prefix}", "libdir=#{share}"]
|
|
|
|
|
|
|
|
if head?
|
|
|
|
system "make", *make_vars
|
|
|
|
system "make", "install", *make_vars
|
|
|
|
else
|
|
|
|
system "make", "-f", "make/gcc.mak", *make_vars
|
|
|
|
system "make", "-f", "make/gcc.mak", "install", *make_vars
|
|
|
|
end
|
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
|
|
|
|
assert File.exist?("foo") # binary
|
|
|
|
end
|
2011-06-25 01:48:47 +00:00
|
|
|
end
|