aws-sdk-cpp 0.10.6 (new formula)

Closes #109.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Zachary Wasserman 2016-04-06 16:32:58 -07:00 committed by Mike McQuaid
parent e424f80c51
commit eabdddf7e1

40
Formula/aws-sdk-cpp.rb Normal file
View file

@ -0,0 +1,40 @@
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"
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