-
Notifications
You must be signed in to change notification settings - Fork 7
/
tuttleofx.rb
82 lines (70 loc) · 2.39 KB
/
tuttleofx.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
require "formula"
class Tuttleofx < Formula
homepage "http://www.tuttleofx.org"
url "https://github.com/tuttleofx/TuttleOFX.git", :tag => "v0.12.1"
version "0.12.1"
devel do
url "https://github.com/tuttleofx/TuttleOFX.git", :branch => "develop"
version "develop"
end
bottle do
root_url "https://bintray.com/artifact/download/cbenhagen/homebrew-video"
sha256 "0f06bab20cee751094bdea2ea46927a8c4f28e17759f995d5dc9187d25da4506" => :yosemite
end
depends_on "python"
depends_on :x11
depends_on "cmake" => :build
depends_on "swig" => :build
depends_on "boost"
depends_on "boost-python"
depends_on "ctl"
depends_on "ffmpeg"
depends_on "fontconfig"
depends_on "freetype"
depends_on "glew"
depends_on "imagemagick"
depends_on "jpeg"
depends_on "jpeg-turbo"
depends_on "libcaca"
depends_on "libraw"
depends_on "little-cms2"
depends_on "openexr"
depends_on "openjpeg"
depends_on "seexpr"
depends_on "numpy" => :recommended
depends_on "openimageio"
depends_on "freeglut"
# for sam tools
depends_on "clint" => :python
depends_on "argcomplete" => :python
def install
Language::Python.each_python(build) do |python, version|
py_abspath = `#{python} -c "import sys; print(sys.executable)"`.strip
py_prefix = `#{python} -c "from __future__ import print_function; import sys; print(sys.prefix)"`.strip
py_include = `#{python} -c "from __future__ import print_function; import distutils.sysconfig; print(distutils.sysconfig.get_python_inc(True))"`.strip
py_numpy = build.without?("numpy")
mkdir_p "build_py#{version}"
cd "build_py#{version}"
system "cmake", "..",
"-DCMAKE_INSTALL_PREFIX=#{prefix}",
"-DCMAKE_BUILD_TYPE=RELEASE",
"-DPYTHON_EXECUTABLE=#{py_abspath}",
"-DPYTHON_LIBRARY=#{py_prefix}/lib/libpython#{version}.dylib",
"-DPYTHON_INCLUDE_DIR=#{py_include}",
"-DWITHOUT_NUMPY=#{py_numpy}"
system "make"
system "make", "install"
cd ".."
end
end
test do
system "sam", "do", "-n"
end
def caveats; <<-EOS.undent
Before using TuttleOFX plugins, you need to set an environment variable to tell where are the plugins:
export OFX_PLUGIN_PATH=/usr/local/Cellar/tuttleofx/#{version}/OFX
For usage instructions:
more #{opt_prefix}/USAGE.md
EOS
end
end