class AwsSdkCpp < Formula desc "AWS SDK for C++" homepage "https://github.com/aws/aws-sdk-cpp" url "https://github.com/aws/aws-sdk-cpp/archive/1.0.131.tar.gz" sha256 "1cee828cce6a6bd41ddea41c86017ebbfdaadf7ce0a0af3a38fce6ec77376733" head "https://github.com/aws/aws-sdk-cpp.git" bottle do cellar :any sha256 "e1658b454557d8b8b73c5e1fafff125d7f4346a3aded7b1b6e0cea9920c28270" => :sierra sha256 "99d22275dfadae181ee05a6c63261256e868e9a3059d3ed7b0765e1e45e7a4d3" => :el_capitan sha256 "59636a771ba473157ae1dafc7f9f88e13570521ed381f998b10c16f78cdb01e5" => :yosemite end option "with-static", "Build with static linking" option "without-http-client", "Don't include the libcurl HTTP client" depends_on "cmake" => :build def install args = std_cmake_args args << "-DSTATIC_LINKING=1" if build.with? "static" args << "-DNO_HTTP_CLIENT=1" if build.without? "http-client" mkdir "build" do system "cmake", "..", *args system "make" system "make", "install" end lib.install Dir[lib/"mac/Release/*"].select { |f| File.file? f } end test do (testpath/"test.cpp").write <<-EOS.undent #include #include int main() { std::cout << Aws::Version::GetVersionString() << std::endl; return 0; } EOS system ENV.cxx, "test.cpp", "-o", "test", "-laws-cpp-sdk-core" system "./test" end end