1 From c5cdb741a9eb72351739e48a38946b87c292c293 Mon Sep 17 00:00:00 2001
2 From: Kouhei Sutou <kou@clear-code.com>
3 Date: Sat, 4 Apr 2015 15:00:14 +0900
4 Subject: [PATCH] glib2: support GLib 2.44
6 gwin32.h includes an enum type that is available on Windows.
10 Reported by Benjamin Maisano. Thanks!!!
12 diff --git a/glib2/ext/glib2/extconf.rb b/glib2/ext/glib2/extconf.rb
13 index d88d971..1c5cd8d 100644
14 --- a/glib2/ext/glib2/extconf.rb
15 +++ b/glib2/ext/glib2/extconf.rb
16 @@ -56,10 +56,18 @@ create_pkg_config_file("Ruby/GLib2", package_id)
18 enum_types_prefix = "glib-enum-types"
19 include_paths = PKGConfig.cflags_only_I("glib-2.0")
25 +unless (/mingw|cygwin|mswin/ === RUBY_PLATFORM)
26 + ignore_headers << "gwin32.h"
28 headers = include_paths.split.inject([]) do |result, path|
29 result + Dir.glob(File.join(path.sub(/^-I/, ""), "glib", "*.h"))
31 - /g(iochannel|main|scanner)\.h/ =~ file
32 + ignore_headers.include?(File.basename(file))
34 include_paths = PKGConfig.cflags_only_I("gobject-2.0")
35 headers = include_paths.split.inject(headers) do |result, path|