diff options
| author | Adam Vandenberg | 2012-08-09 22:15:51 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-08-09 22:15:51 -0700 |
| commit | 4e83722a567b005ef78c3e219353cc35aa98832a (patch) | |
| tree | b8cdfd6ccc852cca5dfae0d657388074e51ed288 | |
| parent | 149cccb818da3600c3ac11ee8e9d88eaffdc5738 (diff) | |
| download | homebrew-4e83722a567b005ef78c3e219353cc35aa98832a.tar.bz2 | |
libqglviewer: use options dsl
| -rw-r--r-- | Library/Formula/libqglviewer.rb | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/Library/Formula/libqglviewer.rb b/Library/Formula/libqglviewer.rb index 76021db0b..8ce03b6d7 100644 --- a/Library/Formula/libqglviewer.rb +++ b/Library/Formula/libqglviewer.rb @@ -5,24 +5,15 @@ class Libqglviewer < Formula url 'http://www.libqglviewer.com/src/libQGLViewer-2.3.17.tar.gz' sha1 '03b1da73bdb07988184c1f5d7c1c360be27b2a0e' - depends_on 'qt' + option :universal - def options - [ - ['--universal', "Build both x86_64 and x86 architectures."], - ] - end + depends_on 'qt' - def patches - DATA - end + def patches; DATA; end def install args = ["PREFIX=#{prefix}"] - - if ARGV.include? '--universal' - args << "CONFIG += x86 x86_64" - end + args << "CONFIG += x86 x86_64" if build.unversal? cd 'QGLViewer' do system "qmake", *args @@ -30,10 +21,9 @@ class Libqglviewer < Formula end end - def caveats - <<-EOS.undent - To avoid issues with runtime linking and facilitate usage of the library: - sudo ln -s "#{prefix}/QGLViewer.framework" "/Library/Frameworks/QGLViewer.framework" + def caveats; <<-EOS.undent + To avoid issues with runtime linking and facilitate usage of the library: + sudo ln -s "#{prefix}/QGLViewer.framework" "/Library/Frameworks/QGLViewer.framework" EOS end end |
