2014-06-17 06:48:56 +00:00
|
|
|
require "formula"
|
2010-06-27 19:18:19 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Gputils < Formula
|
2014-06-17 06:48:56 +00:00
|
|
|
homepage "http://gputils.sourceforge.net/"
|
2014-10-28 05:42:08 +00:00
|
|
|
url "https://downloads.sourceforge.net/project/gputils/gputils/1.4.0/gputils-1.4.0-1.tar.gz"
|
|
|
|
sha1 "26593b7237b0c436b4482d1038216b467ec660b7"
|
2010-06-27 19:18:19 +00:00
|
|
|
|
2014-10-28 06:31:24 +00:00
|
|
|
bottle do
|
|
|
|
sha1 "8990a94d132cc92b08518767ecaa25c93246f7cb" => :yosemite
|
|
|
|
sha1 "2536c92c27e1982743965fa4c5c3bbae997105e1" => :mavericks
|
|
|
|
sha1 "b4ef0c6743be8f8b0cd11e7148cee046f8780d59" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2010-06-27 19:18:19 +00:00
|
|
|
def install
|
|
|
|
system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking"
|
|
|
|
system "make install"
|
|
|
|
end
|
2014-02-12 20:17:10 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
# assemble with gpasm
|
|
|
|
(testpath/"test.asm").write " movlw 0x42\n end\n"
|
|
|
|
system "#{bin}/gpasm -p p16f84 test.asm"
|
|
|
|
assert File.exist?("test.hex")
|
|
|
|
|
|
|
|
# disassemble with gpdasm
|
|
|
|
output = `#{bin}/gpdasm -p p16f84 test.hex`
|
2014-10-28 05:42:08 +00:00
|
|
|
assert_equal "0000: 3042 movlw 0x42\n", output
|
2014-02-12 20:17:10 +00:00
|
|
|
assert_equal 0, $?.exitstatus
|
|
|
|
end
|
2010-06-27 19:18:19 +00:00
|
|
|
end
|