mirror of
https://github.com/mistydemeo/tigerbrew.git
synced 2026-11-27 11:29:53 -05:00
59 lines
1.8 KiB
Ruby
59 lines
1.8 KiB
Ruby
require 'formula'
|
|
|
|
class Opencolorio < Formula
|
|
homepage 'http://opencolorio.org/'
|
|
url 'https://github.com/imageworks/OpenColorIO/archive/v1.0.9.tar.gz'
|
|
sha1 '45efcc24db8f8830b6892830839da085e19eeb6d'
|
|
|
|
head 'https://github.com/imageworks/OpenColorIO.git'
|
|
|
|
depends_on 'cmake' => :build
|
|
depends_on 'pkg-config' => :build
|
|
depends_on 'little-cms2'
|
|
depends_on :python => :optional
|
|
|
|
option 'with-tests', 'Verify the build with its unit tests (~1min)'
|
|
option 'with-java', 'Build ocio with java bindings'
|
|
option 'with-docs', 'Build the documentation'
|
|
|
|
def install
|
|
args = std_cmake_args
|
|
args << "-DOCIO_BUILD_JNIGLUE=ON" if build.with? 'java'
|
|
args << "-DOCIO_BUILD_TESTS=ON" if build.with? 'tests'
|
|
args << "-DOCIO_BUILD_DOCS=ON" if build.with? 'docs'
|
|
args << "-DCMAKE_VERBOSE_MAKEFILE=OFF"
|
|
|
|
# Python note:
|
|
# OCIO's PyOpenColorIO.so doubles as a shared library. So it lives in lib, rather
|
|
# than the usual HOMEBREW_PREFIX/lib/python2.7/site-packages per developer choice.
|
|
args << "-DOCIO_BUILD_PYGLUE=OFF" if build.without? 'python'
|
|
|
|
args << '..'
|
|
|
|
mkdir 'macbuild' do
|
|
system "cmake", *args
|
|
system "make"
|
|
system "make test" if build.with? 'tests'
|
|
system "make install"
|
|
end
|
|
end
|
|
|
|
def caveats
|
|
<<-EOS.undent
|
|
OpenColorIO requires several environment variables to be set.
|
|
You can source the following script in your shell-startup to do that:
|
|
|
|
#{HOMEBREW_PREFIX}/share/ocio/setup_ocio.sh
|
|
|
|
Alternatively the documentation describes what env-variables need set:
|
|
|
|
http://opencolorio.org/installation.html#environment-variables
|
|
|
|
You will require a config for OCIO to be useful. Sample configuration files
|
|
and reference images can be found at:
|
|
|
|
http://opencolorio.org/downloads.html
|
|
EOS
|
|
end
|
|
end
|