diff options
| author | Jack Nagel | 2013-09-18 10:49:13 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-09-18 10:49:44 -0500 |
| commit | 1492a07a512686fc8094c4205674c7b940afdac7 (patch) | |
| tree | 1369a7b6c02b3014f4208fb0515d90bbbc0a79b8 /Library/Formula | |
| parent | ebb2220d61a4a2bd6fef7cf258fb6a2c55c318ce (diff) | |
| download | homebrew-1492a07a512686fc8094c4205674c7b940afdac7.tar.bz2 | |
pgplot: use resource
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/pgplot.rb | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/Library/Formula/pgplot.rb b/Library/Formula/pgplot.rb index 670002bf6..eb378f32d 100644 --- a/Library/Formula/pgplot.rb +++ b/Library/Formula/pgplot.rb @@ -1,11 +1,5 @@ require 'formula' -class Button < Formula - url 'http://www.ucm.es/info/Astrof/software/button/button.tar.gz' - sha1 'd1bfcb51a9ce5819e00d5d1a1d8c658691193f11' - version '1.0' -end - class Pgplot < Formula homepage 'http://www.astro.caltech.edu/~tjp/pgplot/' url 'ftp://ftp.astro.caltech.edu/pub/pgplot/pgplot522.tar.gz' @@ -17,6 +11,12 @@ class Pgplot < Formula depends_on :x11 depends_on :fortran + resource 'button' do + url 'http://www.ucm.es/info/Astrof/software/button/button.tar.gz' + sha1 'd1bfcb51a9ce5819e00d5d1a1d8c658691193f11' + version '1.0' + end + def patches # from MacPorts: https://trac.macports.org/browser/trunk/dports/graphics/pgplot/files {:p0 => [ @@ -87,13 +87,10 @@ class Pgplot < Formula (prefix/'examples').install Dir['*demo*', '../examples/pgdemo*.f', '../cpg/cpgdemo*.c', '../drivers/*/pg*demo.*'] end - # install libbutton - if build.include? 'with-button' - Button.new.brew do - inreplace 'Makefile', 'f77', "#{ENV.fc} #{ENV.fcflags}" - system "make" - lib.install 'libbutton.a' - end - end + resource('button').stage do + inreplace 'Makefile', 'f77', "#{ENV.fc} #{ENV.fcflags}" + system "make" + lib.install 'libbutton.a' + end if build.with? 'button' end end |
