Commit 1aa052b3 authored by Yuichiro NAITO's avatar Yuichiro NAITO
Browse files

prefer to use openssl library from Ports Collection.

parent d0c91c93
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -920,15 +920,21 @@ use_homebrew_yaml() {
}

use_freebsd_pkg() {
  # check if FreeBSD 11-R or later
  # check if FreeBSD
  if [ "FreeBSD" = "$(uname -s)" ]; then
      # use openssl if installed from Ports Collection
      if [ -f /usr/local/include/openssl/ssl.h ]; then
	  package_option ruby configure --with-openssl-dir="/usr/local"
      fi

      # check if 11-R or later
      if [ "$(uname -r | sed 's/[^[:digit:]].*//')" -ge 11 ]; then
	  if $(pkg info -e libedit); then
	      # use if libedit is installed
	      # 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); then
	      # use if readline is installed
	      # use readline from Ports Collection
	      package_option ruby configure --with-readline-dir="/usr/local"
	  fi
      fi