homebrew-core/Formula/aws-sdk-cpp.rb
2016-04-21 09:30:12 +01:00

47 lines
1.4 KiB
Ruby

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.10.6.tar.gz"
sha256 "01ad50677e2bde3bcd51128a9e043f76371e9642a5bea235637ce8e450eec5de"
head "https://github.com/aws/aws-sdk-cpp.git"
bottle do
cellar :any
sha256 "17b684fba219ee3f1351598945c908552fdc2a956d96fa621c4631aefa69353b" => :el_capitan
sha256 "61c4f97e0d6a78a2dc507fba39a128b49c3701639faede617e0f06669525ad87" => :yosemite
sha256 "6cfd0e5190bf11d041ca6d8a86bf8495d5a20db36e387ad92a82a6a64bc3d623" => :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 <aws/core/Version.h>
#include <iostream>
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