glib2 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/ChangeLog +12 -0
  2. data/ext/glib2/rbglib.h +1 -1
  3. data/lib/mkmf-gnome2.rb +20 -21
  4. metadata +3 -3
data/ChangeLog CHANGED
@@ -1,5 +1,17 @@
1
+ 2011-09-19 Kouhei Sutou <kou@cozmixng.org>
2
+
3
+ * lib/mkmf-gnome2.rb (check_cairo): really support RubyGems 1.8.6...
4
+ [#3411234]
5
+ Reported by Tobias Pfeiffer. Thanks!!!
6
+
1
7
  2011-09-18 Kouhei Sutou <kou@cozmixng.org>
2
8
 
9
+ * ext/glib2/rbglib.h: 1.0.2 -> 1.0.3.
10
+
11
+ * lib/mkmf-gnome2.rb (add_depend_package): support RubyGems
12
+ 1.8.6. [#3411204]
13
+ Reported by Tobias Pfeiffer. Thanks!!!
14
+
3
15
  * ext/glib2/rbglib.h: 1.0.1 -> 1.0.2.
4
16
 
5
17
  * ext/glib2/rbgutil_callback.c: don't include unistd.h on Win32
@@ -23,7 +23,7 @@ extern "C" {
23
23
 
24
24
  #define RBGLIB_MAJOR_VERSION 1
25
25
  #define RBGLIB_MINOR_VERSION 0
26
- #define RBGLIB_MICRO_VERSION 2
26
+ #define RBGLIB_MICRO_VERSION 3
27
27
 
28
28
  #ifndef RSTRING_PTR
29
29
  # define RSTRING_PTR(s) (RSTRING(s)->ptr)
@@ -75,21 +75,28 @@ def setup_win32(target_name, base_dir=nil)
75
75
  end
76
76
  end
77
77
 
78
- #add_depend_package("glib2", "ext/glib2", "/...../ruby-gnome2")
79
- def add_depend_package(target_name, target_srcdir, top_srcdir, options={})
78
+ def find_gem_spec(package)
80
79
  begin
81
80
  require 'rubygems'
82
- gem_spec = (Gem::Specification.respond_to?(:find_by_name) ?
83
- Gem::Specification.find_by_name(target_name) :
84
- Gem.source_index.find_name(target_name).last)
85
- if gem_spec
86
- target_source_dir = File.join(gem_spec.full_gem_path, "ext/#{target_name}")
87
- target_build_dir = target_source_dir
88
- add_depend_package_path(target_name,
89
- target_source_dir,
90
- target_build_dir)
81
+ if Gem::Specification.respond_to?(:find_by_name)
82
+ Gem::Specification.find_by_name(package)
83
+ else
84
+ Gem.source_index.find_name(package).last
91
85
  end
92
86
  rescue LoadError
87
+ nil
88
+ end
89
+ end
90
+
91
+ #add_depend_package("glib2", "ext/glib2", "/...../ruby-gnome2")
92
+ def add_depend_package(target_name, target_srcdir, top_srcdir, options={})
93
+ gem_spec = find_gem_spec(target_name)
94
+ if gem_spec
95
+ target_source_dir = File.join(gem_spec.full_gem_path, "ext/#{target_name}")
96
+ target_build_dir = target_source_dir
97
+ add_depend_package_path(target_name,
98
+ target_source_dir,
99
+ target_build_dir)
93
100
  end
94
101
 
95
102
  [top_srcdir,
@@ -383,16 +390,8 @@ def check_cairo(options={})
383
390
  rcairo_source_dir = nil
384
391
  end
385
392
  if rcairo_source_dir.nil?
386
- begin
387
- require 'rubygems'
388
- cairo_gem_spec = (Gem::Specification.respond_to?(:find_by_name) ?
389
- Gem::Specification.find_by_name('cairo') :
390
- Gem.source_index.find_name('cairo')).last
391
- if cairo_gem_spec
392
- rcairo_source_dir = cairo_gem_spec.full_gem_path
393
- end
394
- rescue LoadError
395
- end
393
+ cairo_gem_spec = find_gem_spec("cairo")
394
+ rcairo_source_dir = cairo_gem_spec.full_gem_path if cairo_gem_spec
396
395
  end
397
396
 
398
397
  unless rcairo_source_dir.nil?
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib2
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 2
10
- version: 1.0.2
9
+ - 3
10
+ version: 1.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - The Ruby-GNOME2 Proejct Team