glib2 4.0.5 → 4.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/ext/glib2/rbglib.h +2 -2
  3. data/lib/mkmf-gnome.rb +40 -23
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aad74862235952e6e6ca9c8b3ad4a9277bb66cd7963844395974be279a0c814b
4
- data.tar.gz: c565405f128475f84e8f9eef012ce39717d4cbfe818a422145c411b8c51f26e7
3
+ metadata.gz: f7fedf7b03b6282a1415df17396d4b5bafec1001ebb8ed36ded2674ea7621c7b
4
+ data.tar.gz: b978550b202accd558ed22b65c8b8ee31c1306b726c30c32e9fa881cdc3a7d47
5
5
  SHA512:
6
- metadata.gz: 9067d95d8709acd8c6b5d78029269df842ffaeae6686ac00ca09ab0c6c433b1eed4f7faa55f1e3a782f4738bca19ba5076228615b6c4ba6a9731d8ff008318ff
7
- data.tar.gz: 15de112c4301fbf3a28e8567b0c476a681ee0dd148721a42a8578b3cbd09df4ba97c7f7b23f34c07f574009ca1b25ace2fc5d5bf7e32a89c8bee494365c8d422
6
+ metadata.gz: cf49dbf7a9b77d1986a44f0e6a4be40bb8b6f5ef6959eedb316f6372c1c390b42c1f58cd331df49a5200d39987950fdec39b3928acb8decdc1db37f4465c3f5f
7
+ data.tar.gz: fea19283af5b7b8936604961a89770af95a4da1d7f6e5b96d5a630b226a88724c6bbe981a3cae5eef45da8042340b24abff29688e4c8c8a0611707e9118364c1
data/ext/glib2/rbglib.h CHANGED
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2002-2022 Ruby-GNOME Project Team
3
+ * Copyright (C) 2002-2023 Ruby-GNOME Project Team
4
4
  * Copyright (C) 2002,2003 Masahiro Sakai
5
5
  *
6
6
  * This library is free software; you can redistribute it and/or
@@ -33,7 +33,7 @@ G_BEGIN_DECLS
33
33
 
34
34
  #define RBGLIB_MAJOR_VERSION 4
35
35
  #define RBGLIB_MINOR_VERSION 0
36
- #define RBGLIB_MICRO_VERSION 5
36
+ #define RBGLIB_MICRO_VERSION 7
37
37
 
38
38
  #ifndef RB_ZALLOC
39
39
  # ifdef ZALLOC
data/lib/mkmf-gnome.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2003-2019 Ruby-GNOME Project Team
1
+ # Copyright (C) 2003-2022 Ruby-GNOME Project Team
2
2
  #
3
3
  # This library is free software; you can redistribute it and/or
4
4
  # modify it under the terms of the GNU Lesser General Public
@@ -155,21 +155,15 @@ setup_homebrew
155
155
 
156
156
  #add_depend_package("glib2", "ext/glib2", "/...../ruby-gnome2")
157
157
  def add_depend_package(target_name, target_srcdir, top_srcdir, options={})
158
- gem_spec = find_gem_spec(target_name)
159
- if gem_spec
160
- target_source_dir = File.join(gem_spec.full_gem_path, "ext/#{target_name}")
161
- target_build_dir = target_source_dir
162
- add_depend_package_path(target_name,
163
- target_source_dir,
164
- target_build_dir)
165
- end
166
-
167
- [top_srcdir,
168
- File.join(top_srcdir, target_name),
169
- $configure_args['--topdir'],
170
- File.join($configure_args['--topdir'], target_name)].each do |topdir|
158
+ [
159
+ top_srcdir,
160
+ File.join(top_srcdir, target_name),
161
+ $configure_args['--topdir'],
162
+ File.join($configure_args['--topdir'], target_name),
163
+ ].each do |topdir|
171
164
  topdir = File.expand_path(topdir)
