homebrew-core/Formula/aws-sdk-cpp.rb
2017-04-05 09:03:03 +02: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/1.0.97.tar.gz"
sha256 "0f9ef99c43a29ddf191e53931e10b37732c629cb56b9b1fcae91f4a6639d77f9"
head "https://github.com/aws/aws-sdk-cpp.git"
bottle do
cellar :any
sha256 "1cb7090e53c497cd61d5fe3b4b0854e2edf155e776fba4cce494e5fd86c7848b" => :sierra
sha256 "ccf091996c4cec86337bac4a96e43d60b9415dfca3a42aa5e99bee4035193a79" => :el_capitan
sha256 "fd394c0548cae8ff6b8031da5ed37979f2b2c0dd979ea0475652c8970c3d04bc" => :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 <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