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 +4 -4
- data/ext/glib2/rbglib.h +1 -1
- data/lib/gnome2/rake/package-task.rb +19 -6
- data/lib/gnome2/rake/package.rb +19 -7
- data/lib/mkmf-gnome2.rb +11 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f8d9545fe87678cf0d4db62a81e168fc2fffa17
|
4
|
+
data.tar.gz: 15a6ca125195b394b9668f94538d7162fc8827aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ea40da0e9ef889e0589e951cfb6386ba8bd34045aca82d2e2d887fc14ec56804b960e94e94c9add2f497af25e27210ce8a05f556a9cb36a8333f7c9181903c2
|
7
|
+
data.tar.gz: 8ef475502ac5183a7b18366ee1406d3edd3d660e7373627bbecef7624b5fbd5f81096891e4cec8c5bd1697b80a68437b25a715f39a9a2e06254389a9f14870fa
|
data/ext/glib2/rbglib.h
CHANGED
@@ -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
|
-
|
202
|
-
|
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
|
-
|
206
|
-
|
207
|
-
|
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
|
data/lib/gnome2/rake/package.rb
CHANGED
@@ -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 ||
|
109
|
+
super || guess_build_host
|
110
110
|
end
|
111
111
|
|
112
|
-
def
|
113
|
-
|
114
|
-
|
115
|
-
"
|
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
|
-
|
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
|
|