172
165
  target_source_dir_full_path = File.join(topdir, target_srcdir)
166
+ next unless File.exist?(target_source_dir_full_path)
173
167
 
174
168
  top_build_dir = options[:top_build_dir] || topdir
175
169
  target_build_dir = options[:target_build_dir] || target_srcdir
@@ -185,11 +179,22 @@ def add_depend_package(target_name, target_srcdir, top_srcdir, options={})
185
179
  end
186
180
  add_depend_package_path(target_name,
187
181
  target_source_dir_full_path,
188
- target_build_dir_full_path)
182
+ target_build_dir_full_path,
183
+ false)
184
+ return
189
185
  end
186
+
187
+ gem_spec = find_gem_spec(target_name)
188
+ raise "depended gem isn't found: #{target_name}" unless gem_spec
189
+ target_source_dir = File.join(gem_spec.full_gem_path, "ext/#{target_name}")
190
+ target_build_dir = target_source_dir
191
+ add_depend_package_path(target_name, target_source_dir, target_build_dir)
190
192
  end
191
193
 
192
- def add_depend_package_path(target_name, target_source_dir, target_build_dir)
194
+ def add_depend_package_path(target_name,
195
+ target_source_dir,
196
+ target_build_dir,
197
+ is_gem=true)
193
198
  if File.exist?(target_source_dir)
194
199
  $INCFLAGS = "-I#{target_source_dir}".quote + " #{$INCFLAGS}"
195
200
  end
@@ -199,12 +204,20 @@ def add_depend_package_path(target_name, target_source_dir, target_build_dir)
199
204
  $INCFLAGS = "-I#{target_build_dir}".quote + " #{$INCFLAGS}"
200
205
  end
201
206
 
202
- library_base_name = File.basename(target_source_dir).gsub(/-/, "_")
207
+ library_base_name = target_name.gsub(/-/, "_")
208
+ if is_gem
209
+ # .../glib2/ext/glib2/ -> .../glib2/ext/glib2/../../lib/
210
+ # (.../glib2/lib/)
211
+ library_dir = File.join(target_source_dir, "..", "..", "lib")
212
+ else
213
+ library_dir = target_build_dir
214
+ end
203
215
  case RUBY_PLATFORM
204
216
  when /cygwin|mingw/
205
- $libs << " " << File.join(target_build_dir, "#{library_base_name}.so")
217
+ library_path = File.join(library_dir, "#{library_base_name}.so")
218
+ $libs << " #{library_path}"
206
219
  when /mswin/
207
- $DLDFLAGS << " /libpath:#{target_build_dir}"
220
+ $DLDFLAGS << " /libpath:#{library_dir}"
208
221
  $libs << " #{library_base_name}-$(arch).lib"
209
222
  end
210
223
  end
@@ -431,10 +444,14 @@ def check_cairo(options={})
431
444
  end
432
445
  if rcairo_source_dir.nil?
433
446
  cairo_gem_spec = find_gem_spec("cairo")
434
- rcairo_source_dir = cairo_gem_spec.full_gem_path if cairo_gem_spec
435
- end
436
-
437
- unless rcairo_source_dir.nil?
447
+ if cairo_gem_spec
448
+ rcairo_source_dir = cairo_gem_spec.full_gem_path
449
+ rcairo_ext_source_dir = File.join(rcairo_source_dir, "ext", "cairo")
450
+ add_depend_package_path("cairo",
451
+ rcairo_ext_source_dir,
452
+ rcairo_ext_source_dir)
453
+ end
454
+ else
438
455
  options = {}
439
456
  build_dir = "tmp/#{RUBY_PLATFORM}/cairo/#{RUBY_VERSION}"
440
457
  if File.exist?(File.join(rcairo_source_dir, build_dir))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib2
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.5
4
+ version: 4.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Ruby-GNOME Project Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-12 00:00:00.000000000 Z
11
+ date: 2023-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pkg-config