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-06-08 08:29:29 +00:00
|
|
|
url "https://github.com/aws/aws-sdk-cpp/archive/0.12.6.tar.gz"
|
|
|
|
sha256 "cdc1f19452ceaa96dd50f4af8767aaef1fe82abd53c561ef9ba2bd2a3d996d14"
|
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-06-08 09:07:22 +00:00
|
|
|
sha256 "fe29fbb83985aba0f7eb786e2743dc84bf8d475eb4d35f5590f1b4430102ac3b" => :el_capitan
|
|
|
|
sha256 "d1587bde75b3022f7e3ca601eec8312a9c3caafe491c686379381aab86e8500e" => :yosemite
|
|
|
|
sha256 "1ac3965cff94bc4bc02a4f818e878a393b60cf96fc18813356571dd5dc264494" => :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
|