changeset 3247:31e0a9716e58

Fixed #315: Added check for emtpy xft cflags (see https://bugs.ruby-lang.org/issues/10651)
author unexist
date Tue, 06 Jan 2015 16:47:32 +0100
parents 43d1d0478c46
children 6e9540330a78 43f084bfce99 9ed18c89b96c
files Rakefile
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Rakefile	Tue Jan 28 12:47:41 2014 +0100
+++ b/Rakefile	Tue Jan 06 16:47:32 2015 +0100
@@ -397,6 +397,12 @@
         ret = false
 
         cflags, ldflags, libs = pkg_config("xft")
+
+        # Fix a bug in ruby 2.2.0 (https://bugs.ruby-lang.org/issues/10651)
+        if cflags.empty?
+          cflags << `#{$PKGCONFIG} --cflags xft`.chomp
+        end
+
         unless libs.nil?
           # Update flags
           @options["cpppath"] << " %s" % [ cflags ]