aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2012-08-27 21:54:32 -0700
committerAdam Vandenberg2012-08-27 21:54:32 -0700
commit93bc02cf3dda92479dc35a08cf53984617074b2d (patch)
treea69da6607149f1c136ccb8573558746b3728a220 /Library
parent4dc394990e9f45b7056c2507fbd3b2dabc81a21d (diff)
downloadhomebrew-93bc02cf3dda92479dc35a08cf53984617074b2d.tar.bz2
openimageio: use new dsl
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/openimageio.rb14
1 files changed, 5 insertions, 9 deletions
diff --git a/Library/Formula/openimageio.rb b/Library/Formula/openimageio.rb
index 9cbc872ad..2d9d2f129 100644
--- a/Library/Formula/openimageio.rb
+++ b/Library/Formula/openimageio.rb
@@ -41,6 +41,8 @@ class Openimageio < Formula
head 'https://github.com/OpenImageIO/oiio.git'
+ option 'with-tests', 'Dowload 95MB of test images and verify Oiio (~2 min)'
+
depends_on 'cmake' => :build
depends_on 'pkg-config' => :build
depends_on 'opencolorio'
@@ -57,15 +59,11 @@ class Openimageio < Formula
depends_on 'glew'
depends_on 'qt'
- def options
- [['--with-tests', 'Dowload 95MB of test images and verify Oiio (~2 min).']]
- end
-
def install
# Oiio is designed to have its testsuite images extracted one directory
# above the source. That's not a safe place for HB. Do the opposite,
# and move the entire source down into a subdirectory if --with-tests.
- if ARGV.include? '--with-tests' then
+ if build.include? 'with-tests' then
(buildpath+'localpub').install Dir['*']
chdir 'localpub'
end
@@ -91,11 +89,10 @@ class Openimageio < Formula
end
end
-
# Download standardized test images if the user throws --with-tests.
# 90% of the images are in tarballs, so they are cached normally.
# The webp and fits images are loose. Curl them each install.
- if ARGV.include? '--with-tests' then
+ if build.include? 'with-tests' then
d = buildpath
mkdir d+'webp-images' do
curl "http://www.gstatic.com/webp/gallery/[1-5].webp", "-O"
@@ -118,10 +115,9 @@ class Openimageio < Formula
OiioImages.new('oiioimages').brew { (d+'oiio-images').install Dir['*'] }
end
-
# make is a shell wrapper for cmake crafted by the devs (who have Lion).
system "make", *args
- system "make test" if ARGV.include? '--with-tests'
+ system "make test" if build.include? 'with-tests'
# There is no working make install in 1.0.2, devel or HEAD.
Dir.chdir 'dist/macosx' do
(lib + which_python ).install 'lib/python/site-packages'