forked from KeckCAVES/homebrew-keckcaves
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathlidarviewer.rb
48 lines (41 loc) · 1.93 KB
/
lidarviewer.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
require 'formula'
class Lidarviewer < Formula
ver = "2.12"
pkgver = "1"
homepage 'http://keckcaves.org/software/lidarviewer'
url "https://github.com/KeckCAVES/LidarViewer.git", :revision => "v#{ver}"
version "#{ver}-#{pkgver}"
depends_on 'gfacciol/keckcaves/vrui'
# Patch for Yosemite & ElCapitan to fix the error
# "error: cast from pointer to smaller type 'GLuint' (aka 'unsigned int') loses information"
patch :p0, "--- PointBasedLightingShader.cpp 2016-10-02 01:14:36.000000000 +0200
+++ PointBasedLightingShader.cpp.new 2016-10-02 01:15:40.000000000 +0200
@@ -252,9 +252,9 @@
glCompileShaderFromString(geometryShader,geometryShaderSource);
/* Set the geometry shader's parameters: */
- glProgramParameteriARB(programObject,GL_GEOMETRY_VERTICES_OUT_ARB,4);
- glProgramParameteriARB(programObject,GL_GEOMETRY_INPUT_TYPE_ARB,GL_POINTS);
- glProgramParameteriARB(programObject,GL_GEOMETRY_OUTPUT_TYPE_ARB,GL_TRIANGLE_STRIP);
+ glProgramParameteriARB(reinterpret_cast<uintptr_t>(programObject),GL_GEOMETRY_VERTICES_OUT_ARB,4);
+ glProgramParameteriARB(reinterpret_cast<uintptr_t>(programObject),GL_GEOMETRY_INPUT_TYPE_ARB,GL_POINTS);
+ glProgramParameteriARB(reinterpret_cast<uintptr_t>(programObject),GL_GEOMETRY_OUTPUT_TYPE_ARB,GL_TRIANGLE_STRIP);
/* Compile the surfel fragment shader: */
const char* fragmentShaderSource=
"
def install
args = []
args << "INSTALLDIR=#{prefix}"
args << "ETCINSTALLDIR=#{etc}/#{name}"
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"])
end
end