rb_sys 0.9.20 → 0.9.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +1 -2
- data/lib/rb_sys/mkmf/config.rb +11 -1
- data/lib/rb_sys/mkmf.rb +17 -12
- data/lib/rb_sys/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 690a0a0013da370bdbe206fa6067d7f40ef4368fd7031aa24fc27d45c2f5ddbf
|
4
|
+
data.tar.gz: d0bea23bc70fa5109ef69cc12504e2d5ba00ca408033702803aef5c0d6a89737
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5554e164a6bb504282013e31f56a34f44381f81785dd1f4660b8d126555fd049ca2f6c71b51c91b959740e3b721bf674fe75756eb6fbd8d4754c36df54108d69
|
7
|
+
data.tar.gz: ab49ec7247e0dd08203bf4dc4db749969d440deafd30c0bb00784f0883b5d02cf87d6f01de0163f2c94792653263827c5236fd02d3b9958f9ca7434c88bf1f6c
|
checksums.yaml.gz.sig
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
��O��#�8Y6�HQ�Q}\�p�� �����V}aP����֪U�$�.�Q*ȼ-����Eǖ���i�I�1�:�
|
1
|
+
=���T^�q��W�"�8<'t�u��Rs��+b�RLU�_Sk�}v om<��ӇF`�[]�A�#����9�%-�P���gY�M�17#̋ح+��DQ�/:�+�ޖ[ե�
|
data/lib/rb_sys/mkmf/config.rb
CHANGED
@@ -4,11 +4,12 @@ module RbSys
|
|
4
4
|
module Mkmf
|
5
5
|
# Config that delegates to CargoBuilder if needded
|
6
6
|
class Config
|
7
|
-
attr_accessor :force_install_rust_toolchain
|
7
|
+
attr_accessor :force_install_rust_toolchain, :clean_after_install
|
8
8
|
|
9
9
|
def initialize(builder)
|
10
10
|
@builder = builder
|
11
11
|
@force_install_rust_toolchain = false
|
12
|
+
@clean_after_install = rubygems_invoked?
|
12
13
|
end
|
13
14
|
|
14
15
|
def method_missing(name, *args, &blk)
|
@@ -18,6 +19,15 @@ module RbSys
|
|
18
19
|
def respond_to_missing?(name, include_private = false)
|
19
20
|
@builder.respond_to?(name) || super
|
20
21
|
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
# Seems to be the only way to reliably know if we were invoked by Rubygems.
|
26
|
+
# We want to know this so we can cleanup the target directory after an
|
27
|
+
# install, to remove bloat.
|
28
|
+
def rubygems_invoked?
|
29
|
+
ENV.key?("SOURCE_DATE_EPOCH")
|
30
|
+
end
|
21
31
|
end
|
22
32
|
end
|
23
33
|
end
|
data/lib/rb_sys/mkmf.rb
CHANGED
@@ -88,15 +88,16 @@ module RbSys
|
|
88
88
|
target_prefix = #{target_prefix}
|
89
89
|
TARGET_NAME = #{target[/\A\w+/]}
|
90
90
|
TARGET_ENTRY = #{RbConfig::CONFIG["EXPORT_PREFIX"]}Init_$(TARGET_NAME)
|
91
|
-
CLEANLIBS = $(RUSTLIB) $(DLLIB) $(DEFFILE)
|
92
91
|
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
93
92
|
TARGET = #{target}
|
94
93
|
DLLIB = $(TARGET).#{RbConfig::CONFIG["DLEXT"]}
|
95
94
|
TARGET_DIR = #{Dir.pwd}/$(RB_SYS_CARGO_BUILD_TARGET_DIR)/$(RB_SYS_CARGO_PROFILE_DIR)
|
96
95
|
RUSTLIB = $(TARGET_DIR)/$(SOEXT_PREFIX)$(TARGET_NAME).$(SOEXT)
|
97
96
|
|
98
|
-
|
97
|
+
CLEANOBJS = $(TARGET_DIR)/.fingerprint $(TARGET_DIR)/incremental $(TARGET_DIR)/examples $(TARGET_DIR)/deps $(TARGET_DIR)/build $(TARGET_DIR)/.cargo-lock $(TARGET_DIR)/*.d $(TARGET_DIR)/*.rlib $(RB_SYS_BUILD_DIR)
|
99
98
|
DEFFILE = $(TARGET_DIR)/$(TARGET)-$(arch).def
|
99
|
+
CLEANLIBS = $(DLLIB) $(RUSTLIB) $(DEFFILE)
|
100
|
+
|
100
101
|
#{base_makefile(srcdir)}
|
101
102
|
|
102
103
|
ifneq ($(RB_SYS_VERBOSE),)
|
@@ -104,7 +105,7 @@ module RbSys
|
|
104
105
|
endif
|
105
106
|
|
106
107
|
#{env_vars(builder)}
|
107
|
-
$(
|
108
|
+
$(RUSTLIB): export RUSTFLAGS := $(RUSTFLAGS) $(RB_SYS_EXTRA_RUSTFLAGS)
|
108
109
|
|
109
110
|
FORCE: ;
|
110
111
|
|
@@ -118,15 +119,19 @@ module RbSys
|
|
118
119
|
|
119
120
|
#{optional_rust_toolchain(builder)}
|
120
121
|
|
121
|
-
$(
|
122
|
+
$(RUSTLIB): $(DEFFILE) FORCE
|
122
123
|
\t$(ECHO) generating $(@) \\("$(RB_SYS_CARGO_PROFILE)"\\)
|
123
124
|
\t$(Q) #{full_cargo_command}
|
125
|
+
|
126
|
+
$(DLLIB): $(RUSTLIB)
|
124
127
|
\t$(Q) $(COPY) "$(RUSTLIB)" $@
|
125
128
|
|
126
|
-
install: $(DLLIB)
|
127
|
-
\t$(ECHO) installing $(DLLIB)
|
129
|
+
install-so: $(DLLIB)
|
130
|
+
\t$(ECHO) installing $(DLLIB) to $(RUBYARCHDIR)
|
128
131
|
\t$(Q) $(MAKEDIRS) $(RUBYARCHDIR)
|
129
|
-
\t$(
|
132
|
+
\t$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
|
133
|
+
|
134
|
+
install: #{builder.clean_after_install ? "install-so realclean" : "install-so"}
|
130
135
|
|
131
136
|
all: #{$extout ? "install" : "$(DLLIB)"}
|
132
137
|
MAKE
|
@@ -141,8 +146,7 @@ module RbSys
|
|
141
146
|
|
142
147
|
def base_makefile(cargo_dir)
|
143
148
|
base_makefile = dummy_makefile(__dir__).join("\n")
|
144
|
-
base_makefile.gsub!("all install static install-so install-rb", "all static install-
|
145
|
-
base_makefile.gsub!("clean-so::", "clean-so:\n\t-$(Q)$(RM) $(DLLIB)\n")
|
149
|
+
base_makefile.gsub!("all install static install-so install-rb", "all static install-rb")
|
146
150
|
base_makefile.gsub!(/^srcdir = .*$/, "srcdir = #{cargo_dir}")
|
147
151
|
base_makefile
|
148
152
|
end
|
@@ -159,13 +163,14 @@ module RbSys
|
|
159
163
|
def env_vars(builder)
|
160
164
|
lines = builder.build_env.map { |k, v| env_line(k, v) }
|
161
165
|
lines << env_line("CC", env_or_makefile_config("CC"))
|
166
|
+
lines << env_line("CXX", env_or_makefile_config("CXX"))
|
162
167
|
lines << env_line("AR", env_or_makefile_config("AR")) unless env_or_makefile_config("AR") == "libtool -static"
|
163
168
|
lines.compact.join("\n")
|
164
169
|
end
|
165
170
|
|
166
171
|
def env_line(k, v)
|
167
172
|
return unless v
|
168
|
-
%($(
|
173
|
+
%($(RUSTLIB): export #{k} = #{v.gsub("\n", '\n')})
|
169
174
|
end
|
170
175
|
|
171
176
|
def env_or_makefile_config(key)
|
@@ -211,11 +216,11 @@ module RbSys
|
|
211
216
|
|
212
217
|
$(CARGO):
|
213
218
|
\t$(Q) $(MAKEDIRS) $(CARGO_HOME) $(RUSTUP_HOME)
|
214
|
-
\tcurl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
|
219
|
+
\tcurl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --no-modify-path --profile minimal --default-toolchain none -y
|
215
220
|
\trustup toolchain install $(RB_SYS_DEFAULT_TOOLCHAIN) --profile $(RB_SYS_RUSTUP_PROFILE)
|
216
221
|
\trustup default $(RB_SYS_DEFAULT_TOOLCHAIN)
|
217
222
|
|
218
|
-
$(
|
223
|
+
$(RUSTLIB): $(CARGO)
|
219
224
|
endif
|
220
225
|
MAKE
|
221
226
|
end
|
data/lib/rb_sys/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rb_sys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian Ker-Seymer
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
Rl+ASkq2/1i07TkBpCf+2hq66+h/hx+/Y/KrUzXfe0jtvil0WESkJT2kqRqHWNhD
|
31
31
|
9GKBxaQlXokNDtWCm1/gl6cD8WRZ0N5S4ZGJT1FLLsA=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2022-07-
|
33
|
+
date: 2022-07-20 00:00:00.000000000 Z
|
34
34
|
dependencies: []
|
35
35
|
description:
|
36
36
|
email:
|
metadata.gz.sig
CHANGED
Binary file
|