-
Notifications
You must be signed in to change notification settings - Fork 17
/
visualizer.rb
47 lines (39 loc) · 1.54 KB
/
visualizer.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
# This is named 'visualizer' and not '3dvisualizer' only because
# of limitations in class naming between ruby and homebrew.
require 'formula'
class Visualizer < Formula
ver = "1.14"
pkgver = "1"
homepage 'http://keckcaves.org/software/3dvisualizer'
url "https://github.com/KeckCAVES/3DVisualizer.git", :revision => "v#{ver}"
version "#{ver}-#{pkgver}"
depends_on 'KeckCAVES/keckcaves/vrui'
# Don't strip symbols; need them for dynamic linking.
skip_clean 'bin'
# option 'without-shaders',\
"Use fixed OpenGL functionality instead of GLSL shaders\n\t"\
"for some visualization algorithms, especially volume rendering.\n\t"\
"This flag should only be set for use on less powerful graphics hardware."
def install
inreplace 'makefile', 'UNSUPPORTED_MODULE_NAMES =', 'MODULE_NAMES +='
inreplace 'makefile', 'UnstructuredPlot3DFile', ''
args = []
args << "INSTALLDIR=#{prefix}"
args << "VRUI_MAKEDIR=#{HOMEBREW_PREFIX}/share/vrui/make"
args << "JPEG_BASEDIR=#{HOMEBREW_PREFIX}"
args << "TIFF_BASEDIR=#{HOMEBREW_PREFIX}"
args << "LIBUSB1_BASEDIR=#{HOMEBREW_PREFIX}"
args << "PNG_BASEDIR=#{MacOS::X11.prefix}"
args << "X11_BASEDIR=#{MacOS::X11.prefix}"
args << "GL_BASEDIR=#{MacOS::X11.prefix}"
args << "GLU_BASEDIR=#{MacOS::X11.prefix}"
args << "USE_SHADERS=1"
args << "SHOWCOMMAND=1"
system "make", *args
system "make", *(args+["install"])
end
def caveats; <<-EOS.undent
Please note that the name of the installed executable is "3DVisualizer".
EOS
end
end