2015-05-13 04:21:07 +00:00
|
|
|
class SpiceProtocol < Formula
|
2015-11-25 18:32:56 +00:00
|
|
|
desc "Headers for SPICE protocol"
|
2016-11-05 21:55:41 +00:00
|
|
|
homepage "https://www.spice-space.org/"
|
2018-07-19 03:20:39 +00:00
|
|
|
url "https://www.spice-space.org/download/releases/spice-protocol-0.12.14.tar.bz2"
|
|
|
|
sha256 "20350bc4309039fdf0d29ee4fd0033cde27bccf33501e13b3c1befafde9d0c9c"
|
2019-01-06 20:48:53 +00:00
|
|
|
revision 1
|
2015-05-13 04:21:07 +00:00
|
|
|
|
|
|
|
def install
|
2017-09-06 17:12:15 +00:00
|
|
|
system "./configure", "--disable-silent-rules",
|
2015-05-13 04:21:07 +00:00
|
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
2019-01-06 20:48:53 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.cpp").write <<~EOS
|
|
|
|
#include <spice/protocol.h>
|
|
|
|
int main() {
|
|
|
|
return (SPICE_LINK_ERR_OK == 0) ? 0 : 1;
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
system ENV.cc, "test.cpp",
|
|
|
|
"-I#{include}/spice-1",
|
|
|
|
"-o", "test"
|
|
|
|
system "./test"
|
|
|
|
end
|
2015-05-13 04:21:07 +00:00
|
|
|
end
|