class Glut < Formula
  homepage "http://iihm.imag.fr/blanch/software/glut-macosx"
  url "http://iihm.imag.fr/blanch/software/glut-macosx/glut-3.3.2.zip"
  version "3.3.2"
  sha1 "f8e95b1a8fc680b418d007570dc0bf94d5ff02c6"

  patch do
  	url "http://iihm.imag.fr/blanch/software/glut-macosx/patches/glut-3.3.2-0-compilation.patch"
  	sha1 "edc78111867f49be9c4dfa982f5e23728b65f590"
  end

  patch do
  	url "http://iihm.imag.fr/blanch/software/glut-macosx/patches/glut-3.3.2-1-mousewheel.patch"
  	sha1 "5ee5d94988aa7456b6de779e6988ab5b86a96a85"
  end

  patch do
  	url "http://iihm.imag.fr/blanch/software/glut-macosx/patches/glut-3.3.2-2-hidpi.patch"
  	sha1 "d39518efc5d4b00037d9b2dd248142f0633ef13b"
  end

  patch do
  	url "http://iihm.imag.fr/blanch/software/glut-macosx/patches/glut-3.3.2-3-foreground.patch"
  	sha1 "8e05812ef8714ba2005cd81b3bae5651ad81b14b"
  end

  patch do
  	url "http://iihm.imag.fr/blanch/software/glut-macosx/patches/glut-3.3.2-4-3.2core.patch"
  	sha1 "50b058de8454994b148b0a8a2a393dbde71ff6e6"
  end

  def install
    system "xcodebuild", "-configuration", "Release"
    system "xcodebuild", "install", "DSTROOT=#{prefix}"
  end

  test do
  end
end
