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/0.14.7.tar.gz" sha256 "5a99276bae426f23dcfa00af52e1082283c5bf881bf7c9a625493c53a46acd12" head "https://github.com/aws/aws-sdk-cpp.git" bottle do cellar :any sha256 "03579519272d623a2dc415e91ff729b8b9362b4c12ec7936017b25c0996fe39b" => :el_capitan sha256 "fd913969eb424b99a5ec54765e1339b292a6a8cb11f99076a1310f9ef62c8f45" => :yosemite sha256 "dc15bb17ebea4cb584607d34379bbe12979a31240c07d6502b5f318431a579fa" => :mavericks 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