rb_sys 0.9.21 → 0.9.22
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 +0 -0
- data/lib/rb_sys/mkmf/config.rb +11 -1
- data/lib/rb_sys/mkmf.rb +6 -5
- data/lib/rb_sys/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- 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: 63ba0fbfb3a21414b8e379d92abf8cf37ca5b310e57360d57d42d10a1aa42b22
|
4
|
+
data.tar.gz: 54ab9824e5902fbe11416cd8be8529fb90f9129412bbe916b5195270ca54fb9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 523f540fdbfabed2e6988871ec2bd4f2d97a20c5ab0c39a8b10181dacff50a6c32cfcfaafe1335d6f4d5454458201feb20df7fb2fc14f6a28a8b9df7c077b1c8
|
7
|
+
data.tar.gz: a49dc910f814519fc42d37c08ba3ce52729b90ca47bc08a1f48f9edba26e54c7bcfe234ce952b80c0a2a8a88f82565bfc7784f9ee067e92b3bbade2cc7bda4dc
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
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,14 +88,14 @@ 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)
|
91
|
+
CLEANLIBS = $(RUSTLIB)
|
92
92
|
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
93
93
|
TARGET = #{target}
|
94
94
|
DLLIB = $(TARGET).#{RbConfig::CONFIG["DLEXT"]}
|
95
95
|
TARGET_DIR = #{Dir.pwd}/$(RB_SYS_CARGO_BUILD_TARGET_DIR)/$(RB_SYS_CARGO_PROFILE_DIR)
|
96
96
|
RUSTLIB = $(TARGET_DIR)/$(SOEXT_PREFIX)$(TARGET_NAME).$(SOEXT)
|
97
97
|
|
98
|
-
|
98
|
+
CLEANOBJS = $(TARGET_DIR)/.fingerprint $(TARGET_DIR)/incremental $(TARGET_DIR)/examples $(TARGET_DIR)/deps $(TARGET_DIR)/build $(TARGET_DIR)/.cargo-lock $(TARGET_DIR)/*.d $(RB_SYS_BUILD_DIR)
|
99
99
|
DEFFILE = $(TARGET_DIR)/$(TARGET)-$(arch).def
|
100
100
|
#{base_makefile(srcdir)}
|
101
101
|
|
@@ -123,11 +123,13 @@ module RbSys
|
|
123
123
|
\t$(Q) #{full_cargo_command}
|
124
124
|
\t$(Q) $(COPY) "$(RUSTLIB)" $@
|
125
125
|
|
126
|
-
install: $(DLLIB) Makefile
|
126
|
+
install-so: $(DLLIB) Makefile
|
127
127
|
\t$(ECHO) installing $(DLLIB)
|
128
128
|
\t$(Q) $(MAKEDIRS) $(RUBYARCHDIR)
|
129
129
|
\t$(Q) $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
|
130
130
|
|
131
|
+
install: #{builder.clean_after_install ? "install-so realclean" : "install-so"}
|
132
|
+
|
131
133
|
all: #{$extout ? "install" : "$(DLLIB)"}
|
132
134
|
MAKE
|
133
135
|
|
@@ -141,8 +143,7 @@ module RbSys
|
|
141
143
|
|
142
144
|
def base_makefile(cargo_dir)
|
143
145
|
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")
|
146
|
+
base_makefile.gsub!("all install static install-so install-rb", "all static install-rb")
|
146
147
|
base_makefile.gsub!(/^srcdir = .*$/, "srcdir = #{cargo_dir}")
|
147
148
|
base_makefile
|
148
149
|
end
|
data/lib/rb_sys/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|