forked from KeckCAVES/homebrew-keckcaves
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vrui-examples.rb
40 lines (34 loc) · 1.23 KB
/
vrui-examples.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
require 'formula'
class VruiExamplesBlueMarbleTex < Formula
homepage 'http://keckcaves.org/data/'
url 'http://keckcaves.org/data/BlueMarble.png'
sha1 '07e19462d4ccd6e6e9122ffa3d2417ce77c59317'
version '1'
end
class VruiExamples < Formula
ver = "3.1-002"
pkgver = "1"
homepage 'http://keckcaves.org/software/vrui'
url "https://github.com/KeckCAVES/Vrui.git", :revision => "v#{ver}"
version "#{ver}-#{pkgver}"
depends_on "KeckCAVES/keckcaves/vrui"
def install
args = []
args << "--directory=ExamplePrograms"
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 << "SHOWCOMMAND=1"
system "make", *args
system "make", *(args+["install"])
topodir = share+"VruiExamplePrograms"
VruiExamplesBlueMarbleTex.new.brew { topodir.install Dir['BlueMarble.png'] }
ln_sf topodir+"BlueMarble.png", topodir+"EarthTopography.png"
end
end