From 7629f7b8567ab882c96c6241683a711305996897 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 1 Jun 2017 18:47:02 +0900 Subject: [PATCH 1/6] Added zlib entry to {download,extract}-extlibs task. It enable to download and extract zlib sources into ext/zlib directory. We can static build without manually download and extract tarball. --- .gitignore | 3 +++ ext/zlib/extlibs | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 ext/zlib/extlibs diff --git a/.gitignore b/.gitignore index fe7c04823b4eab..b7a6f66dc5f649 100644 --- a/.gitignore +++ b/.gitignore @@ -196,6 +196,9 @@ lcov*.info /ext/socket/constdefs.h /ext/socket/constdefs.c +# /ext/zlib/ +/ext/zlib/zlib-* + # /gems /gems/*.gem /gems/src diff --git a/ext/zlib/extlibs b/ext/zlib/extlibs new file mode 100644 index 00000000000000..8db11f5d49d3fb --- /dev/null +++ b/ext/zlib/extlibs @@ -0,0 +1,3 @@ +https://www.zlib.net/zlib-1.2.11.tar.gz \ + md5:1c9f62f0778697a09d36121ead88e08e \ + sha512:73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae From c9a22d898616cc985a08c735f0e758ad9bdd002f Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 2 Jun 2017 19:23:46 +0900 Subject: [PATCH 2/6] Added condition for static link of zlib --- ext/zlib/extconf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/zlib/extconf.rb b/ext/zlib/extconf.rb index fd2f16852293f4..03220b3e1d4188 100644 --- a/ext/zlib/extconf.rb +++ b/ext/zlib/extconf.rb @@ -20,7 +20,7 @@ dirs.delete_if {|x| !File.directory?(x)} zsrc = dirs.max_by {|x| x.scan(/\d+/).map(&:to_i)} end - if zsrc + if zsrc && enable_config('bundled-zlib') addconf = [ "ZSRC = $(srcdir)/#{File.basename(zsrc)}\n", "all:\n", From 72a5ba7a5f7fbcbb5dbc75fcf5773e631421df1e Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 2 Jun 2017 21:03:18 +0900 Subject: [PATCH 3/6] To use http --- ext/zlib/extlibs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/zlib/extlibs b/ext/zlib/extlibs index 8db11f5d49d3fb..246a3d12cc9e82 100644 --- a/ext/zlib/extlibs +++ b/ext/zlib/extlibs @@ -1,3 +1,3 @@ -https://www.zlib.net/zlib-1.2.11.tar.gz \ +http://www.zlib.net/zlib-1.2.11.tar.gz \ md5:1c9f62f0778697a09d36121ead88e08e \ sha512:73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae From 7645689d9849e6952f9fd15046d4eac080ec0ca4 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 13 Jun 2017 11:31:44 +0900 Subject: [PATCH 4/6] Added configuration option for bundled-zlib --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 28ca917e8eadd0..41d775a802444d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -62,7 +62,7 @@ for: build_script: - cd %APPVEYOR_BUILD_FOLDER% - cd %Platform%-mswin_%vs% - - ..\win32\configure.bat --without-ext=+,dbm,gdbm,readline --with-opt-dir=/usr/local --with-openssl-dir=%OPENSSL_DIR:\=/% + - ..\win32\configure.bat --without-ext=+,dbm,gdbm,readline --with-opt-dir=/usr/local --enable-bundled-zlib --with-openssl-dir=%OPENSSL_DIR:\=/% - nmake -l - nmake install-nodoc - \usr\bin\ruby -v -e "p :locale => Encoding.find('locale'), :filesystem => Encoding.find('filesystem')" From b0761c944641c84163af94b0447e3bf1c29d9747 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 20 Oct 2017 11:22:11 +0900 Subject: [PATCH 5/6] Removed needless option to use bundled zlib source. It's automatically fallback when zlib header was missing. --- ext/zlib/extconf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/zlib/extconf.rb b/ext/zlib/extconf.rb index 03220b3e1d4188..fd2f16852293f4 100644 --- a/ext/zlib/extconf.rb +++ b/ext/zlib/extconf.rb @@ -20,7 +20,7 @@ dirs.delete_if {|x| !File.directory?(x)} zsrc = dirs.max_by {|x| x.scan(/\d+/).map(&:to_i)} end - if zsrc && enable_config('bundled-zlib') + if zsrc addconf = [ "ZSRC = $(srcdir)/#{File.basename(zsrc)}\n", "all:\n", From 32e41bb7badc94f740c96b45868938a99a50de25 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 27 Sep 2019 13:16:43 +0900 Subject: [PATCH 6/6] Removed needless build steps --- appveyor.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 41d775a802444d..5da810c4c19473 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -54,8 +54,6 @@ for: - mkdir \usr\local\bin - mkdir \usr\local\include - mkdir \usr\local\lib - - curl -fsSL -o zlib%zlib_version:.=%.zip --retry 10 https://zlib.net/zlib%zlib_version:.=%.zip - - 7z x -o%APPVEYOR_BUILD_FOLDER%\ext\zlib zlib%zlib_version:.=%.zip - for %%I in (%OPENSSL_DIR%\*.dll) do mklink /h \usr\local\bin\%%~nxI %%I - attrib +r /s /d - mkdir %Platform%-mswin_%vs%