2014-05-20 22:17:30 +00:00
|
|
|
class Librem < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Toolkit library for real-time audio and video processing"
|
2014-05-20 22:17:30 +00:00
|
|
|
homepage "http://www.creytiv.com"
|
|
|
|
url "http://www.creytiv.com/pub/rem-0.4.6.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "7ce86f1eb8a3ba8cb14c490b80abe4d2389de306f385bfbb8c601c8b6ff2f865"
|
2014-05-20 22:17:30 +00:00
|
|
|
|
2014-07-03 21:00:26 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2014-10-20 14:02:15 +00:00
|
|
|
revision 1
|
|
|
|
sha1 "d9e53e65a746d38c30e749ed06bde416d5c4b83d" => :yosemite
|
|
|
|
sha1 "658296136774b5bad7b94a84d24b290ed412e1f6" => :mavericks
|
|
|
|
sha1 "ca0405f5fd90ebbaf16dd49205c1416a823f41f7" => :mountain_lion
|
2014-07-03 21:00:26 +00:00
|
|
|
end
|
|
|
|
|
2014-05-20 22:17:30 +00:00
|
|
|
depends_on "libre"
|
|
|
|
|
|
|
|
def install
|
2014-05-25 19:17:06 +00:00
|
|
|
libre = Formula["libre"]
|
|
|
|
system "make", "install", "PREFIX=#{prefix}",
|
|
|
|
"LIBRE_MK=#{libre.opt_share}/re/re.mk",
|
|
|
|
"LIBRE_INC=#{libre.opt_include}/re",
|
|
|
|
"LIBRE_SO=#{libre.opt_lib}"
|
2014-05-20 22:17:30 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2015-08-03 12:55:31 +00:00
|
|
|
(testpath/"test.c").write <<-EOS.undent
|
2014-05-20 22:17:30 +00:00
|
|
|
#include <re/re.h>
|
|
|
|
#include <rem/rem.h>
|
|
|
|
int main() {
|
2014-05-25 19:17:06 +00:00
|
|
|
return (NULL != vidfmt_name(VID_FMT_YUV420P)) ? 0 : 1;
|
2014-05-20 22:17:30 +00:00
|
|
|
}
|
|
|
|
EOS
|
2014-05-25 19:17:06 +00:00
|
|
|
system ENV.cc, "test.c", "-L#{opt_lib}", "-lrem", "-o", "test"
|
|
|
|
system "./test"
|
2014-05-20 22:17:30 +00:00
|
|
|
end
|
|
|
|
end
|