homebrew-core/Formula/libbpg.rb

33 lines
906 B
Ruby
Raw Normal View History

require "formula"
class Libbpg < Formula
homepage "http://bellard.org/bpg/"
url "http://bellard.org/bpg/libbpg-0.9.1.tar.gz"
sha1 "0ece88372e178985d3327bbb7a0c94947586b3f1"
2014-12-06 16:04:27 +00:00
bottle do
cellar :any
2014-12-08 03:48:07 +00:00
sha1 "3ad0c2c2c23a9066e7e8db6ef93c90be7d0d8fe9" => :yosemite
sha1 "d4f5563138bb800f9ec301a972ae9be74ba75672" => :mavericks
sha1 "2edf42ccb895e3ff41f4c3c4a95c04d8543c5dd5" => :mountain_lion
2014-12-06 16:04:27 +00:00
end
depends_on "libpng"
depends_on "jpeg"
def install
# Following changes are necessary for compilation on OS X. These have been
# reported to the author and can be removed once incorporated upstream.
inreplace "libavutil/mem.c" do |s|
s.gsub! "#include <malloc.h>", "#include <malloc/malloc.h>"
end
bin.mkpath
system "make", "install", "prefix=#{prefix}", "CONFIG_APPLE=y"
end
test do
2014-12-06 17:08:34 +00:00
system "#{bin}/bpgenc", test_fixtures("test.png")
end
end