Skip to content

Commit

Permalink
Merge pull request #1098 from rbenv/update-gems
Browse files Browse the repository at this point in the history
invoke make update-gems before make install with ruby-trunk
  • Loading branch information
hsbt authored Jun 13, 2017
2 parents 3ea03e3 + f7c96a7 commit f81c95d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 10 deletions.
30 changes: 26 additions & 4 deletions bin/ruby-build
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ build_package_warn_unsupported() {
} >&3
}

build_package_standard() {
build_package_standard_build() {
local package_name="$1"

if [ "${MAKEOPTS+defined}" ]; then
Expand All @@ -548,8 +548,6 @@ build_package_standard() {
local PACKAGE_CONFIGURE_OPTS_ARRAY="${package_var_name}_CONFIGURE_OPTS_ARRAY[@]"
local PACKAGE_MAKE_OPTS="${package_var_name}_MAKE_OPTS"
local PACKAGE_MAKE_OPTS_ARRAY="${package_var_name}_MAKE_OPTS_ARRAY[@]"
local PACKAGE_MAKE_INSTALL_OPTS="${package_var_name}_MAKE_INSTALL_OPTS"
local PACKAGE_MAKE_INSTALL_OPTS_ARRAY="${package_var_name}_MAKE_INSTALL_OPTS_ARRAY[@]"
local PACKAGE_CFLAGS="${package_var_name}_CFLAGS"

if [ "$package_var_name" = "RUBY" ]; then
Expand All @@ -567,10 +565,34 @@ build_package_standard() {
) >&4 2>&1

{ "$MAKE" $MAKE_OPTS ${!PACKAGE_MAKE_OPTS} "${!PACKAGE_MAKE_OPTS_ARRAY}"
"$MAKE" install $MAKE_INSTALL_OPTS ${!PACKAGE_MAKE_INSTALL_OPTS} "${!PACKAGE_MAKE_INSTALL_OPTS_ARRAY}"
} >&4 2>&1
}

build_package_standard_install() {
local package_name="$1"
local package_var_name="$(capitalize "${package_name%%-*}")"

local PACKAGE_MAKE_INSTALL_OPTS="${package_var_name}_MAKE_INSTALL_OPTS"
local PACKAGE_MAKE_INSTALL_OPTS_ARRAY="${package_var_name}_MAKE_INSTALL_OPTS_ARRAY[@]"

{ "$MAKE" install $MAKE_INSTALL_OPTS ${!PACKAGE_MAKE_INSTALL_OPTS} "${!PACKAGE_MAKE_INSTALL_OPTS_ARRAY}"
} >&4 2>&1
}

build_package_standard_install_with_bundled_gems() {
{ "$MAKE" update-gems
"$MAKE" extract-gems
} >&4 2>&1

build_package_standard_install "$@"
}

# Backword Compatibility for standard function
build_package_standard() {
build_package_standard_build "$@"
build_package_standard_install "$@"
}

build_package_autoconf() {
{ autoconf
} >&4 2>&1
Expand Down
2 changes: 1 addition & 1 deletion share/ruby-build/2.2.0-dev
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
install_package "openssl-1.0.2l" "https://www.openssl.org/source/openssl-1.0.2l.tar.gz#ce07195b659e75f4e1db43552860070061f156a98bb37b672b101ba6e3ddf30c" mac_openssl --if has_broken_mac_openssl
install_git "ruby-2.2.0-dev" "https://github.com/ruby/ruby.git" "ruby_2_2" warn_unsupported ldflags_dirs autoconf standard verify_openssl
install_git "ruby-2.2.0-dev" "https://github.com/ruby/ruby.git" "ruby_2_2" warn_unsupported ldflags_dirs autoconf standard_build standard_install_with_bundled_gems verify_openssl
2 changes: 1 addition & 1 deletion share/ruby-build/2.3.0-dev
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
install_package "openssl-1.0.2l" "https://www.openssl.org/source/openssl-1.0.2l.tar.gz#ce07195b659e75f4e1db43552860070061f156a98bb37b672b101ba6e3ddf30c" mac_openssl --if has_broken_mac_openssl
install_git "ruby-2.3.0-dev" "https://github.com/ruby/ruby.git" "ruby_2_3" ldflags_dirs autoconf standard verify_openssl
install_git "ruby-2.3.0-dev" "https://github.com/ruby/ruby.git" "ruby_2_3" ldflags_dirs autoconf standard_build standard_install_with_bundled_gems verify_openssl
4 changes: 2 additions & 2 deletions share/ruby-build/2.4.0-dev
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
install_package "openssl-1.1.0f" "https://www.openssl.org/source/openssl-1.1.0f.tar.gz#12f746f3f2493b2f39da7ecf63d7ee19c6ac9ec6a4fcd8c229da8a522cb12765" mac_openssl --if has_broken_mac_openssl
install_git "ruby-2.4.0-dev" "https://github.com/ruby/ruby.git" "ruby_2_4" ldflags_dirs autoconf standard verify_openssl
install_package "openssl-1.1.0f" "https://www.openssl.org/source/openssl-1.1.0f.tar.gz#12f746f3f2493b2f39da7ecf63d7ee19c6ac9ec6a4fcd8c229da8a522cb12765" mac_openssl --if has_broken_mac_openssl
install_git "ruby-2.4.0-dev" "https://github.com/ruby/ruby.git" "ruby_2_4" ldflags_dirs autoconf standard_build standard_install_with_bundled_gems verify_openssl
4 changes: 2 additions & 2 deletions share/ruby-build/2.5.0-dev
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
install_package "openssl-1.1.0f" "https://www.openssl.org/source/openssl-1.1.0f.tar.gz#12f746f3f2493b2f39da7ecf63d7ee19c6ac9ec6a4fcd8c229da8a522cb12765" mac_openssl --if has_broken_mac_openssl
install_git "ruby-trunk" "https://github.com/ruby/ruby.git" "trunk" ldflags_dirs autoconf standard verify_openssl
install_package "openssl-1.1.0f" "https://www.openssl.org/source/openssl-1.1.0f.tar.gz#12f746f3f2493b2f39da7ecf63d7ee19c6ac9ec6a4fcd8c229da8a522cb12765" mac_openssl --if has_broken_mac_openssl
install_git "ruby-trunk" "https://github.com/ruby/ruby.git" "trunk" ldflags_dirs autoconf standard_build standard_install_with_bundled_gems verify_openssl

0 comments on commit f81c95d

Please sign in to comment.