Commit fdcc0a76 authored by Yuichiro NAITO's avatar Yuichiro NAITO
Browse files

Prefers readline

It's needed for older ruby (before 2.1) and works latter versions, too.
parent 8b2c3ef4
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -931,13 +931,14 @@ use_freebsd_pkg() {
      # check if 11-R or later
      release="$(uname -r)"
      if [ "${release%%.*}" -ge 11 ]; then
	  if pkg info -e libedit > /dev/null; then
	  # prefers readline to compile most of ruby versions
	  if pkg info -e readline > /dev/null; then
	      # use readline from Ports Collection
	      package_option ruby configure --with-readline-dir="/usr/local"
	  elif pkg info -e libedit > /dev/null; then
	      # use libedit from Ports Collection
	      package_option ruby configure --enable-libedit
	      package_option ruby configure --with-libedit-dir="/usr/local"
	  elif pkg info -e readline > /dev/null; then
	      # use readline from Ports Collection
	      package_option ruby configure --with-readline-dir="/usr/local"
	  fi
      fi
  fi