glib2 2.2.1 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04730751dce8565060ffd80a06d6a0ff6a15810a
4
- data.tar.gz: 259e897aa9cd8d7a9ed55fd4d5d46250d8fffefe
3
+ metadata.gz: 5f8d9545fe87678cf0d4db62a81e168fc2fffa17
4
+ data.tar.gz: 15a6ca125195b394b9668f94538d7162fc8827aa
5
5
  SHA512:
6
- metadata.gz: 012bb0c94321282d928c856e78861ba209fd043dc89aad1f91e9c452c33e26a894efba8291923dfaa78d2763f8f7e9729c8a7918bb205ea12b8805c8349ebc0b
7
- data.tar.gz: 570415824340c5482d8ff2673f5b41c64a4dcd11f33c1e01f9ed3c497e4fda0f4e92a9a1a90ff6a9850e8dddcaf32500b1ebe6cd01454fc13cf61a6117975cab
6
+ metadata.gz: 5ea40da0e9ef889e0589e951cfb6386ba8bd34045aca82d2e2d887fc14ec56804b960e94e94c9add2f497af25e27210ce8a05f556a9cb36a8333f7c9181903c2
7
+ data.tar.gz: 8ef475502ac5183a7b18366ee1406d3edd3d660e7373627bbecef7624b5fbd5f81096891e4cec8c5bd1697b80a68437b25a715f39a9a2e06254389a9f14870fa
data/ext/glib2/rbglib.h CHANGED
@@ -36,7 +36,7 @@ extern "C" {
36
36
 
37
37
  #define RBGLIB_MAJOR_VERSION 2
38
38
  #define RBGLIB_MINOR_VERSION 2
39
- #define RBGLIB_MICRO_VERSION 1
39
+ #define RBGLIB_MICRO_VERSION 2
40
40
 
41
41
  #ifndef RSTRING_PTR
42
42
  # define RSTRING_PTR(s) (RSTRING(s)->ptr)
@@ -1,6 +1,6 @@
1
1
  # coding: utf-8
2
2
 
3
- # Copyright(C) 2011 Ruby-GNOME2 Project.
3
+ # Copyright(C) 2011-2014 Ruby-GNOME2 Project.
4
4
  #
5
5
  # This program is licenced under the same license of Ruby-GNOME2.
6
6
 
@@ -112,6 +112,10 @@ module GNOME2
112
112
  @dependency_configuration = DependencyConfiguration.new(self)
113
113
  end
114
114
 
115
+ def cross_platform
116
+ "#{windows.build_architecture}-mingw32"
117
+ end
118
+
115
119
  def define_spec
116
120
  @spec = Gem::Specification.new do |s|
117
121
  s.name = @name
@@ -168,6 +172,7 @@ module GNOME2
168
172
 
169
173
  def define_win32_extension_task
170
174
  ::Rake::ExtensionTask.new(so_base_name, @spec) do |ext|
175
+ ext.cross_platform = cross_platform
171
176
  ext.ext_dir = "ext/#{@name}"
172
177
  ext.cross_compile = true
173
178
  ext.cross_compiling do |spec|
@@ -198,13 +203,21 @@ module GNOME2
198
203
  end
199
204
  end
200
205
 
201
- def define_win32_download_task
202
- GNOME2Win32BinaryDownloadTask.new(@package)
206
+ extconf_rb = "ext/#{@name}/extconf.rb"
207
+ unless File.exist?(extconf_rb)
208
+ native_task_name = "native:#{@name}:#{cross_platform}"
209
+ if ::Rake::Task.task_defined?(native_task_name)
210
+ ::Rake::Task[native_task_name].prerequisites.clear
211
+ end
203
212
  end
213
+ end
204
214
 
205
- def define_win32_build_task
206
- GNOME2Win32BinaryBuildTask.new(@package)
207
- end
215
+ def define_win32_download_task
216
+ GNOME2Win32BinaryDownloadTask.new(@package)
217
+ end
218
+
219
+ def define_win32_build_task
220
+ GNOME2Win32BinaryBuildTask.new(@package)
208
221
  end
209
222
 
210
223
  def define_package_tasks
@@ -1,6 +1,6 @@
1
1
  # -*- ruby -*-
2
2
  #
3
- # Copyright (C) 2013 Ruby-GNOME2 Project Team
3
+ # Copyright (C) 2013-2014 Ruby-GNOME2 Project Team
4
4
  #
5
5
  # This library is free software; you can redistribute it and/or
6
6
  # modify it under the terms of the GNU Lesser General Public
@@ -106,17 +106,29 @@ module GNOME2
106
106
  end
107
107
 
108
108
  def build_host
109
- super || "i686-w64-mingw32"
109
+ super || guess_build_host
110
110
  end
111
111
 
112
- def build_architecture
113
- case build_host
114
- when /\Ai\d86-/
115
- "x86_64"
112
+ def guess_build_host
113
+ ENV["RUBY_GNOME2_BUILD_HOST"] ||
114
+ guess_build_host_from_architecture ||
115
+ "i686-w64-mingw32"
116
+ end
117
+
118
+ def guess_build_host_from_architecture
119
+ case build_architecture
120
+ when "x86"
121
+ "i686-w64-mingw32"
122
+ when "x64"
123
+ "x86_64-w64-mingw32"
116
124
  else
117
- "x64"
125
+ nil
118
126
  end
119
127
  end
128
+
129
+ def build_architecture
130
+ ENV["RUBY_GNOME2_BUILD_ARCHITECTURE"] || "x86"
131
+ end
120
132
  end
121
133
 
122
134
  class NativeConfiguration
data/lib/mkmf-gnome2.rb CHANGED
@@ -185,6 +185,17 @@ def add_depend_package_path(target_name, target_source_dir, target_build_dir)
185
185
  $INCFLAGS = "-I#{target_source_dir} #{$INCFLAGS}"
186
186
  end
187
187
 
188
+ case RUBY_PLATFORM
189
+ when /cygwin|mingw|mswin/
190
+ target_base_dir = Pathname.new(target_source_dir).parent.parent
191
+ target_binary_base_dir = target_base_dir + "vendor" + "local"
192
+ if target_binary_base_dir.exist?
193
+ $INCFLAGS = "-I#{target_binary_base_dir}/include #{$INCFLAGS}"
194
+ target_pkg_config_dir = target_binary_base_dir + "lib" + "pkgconfig"
195
+ PKGConfig.add_path(target_pkg_config_dir.to_s)
196
+ end
197
+ end
198
+
188
199
  return unless File.exist?(target_build_dir)
189
200
  if target_source_dir != target_build_dir
190
201
  $INCFLAGS = "-I#{target_build_dir} #{$INCFLAGS}"
@@ -201,13 +212,6 @@ def add_depend_package_path(target_name, target_source_dir, target_build_dir)
201
212
  $DLDFLAGS << " /libpath:#{target_build_dir}"
202
213
  $libs << " lib#{library_base_name}.lib"
203
214
  end
204
- target_base_dir = Pathname.new(target_source_dir).parent.parent
205
- target_binary_base_dir = target_base_dir + "vendor" + "local"
206
- if target_binary_base_dir.exist?
207
- $INCFLAGS = "-I#{target_binary_base_dir}/include #{$INCFLAGS}"
208
- target_pkg_config_dir = target_binary_base_dir + "lib" + "pkgconfig"
209
- PKGConfig.add_path(target_pkg_config_dir.to_s)
210
- end
211
215
  end
212
216
  end
213
217
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Ruby-GNOME2 Project Team