pngcheck 0.2.6 → 0.2.8
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 +4 -4
- data/.cross_rubies +1 -0
- data/Rakefile +12 -0
- data/bin/rspec +29 -0
- data/ext/layout.rb +5 -0
- data/ext/pngcheck-3.0.3.tar.gz +0 -0
- data/lib/pngcheck/recipe.rb +17 -2
- data/lib/pngcheck/version.rb +1 -1
- metadata +33 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9014c01557052b2b5a66aeef6910309871615749692205ca0ad5e6872ef420e1
|
4
|
+
data.tar.gz: 296d674f35113d068fc8c641628b8abb0dfdf89525c22146ad91598bc9e8a10a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff8ff007d23e62aae50dc3d392a701392dfb43063ad963738a18864d8e257c2341c75b0d1b0dd6fa0c44df6236320527b38d87ae879fc47f248d7e248a9c29e8
|
7
|
+
data.tar.gz: 9fd0238c153a571a82b2fb85e1864d517a266cf47f5ccbdbb60d5d5fc6b94c9207dc40ca0985fe5941df6c1644e553466ad7c7cf233dcfa3f6935219f0a0743a
|
data/.cross_rubies
CHANGED
data/Rakefile
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
require "bundler/gem_tasks"
|
4
4
|
require "rspec/core/rake_task"
|
5
5
|
require "rubocop/rake_task"
|
6
|
+
require_relative "ext/layout"
|
6
7
|
|
7
8
|
RSpec::Core::RakeTask.new(:spec)
|
8
9
|
RuboCop::RakeTask.new
|
@@ -20,14 +21,24 @@ task "gem:native:any" do
|
|
20
21
|
sh "rake platform:any gem"
|
21
22
|
end
|
22
23
|
|
24
|
+
desc "Download pngcheck source"
|
25
|
+
task :pngcheck do
|
26
|
+
test_cmd = "test -f #{PNGCHECK_LOCAL}"
|
27
|
+
wget_cmd = "wget -nc -nv -O #{PNGCHECK_LOCAL} #{PNGCHECK_URI}"
|
28
|
+
sh "#{test_cmd} || #{wget_cmd}"
|
29
|
+
end
|
30
|
+
task compile: :pngcheck
|
31
|
+
|
23
32
|
require "rubygems/package_task"
|
24
33
|
|
25
34
|
desc "Define the gem task to build on any platform (compile on install)"
|
26
35
|
task "platform:any" do
|
27
36
|
spec = Gem::Specification::load("pngcheck.gemspec").dup
|
37
|
+
spec.files << PNGCHECK_LOCAL
|
28
38
|
task = Gem::PackageTask.new(spec)
|
29
39
|
task.define
|
30
40
|
end
|
41
|
+
task "gem:native:any": :pngcheck
|
31
42
|
|
32
43
|
File.readlines(".cross_rubies", chomp: true).each do |platform|
|
33
44
|
desc "Build pre-compiled gem for the #{platform} platform"
|
@@ -53,6 +64,7 @@ require "rake/clean"
|
|
53
64
|
CLOBBER.include("pkg")
|
54
65
|
CLEAN.include("ports",
|
55
66
|
"tmp",
|
67
|
+
PNGCHECK_LOCAL,
|
56
68
|
"lib/pngcheck/*.dll",
|
57
69
|
"lib/pngcheck/*.dylib",
|
58
70
|
"lib/pngcheck/*.so")
|
data/bin/rspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rspec' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("bundle", __dir__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("rspec-core", "rspec")
|
data/ext/layout.rb
ADDED
Binary file
|
data/lib/pngcheck/recipe.rb
CHANGED
@@ -8,14 +8,16 @@ require "shellwords"
|
|
8
8
|
require "open3"
|
9
9
|
require_relative "version"
|
10
10
|
|
11
|
+
ROOT = Pathname.new(File.expand_path("../..", __dir__))
|
12
|
+
require "#{ROOT}/ext/layout.rb"
|
13
|
+
|
11
14
|
module PngCheck
|
12
15
|
class Recipe < MiniPortile
|
13
|
-
ROOT = Pathname.new(File.expand_path("../..", __dir__))
|
14
16
|
COMMON_FLAGS = "-shared -fPIC -Wall -O -DUSE_ZLIB"
|
15
17
|
|
16
18
|
def files_to_load_all
|
17
19
|
@files << {
|
18
|
-
url: "http://www.libpng.org/pub/png/src/pngcheck-3.0.3.tar.gz"
|
20
|
+
url: "file:#{ROOT}/#{PNGCHECK_LOCAL}", # "http://www.libpng.org/pub/png/src/pngcheck-3.0.3.tar.gz"
|
19
21
|
sha256: "c36a4491634af751f7798ea421321642f9590faa032eccb0dd5fb4533609dee6", # rubocop:disable Layout/LineLength
|
20
22
|
}
|
21
23
|
end
|
@@ -64,6 +66,19 @@ module PngCheck
|
|
64
66
|
FileUtils.touch(checkpoint)
|
65
67
|
end
|
66
68
|
|
69
|
+
def download_file_file(uri, full_path)
|
70
|
+
if MiniPortile.windows?
|
71
|
+
FileUtils.mkdir_p File.dirname(full_path)
|
72
|
+
FileUtils.cp uri.to_s.delete_prefix("file:"), full_path
|
73
|
+
else
|
74
|
+
super
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def tmp_path
|
79
|
+
"tmp/#{@host}/ports"
|
80
|
+
end
|
81
|
+
|
67
82
|
def checkpoint
|
68
83
|
File.join(@target, "#{name}-#{version}-#{host}.installed")
|
69
84
|
end
|
data/lib/pngcheck/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pngcheck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.3'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 2.3.22
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.3'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 2.3.22
|
13
33
|
- !ruby/object:Gem::Dependency
|
14
34
|
name: ffi
|
15
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,33 +59,33 @@ dependencies:
|
|
39
59
|
- !ruby/object:Gem::Version
|
40
60
|
version: '2.7'
|
41
61
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
62
|
+
name: rake
|
43
63
|
requirement: !ruby/object:Gem::Requirement
|
44
64
|
requirements:
|
45
65
|
- - "~>"
|
46
66
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0
|
48
|
-
type: :
|
67
|
+
version: '13.0'
|
68
|
+
type: :runtime
|
49
69
|
prerelease: false
|
50
70
|
version_requirements: !ruby/object:Gem::Requirement
|
51
71
|
requirements:
|
52
72
|
- - "~>"
|
53
73
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0
|
74
|
+
version: '13.0'
|
55
75
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
76
|
+
name: libpng-ruby
|
57
77
|
requirement: !ruby/object:Gem::Requirement
|
58
78
|
requirements:
|
59
79
|
- - "~>"
|
60
80
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
81
|
+
version: '0.6'
|
62
82
|
type: :development
|
63
83
|
prerelease: false
|
64
84
|
version_requirements: !ruby/object:Gem::Requirement
|
65
85
|
requirements:
|
66
86
|
- - "~>"
|
67
87
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
88
|
+
version: '0.6'
|
69
89
|
- !ruby/object:Gem::Dependency
|
70
90
|
name: rspec
|
71
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -99,6 +119,7 @@ email:
|
|
99
119
|
- open.source@ribose.com
|
100
120
|
executables:
|
101
121
|
- console
|
122
|
+
- rspec
|
102
123
|
- setup
|
103
124
|
extensions:
|
104
125
|
- ext/extconf.rb
|
@@ -113,9 +134,12 @@ files:
|
|
113
134
|
- README.adoc
|
114
135
|
- Rakefile
|
115
136
|
- bin/console
|
137
|
+
- bin/rspec
|
116
138
|
- bin/setup
|
117
139
|
- ext/Makefile
|
118
140
|
- ext/extconf.rb
|
141
|
+
- ext/layout.rb
|
142
|
+
- ext/pngcheck-3.0.3.tar.gz
|
119
143
|
- ext/wrapper.c
|
120
144
|
- lib/pngcheck.rb
|
121
145
|
- lib/pngcheck/recipe.rb
|