Unverified Commit d9bdc904 authored by Mislav Marohnić's avatar Mislav Marohnić
Browse files

💅 RUBY_CONFIGURE_OPTS_ARRAY

parent fbdf88cc
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -529,6 +529,7 @@ build_package() {
package_option() {
  local package_name="$1"
  local command_name="$2"
  # e.g. RUBY_CONFIGURE_OPTS_ARRAY, OPENSSL_MAKE_OPTS_ARRAY
  local variable="$(capitalize "${package_name}_${command_name}")_OPTS_ARRAY"
  local array="$variable[@]"
  shift 2
@@ -650,18 +651,18 @@ build_package_ruby() {
build_package_ree_installer() {
  build_package_auto_tcltk

  local options=""
  is_mac && options="--no-tcmalloc"
  local options=()
  is_mac && options+=(--no-tcmalloc)

  local option
  for option in ${RUBY_CONFIGURE_OPTS_ARRAY[@]} $RUBY_CONFIGURE_OPTS; do
    options="$options -c $option"
  for option in "${RUBY_CONFIGURE_OPTS_ARRAY[@]}" $RUBY_CONFIGURE_OPTS; do
    options+=(-c "$option")
  done

  # Work around install_useful_libraries crash with --dont-install-useful-gems
  mkdir -p "$PREFIX_PATH/lib/ruby/gems/1.8/gems"

  { ./installer --auto "$PREFIX_PATH" --dont-install-useful-gems $options $CONFIGURE_OPTS
  { ./installer --auto "$PREFIX_PATH" --dont-install-useful-gems "${options[@]}" $CONFIGURE_OPTS
  } >&4 2>&1
}