2011-08-15 00:48:31 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Avra < Formula
|
|
|
|
homepage 'http://avra.sourceforge.net/'
|
2014-02-27 14:19:55 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/avra/1.3.0/avra-1.3.0.tar.bz2'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '7ad7d168b02107d4f2d72951155798c2fd87d5a9'
|
2011-08-15 00:48:31 +00:00
|
|
|
|
2014-12-27 18:35:58 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "e2421ffa73e2cce740fdf6d03083931511ba729c" => :yosemite
|
|
|
|
sha1 "93af396271220b7b110c8506affea3703c914482" => :mavericks
|
|
|
|
sha1 "9a850a1c6ca9634a2a8e33b1f399d272cf2c78ee" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2014-12-04 22:38:00 +00:00
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
2012-08-28 17:49:58 +00:00
|
|
|
|
2011-08-15 00:48:31 +00:00
|
|
|
def install
|
|
|
|
# build fails if these don't exist
|
2012-09-06 22:50:12 +00:00
|
|
|
touch 'NEWS'
|
|
|
|
touch 'ChangeLog'
|
2012-02-21 06:04:21 +00:00
|
|
|
cd "src" do
|
2011-10-18 17:01:52 +00:00
|
|
|
system "./bootstrap"
|
2012-02-21 06:04:21 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}"
|
2011-10-18 17:01:52 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2014-12-27 17:06:13 +00:00
|
|
|
(share/"avra").install Dir["includes/*"]
|
2011-08-15 00:48:31 +00:00
|
|
|
end
|
2014-02-12 21:10:27 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.asm").write " .device attiny10\n ldi r16,0x42\n"
|
2014-05-04 19:12:41 +00:00
|
|
|
output = shell_output("#{bin}/avra -l test.lst test.asm")
|
2014-02-12 21:10:27 +00:00
|
|
|
assert output.include?("Assembly complete with no errors.")
|
|
|
|
assert File.exist?("test.hex")
|
|
|
|
assert File.read("test.lst").include?("ldi r16,0x42")
|
|
|
|
end
|
2011-08-15 00:48:31 +00:00
|
|
|
end
|