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
130130 def build ( remake : false , reconfigure : false )
131131 FileUtils . mkdir_p dest_dir
132132 FileUtils . mkdir_p build_dir
133- [ @source , @baseruby , @libyaml ] . each ( &:build )
133+ [ @source , @baseruby , @libyaml , @zlib ] . each ( &:build )
134134 dep_tasks . each ( &:invoke )
135135 configure ( reconfigure : reconfigure )
136136 build_exts
@@ -164,7 +164,6 @@ def with_libyaml(libyaml)
164164
165165 def with_zlib ( zlib )
166166 @zlib = zlib
167- @dep_tasks << zlib . install_task
168167 end
169168
170169 def with_wasi_vfs ( wasi_vfs )
Original file line number Diff line number Diff line change 1- require "rake"
21require_relative "./product"
32
43module RubyWasm
54 class ZlibProduct < AutoconfProduct
6- attr_reader :target , :install_task
5+ attr_reader :target
76
87 ZLIB_VERSION = "1.2.13"
98
@@ -29,21 +28,18 @@ def name
2928 product_build_dir
3029 end
3130
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 )
3633
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
3936
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" ,
4138 chdir : File . dirname ( product_build_dir )
4239
43- sh "#{ tools_args . join ( " " ) } ./configure --static" ,
40+ system "#{ tools_args . join ( " " ) } ./configure --static" ,
4441 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
4743 end
4844 end
4945end
Original file line number Diff line number Diff line change @@ -44,8 +44,7 @@ def initialize(
4444 add_product ( toolchain || RubyWasm ::Toolchain . get ( target , @build_dir ) )
4545
4646 @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 )
4948 @wasi_vfs = add_product RubyWasm ::WasiVfsProduct . new ( @build_dir )
5049 @source = RubyWasm ::BuildSource . new ( src , @build_dir )
5150 @baseruby = RubyWasm ::BaseRubyProduct . new ( @build_dir , @source )
You can’t perform that action at this time.
0 commit comments