2010-09-25 11:51:05 +00:00
|
|
|
require 'formula'
|
|
|
|
require 'download_strategy'
|
|
|
|
|
|
|
|
class VmallocDownloadStrategy <CurlDownloadStrategy
|
|
|
|
def _fetch
|
|
|
|
# downloading from AT&T requires using the following credentials
|
|
|
|
credentials = 'I accept www.opensource.org/licenses/cpl:.'
|
|
|
|
curl @url, '--output', @tarball_path, '--user', credentials
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Vmalloc < Formula
|
2010-09-25 11:51:05 +00:00
|
|
|
url 'http://www2.research.att.com/~gsf/download/tgz/vmalloc.2005-02-01.tgz',
|
|
|
|
:using => VmallocDownloadStrategy
|
|
|
|
homepage 'http://www2.research.att.com/sw/download/'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '13e45960831226b2b2ac93cdbe23d1d4c6e7eb38'
|
2010-09-25 11:51:05 +00:00
|
|
|
version '2005-02-01'
|
|
|
|
|
|
|
|
def install
|
|
|
|
# Vmalloc makefile does not work in parallel mode
|
|
|
|
ENV.deparallelize
|
|
|
|
# override Vmalloc makefile flags
|
|
|
|
inreplace Dir['src/**/Makefile'] do |s|
|
|
|
|
s.change_make_var! "CC", ENV.cc
|
|
|
|
s.change_make_var! "CXFLAGS", ENV.cflags
|
|
|
|
s.change_make_var! "CCMODE", ""
|
|
|
|
end
|
|
|
|
# make all Vmalloc stuff
|
|
|
|
system "/bin/sh ./Runmake"
|
|
|
|
# install manually
|
|
|
|
# put all includes into a directory of their own
|
|
|
|
(include + "vmalloc").install Dir['include/*.h']
|
|
|
|
lib.install Dir['lib/*.a']
|
|
|
|
man.install 'man/man3'
|
|
|
|
end
|
|
|
|
|
2012-05-08 05:15:16 +00:00
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
We agreed to the OSI Common Public License Version 1.0 for you.
|
|
|
|
If this is unacceptable you should uninstall.
|
|
|
|
EOS
|
2010-09-25 11:51:05 +00:00
|
|
|
end
|
|
|
|
end
|