homebrew-core/Formula/avra.rb

30 lines
817 B
Ruby
Raw Normal View History

require 'formula'
class Avra < Formula
homepage 'http://avra.sourceforge.net/'
url 'https://downloads.sourceforge.net/project/avra/1.3.0/avra-1.3.0.tar.bz2'
sha1 '7ad7d168b02107d4f2d72951155798c2fd87d5a9'
2014-12-04 22:38:00 +00:00
depends_on "autoconf" => :build
depends_on "automake" => :build
def install
# build fails if these don't exist
touch 'NEWS'
touch 'ChangeLog'
cd "src" do
2011-10-18 17:01:52 +00:00
system "./bootstrap"
system "./configure", "--prefix=#{prefix}"
2011-10-18 17:01:52 +00:00
system "make install"
end
end
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")
assert output.include?("Assembly complete with no errors.")
assert File.exist?("test.hex")
assert File.read("test.lst").include?("ldi r16,0x42")
end
end