Last active
August 29, 2015 14:26
-
-
Save cbeck88/c92559f9449838c7a346 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Gles2mesa < Formula | |
homepage 'http://www.mesa3d.org' | |
url 'ftp://ftp.freedesktop.org/pub/mesa/10.5.4/mesa-10.5.4.tar.gz' | |
sha256 'e1089567fc7bf8d9b2d8badcc9f2fc3b758701c8c0ccfe7af1805549fea53f11' | |
version '10.5.4' | |
depends_on :x11 | |
# depends_on :cmake | |
option 'enable-static', "Build static library" | |
def install | |
args = ["--disable-debug", "--disable-dependency-tracking", | |
"--prefix=#{prefix}"] | |
args << "--with-driver=xlib" | |
args << "--disable-gl-osmesa" | |
args << "--disable-glu" | |
args << "--disable-glut" | |
args << "--enable-gles2" | |
if build.include? 'enable-static' | |
args << "--enable-static" | |
end | |
system "./configure", *args | |
inreplace 'configs/autoconf' do |s| | |
s.gsub! /.so/, '.dylib' | |
s.gsub! /-L\$\(TOP\)\/\$\(LIB_DIR\)/, "-L#{MacOS::X11.lib}" | |
end | |
inreplace 'src/glw/Makefile' do |s| | |
s.gsub! /-I\$\(TOP\)\/include /, '' | |
end | |
system "make" | |
# (include+'GLES2').mkpath | |
# (include+'GLES2').install Dir['src/gles2/*.h'] | |
# lib.install Dir['lib/*'] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment