2011-06-25 01:48:47 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Cc65 < Formula
|
2014-09-07 20:55:53 +00:00
|
|
|
homepage 'https://cc65.github.io/cc65/'
|
|
|
|
# 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'
|
2012-10-24 16:00:26 +00:00
|
|
|
url 'ftp://ftp.musoftware.de/pub/uz/cc65/cc65-sources-2.13.3.tar.bz2'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '925c6edfcef7057e24ecb0704fa07210faec07bc'
|
2011-06-25 01:48:47 +00:00
|
|
|
|
2013-11-22 00:25:57 +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:
|
|
|
|
#{share}/cc65
|
|
|
|
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
|