homebrew-core/Formula/babl.rb

59 lines
1.6 KiB
Ruby
Raw Normal View History

require 'formula'
class Babl < Formula
homepage 'http://www.gegl.org/babl/'
2012-03-11 02:09:15 +00:00
url 'ftp://ftp.gimp.org/pub/babl/0.1/babl-0.1.6.tar.bz2'
md5 'dc960981a5ec5330fc1c177be9f59068'
head 'git://git.gnome.org/babl'
depends_on 'pkg-config' => :build
def options
2012-03-11 02:09:15 +00:00
[["--universal", "Builds a universal binary"]]
end
def patches
2012-03-11 02:09:15 +00:00
# Fixes an error when compiling with clang. See:
# https://trac.macports.org/browser/trunk/dports/graphics/babl/files/clang.patch
{ :p0 => DATA }
end
def install
if ARGV.build_universal?
ENV.universal_binary
2012-03-11 02:09:15 +00:00
if ENV.compiler == :gcc
opoo 'Compilation may fail at babl-cpuaccel.c using gcc for a universal build'
end
end
2012-03-11 02:09:15 +00:00
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
end
end
__END__
Index: extensions/sse-fixups.c
===================================================================
--- extensions/sse-fixups.c.orig 2011-06-28 20:01:39.000000000 -0700
+++ extensions/sse-fixups.c 2011-06-28 20:01:29.000000000 -0700
@@ -21,7 +21,7 @@
#include "config.h"
-#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(USE_SSE) && defined(USE_MMX)
+#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 4) && defined(USE_SSE) && defined(USE_MMX)
#include <stdint.h>
#include <stdlib.h>
@@ -173,7 +173,7 @@
int
init (void)
{
-#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(USE_SSE) && defined(USE_MMX)
+#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 4) && defined(USE_SSE) && defined(USE_MMX)
Babl *rgbaF_linear = babl_format_new (
babl_model ("RGBA"),