aports/community/h2o/ruby-file-exists.patch
2023-04-23 16:46:38 +02:00

34 lines
1.3 KiB
Diff

File.exists? was removed from the stdlib in favor of File.exist?
--- h2o-2.2.6.orig/deps/mruby-onig-regexp/mrbgem.rake
+++ h2o-2.2.6/deps/mruby-onig-regexp/mrbgem.rake
@@ -66,7 +66,7 @@
end
_pp 'autotools', oniguruma_dir
- run_command e, './autogen.sh' if File.exists? 'autogen.sh'
+ run_command e, './autogen.sh' if File.exist? 'autogen.sh'
run_command e, "./configure --disable-shared --enable-static #{host}"
run_command e, 'make'
else
@@ -94,7 +94,7 @@
file libmruby_a => Dir.glob("#{libonig_objs_dir}/*#{objext}")
end
- file libmruby_a => Dir.glob("#{libonig_objs_dir}/*#{objext}") if File.exists? oniguruma_lib
+ file libmruby_a => Dir.glob("#{libonig_objs_dir}/*#{objext}") if File.exist? oniguruma_lib
file "#{dir}/src/mruby_onig_regexp.c" => oniguruma_lib
cc.include_paths << oniguruma_dir
--- h2o-2.2.6.orig/deps/mruby/minirake
+++ h2o-2.2.6/deps/mruby/minirake
@@ -261,7 +261,7 @@
dir = args.is_a?(Hash) ? args.keys.first : args
(dir.split(File::SEPARATOR) + ['']).inject do |acc, part|
(acc + File::SEPARATOR).tap do |d|
- Dir.mkdir(d) unless File.exists? d
+ Dir.mkdir(d) unless File.exist? d
end + part
end
end