aws-sdk-cpp 0.10.6 (new formula)
Closes #109. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
e424f80c51
commit
eabdddf7e1
1 changed files with 40 additions and 0 deletions
40
Formula/aws-sdk-cpp.rb
Normal file
40
Formula/aws-sdk-cpp.rb
Normal 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
|
Loading…
Reference in a new issue