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.47.tar.gz" sha256 "26ba39e199f97724017bd2a888c5f59b22c7ab41e36f186130f03c845bb2a749" head "https://github.com/aws/aws-sdk-cpp.git" bottle do cellar :any sha256 "496c5d210f5563755ef6d7baffa06f237565c91b638acc99c287672db5c24f48" => :sierra sha256 "9d6d8f08933e3441459e192079cfe39d8b05ada7878970c1bcc6d558ba333f7e" => :el_capitan sha256 "021eec9d0bc5168dc5f48264f6befa0b40f2ae0916aa579021ef69f066152867" => :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