vips 8.12.1 → 8.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/{development.yml → test.yaml} +2 -3
- data/CHANGELOG.md +7 -0
- data/Gemfile +2 -2
- data/README.md +29 -5
- data/lib/vips/mutableimage.rb +7 -0
- data/lib/vips/version.rb +1 -1
- data/lib/vips.rb +87 -4
- data/vips.gemspec +6 -12
- metadata +18 -62
- data/.standard.yml +0 -17
- data/.travis.yml +0 -57
- data/Rakefile +0 -33
- data/TODO +0 -43
- data/ext/Rakefile +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6bd237512aae93032374986191fee161225257023c6a25a94a0d3fb9ca94c73
|
4
|
+
data.tar.gz: baf2e85497526b4247f1fdf6b0853241860c6fd1ec7d1002e10a623b5fd66b9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c26a85f2626c1c4da2a7221c12d7eb8298ada48cdf2fbbc387ad280e550ad59129de9658c0af4c87be6f6282cefaaeef967fc26b1baba7c69d80f085cdbb9be5
|
7
|
+
data.tar.gz: 2aea627d161349dd7c5bb765118e1689b7b0fa9a09768f5442b8aa8edfd9825f43dca035cbc15693a6fe8d7e2fdc17434c1f833631a341ac2be5341b1d705334
|
@@ -1,4 +1,4 @@
|
|
1
|
-
name:
|
1
|
+
name: Test
|
2
2
|
|
3
3
|
on: [push, pull_request]
|
4
4
|
|
@@ -47,8 +47,7 @@ jobs:
|
|
47
47
|
run: |
|
48
48
|
sudo apt-get update -qq -o Acquire::Retries=3
|
49
49
|
sudo apt-get install --fix-missing -qq -o Acquire::Retries=3 libvips
|
50
|
-
bundle exec rake ext
|
51
50
|
|
52
51
|
- name: Run tests
|
53
52
|
timeout-minutes: 5
|
54
|
-
run: ${{matrix.env}} bundle exec
|
53
|
+
run: ${{matrix.env}} bundle exec rspec
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
* add `draw_point!` [jcupitt]
|
6
|
+
* add `Vips.tracked_*` for getting file and memory metrics [jeremy]
|
7
|
+
* add `Vips.cache_*` for getting cache settings [jeremy]
|
8
|
+
* add `Vips.vector?` to get/set SIMD status [jeremy]
|
9
|
+
* add `Vips.concurrency` to get/set threadpool size [jeremy]
|
10
|
+
* add `Vips.concurrency_default` to get the default threadpool size [jeremy]
|
11
|
+
|
5
12
|
## Version 2.1.4 (2021-10-28)
|
6
13
|
|
7
14
|
* `write_to_buffer` tries to use the new target API, then falls back to the old
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,15 @@
|
|
1
1
|
# Vips
|
2
2
|
|
3
|
-
[![
|
4
|
-
[![Test](https://github.com/libvips/ruby-vips/workflows/Test/badge.svg)](https://github.com/libvips/ruby-vips/actions?query=workflow%3ATest)
|
3
|
+
[![Development](https://github.com/ioquatix/vips/workflows/Development/badge.svg)](https://github.com/libvips/ruby-vips/actions?query=workflow%3ATest)
|
5
4
|
|
6
|
-
This gem is a
|
5
|
+
This gem is a Ruby binding for the [libvips image processing
|
6
|
+
library](https://libvips.github.io/libvips). It has been tested on
|
7
|
+
Linux, macOS and Windows, and with ruby 2, ruby 3 and jruby. It uses
|
8
|
+
[ruby-ffi](https://github.com/ffi/ffi) to call functions in the libvips
|
9
|
+
library.
|
10
|
+
|
11
|
+
This fork is compatible witih `ruby-vips` but also includes (and compiles)
|
12
|
+
the [libvips] source code.
|
7
13
|
|
8
14
|
libvips is a [demand-driven, horizontally
|
9
15
|
threaded](https://github.com/libvips/libvips/wiki/Why-is-libvips-quick)
|
@@ -13,14 +19,32 @@ memory](https://github.com/libvips/libvips/wiki/Speed-and-memory-use).
|
|
13
19
|
libvips is licensed under the [LGPL
|
14
20
|
2.1+](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html).
|
15
21
|
|
16
|
-
|
22
|
+
## Install on linux and macOS
|
17
23
|
|
18
|
-
|
24
|
+
Install the libvips binary with your package manager (eg. `apt install
|
25
|
+
libvips42` or perhaps `brew install vips`, see the [libvips install
|
26
|
+
instructions](https://libvips.github.io/libvips/install.html)) then install
|
27
|
+
this gem with:
|
19
28
|
|
20
29
|
``` shell
|
21
30
|
$ bundle add vips
|
22
31
|
```
|
23
32
|
|
33
|
+
## Install on Windows
|
34
|
+
|
35
|
+
The gemspec will pull in the msys libvips for you.
|
36
|
+
|
37
|
+
Tested with the ruby and msys from choco, but others may work.
|
38
|
+
|
39
|
+
## Example
|
40
|
+
|
41
|
+
```ruby
|
42
|
+
require "vips"
|
43
|
+
|
44
|
+
Or install it yourself as:
|
45
|
+
|
46
|
+
$ gem install vips
|
47
|
+
|
24
48
|
You'll still need to install `glib` and `gobject-introspection`.
|
25
49
|
|
26
50
|
## Usage
|
data/lib/vips/mutableimage.rb
CHANGED
@@ -96,6 +96,13 @@ module Vips
|
|
96
96
|
Vips::Operation.call name.to_s, [self, *args], options
|
97
97
|
end
|
98
98
|
|
99
|
+
# Draw a point on an image.
|
100
|
+
#
|
101
|
+
# See {Image#draw_rect}.
|
102
|
+
def draw_point! ink, left, top, **opts
|
103
|
+
draw_rect! ink, left, top, 1, 1, **opts
|
104
|
+
end
|
105
|
+
|
99
106
|
# Create a metadata item on an image of the specifed type. Ruby types
|
100
107
|
# are automatically transformed into the matching glib type (eg.
|
101
108
|
# {GObject::GINT_TYPE}), if possible.
|
data/lib/vips/version.rb
CHANGED
data/lib/vips.rb
CHANGED
@@ -27,9 +27,9 @@ def library_name(name, abi_number)
|
|
27
27
|
if FFI::Platform.windows?
|
28
28
|
"lib#{name}-#{abi_number}.dll"
|
29
29
|
elsif FFI::Platform.mac?
|
30
|
-
"#{name}.#{abi_number}"
|
30
|
+
"lib#{name}.#{abi_number}"
|
31
31
|
else
|
32
|
-
"#{name}.so.#{abi_number}"
|
32
|
+
"lib#{name}.so.#{abi_number}"
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
@@ -625,7 +625,12 @@ module Vips
|
|
625
625
|
|
626
626
|
attach_function :vips_leak_set, [:int], :void
|
627
627
|
attach_function :vips_vector_set_enabled, [:int], :void
|
628
|
+
attach_function :vips_vector_isenabled, [], :int
|
628
629
|
attach_function :vips_concurrency_set, [:int], :void
|
630
|
+
attach_function :vips_concurrency_get, [], :int
|
631
|
+
|
632
|
+
# Track the original default concurrency so we can reset to it.
|
633
|
+
DEFAULT_CONCURRENCY = vips_concurrency_get
|
629
634
|
|
630
635
|
# vips_foreign_get_suffixes was added in libvips 8.8
|
631
636
|
begin
|
@@ -640,20 +645,66 @@ module Vips
|
|
640
645
|
vips_leak_set((leak ? 1 : 0))
|
641
646
|
end
|
642
647
|
|
648
|
+
attach_function :vips_tracked_get_mem, [], :int
|
649
|
+
attach_function :vips_tracked_get_mem_highwater, [], :int
|
650
|
+
attach_function :vips_tracked_get_allocs, [], :int
|
651
|
+
attach_function :vips_tracked_get_files, [], :int
|
652
|
+
attach_function :vips_cache_get_max, [], :int
|
653
|
+
attach_function :vips_cache_get_max_mem, [], :int
|
654
|
+
attach_function :vips_cache_get_max_files, [], :int
|
643
655
|
attach_function :vips_cache_set_max, [:int], :void
|
644
656
|
attach_function :vips_cache_set_max_mem, [:int], :void
|
645
657
|
attach_function :vips_cache_set_max_files, [:int], :void
|
658
|
+
attach_function :vips_cache_print, [], :void
|
659
|
+
attach_function :vips_cache_drop_all, [], :void
|
660
|
+
|
661
|
+
# Get the number of bytes currently allocated via vips_malloc.
|
662
|
+
def self.tracked_mem
|
663
|
+
vips_tracked_get_mem
|
664
|
+
end
|
665
|
+
|
666
|
+
# Get the greatest number of bytes ever actively allocated via vips_malloc.
|
667
|
+
def self.tracked_mem_highwater
|
668
|
+
vips_tracked_get_mem_highwater
|
669
|
+
end
|
670
|
+
|
671
|
+
# Get the number of active allocations.
|
672
|
+
def self.tracked_allocs
|
673
|
+
vips_tracked_get_allocs
|
674
|
+
end
|
675
|
+
|
676
|
+
# Get the number of open files.
|
677
|
+
def self.tracked_files
|
678
|
+
vips_tracked_get_files
|
679
|
+
end
|
680
|
+
|
681
|
+
# Get the maximum number of operations that libvips should cache.
|
682
|
+
def self.cache_max
|
683
|
+
vips_cache_get_max
|
684
|
+
end
|
685
|
+
|
686
|
+
# Get the maximum amount of memory that libvips uses for the operation cache.
|
687
|
+
def self.cache_max_mem
|
688
|
+
vips_cache_get_max_mem
|
689
|
+
end
|
690
|
+
|
691
|
+
# Get the maximum number of files libvips keeps open in the operation cache.
|
692
|
+
def self.cache_max_files
|
693
|
+
vips_cache_get_max_files
|
694
|
+
end
|
646
695
|
|
647
696
|
# Set the maximum number of operations that libvips should cache. Set 0 to
|
648
697
|
# disable the operation cache. The default is 1000.
|
649
698
|
def self.cache_set_max size
|
650
699
|
vips_cache_set_max size
|
700
|
+
cache_max
|
651
701
|
end
|
652
702
|
|
653
703
|
# Set the maximum amount of memory that libvips should use for the operation
|
654
704
|
# cache. Set 0 to disable the operation cache. The default is 100mb.
|
655
705
|
def self.cache_set_max_mem size
|
656
706
|
vips_cache_set_max_mem size
|
707
|
+
cache_max_mem
|
657
708
|
end
|
658
709
|
|
659
710
|
# Set the maximum number of files libvips should keep open in the
|
@@ -661,12 +712,43 @@ module Vips
|
|
661
712
|
# 100.
|
662
713
|
def self.cache_set_max_files size
|
663
714
|
vips_cache_set_max_files size
|
715
|
+
cache_max_files
|
716
|
+
end
|
717
|
+
|
718
|
+
# Print the libvips operation cache to stdout. Handy for debugging.
|
719
|
+
def self.cache_print # :nodoc:
|
720
|
+
vips_cache_print
|
721
|
+
end
|
722
|
+
|
723
|
+
# Drop the libvips operation cache. Handy for leak tracking.
|
724
|
+
def self.cache_drop_all # :nodoc:
|
725
|
+
vips_cache_drop_all
|
726
|
+
end
|
727
|
+
|
728
|
+
# Get the size of libvips worker pools. Defaults to the VIPS_CONCURRENCY env
|
729
|
+
# var or the number of hardware threads on your computer.
|
730
|
+
def self.concurrency
|
731
|
+
vips_concurrency_get
|
664
732
|
end
|
665
733
|
|
666
|
-
#
|
667
|
-
|
734
|
+
# Get the default size of libvips worker pools.
|
735
|
+
def self.concurrency_default
|
736
|
+
DEFAULT_CONCURRENCY
|
737
|
+
end
|
738
|
+
|
739
|
+
# Set the size of each libvips worker pool. Max 1024 threads. Set to 1 to
|
740
|
+
# disable threading. Set to 0 or nil to reset to default.
|
668
741
|
def self.concurrency_set n
|
742
|
+
n = DEFAULT_CONCURRENCY if n.to_i == 0
|
669
743
|
vips_concurrency_set n
|
744
|
+
concurrency
|
745
|
+
end
|
746
|
+
|
747
|
+
# Whether SIMD and the run-time compiler are enabled. This can give a nice
|
748
|
+
# speed-up, but can also be unstable on some systems or with some versions
|
749
|
+
# of the run-time compiler.
|
750
|
+
def self.vector?
|
751
|
+
vips_vector_isenabled == 1
|
670
752
|
end
|
671
753
|
|
672
754
|
# Enable or disable SIMD and the run-time compiler. This can give a nice
|
@@ -674,6 +756,7 @@ module Vips
|
|
674
756
|
# of the run-time compiler.
|
675
757
|
def self.vector_set enabled
|
676
758
|
vips_vector_set_enabled(enabled ? 1 : 0)
|
759
|
+
vector?
|
677
760
|
end
|
678
761
|
|
679
762
|
# Deprecated compatibility function.
|
data/vips.gemspec
CHANGED
@@ -5,7 +5,6 @@ Gem::Specification.new do |spec|
|
|
5
5
|
spec.name = "vips"
|
6
6
|
spec.version = Vips::VERSION
|
7
7
|
spec.authors = ["John Cupitt", "Samuel Williams"]
|
8
|
-
spec.email = ["jcupitt@gmail.com", "samuel.williams@oriontransfer.co.nz"]
|
9
8
|
|
10
9
|
spec.summary = "Vips is a high-performance image manipulation library."
|
11
10
|
spec.description = "Provides pre-compiled binaries for libvips."
|
@@ -15,22 +14,17 @@ Gem::Specification.new do |spec|
|
|
15
14
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
16
15
|
f.match(%r{^(test|spec|features)/})
|
17
16
|
end
|
18
|
-
|
17
|
+
|
19
18
|
spec.require_paths = ["lib"]
|
20
19
|
|
21
20
|
spec.required_ruby_version = ">= 2.1"
|
22
21
|
|
23
|
-
spec.extensions = %w[ext/Rakefile]
|
22
|
+
# spec.extensions = %w[ext/Rakefile]
|
24
23
|
|
25
24
|
spec.add_runtime_dependency "ffi", ["~> 1.12"]
|
26
25
|
|
27
|
-
spec.add_development_dependency "
|
28
|
-
spec.add_development_dependency "
|
29
|
-
spec.add_development_dependency "
|
30
|
-
|
31
|
-
spec.add_development_dependency "bundler"
|
32
|
-
spec.add_development_dependency "rspec", "~> 3.7"
|
33
|
-
spec.add_development_dependency "rake"
|
34
|
-
|
35
|
-
spec.add_development_dependency "standardrb"
|
26
|
+
spec.add_development_dependency "rake", ["~> 12.0"]
|
27
|
+
spec.add_development_dependency "rspec", ["~> 3.3"]
|
28
|
+
spec.add_development_dependency "yard", ["~> 0.9.11"]
|
29
|
+
spec.add_development_dependency "bundler", [">= 1.0", "< 3"]
|
36
30
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vips
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.
|
4
|
+
version: 8.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Cupitt
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-02-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|
@@ -26,21 +26,21 @@ dependencies:
|
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.12'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
29
|
+
name: rake
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '0
|
34
|
+
version: '12.0'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '0
|
41
|
+
version: '12.0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
43
|
+
name: rspec
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
@@ -54,95 +54,52 @@ dependencies:
|
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '3.3'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
57
|
+
name: yard
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
62
|
+
version: 0.9.11
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: 0.9.11
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: bundler
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '0'
|
77
|
-
|
78
|
-
prerelease: false
|
79
|
-
version_requirements: !ruby/object:Gem::Requirement
|
80
|
-
requirements:
|
81
|
-
- - ">="
|
76
|
+
version: '1.0'
|
77
|
+
- - "<"
|
82
78
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
84
|
-
- !ruby/object:Gem::Dependency
|
85
|
-
name: rspec
|
86
|
-
requirement: !ruby/object:Gem::Requirement
|
87
|
-
requirements:
|
88
|
-
- - "~>"
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
version: '3.7'
|
79
|
+
version: '3'
|
91
80
|
type: :development
|
92
81
|
prerelease: false
|
93
82
|
version_requirements: !ruby/object:Gem::Requirement
|
94
|
-
requirements:
|
95
|
-
- - "~>"
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
version: '3.7'
|
98
|
-
- !ruby/object:Gem::Dependency
|
99
|
-
name: rake
|
100
|
-
requirement: !ruby/object:Gem::Requirement
|
101
|
-
requirements:
|
102
|
-
- - ">="
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
version: '0'
|
105
|
-
type: :development
|
106
|
-
prerelease: false
|
107
|
-
version_requirements: !ruby/object:Gem::Requirement
|
108
|
-
requirements:
|
109
|
-
- - ">="
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
version: '0'
|
112
|
-
- !ruby/object:Gem::Dependency
|
113
|
-
name: standardrb
|
114
|
-
requirement: !ruby/object:Gem::Requirement
|
115
83
|
requirements:
|
116
84
|
- - ">="
|
117
85
|
- !ruby/object:Gem::Version
|
118
|
-
version: '0'
|
119
|
-
|
120
|
-
prerelease: false
|
121
|
-
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
requirements:
|
123
|
-
- - ">="
|
86
|
+
version: '1.0'
|
87
|
+
- - "<"
|
124
88
|
- !ruby/object:Gem::Version
|
125
|
-
version: '
|
89
|
+
version: '3'
|
126
90
|
description: Provides pre-compiled binaries for libvips.
|
127
91
|
email:
|
128
|
-
- jcupitt@gmail.com
|
129
|
-
- samuel.williams@oriontransfer.co.nz
|
130
92
|
executables: []
|
131
|
-
extensions:
|
132
|
-
- ext/Rakefile
|
93
|
+
extensions: []
|
133
94
|
extra_rdoc_files: []
|
134
95
|
files:
|
135
96
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
136
|
-
- ".github/workflows/
|
97
|
+
- ".github/workflows/test.yaml"
|
137
98
|
- ".gitignore"
|
138
|
-
- ".standard.yml"
|
139
|
-
- ".travis.yml"
|
140
99
|
- ".yardopts"
|
141
100
|
- CHANGELOG.md
|
142
101
|
- Gemfile
|
143
102
|
- README.md
|
144
|
-
- Rakefile
|
145
|
-
- TODO
|
146
103
|
- example/annotate.rb
|
147
104
|
- example/connection.rb
|
148
105
|
- example/daltonize8.rb
|
@@ -158,7 +115,6 @@ files:
|
|
158
115
|
- example/trim8.rb
|
159
116
|
- example/watermark.rb
|
160
117
|
- example/wobble.rb
|
161
|
-
- ext/Rakefile
|
162
118
|
- lib/vips.rb
|
163
119
|
- lib/vips/access.rb
|
164
120
|
- lib/vips/align.rb
|
@@ -217,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
217
173
|
- !ruby/object:Gem::Version
|
218
174
|
version: '0'
|
219
175
|
requirements: []
|
220
|
-
rubygems_version: 3.
|
176
|
+
rubygems_version: 3.5.5
|
221
177
|
signing_key:
|
222
178
|
specification_version: 4
|
223
179
|
summary: Vips is a high-performance image manipulation library.
|
data/.standard.yml
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
fix: false # default: false
|
2
|
-
parallel: true # default: false
|
3
|
-
format: progress # default: Standard::Formatter
|
4
|
-
ruby_version: 2.0 # default: RUBY_VERSION
|
5
|
-
default_ignores: false # default: true
|
6
|
-
|
7
|
-
ignore: # default: []
|
8
|
-
- '**/*':
|
9
|
-
- Standard/SemanticBlocks
|
10
|
-
- 'lib/vips/methods.rb'
|
11
|
-
- '{lib,example}/**/*':
|
12
|
-
- Lint/IneffectiveAccessModifier
|
13
|
-
- Lint/RescueException
|
14
|
-
- Style/GlobalVars
|
15
|
-
- 'spec/**/*':
|
16
|
-
- Lint/BinaryOperatorWithIdenticalOperands
|
17
|
-
- 'vendor/**/*'
|
data/.travis.yml
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
dist: xenial
|
3
|
-
cache: bundler
|
4
|
-
|
5
|
-
addons:
|
6
|
-
apt:
|
7
|
-
packages:
|
8
|
-
- libexpat1-dev
|
9
|
-
- gettext
|
10
|
-
- libglib2.0-dev
|
11
|
-
- liborc-0.4-dev
|
12
|
-
- libfftw3-dev
|
13
|
-
- liblcms2-dev
|
14
|
-
- libmagickwand-dev
|
15
|
-
- libopenexr-dev
|
16
|
-
- libcfitsio3-dev
|
17
|
-
- libgif-dev
|
18
|
-
- libgsf-1-dev
|
19
|
-
- libmatio-dev
|
20
|
-
- libopenslide-dev
|
21
|
-
- libpango1.0-dev
|
22
|
-
- libpoppler-glib-dev
|
23
|
-
- librsvg2-dev
|
24
|
-
- libwebp-dev
|
25
|
-
homebrew:
|
26
|
-
packages:
|
27
|
-
- glib
|
28
|
-
- libffi
|
29
|
-
- libexif
|
30
|
-
update: true
|
31
|
-
|
32
|
-
cache:
|
33
|
-
bundler: true
|
34
|
-
directories: $HOME/vips/ext
|
35
|
-
|
36
|
-
matrix:
|
37
|
-
include:
|
38
|
-
- rvm: 2.4
|
39
|
-
- rvm: 2.5
|
40
|
-
- rvm: 2.6
|
41
|
-
- rvm: 2.6
|
42
|
-
os: osx
|
43
|
-
env: PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
|
44
|
-
- rvm: 2.7
|
45
|
-
- rvm: truffleruby
|
46
|
-
- rvm: jruby-head
|
47
|
-
- rvm: ruby-head
|
48
|
-
allow_failures:
|
49
|
-
- rvm: truffleruby
|
50
|
-
- rvm: ruby-head
|
51
|
-
- rvm: jruby-head
|
52
|
-
|
53
|
-
before_script:
|
54
|
-
- bundle exec rake ext
|
55
|
-
|
56
|
-
script:
|
57
|
-
- bundle exec rake
|
data/Rakefile
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
require "bundler/gem_tasks"
|
2
|
-
|
3
|
-
begin
|
4
|
-
Bundler.setup(:default, :development)
|
5
|
-
rescue Bundler::BundlerError => e
|
6
|
-
warn e.message
|
7
|
-
warn "Run `bundle install` to install missing gems"
|
8
|
-
exit e.status_code
|
9
|
-
end
|
10
|
-
|
11
|
-
require "rake"
|
12
|
-
|
13
|
-
require "rspec/core"
|
14
|
-
require "rspec/core/rake_task"
|
15
|
-
RSpec::Core::RakeTask.new(:spec) do |spec|
|
16
|
-
spec.pattern = FileList["spec/**/*_spec.rb"]
|
17
|
-
end
|
18
|
-
|
19
|
-
task default: :spec
|
20
|
-
|
21
|
-
task :ext do
|
22
|
-
Dir.chdir "ext" do
|
23
|
-
sh "rake"
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
unless RUBY_PLATFORM.include?("java")
|
28
|
-
require "github/markup"
|
29
|
-
require "yard"
|
30
|
-
require "yard/rake/yardoc_task"
|
31
|
-
|
32
|
-
YARD::Rake::YardocTask.new
|
33
|
-
end
|
data/TODO
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
# Notes
|
2
|
-
|
3
|
-
- We should support complex constants, eg:
|
4
|
-
|
5
|
-
Complex(1, 2)
|
6
|
-
=> (1+2i)
|
7
|
-
|
8
|
-
# Common operations
|
9
|
-
|
10
|
-
- Lint.
|
11
|
-
|
12
|
-
bundle exec standardrb
|
13
|
-
|
14
|
-
- Reinstall local copy of gem after a change.
|
15
|
-
|
16
|
-
bundle exec rake install
|
17
|
-
|
18
|
-
- Run test suite.
|
19
|
-
|
20
|
-
bundle exec rake
|
21
|
-
|
22
|
-
- Version bump.
|
23
|
-
|
24
|
-
edit lib/vips/version.rb
|
25
|
-
edit VERSION
|
26
|
-
|
27
|
-
- Regenerate autodocs.
|
28
|
-
|
29
|
-
cd lib/vips
|
30
|
-
ruby > methods.rb
|
31
|
-
require "vips"; Vips::Yard.generate
|
32
|
-
^D
|
33
|
-
|
34
|
-
- Regenerate docs.
|
35
|
-
|
36
|
-
bundle exec rake yard
|
37
|
-
|
38
|
-
- Push new gem to rubygems, tag repository with version.
|
39
|
-
|
40
|
-
bundle exec rake release
|
41
|
-
|
42
|
-
You'll be asked for a otp from authy / google authenticator / etc.
|
43
|
-
|
data/ext/Rakefile
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
|
2
|
-
require_relative '../lib/vips/version'
|
3
|
-
|
4
|
-
version = Vips::VERSION[/\d+\.\d+\.\d+/]
|
5
|
-
archive_path = "vips-#{version}.tar.gz"
|
6
|
-
source_path = "vips-#{version}"
|
7
|
-
prefix = ENV['PREFIX'] || File.dirname(__dir__)
|
8
|
-
|
9
|
-
task :fetch do
|
10
|
-
url = "https://github.com/libvips/libvips/releases/download/v#{version}/#{archive_path}"
|
11
|
-
|
12
|
-
unless File.exist? archive_path
|
13
|
-
sh "wget #{url} -O #{archive_path}"
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
task :extract do
|
18
|
-
unless File.exist? source_path
|
19
|
-
sh "tar -xvf #{archive_path}"
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
task :build do
|
24
|
-
Dir.chdir source_path do
|
25
|
-
sh "./configure --prefix=#{prefix} --exec-prefix=#{prefix}"
|
26
|
-
sh "make install"
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
task :clean do
|
31
|
-
FileUtils.rm_rf archive_path
|
32
|
-
FileUtils.rm_rf source_path
|
33
|
-
end
|
34
|
-
|
35
|
-
task :default => [:fetch, :extract, :build]
|