2011-04-05 23:16:18 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Ace < Formula
|
|
|
|
homepage 'http://www.cse.wustl.edu/~schmidt/ACE.html'
|
2013-08-17 23:47:53 +00:00
|
|
|
url 'http://download.dre.vanderbilt.edu/previous_versions/ACE-6.2.1.tar.bz2'
|
|
|
|
sha1 '0454a0bd0374655e8272371ed43d86a68e364288'
|
2011-04-05 23:16:18 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
# ACE has two methods of compilation, "traditional" and ./configure.
|
|
|
|
# The "traditional" method has consistently given better results
|
|
|
|
# for the last 5 years, so although awkward to use on OSX, we use
|
|
|
|
# it anyway.
|
|
|
|
|
|
|
|
# First, we figure out the names of header files and make files
|
|
|
|
# for this version of OSX.
|
|
|
|
ver = %x[sw_vers -productVersion].chomp.split(".")
|
|
|
|
ver = ver.slice(0).to_i*100 + ver.slice(1).to_i
|
2012-04-24 04:36:25 +00:00
|
|
|
name = { 1002 => 'macosx',
|
|
|
|
1003 => 'macosx_panther',
|
|
|
|
1004 => 'macosx_tiger',
|
|
|
|
1005 => 'macosx_leopard',
|
2011-07-21 11:25:40 +00:00
|
|
|
1006 => 'macosx_snowleopard',
|
2012-04-24 04:36:25 +00:00
|
|
|
1007 => 'macosx_lion',
|
2012-08-03 20:35:17 +00:00
|
|
|
# TODO: Fix for 6.1.4.
|
|
|
|
# There's no Mountain Lion file yet.
|
|
|
|
# Reported to d.schmidt@vanderbilt.edu
|
|
|
|
1008 => 'macosx_lion' }[ver]
|
2011-04-05 23:16:18 +00:00
|
|
|
makefile = "platform_#{name}.GNU"
|
|
|
|
header = "config-" + name.sub('_','-') + ".h"
|
|
|
|
|
|
|
|
# Now, we give those files the appropriate standard names.
|
|
|
|
ln_sf header, "ace/config.h"
|
|
|
|
ln_sf makefile, "include/makeinclude/platform_macros.GNU"
|
|
|
|
|
|
|
|
# Set up the environment the way ACE expects during build.
|
2012-02-24 20:50:21 +00:00
|
|
|
ENV['ACE_ROOT'] = buildpath
|
|
|
|
ENV['DYLD_LIBRARY_PATH'] = "#{buildpath}/ace:#{buildpath}/lib"
|
2011-04-05 23:16:18 +00:00
|
|
|
|
|
|
|
# Done! We go ahead and build.
|
2012-02-21 06:04:21 +00:00
|
|
|
cd "ace" do
|
2012-02-24 20:50:21 +00:00
|
|
|
system "make", "-f", "GNUmakefile.ACE",
|
|
|
|
"INSTALL_PREFIX=#{prefix}",
|
|
|
|
"LDFLAGS=",
|
|
|
|
"DESTDIR=",
|
|
|
|
"INST_DIR=/ace",
|
|
|
|
"debug=0",
|
2012-04-24 04:36:25 +00:00
|
|
|
"shared_libs=1",
|
|
|
|
"static_libs=0",
|
2012-02-24 20:50:21 +00:00
|
|
|
"install"
|
2012-02-21 06:04:21 +00:00
|
|
|
end
|
2011-04-05 23:16:18 +00:00
|
|
|
end
|
|
|
|
end
|