File tree Expand file tree Collapse file tree 3 files changed +10
-16
lines changed Expand file tree Collapse file tree 3 files changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ def build_exts
130
130
def build ( remake : false , reconfigure : false )
131
131
FileUtils . mkdir_p dest_dir
132
132
FileUtils . mkdir_p build_dir
133
- [ @source , @baseruby , @libyaml ] . each ( &:build )
133
+ [ @source , @baseruby , @libyaml , @zlib ] . each ( &:build )
134
134
dep_tasks . each ( &:invoke )
135
135
configure ( reconfigure : reconfigure )
136
136
build_exts
@@ -164,7 +164,6 @@ def with_libyaml(libyaml)
164
164
165
165
def with_zlib ( zlib )
166
166
@zlib = zlib
167
- @dep_tasks << zlib . install_task
168
167
end
169
168
170
169
def with_wasi_vfs ( wasi_vfs )
Original file line number Diff line number Diff line change 1
- require "rake"
2
1
require_relative "./product"
3
2
4
3
module RubyWasm
5
4
class ZlibProduct < AutoconfProduct
6
- attr_reader :target , :install_task
5
+ attr_reader :target
7
6
8
7
ZLIB_VERSION = "1.2.13"
9
8
@@ -29,21 +28,18 @@ def name
29
28
product_build_dir
30
29
end
31
30
32
- def define_task
33
- @install_task =
34
- task name => [ @toolchain . define_task ] do
35
- next if Dir . exist? ( install_root )
31
+ def build
32
+ return if Dir . exist? ( install_root )
36
33
37
- mkdir_p File . dirname ( product_build_dir )
38
- rm_rf product_build_dir
34
+ FileUtils . mkdir_p File . dirname ( product_build_dir )
35
+ FileUtils . rm_rf product_build_dir
39
36
40
- sh "curl -L https://zlib.net/zlib-#{ ZLIB_VERSION } .tar.gz | tar xz" ,
37
+ system "curl -L https://zlib.net/zlib-#{ ZLIB_VERSION } .tar.gz | tar xz" ,
41
38
chdir : File . dirname ( product_build_dir )
42
39
43
- sh "#{ tools_args . join ( " " ) } ./configure --static" ,
40
+ system "#{ tools_args . join ( " " ) } ./configure --static" ,
44
41
chdir : product_build_dir
45
- sh "make install DESTDIR=#{ destdir } " , chdir : product_build_dir
46
- end
42
+ system "make install DESTDIR=#{ destdir } " , chdir : product_build_dir
47
43
end
48
44
end
49
45
end
Original file line number Diff line number Diff line change @@ -44,8 +44,7 @@ def initialize(
44
44
add_product ( toolchain || RubyWasm ::Toolchain . get ( target , @build_dir ) )
45
45
46
46
@libyaml = RubyWasm ::LibYAMLProduct . new ( @build_dir , @target , @toolchain )
47
- @zlib =
48
- add_product RubyWasm ::ZlibProduct . new ( @build_dir , @target , @toolchain )
47
+ @zlib = RubyWasm ::ZlibProduct . new ( @build_dir , @target , @toolchain )
49
48
@wasi_vfs = add_product RubyWasm ::WasiVfsProduct . new ( @build_dir )
50
49
@source = RubyWasm ::BuildSource . new ( src , @build_dir )
51
50
@baseruby = RubyWasm ::BaseRubyProduct . new ( @build_dir , @source )
You can’t perform that action at this time.
0 commit comments