forked from rdowinton/homebrew-x11
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfreeglut.rb
45 lines (37 loc) · 1.29 KB
/
freeglut.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
class Freeglut < Formula
homepage "http://freeglut.sourceforge.net/"
url "https://downloads.sourceforge.net/project/freeglut/freeglut/2.8.1/freeglut-2.8.1.tar.gz"
sha256 "dde46626a62a1cd9cf48a11951cdd592e7067c345cffe193a149dfd47aef999a"
# Examples won't build on Snow Leopard as one of them requires
# a header the system provided X11 doesn't have.
option "with-examples", "Build the examples."
option :universal
depends_on :x11
patch :DATA if MacOS.version >= :lion
def install
ENV.universal_binary if build.universal?
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}"
if build.without?("examples") || MacOS.version < :lion
inreplace "Makefile" do |s|
s.change_make_var! "SUBDIRS", "src include doc"
end
end
system "make", "all"
system "make", "install"
end
end
__END__
diff -ur org/freeglut-2.8.1/include/GL/freeglut_std.h freeglut-2.8.1/include/GL/freeglut_std.h
--- org/freeglut-2.8.1/include/GL/freeglut_std.h
+++ freeglut-2.8.1/include/GL/freeglut_std.h
@@ -122,7 +122,7 @@
* Always include OpenGL and GLU headers
*/
#if __APPLE__
-# include <OpenGL/gl.h>
+# include <OpenGL/gl3.h>
# include <OpenGL/glu.h>
#else
# include <GL/gl.h>