2010-04-10 15:10:43 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Libcaca < Formula
|
2012-03-18 03:37:44 +00:00
|
|
|
homepage 'http://caca.zoy.org/wiki/libcaca'
|
2012-04-08 09:54:44 +00:00
|
|
|
url 'http://caca.zoy.org/files/libcaca/libcaca-0.99.beta18.tar.gz'
|
|
|
|
version '0.99b18'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '0cbf8075c01d59b53c3cdfec7df9818696a41128'
|
2010-05-22 10:40:42 +00:00
|
|
|
|
2012-09-02 08:01:48 +00:00
|
|
|
option 'with-imlib2', 'Build with Imlib2 support'
|
|
|
|
|
|
|
|
depends_on :x11 if MacOS::X11.installed? or build.include? "with-imlib2"
|
|
|
|
|
|
|
|
if build.include? "with-imlib2"
|
|
|
|
depends_on 'pkg-config' => :build
|
|
|
|
depends_on 'imlib2' => :optional
|
|
|
|
end
|
2010-04-10 15:10:43 +00:00
|
|
|
|
2012-03-18 20:33:24 +00:00
|
|
|
fails_with :llvm do
|
|
|
|
cause "Unsupported inline asm: input constraint with a matching output constraint of incompatible type"
|
|
|
|
end
|
2011-03-27 19:28:48 +00:00
|
|
|
|
2012-03-18 03:37:44 +00:00
|
|
|
# Make libcaca build with clang; see http://caca.zoy.org/ticket/90
|
|
|
|
def patches; DATA; end
|
2012-02-09 21:45:09 +00:00
|
|
|
|
2010-04-10 15:10:43 +00:00
|
|
|
def install
|
2010-08-16 00:27:12 +00:00
|
|
|
# Some people can't compile when Java is enabled. See:
|
2010-11-10 18:16:28 +00:00
|
|
|
# https://github.com/mxcl/homebrew/issues/issue/2049
|
2010-10-21 04:42:10 +00:00
|
|
|
|
|
|
|
# Don't build csharp bindings
|
|
|
|
# Don't build ruby bindings; fails for adamv w/ Homebrew Ruby 1.9.2
|
2012-04-08 09:54:44 +00:00
|
|
|
# Don't build python bindings:
|
|
|
|
# ../.auto/py-compile: Missing argument to --destdir.
|
2010-10-21 04:42:10 +00:00
|
|
|
|
2012-04-08 09:54:44 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
2010-04-10 15:10:43 +00:00
|
|
|
"--prefix=#{prefix}",
|
2012-04-08 09:54:44 +00:00
|
|
|
"--disable-python",
|
2010-04-10 15:10:43 +00:00
|
|
|
"--disable-doc",
|
2010-08-16 00:27:12 +00:00
|
|
|
"--disable-slang",
|
2010-10-21 04:42:10 +00:00
|
|
|
"--disable-java",
|
|
|
|
"--disable-csharp",
|
|
|
|
"--disable-ruby"
|
2012-04-08 09:54:44 +00:00
|
|
|
system "make"
|
2010-10-21 04:42:10 +00:00
|
|
|
ENV.j1 # Or install can fail making the same folder at the same time
|
2010-04-10 15:10:43 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2012-09-02 08:01:48 +00:00
|
|
|
|
|
|
|
def test
|
|
|
|
system "#{bin}/img2txt", "--version"
|
|
|
|
end
|
2010-04-10 15:10:43 +00:00
|
|
|
end
|
2012-02-09 21:45:09 +00:00
|
|
|
|
|
|
|
__END__
|
2012-03-18 03:37:44 +00:00
|
|
|
--- a/caca/caca.h 2011-07-05 00:09:51.000000000 -0700
|
|
|
|
+++ b/caca/caca.h 2011-07-05 00:10:10.000000000 -0700
|
2012-02-09 21:45:09 +00:00
|
|
|
@@ -645,7 +645,7 @@ typedef struct cucul_buffer cucul_buffer
|
|
|
|
# define CACA_DEPRECATED
|
|
|
|
# endif
|
|
|
|
|
|
|
|
-# if defined __GNUC__ && __GNUC__ > 3
|
|
|
|
+# if !defined __APPLE__ && defined __GNUC__ && __GNUC__ > 3
|
|
|
|
# define CACA_ALIAS(x) __attribute__ ((weak, alias(#x)))
|
|
|
|
# else
|
|
|
|
# define CACA_ALIAS(x)
|