homebrew-core/Formula/aws-sdk-cpp.rb

48 lines
1.4 KiB
Ruby
Raw Normal View History

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.15.tar.gz"
sha256 "88c833843b852920e228f7748c703f822770ee6e9595de55bf4b027b12547f06"
head "https://github.com/aws/aws-sdk-cpp.git"
2016-04-20 18:45:51 +00:00
bottle do
cellar :any
2016-05-15 16:22:45 +00:00
sha256 "99341d48af6b12ccaefe79af4926677043a02a58bfd771def23fcd65ea860f68" => :el_capitan
sha256 "865d5fa5954f2e0b696d487325d1e316d6293e9aa127a0648f6542df89f8a49f" => :yosemite
sha256 "557e75a039f90d9e00f8554af632bf8142c7ae94dbb9c62bcfe2c62644b12718" => :mavericks
2016-04-20 18:45:51 +00:00
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