archrelease: copy trunk to community-any
[ArchLinux/community.git] / ruby-glib2 / repos / community-x86_64 / 0001-glib2-support-GLib-2.44.patch
blobddc4f17293e45f7273d8805a847d435f106e6791
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.
8 GitHub: fix #361
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")
20 +ignore_headers = [
21 + "giochannel.h",
22 + "gmain.h",
23 + "gscanner.h",
25 +unless (/mingw|cygwin|mswin/ === RUBY_PLATFORM)
26 + ignore_headers << "gwin32.h"
27 +end
28 headers = include_paths.split.inject([]) do |result, path|
29 result + Dir.glob(File.join(path.sub(/^-I/, ""), "glib", "*.h"))
30 end.reject do |file|
31 - /g(iochannel|main|scanner)\.h/ =~ file
32 + ignore_headers.include?(File.basename(file))
33 end
34 include_paths = PKGConfig.cflags_only_I("gobject-2.0")
35 headers = include_paths.split.inject(headers) do |result, path|
36 --
37 2.3.5