From 7452b56a38181d87b8749ccff61611f797ff67d3 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sat, 26 Jan 2013 13:52:14 -0800 Subject: [PATCH] adol-c: use Python one-liner instead of aardvark_shell_utils --- Formula/adol-c.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Formula/adol-c.rb b/Formula/adol-c.rb index a0425ce057..a936de05c4 100644 --- a/Formula/adol-c.rb +++ b/Formula/adol-c.rb @@ -7,14 +7,20 @@ class AdolC < Formula head 'https://projects.coin-or.org/svn/ADOL-C/trunk/', :using => :svn - # realpath is used in configure to find colpack - depends_on 'aardvark_shell_utils' => :build depends_on 'colpack' def install + # Make our own realpath script + (buildpath/'realpath').write <<-EOS.undent + #!/usr/bin/python + import os,sys + print os.path.realpath(sys.argv[1]) + EOS + system "chmod +x ./realpath" + # Configure may get automatically regenerated. So patch configure.ac also. inreplace %w(configure configure.ac) do |s| - s.gsub! "readlink -f", "realpath" + s.gsub! "readlink -f", "/#{buildpath}/realpath" s.gsub! "lib64", "lib" end