mkmf-lite 0.2.6 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGES +5 -0
- data/README +2 -2
- data/certs/djberg96_pub.pem +22 -17
- data/lib/mkmf/lite.rb +36 -38
- data/mkmf-lite.gemspec +11 -2
- data/test/test_mkmf_lite.rb +2 -1
- metadata +33 -22
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b09c774e9b8a62f9c17fc3bddb1a3f5031aec85456258ff557dbd7945897a029
|
4
|
+
data.tar.gz: 1f278b056338594d68a3bcc6d3a2b61730fc91acca58826335119c34d9736298
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05766eb2658383495265b925361943902dacdab84e8fd88c514ec1b4797f0deb3569e9f82462a8f84ddcd42bd90a0840e0c4384d8f1e60a0403fa10d376d3ab5
|
7
|
+
data.tar.gz: b919b4924fd50ac8137c1d76bbb613c3c66f243f9c51c162473377c9b790a66aa263ef86662e87740c59a99fa08d853c3ddb701e41dde438503e972cc445ff14
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGES
CHANGED
data/README
CHANGED
data/certs/djberg96_pub.pem
CHANGED
@@ -1,21 +1,26 @@
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
2
|
-
|
2
|
+
MIIEcDCCAtigAwIBAgIBATANBgkqhkiG9w0BAQsFADA/MREwDwYDVQQDDAhkamJl
|
3
3
|
cmc5NjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
|
4
|
-
|
4
|
+
MB4XDTE4MDMxODE1MjIwN1oXDTI4MDMxNTE1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OCAYEAW2tnYixXQtKxgGXq
|
18
|
+
/3iSWG2bLwvxS4go3srO+aRXZHrFUMlJ5W0mCxl03aazxxKTsVVpZD8QZxvK91OQ
|
19
|
+
h9zr9JBYqCLcCVbr8SkmYCi/laxIZxsNE5YI8cC8vvlLI7AMgSfPSnn/Epq1GjGY
|
20
|
+
6L1iRcEDtanGCIvjqlCXO9+BmsnCfEVehqZkQHeYczA03tpOWb6pon2wzvMKSsKH
|
21
|
+
ks0ApVdstSLz1kzzAqem/uHdG9FyXdbTAwH1G4ZPv69sQAFAOCgAqYmdnzedsQtE
|
22
|
+
1LQfaQrx0twO+CZJPcRLEESjq8ScQxWRRkfuh2VeR7cEU7L7KqT10mtUwrvw7APf
|
23
|
+
DYoeCY9KyjIBjQXfbj2ke5u1hZj94Fsq9FfbEQg8ygCgwThnmkTrrKEiMSs3alYR
|
24
|
+
ORVCZpRuCPpmC8qmqxUnARDArzucjaclkxjLWvCVHeFa9UP7K3Nl9oTjJNv+7/jM
|
25
|
+
WZs4eecIcUc4tKdHxcAJ0MO/Dkqq7hGaiHpwKY76wQ1+8xAh
|
21
26
|
-----END CERTIFICATE-----
|
data/lib/mkmf/lite.rb
CHANGED
@@ -7,42 +7,40 @@ require 'open3'
|
|
7
7
|
module Mkmf
|
8
8
|
module Lite
|
9
9
|
# The version of the mkmf-lite library
|
10
|
-
MKMF_LITE_VERSION = '0.
|
10
|
+
MKMF_LITE_VERSION = '0.3.0'.freeze
|
11
11
|
|
12
|
-
|
13
|
-
@@cpp_srcfile = 'conftest.c'
|
12
|
+
private
|
14
13
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
def cpp_command
|
15
|
+
command = RbConfig::CONFIG['CC'] || RbConfig::CONFIG['CPP'] || File.which('cc') || File.which('gcc') || File.which('cl')
|
16
|
+
raise "Compiler not found" unless command
|
17
|
+
command
|
19
18
|
end
|
20
19
|
|
21
|
-
|
22
|
-
|
23
|
-
else
|
24
|
-
# TODO: We should adjust this based on OS. For now we're using
|
25
|
-
# arguments I think you'll typically see set on Linux and BSD.
|
26
|
-
@@cpp_libraries = "-lrt -ldl -lcrypt -lm"
|
20
|
+
def cpp_source_file
|
21
|
+
'conftest.c'
|
27
22
|
end
|
28
23
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
when /sunos|solaris|hpux/i
|
35
|
-
@@cpp_command = File.which('cc') || File.which('gcc')
|
36
|
-
else
|
37
|
-
@@cpp_command = 'gcc'
|
24
|
+
def cpp_out_file
|
25
|
+
if File::ALT_SEPARATOR && RbConfig::CONFIG['CPP'] =~ /^cl/
|
26
|
+
'/Feconftest.exe'
|
27
|
+
else
|
28
|
+
'-o conftest.exe'
|
38
29
|
end
|
39
30
|
end
|
40
31
|
|
41
|
-
#
|
42
|
-
|
43
|
-
|
32
|
+
# TODO: We should adjust this based on OS. For now we're using
|
33
|
+
# arguments I think you'll typically see set on Linux and BSD.
|
34
|
+
def cpp_libraries
|
35
|
+
if RbConfig::CONFIG['LIBS']
|
36
|
+
RbConfig::CONFIG['LIBS'] + RbConfig::CONFIG['LIBRUBYARG']
|
37
|
+
else
|
38
|
+
'-lrt -ldl -lcrypt -lm'
|
39
|
+
end
|
44
40
|
end
|
45
41
|
|
42
|
+
public
|
43
|
+
|
46
44
|
# Check for the presence of the given +header+ file. You may optionally
|
47
45
|
# provide a list of directories to search.
|
48
46
|
#
|
@@ -166,11 +164,11 @@ module Mkmf
|
|
166
164
|
stdout_orig = $stdout.dup
|
167
165
|
|
168
166
|
Dir.chdir(Dir.tmpdir){
|
169
|
-
File.open(
|
167
|
+
File.open(cpp_source_file, 'w'){ |fh| fh.write(code) }
|
170
168
|
|
171
|
-
command =
|
172
|
-
command +=
|
173
|
-
command +=
|
169
|
+
command = cpp_command + ' '
|
170
|
+
command += cpp_out_file + ' '
|
171
|
+
command += cpp_source_file
|
174
172
|
|
175
173
|
# Temporarily close these
|
176
174
|
$stderr.reopen(File.null)
|
@@ -191,8 +189,8 @@ module Mkmf
|
|
191
189
|
end
|
192
190
|
}
|
193
191
|
ensure
|
194
|
-
File.delete(
|
195
|
-
File.delete(
|
192
|
+
File.delete(cpp_source_file) if File.exists?(cpp_source_file)
|
193
|
+
File.delete(cpp_out_file) if File.exists?(cpp_out_file)
|
196
194
|
$stderr.reopen(stderr_orig)
|
197
195
|
$stdout.reopen(stdout_orig)
|
198
196
|
end
|
@@ -214,24 +212,24 @@ module Mkmf
|
|
214
212
|
stdout_orig = $stdout.dup
|
215
213
|
|
216
214
|
Dir.chdir(Dir.tmpdir){
|
217
|
-
File.open(
|
215
|
+
File.open(cpp_source_file, 'w'){ |fh| fh.write(code) }
|
218
216
|
|
219
217
|
if command_options
|
220
|
-
command =
|
218
|
+
command = cpp_command + ' ' + command_options + ' '
|
221
219
|
else
|
222
|
-
command =
|
220
|
+
command = cpp_command + ' '
|
223
221
|
end
|
224
222
|
|
225
|
-
command +=
|
226
|
-
command +=
|
223
|
+
command += cpp_out_file + ' '
|
224
|
+
command += cpp_source_file
|
227
225
|
|
228
226
|
$stderr.reopen(File.null)
|
229
227
|
$stdout.reopen(File.null)
|
230
228
|
boolean = system(command)
|
231
229
|
}
|
232
230
|
ensure
|
233
|
-
File.delete(
|
234
|
-
File.delete(
|
231
|
+
File.delete(cpp_source_file) if File.exists?(cpp_source_file)
|
232
|
+
File.delete(cpp_out_file) if File.exists?(cpp_out_file)
|
235
233
|
$stdout.reopen(stdout_orig)
|
236
234
|
$stderr.reopen(stderr_orig)
|
237
235
|
end
|
data/mkmf-lite.gemspec
CHANGED
@@ -3,9 +3,9 @@ require 'rubygems'
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = 'mkmf-lite'
|
5
5
|
spec.summary = 'A lighter version of mkmf designed for use as a library'
|
6
|
-
spec.version = '0.
|
6
|
+
spec.version = '0.3.0'
|
7
7
|
spec.author = 'Daniel J. Berger'
|
8
|
-
spec.license = '
|
8
|
+
spec.license = 'Apache-2.0'
|
9
9
|
spec.email = 'djberg96@gmail.com'
|
10
10
|
spec.homepage = 'http://github.com/djberg96/mkmf-lite'
|
11
11
|
spec.test_file = 'test/test_mkmf_lite.rb'
|
@@ -17,6 +17,15 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.add_dependency('ptools')
|
18
18
|
spec.add_development_dependency('test-unit', '>= 2.4.0')
|
19
19
|
|
20
|
+
spec.metadata = {
|
21
|
+
'homepage_uri' => 'https://github.com/djberg96/mkmf-lite',
|
22
|
+
'bug_tracker_uri' => 'https://github.com/djberg96/mkmf-lite/issues',
|
23
|
+
'changelog_uri' => 'https://github.com/djberg96/mkmf-lite/blob/master/CHANGES',
|
24
|
+
'documentation_uri' => 'https://github.com/djberg96/mkmf-lite/wiki',
|
25
|
+
'source_code_uri' => 'https://github.com/djberg96/mkmf-lite',
|
26
|
+
'wiki_uri' => 'https://github.com/djberg96/mkmf-lite/wiki'
|
27
|
+
}
|
28
|
+
|
20
29
|
spec.description = <<-EOF
|
21
30
|
The mkmf-lite library is a light version of the the mkmf library
|
22
31
|
designed for use as a library. It does not create packages, builds,
|
data/test/test_mkmf_lite.rb
CHANGED
@@ -21,7 +21,8 @@ class TC_Mkmf_Lite < Test::Unit::TestCase
|
|
21
21
|
end
|
22
22
|
|
23
23
|
test "version information" do
|
24
|
-
assert_equal('0.
|
24
|
+
assert_equal('0.3.0', MKMF_LITE_VERSION)
|
25
|
+
assert_true(MKMF_LITE_VERSION.frozen?)
|
25
26
|
end
|
26
27
|
|
27
28
|
test "have_header basic functionality" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mkmf-lite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -10,27 +10,32 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
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DrD5MYQIDAQABo3cwdTAJBgNV
|
26
|
+
HRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUFZsMapgzJimzsbaBG2Tm8j5e
|
27
|
+
AzgwHQYDVR0RBBYwFIESZGpiZXJnOTZAZ21haWwuY29tMB0GA1UdEgQWMBSBEmRq
|
28
|
+
YmVyZzk2QGdtYWlsLmNvbTANBgkqhkiG9w0BAQsFAAOCAYEAW2tnYixXQtKxgGXq
|
29
|
+
/3iSWG2bLwvxS4go3srO+aRXZHrFUMlJ5W0mCxl03aazxxKTsVVpZD8QZxvK91OQ
|
30
|
+
h9zr9JBYqCLcCVbr8SkmYCi/laxIZxsNE5YI8cC8vvlLI7AMgSfPSnn/Epq1GjGY
|
31
|
+
6L1iRcEDtanGCIvjqlCXO9+BmsnCfEVehqZkQHeYczA03tpOWb6pon2wzvMKSsKH
|
32
|
+
ks0ApVdstSLz1kzzAqem/uHdG9FyXdbTAwH1G4ZPv69sQAFAOCgAqYmdnzedsQtE
|
33
|
+
1LQfaQrx0twO+CZJPcRLEESjq8ScQxWRRkfuh2VeR7cEU7L7KqT10mtUwrvw7APf
|
34
|
+
DYoeCY9KyjIBjQXfbj2ke5u1hZj94Fsq9FfbEQg8ygCgwThnmkTrrKEiMSs3alYR
|
35
|
+
ORVCZpRuCPpmC8qmqxUnARDArzucjaclkxjLWvCVHeFa9UP7K3Nl9oTjJNv+7/jM
|
36
|
+
WZs4eecIcUc4tKdHxcAJ0MO/Dkqq7hGaiHpwKY76wQ1+8xAh
|
32
37
|
-----END CERTIFICATE-----
|
33
|
-
date:
|
38
|
+
date: 2019-01-08 00:00:00.000000000 Z
|
34
39
|
dependencies:
|
35
40
|
- !ruby/object:Gem::Dependency
|
36
41
|
name: ptools
|
@@ -90,8 +95,14 @@ files:
|
|
90
95
|
- test/test_mkmf_lite.rb
|
91
96
|
homepage: http://github.com/djberg96/mkmf-lite
|
92
97
|
licenses:
|
93
|
-
-
|
94
|
-
metadata:
|
98
|
+
- Apache-2.0
|
99
|
+
metadata:
|
100
|
+
homepage_uri: https://github.com/djberg96/mkmf-lite
|
101
|
+
bug_tracker_uri: https://github.com/djberg96/mkmf-lite/issues
|
102
|
+
changelog_uri: https://github.com/djberg96/mkmf-lite/blob/master/CHANGES
|
103
|
+
documentation_uri: https://github.com/djberg96/mkmf-lite/wiki
|
104
|
+
source_code_uri: https://github.com/djberg96/mkmf-lite
|
105
|
+
wiki_uri: https://github.com/djberg96/mkmf-lite/wiki
|
95
106
|
post_install_message:
|
96
107
|
rdoc_options: []
|
97
108
|
require_paths:
|
@@ -108,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
119
|
version: '0'
|
109
120
|
requirements: []
|
110
121
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.
|
122
|
+
rubygems_version: 2.7.6
|
112
123
|
signing_key:
|
113
124
|
specification_version: 4
|
114
125
|
summary: A lighter version of mkmf designed for use as a library
|
metadata.gz.sig
CHANGED
Binary file
|