homebrew-core/Formula/ace.rb
2016-07-04 12:14:06 +01:00

44 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 "http://download.dre.vanderbilt.edu/previous_versions/ACE-6.4.0.tar.bz2"
sha256 "6a7fd5f23f6a004bb21978767df4e36adea078cd344e45bab50266213586c001"
bottle do
cellar :any
sha256 "0b53c1e14820be00af7115e9afefa09a380803589597038d962bb8ab16b79331" => :el_capitan
sha256 "d3e7e45197f7d7643d675ff84057df769947f6c0a9185388d23b2a28375760f0" => :yosemite
sha256 "72f21357797c350fe547a7978f402e564cf328c3662a0e321d1ec293f4899139" => :mavericks
end
def install
# Figure out the names of the header and makefile for this version
# of OSX and link those files to the standard names.
name = MacOS.cat.to_s.delete "_"
ln_sf "config-macosx-#{name}.h", "ace/config.h"
ln_sf "platform_macosx_#{name}.GNU", "include/makeinclude/platform_macros.GNU"
# Set up the environment the way ACE expects during build.
ENV["ACE_ROOT"] = buildpath
ENV["DYLD_LIBRARY_PATH"] = "#{buildpath}/ace:#{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"
pkgshare.install "examples"
end
test do
cp_r "#{pkgshare}/examples/Log_Msg/.", testpath
system "./test_callback"
end
end