Skip to content

Instantly share code, notes, and snippets.

@ranma42
Created January 26, 2017 18:01
Show Gist options
  • Save ranma42/35d7521767d5ce8c9c1bc307de5520c2 to your computer and use it in GitHub Desktop.
Save ranma42/35d7521767d5ce8c9c1bc307de5520c2 to your computer and use it in GitHub Desktop.
Hack to (force-)enable cairo Xlib backend on Tiger
diff --git a/Library/Formula/cairo.rb b/Library/Formula/cairo.rb
index 0d4d2aa..a0cfe01 100644
--- a/Library/Formula/cairo.rb
+++ b/Library/Formula/cairo.rb
@@ -8,11 +8,8 @@ class Cairo < Formula
keg_only :provided_pre_mountain_lion
option :universal
- # Tiger's X11 is simply way too old
- option 'without-x', 'Build without X11 support' if MacOS.version > :tiger
depends_on "pkg-config" => :build
- depends_on :x11 => :optional if MacOS.version > :leopard
depends_on "freetype"
depends_on "fontconfig"
depends_on "libpng"
@@ -40,8 +37,13 @@ class Cairo < Formula
--enable-quartz-image
]
- if build.with? "x11"
- args << "--enable-xcb=yes" << "--enable-xlib=yes" << "--enable-xlib-xrender=yes"
+ if true #build.with? "x11"
+ args << "--enable-xlib=yes" << "--enable-xlib-xrender=yes"
+ if MacOS.version <= :leopard
+ args << "--enable-xcb=no"
+ else
+ args << "--enable-xcb=yes"
+ end
else
args << "--enable-xcb=no" << "--enable-xlib=no" << "--enable-xlib-xrender=no"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment