ruby-vips 2.2.1 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: faf388c9ee4f7b130b34c0a30954da1d9efd08b09799befe88d676bca7c79f64
4
- data.tar.gz: 015463ac062367c72195e8349669c8ed80123c81cb88710951130d030b6a4018
3
+ metadata.gz: f57995edbbad929820ab97faae77cefac5596a6c4e440abfd86dc67a1a3ef6e3
4
+ data.tar.gz: 2cf84c9faced0678582b7858a1eac8c870e800bbf275c54427cf6f9564a76c13
5
5
  SHA512:
6
- metadata.gz: e05333180a545ecae8a7aa4da0a0fa1382e2b8e0233338b2e818cfcaa7de6e2a14c9be0d6f11510393ffb4343e5ad84a7100ba665c158546fd8dfcb71e83462e
7
- data.tar.gz: b4edb03ea9b62fd30c41fc51bb9cfb94214b4929e83df24c62742de63f7dbff1d13220e57a234da8592816f33e09f0122a9a60c790c9d459b236e655c7691467
6
+ metadata.gz: 48a29e47be77eca5d376af0f52969b7cf051eced8467c10206ae7ab10d8e48a25482a9c4402116ceb5dbc6fbc034fcc6aa340324bd77330d191d8920af1efb8b
7
+ data.tar.gz: e3ee97a320b95e9d897cd79754e1db0124c32c2f751e170896e70deecf72bddefa21f1dfda5ea5966846dccbbc95544e5e4ecffc0ebeb0d9f429802c8c62a6a3
@@ -38,8 +38,6 @@ jobs:
38
38
  matrix:
39
39
  os-version: [ 'ubuntu-20.04' ]
40
40
  ruby-version:
41
- - '2.1'
42
- - '2.2'
43
41
  - '2.3'
44
42
  - '2.4'
45
43
  - '2.5'
@@ -48,6 +46,7 @@ jobs:
48
46
  - '3.0'
49
47
  - '3.1'
50
48
  - '3.2'
49
+ - '3.3'
51
50
  - jruby
52
51
  fail-fast: true
53
52
 
@@ -74,7 +73,7 @@ jobs:
74
73
  DEBIAN_FRONTEND: noninteractive
75
74
  run:
76
75
  # we only need the library
77
- sudo apt-get install --fix-missing -qq -o Acquire::Retries=3
76
+ sudo apt-get install --no-install-recommends --fix-missing -qq -o Acquire::Retries=3
78
77
  libvips
79
78
 
80
79
  - name: Run Tests
data/CHANGELOG.md CHANGED
@@ -2,7 +2,11 @@
2
2
 
3
3
  ## master
4
4
 
5
- ## Version 2.2.1 (2023-02-21)
5
+ ## Version 2.2.2 (2024-07-17)
6
+
7
+ * fix compat with unified (semistatic) libvips binaries [kleisauke]
8
+
9
+ ## Version 2.2.1 (2024-02-21)
6
10
 
