gobject-introspection 1.2.6 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +90 -13
- data/ext/gobject-introspection/gobject_introspection.def +5 -0
- data/lib/gobject-introspection.rb +13 -3
- metadata +5 -4
data/Rakefile
CHANGED
@@ -17,25 +17,102 @@
|
|
17
17
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
18
|
|
19
19
|
$LOAD_PATH.unshift("./../glib2/lib")
|
20
|
-
require "gnome2-
|
20
|
+
require "gnome2/rake/package-task"
|
21
21
|
|
22
|
-
package =
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
22
|
+
package = nil
|
23
|
+
package_task = GNOME2::Rake::PackageTask.new do |_package|
|
24
|
+
package = _package
|
25
|
+
package.summary = "Ruby/GObjectIntrospection is a Ruby binding of GObjectIntrospection."
|
26
|
+
package.description = "Ruby/GObjectIntrospection is a Ruby binding of GObjectIntrospection."
|
27
|
+
package.dependency.gem.runtime = ["glib2"]
|
28
|
+
package.dependency.gem.development = [["test-unit", ">= 2"]]
|
29
|
+
package.windows.packages = []
|
30
|
+
package.windows.dependencies = []
|
31
|
+
package.windows.build_dependencies = ["glib2"]
|
32
|
+
package.external_packages = [
|
33
|
+
{
|
34
|
+
:name => "glib",
|
35
|
+
:download_site => :gnome,
|
36
|
+
:label => "GLib",
|
37
|
+
:version => "2.36.0",
|
38
|
+
:compression_method => "xz",
|
39
|
+
:windows => {
|
40
|
+
:build => false,
|
41
|
+
},
|
42
|
+
:native => {
|
43
|
+
:build => true,
|
44
|
+
},
|
45
|
+
},
|
31
46
|
{
|
32
47
|
:name => "gobject-introspection",
|
33
48
|
:download_site => :gnome,
|
34
49
|
:label => "gobject-introspection",
|
35
|
-
:version => "1.
|
36
|
-
:configure_args => [],
|
50
|
+
:version => "1.36.0",
|
37
51
|
:compression_method => "xz",
|
52
|
+
:windows => {
|
53
|
+
:configure_args => [
|
54
|
+
"--with-g-ir-scanner=#{package.native.absolute_binary_dir}/bin/g-ir-scanner",
|
55
|
+
"--disable-tests",
|
56
|
+
],
|
57
|
+
:patches => [
|
58
|
+
"0001-Support-external-g-ir-scanner.patch",
|
59
|
+
],
|
60
|
+
:need_autoreconf => true,
|
61
|
+
},
|
62
|
+
:native => {
|
63
|
+
:build => true,
|
64
|
+
:patches => [
|
65
|
+
# "cross-compilable-g-ir-scanner.diff",
|
66
|
+
],
|
67
|
+
}
|
38
68
|
},
|
39
69
|
]
|
40
70
|
end
|
41
|
-
|
71
|
+
package_task.define
|
72
|
+
|
73
|
+
namespace :native do
|
74
|
+
namespace :"gobject-introspection" do
|
75
|
+
desc "Make g-ir-scanner workable for Windows on non Windows"
|
76
|
+
task :cross do
|
77
|
+
g_ir_scanner_dir = package.native.absolute_binary_dir
|
78
|
+
g_ir_scanner_dir += "lib/gobject-introspection/giscanner"
|
79
|
+
Dir.chdir(g_ir_scanner_dir.to_s) do
|
80
|
+
patch = "#{package.patches_dir}/cross-g-ir-scanner.diff"
|
81
|
+
sh("patch -p2 < #{patch}")
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
namespace :builder do
|
87
|
+
task :after => "native:gobject-introspection:cross"
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
namespace :win32 do
|
92
|
+
namespace :"gobject-introspection" do
|
93
|
+
desc "Use native tools"
|
94
|
+
task :cross do
|
95
|
+
pkg_config_dir = package.windows.absolute_binary_dir + "lib/pkgconfig"
|
96
|
+
pc_path = pkg_config_dir + "gobject-introspection-1.0.pc"
|
97
|
+
original_pc = pc_path.read
|
98
|
+
new_pc = ""
|
99
|
+
new_pc << "native_prefix=#{package.native.absolute_binary_dir}\n"
|
100
|
+
new_pc << "native_bindir=${native_prefix}/bin\n"
|
101
|
+
original_pc.each_line do |line|
|
102
|
+
case line
|
103
|
+
when /\Ag_ir_(scanner|compiler)=/
|
104
|
+
new_pc << line.gsub(/\${bindir}/, "${native_bindir}")
|
105
|
+
else
|
106
|
+
new_pc << line
|
107
|
+
end
|
108
|
+
end
|
109
|
+
pc_path.open("w") do |pc_file|
|
110
|
+
pc_file.write(new_pc)
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
namespace :builder do
|
116
|
+
task :after => "win32:gobject-introspection:cross"
|
117
|
+
end
|
118
|
+
end
|
@@ -16,10 +16,18 @@
|
|
16
16
|
|
17
17
|
require "glib2"
|
18
18
|
|
19
|
-
|
19
|
+
module GObjectIntrospection
|
20
|
+
class << self
|
21
|
+
def prepend_typelib_path(path)
|
22
|
+
GLib.prepend_path_to_environment_variable(path, "GI_TYPELIB_PATH")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
base_dir = Pathname.new(__FILE__).dirname.dirname.expand_path
|
20
28
|
vendor_dir = base_dir + "vendor" + "local"
|
21
29
|
vendor_bin_dir = vendor_dir + "bin"
|
22
|
-
GLib.
|
30
|
+
GLib.prepend_dll_path(vendor_bin_dir)
|
23
31
|
begin
|
24
32
|
major, minor, _ = RUBY_VERSION.split(/\./)
|
25
33
|
require "#{major}.#{minor}/gobject_introspection.so"
|
@@ -27,10 +35,12 @@ rescue LoadError
|
|
27
35
|
require "gobject_introspection.so"
|
28
36
|
end
|
29
37
|
|
38
|
+
vendor_girepository_dir = vendor_dir + "lib" + "girepository-1.0"
|
39
|
+
GObjectIntrospection.prepend_typelib_path(vendor_girepository_dir)
|
40
|
+
|
30
41
|
module GObjectIntrospection
|
31
42
|
LOG_DOMAIN = "GObjectIntrospection"
|
32
43
|
end
|
33
|
-
|
34
44
|
GLib::Log.set_log_domain(GObjectIntrospection::LOG_DOMAIN)
|
35
45
|
|
36
46
|
require "gobject-introspection/repository"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gobject-introspection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: glib2
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 2.0.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 2.0.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: test-unit
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -63,6 +63,7 @@ files:
|
|
63
63
|
- lib/gobject-introspection/union-info.rb
|
64
64
|
- ext/gobject-introspection/depend
|
65
65
|
- ext/gobject-introspection/extconf.rb
|
66
|
+
- ext/gobject-introspection/gobject_introspection.def
|
66
67
|
- ext/gobject-introspection/rb-gi-arg-info.c
|
67
68
|
- ext/gobject-introspection/rb-gi-argument.c
|
68
69
|
- ext/gobject-introspection/rb-gi-base-info.c
|