2017-12-25 22:05:47 +00:00
|
|
|
class Fruit < Formula
|
|
|
|
desc "Dependency injection framework for C++"
|
|
|
|
homepage "https://github.com/google/fruit/wiki"
|
2018-07-25 04:39:07 +00:00
|
|
|
url "https://github.com/google/fruit/archive/v3.2.0.tar.gz"
|
|
|
|
sha256 "78596be1c1c17d65ad3fe50c30fc817717ffb7dfc3b03d701106598a13b9ff32"
|
2017-12-25 22:05:47 +00:00
|
|
|
|
2018-02-14 14:30:18 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2018-07-25 04:58:29 +00:00
|
|
|
sha256 "68d203232c339e922d31b8202abd16d2548bab5fdfbe4ce1167822adc8ef1b00" => :high_sierra
|
|
|
|
sha256 "41d0398cabe780492baaaed4d04ab18f30a880d8ef5a951a8c3b7c8aa24ce4af" => :sierra
|
|
|
|
sha256 "5c1ec3722f8337844cd19ec5fa3f53005fbfb439ab65e2b704ab882df9b9a921" => :el_capitan
|
2018-02-14 14:30:18 +00:00
|
|
|
end
|
|
|
|
|
2017-12-25 22:05:47 +00:00
|
|
|
depends_on "cmake" => :build
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "cmake", ".", "-DFRUIT_USES_BOOST=False", *std_cmake_args
|
|
|
|
system "make", "install"
|
|
|
|
pkgshare.install "examples/hello_world/main.cpp"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
cp_r pkgshare/"main.cpp", testpath
|
|
|
|
system ENV.cxx, "main.cpp", "-I#{include}", "-L#{lib}",
|
|
|
|
"-std=c++11", "-lfruit", "-o", "test"
|
|
|
|
system "./test"
|
|
|
|
end
|
|
|
|
end
|