homebrew-core/Formula/irrlicht.rb
Jack Nagel ec11577107 Switch compilers when no build is specified
Given the current state of OS X compilers, the original fails_with
behavior is becoming less useful, mostly resulting in build failures
each time the compiler is updated. So make the following changes:

When a build is specified, we retain the old behavior: switch compilers
if the available compiler is <= the build, don't switch if it is > the
build.

When no build is specified, unconditionally switch compilers, and don't
output the advice message. This allows us to mark formulae as
perpetually failing, avoiding the need to update formulae each time a
new compiler build is made available.

As a bonus, this makes the logic much easier to reason about.

Closes Homebrew/homebrew#18175.
2013-03-12 13:55:15 -05:00

25 lines
825 B
Ruby

require 'formula'
class Irrlicht < Formula
homepage 'http://irrlicht.sourceforge.net/'
url 'http://downloads.sourceforge.net/irrlicht/irrlicht-1.8.zip'
sha1 'a24c2183e3c7dd909f92699c373a68382958b09d'
head 'https://irrlicht.svn.sourceforge.net/svnroot/irrlicht/trunk'
depends_on :xcode
fails_with :clang do
cause <<-EOS.undent
COpenGLExtensionHandler.h:2390:31: error: expected ')'
glProgramParameteriEXT((long GLuint)program, pname, value);
EOS
end
def install
system *%W(xcodebuild -project source/Irrlicht/MacOSX/MacOSX.xcodeproj -configuration Release -target libIrrlicht.a GCC_VERSION=com.apple.compilers.llvmgcc42 -sdk macosx#{MacOS.version})
lib.install "source/Irrlicht/MacOSX/build/Release/libIrrlicht.a"
include.install "include" => "irrlicht"
end
end