2016-04-06 23:32:58 +00:00
|
|
|
class AwsSdkCpp < Formula
|
|
|
|
desc "AWS SDK for C++"
|
|
|
|
homepage "https://github.com/aws/aws-sdk-cpp"
|
2016-08-24 02:46:45 +00:00
|
|
|
url "https://github.com/aws/aws-sdk-cpp/archive/0.14.7.tar.gz"
|
|
|
|
sha256 "5a99276bae426f23dcfa00af52e1082283c5bf881bf7c9a625493c53a46acd12"
|
2016-04-06 23:32:58 +00:00
|
|
|
head "https://github.com/aws/aws-sdk-cpp.git"
|
|
|
|
|
2016-04-20 18:45:51 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2016-08-24 03:22:12 +00:00
|
|
|
sha256 "03579519272d623a2dc415e91ff729b8b9362b4c12ec7936017b25c0996fe39b" => :el_capitan
|
|
|
|
sha256 "fd913969eb424b99a5ec54765e1339b292a6a8cb11f99076a1310f9ef62c8f45" => :yosemite
|
|
|
|
sha256 "dc15bb17ebea4cb584607d34379bbe12979a31240c07d6502b5f318431a579fa" => :mavericks
|
2016-04-20 18:45:51 +00:00
|
|
|
end
|
|
|
|
|
2016-04-06 23:32:58 +00:00
|
|
|
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
|