aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2013-09-18 10:49:13 -0500
committerJack Nagel2013-09-18 10:49:44 -0500
commit1492a07a512686fc8094c4205674c7b940afdac7 (patch)
tree1369a7b6c02b3014f4208fb0515d90bbbc0a79b8 /Library/Formula
parentebb2220d61a4a2bd6fef7cf258fb6a2c55c318ce (diff)
downloadhomebrew-1492a07a512686fc8094c4205674c7b940afdac7.tar.bz2
pgplot: use resource
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/pgplot.rb25
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