Created
March 29, 2012 19:45
-
-
Save dpo/2242944 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class ASLDownloadStrategy < NoUnzipCurlDownloadStrategy | |
def _fetch | |
# The Netlib FTP server is picky about the password | |
# used for anonymous access; an @-terminated string isn't enough. | |
curl '-u', 'anonymous:[email protected]', @url, | |
'--output', @tarball_path | |
end | |
def stage | |
safe_system '/usr/bin/tar', 'xf', @tarball_path | |
chdir | |
end | |
end | |
class Asl < Formula | |
url 'ftp://www.netlib.org/ampl/solvers.tar', :using => ASLDownloadStrategy | |
md5 'f5575ca83e374ba13df9fa8a26ec4b62' | |
version '20120323' | |
homepage 'http://www.ampl.com/hooking.html' | |
def install | |
system 'make', '-f', 'makefile.u', "CC=#{ENV.cc}", "CFLAGS='-DNON_STIO -I.'" | |
system 'mv', 'amplsolver.a', 'libasl.a' | |
lib.install('libasl.a') | |
(include+'asl').install Dir['*.h'] | |
(include+'asl').install Dir['*.hd'] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment