2011-11-28 09:21:43 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Babl < Formula
|
|
|
|
homepage 'http://www.gegl.org/babl/'
|
2012-04-13 23:56:06 +00:00
|
|
|
url 'ftp://ftp.gtk.org/pub/babl/0.1/babl-0.1.10.tar.bz2'
|
|
|
|
md5 '9e1542ab5c0b12ea3af076a9a2f02d79'
|
2011-11-28 09:21:43 +00:00
|
|
|
|
|
|
|
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"]]
|
2011-11-28 09:21:43 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def patches
|
2012-04-13 23:56:06 +00:00
|
|
|
# There are two patches.
|
|
|
|
# The first one changes an include <values.h> (deleted on Mac OS X) to <limits.h>
|
|
|
|
# The second one fixes an error when compiling with clang. See:
|
2012-03-11 02:09:15 +00:00
|
|
|
# https://trac.macports.org/browser/trunk/dports/graphics/babl/files/clang.patch
|
2011-11-28 09:21:43 +00:00
|
|
|
{ :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
|
2011-11-28 09:21:43 +00:00
|
|
|
end
|
|
|
|
|
2012-03-11 02:09:15 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make install"
|
2011-11-28 09:21:43 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
__END__
|
2012-04-13 23:56:06 +00:00
|
|
|
diff -cr babl.ori/babl-palette.c babl/babl-palette.c
|
|
|
|
*** babl.ori/babl-palette.c Sat Apr 14 01:31:40 2012
|
|
|
|
--- babl/babl-palette.c Sat Apr 14 01:32:15 2012
|
|
|
|
***************
|
|
|
|
*** 19,25 ****
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
! #include <values.h>
|
|
|
|
#include <assert.h>
|
|
|
|
#include "config.h"
|
|
|
|
#include "babl-internal.h"
|
|
|
|
--- 19,25 ----
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
! #include <limits.h>
|
|
|
|
#include <assert.h>
|
|
|
|
#include "config.h"
|
|
|
|
#include "babl-internal.h"
|
|
|
|
diff -cr extensions.ori/sse-fixups.c extensions/sse-fixups.c
|
|
|
|
*** extensions.ori/sse-fixups.c Sat Apr 14 01:31:40 2012
|
|
|
|
--- extensions/sse-fixups.c Sat Apr 14 01:33:44 2012
|
|
|
|
***************
|
|
|
|
*** 21,27 ****
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
! #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(USE_SSE) && defined(USE_MMX)
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
--- 21,27 ----
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
! #if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 4) && defined(USE_SSE) && defined(USE_MMX)
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
***************
|
|
|
|
*** 177,183 ****
|
|
|
|
int
|
|
|
|
init (void)
|
|
|
|
{
|
|
|
|
! #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(USE_SSE) && defined(USE_MMX)
|
|
|
|
|
|
|
|
const Babl *rgbaF_linear = babl_format_new (
|
|
|
|
babl_model ("RGBA"),
|
|
|
|
--- 177,183 ----
|
|
|
|
int
|
|
|
|
init (void)
|
|
|
|
{
|
|
|
|
! #if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 4) && defined(USE_SSE) && defined(USE_MMX)
|
|
|
|
|
|
|
|
const Babl *rgbaF_linear = babl_format_new (
|
|
|
|
babl_model ("RGBA"),
|