2010-04-24 17:33:55 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Fontconfig < Formula
|
2010-04-24 17:33:55 +00:00
|
|
|
homepage 'http://fontconfig.org/'
|
2012-08-04 09:09:01 +00:00
|
|
|
url 'http://fontconfig.org/release/fontconfig-2.10.1.tar.gz'
|
|
|
|
sha1 'e377cbe989cd22d3a10020309c906ecbbcac0043'
|
2010-04-24 17:33:55 +00:00
|
|
|
|
2012-08-23 16:49:08 +00:00
|
|
|
keg_only :provided_pre_mountain_lion
|
2010-04-24 17:33:55 +00:00
|
|
|
|
2012-10-20 15:54:37 +00:00
|
|
|
option :universal
|
|
|
|
|
2012-08-04 09:09:35 +00:00
|
|
|
depends_on :freetype
|
2011-03-16 05:01:31 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2010-10-16 16:00:07 +00:00
|
|
|
|
2012-10-20 17:43:28 +00:00
|
|
|
# Patch adapted from Macports patch for 2.9.0 defines sizeof based on __LP64__
|
|
|
|
# Fixes universal builds but seems groovy enough to apply in all cases.
|
|
|
|
# https://trac.macports.org/browser/trunk/dports/graphics/fontconfig/files/patch-check-arch-at-runtime.diff
|
|
|
|
def patches; DATA; end
|
|
|
|
|
2010-04-24 17:33:55 +00:00
|
|
|
def install
|
2012-10-20 15:54:37 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
2012-10-30 11:36:02 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking", "--with-add-fonts=/Library/Fonts,~/Library/Fonts", "--prefix=#{prefix}"
|
2010-04-24 17:33:55 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2012-10-20 17:43:28 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
--- a/src/fcarch.h 2012-07-23 19:01:32.000000000 -0700
|
|
|
|
+++ b/src/fcarch.h 2012-10-20 10:29:15.000000000 -0700
|
|
|
|
@@ -46,6 +46,19 @@
|
|
|
|
* be64 1234 8 8
|
|
|
|
*/
|
|
|
|
|
|
|
|
+#ifdef __APPLE__
|
|
|
|
+# include <machine/endian.h>
|
|
|
|
+# undef SIZEOF_VOID_P
|
|
|
|
+# undef ALIGNOF_DOUBLE
|
|
|
|
+# ifdef __LP64__
|
|
|
|
+# define SIZEOF_VOID_P 8
|
|
|
|
+# define ALIGNOF_DOUBLE 8
|
|
|
|
+# else
|
|
|
|
+# define SIZEOF_VOID_P 4
|
|
|
|
+# define ALIGNOF_DOUBLE 4
|
|
|
|
+# endif
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
#if defined(__DARWIN_BYTE_ORDER) && __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN
|
|
|
|
# define FC_ARCH_ENDIAN "le"
|
|
|
|
#elif defined(__DARWIN_BYTE_ORDER) && __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN
|