7
11
  * add `Vips.block_untrusted` method to block all untrusted operations. Only for libvips >= 8.13. [Docs](https://www.libvips.org/API/current/libvips-vips.html#vips-block-untrusted-set). [#382](https://github.com/libvips/ruby-vips/pull/382) [aglushkov](https://github.com/aglushkov)
8
12
  * add `Vips.block` method to block specific operation. Only for libvips >= 8.13. [Docs](https://www.libvips.org/API/current/VipsOperation.html#vips-operation-block-set). [#382](https://github.com/libvips/ruby-vips/pull/382) [aglushkov](https://github.com/aglushkov)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.1
1
+ 2.2.2
data/lib/vips/object.rb CHANGED
@@ -9,9 +9,6 @@ require "ffi"
9
9
  module Vips
10
10
  private
11
11
 
12
- # debugging support
13
- attach_function :vips_object_print_all, [], :void
14
-
15
12
  # we must init these by hand, since they are usually made on first image
16
13
  # create
17
14
  attach_function :vips_band_format_get_type, [], :GType
@@ -337,6 +334,7 @@ module Vips
337
334
  ArgumentClassPtr.ptr, ArgumentInstancePtr.ptr],
338
335
  :int
339
336
 
337
+ # debugging support
340
338
  attach_function :vips_object_print_all, [], :void
341
339
 
342
340
  attach_function :vips_object_set_from_string, [:pointer, :string], :int
data/lib/vips/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Vips
2
- VERSION = "2.2.1"
2
+ VERSION = "2.2.2"
3
3
  end
data/lib/vips.rb CHANGED
@@ -33,6 +33,30 @@ def library_name(name, abi_number)
33
33
  end
34
34
  end
35
35
 
36
+ # we can sometimes get dependent libraries from libvips -- either the platform
37
+ # will open dependencies for us automatically, or the libvips binary has been
38
+ # built to includes all main dependencies (common on windows, can happen
39
+ # elsewhere)
40
+ #
41
+ # we must get glib functions from libvips if we can, since it will be the
42
+ # one that libvips itself is using, and they will share runtime types
43
+ module Vips
44
+ extend FFI::Library
45
+
46
+ ffi_lib library_name("vips", 42)
47
+
48
+ begin
49
+ attach_function :g_malloc, [:size_t], :pointer
50
+ @@is_unified = true
51
+ rescue FFI::NotFoundError
52
+ @@is_unified = false
53
+ end
54
+
55
+ def self.unified?
56
+ @@is_unified
57
+ end
58
+ end
59
+
36
60
  module GLib
37
61
  class << self
38
62
  attr_accessor :logger
@@ -42,7 +66,11 @@ module GLib
42
66
 
43
67
  extend FFI::Library
44
68
 
45
- ffi_lib library_name("glib-2.0", 0)
69
+ if Vips.unified?
70
+ ffi_lib library_name("vips", 42)
71
+ else
72
+ ffi_lib library_name("glib-2.0", 0)
73
+ end
46
74
 
47
75
  attach_function :g_malloc, [:size_t], :pointer
48
76
 
@@ -134,7 +162,11 @@ end
134
162
  module GObject
135
163
  extend FFI::Library
136
164
 
137
- ffi_lib library_name("gobject-2.0", 0)
165
+ if Vips.unified?
166
+ ffi_lib library_name("vips", 42)
167
+ else
168
+ ffi_lib library_name("gobject-2.0", 0)
169
+ end
138
170
 
139
171
  # we can't just use ulong, windows has different int sizing rules
140
172
  if FFI::Platform::ADDRESS_SIZE == 64
@@ -568,9 +600,7 @@ require "vips/gvalue"
568
600
  # {Image#median}.
569
601
 
570
602
  module Vips
571
- extend FFI::Library
572
-
573
- ffi_lib library_name("vips", 42)
603
+ # we've already opened the libvips library
574
604
 
575
605
  LOG_DOMAIN = "VIPS"
576
606
  GLib.set_log_domain LOG_DOMAIN
data/ruby-vips.gemspec CHANGED
@@ -36,6 +36,7 @@ Gem::Specification.new do |spec|
36
36
  spec.required_ruby_version = ">= 2.0.0"
37
37
 
38
38
  spec.add_runtime_dependency "ffi", ["~> 1.12"]
39
+ spec.add_runtime_dependency "logger"
39
40
 
40
41
  spec.add_development_dependency "rake", ["~> 12.0"]
41
42
  spec.add_development_dependency "rspec", ["~> 3.3"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-vips
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
  - John Cupitt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-21 00:00:00.000000000 Z
11
+ date: 2024-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.12'
27
+ - !ruby/object:Gem::Dependency
28
+ name: logger
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rake
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -206,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
220
  - !ruby/object:Gem::Version
207
221
  version: '0'
208
222
  requirements: []
209
- rubygems_version: 3.3.15
223
+ rubygems_version: 3.4.20
210
224
  signing_key:
211
225
  specification_version: 4
212
226
  summary: A fast image processing library with low memory needs