homebrew-core/Formula/ace.rb

50 lines
1.6 KiB
Ruby

class Ace < Formula
desc "ADAPTIVE Communication Environment: OO network programming in C++"
homepage "https://www.dre.vanderbilt.edu/~schmidt/ACE.html"
url "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-7_0_5/ACE-7.0.5.tar.bz2"
sha256 "438bf41e184a5262e2b79f95edb6fd8384fb7ea69e249c54e75daf059a8d9757"
license "DOC"
livecheck do
url :stable
regex(/^ACE(?:\+[A-Z]+)*?[._-]v?(\d+(?:[._]\d+)+)$/i)
strategy :git do |tags, regex|
tags.map { |tag| tag[regex, 1]&.tr("_", ".") }
end
end
bottle do
sha256 cellar: :any, big_sur: "a8b07fff8fefb939f8eac8844f818403c865ea25d0d21ed5acdd830491ad07dc"
sha256 cellar: :any, catalina: "29e541be09f367e3fbfb9b4828a02664a9aff2b3c2105f09b110c7b278b7673d"
end
def install
ln_sf "config-macosx.h", "ace/config.h"
ln_sf "platform_macosx.GNU", "include/makeinclude/platform_macros.GNU"
# Set up the environment the way ACE expects during build.
ENV.cxx11
ENV["ACE_ROOT"] = buildpath
ENV["DYLD_LIBRARY_PATH"] = "#{buildpath}/lib"
# Done! We go ahead and build.
system "make", "-C", "ace", "-f", "GNUmakefile.ACE",
"INSTALL_PREFIX=#{prefix}",
"LDFLAGS=",
"DESTDIR=",
"INST_DIR=/ace",
"debug=0",
"shared_libs=1",
"static_libs=0",
"install"
system "make", "-C", "examples/Log_Msg"
pkgshare.install "examples"
end
test do
cp_r "#{pkgshare}/examples/Log_Msg/.", testpath
system "./test_callback"
end
end