48 lines
1.6 KiB
Ruby
48 lines
1.6 KiB
Ruby
class Bde < Formula
|
|
desc "Basic Development Environment: foundational C++ libraries used at Bloomberg"
|
|
homepage "https://github.com/bloomberg/bde"
|
|
url "https://github.com/bloomberg/bde/archive/3.39.0.0.tar.gz"
|
|
sha256 "e16f0821e925f23de279f72cfd2b2ff23ae344979a4b285d9d63abd4f759f329"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "5fe57437f986a42e494df5eff06be60371cac212be241bb72e4c4c98fd3a031a" => :catalina
|
|
sha256 "0928ef24f2fa7b32810365b6dfa52737562017acb3b18c3359ca2a33841355bf" => :mojave
|
|
sha256 "9544ca69a703818f4a7762d38da5382f6b463afc995ae50c1a3603f2dab2fd2c" => :high_sierra
|
|
end
|
|
|
|
depends_on "cmake" => :build
|
|
depends_on "ninja" => :build
|
|
|
|
resource "bde-tools" do
|
|
url "https://github.com/bloomberg/bde-tools/archive/v1.1.tar.gz"
|
|
sha256 "c5d77d5e811e79f824816ee06dbf92a2a7e3eb0b6d9f27088bcac8c06d930fd5"
|
|
end
|
|
|
|
def install
|
|
buildpath.install resource("bde-tools")
|
|
|
|
ENV.cxx11
|
|
|
|
system "python", "./bin/waf", "configure", "--prefix=#{prefix}"
|
|
system "python", "./bin/waf", "build"
|
|
system "python", "./bin/waf", "install"
|
|
end
|
|
|
|
test do
|
|
# bde tests are incredibly performance intensive
|
|
# test below does a simple sanity check for linking against bsl.
|
|
(testpath/"test.cpp").write <<~EOS
|
|
#include <bsl/bsl_string.h>
|
|
#include <bsl/bslma_default.h>
|
|
int main() {
|
|
using namespace BloombergLP;
|
|
bsl::string string(bslma::Default::globalAllocator());
|
|
return 0;
|
|
}
|
|
EOS
|
|
system ENV.cxx, "-I#{include}/bsl", "test.cpp", "-L#{lib}", "-lbsl", "-o", "test"
|
|
system "./test"
|
|
end
|
|
end
|