Skip to content

Commit

Permalink
prefer to use openssl library from Ports Collection.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuichiro NAITO committed Nov 4, 2016
1 parent d0c91c9 commit 1aa052b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions bin/ruby-build
Expand Up @@ -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
Expand Down

0 comments on commit 1aa052b

Please sign in to comment.