ec11577107
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.
43 lines
1.2 KiB
Ruby
43 lines
1.2 KiB
Ruby
require 'formula'
|
|
|
|
class Devil < Formula
|
|
homepage 'http://sourceforge.net/projects/openil/'
|
|
url 'http://downloads.sourceforge.net/project/openil/DevIL/1.7.8/DevIL-1.7.8.tar.gz'
|
|
sha1 'bc27e3e830ba666a3af03548789700d10561fcb1'
|
|
|
|
depends_on :libpng
|
|
depends_on 'jpeg'
|
|
|
|
# see http://sourceforge.net/tracker/?func=detail&aid=3404133&group_id=4470&atid=104470
|
|
# also, even with -std=gnu99 removed from the configure script,
|
|
# devil fails to build with clang++ while compiling il_exr.cpp
|
|
fails_with :clang do
|
|
cause "invalid -std=gnu99 flag while building C++"
|
|
end
|
|
|
|
# fix compilation issue for iluc.c
|
|
def patches; DATA; end
|
|
|
|
def install
|
|
system "./configure", "--disable-debug",
|
|
"--disable-dependency-tracking",
|
|
"--prefix=#{prefix}",
|
|
"--enable-ILU",
|
|
"--enable-ILUT"
|
|
system "make install"
|
|
end
|
|
end
|
|
|
|
__END__
|
|
--- a/src-ILU/ilur/ilur.c 2009-03-08 08:10:12.000000000 +0100
|
|
+++ b/src-ILU/ilur/ilur.c 2010-09-26 20:01:45.000000000 +0200
|
|
@@ -1,6 +1,7 @@
|
|
#include <string.h>
|
|
#include <stdio.h>
|
|
-#include <malloc.h>
|
|
+#include <stdlib.h>
|
|
+#include "sys/malloc.h"
|
|
|
|
#include <IL/il.h>
|
|
#include <IL/ilu.h>
|
|
|