mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-11-12 15:11:14 +01:00
support FreeBSD 11-RELEASE
This commit is contained in:
parent
8ef0c34cdb
commit
d0c91c935e
1 changed files with 17 additions and 0 deletions
|
|
@ -553,6 +553,7 @@ build_package_standard() {
|
|||
local PACKAGE_CFLAGS="${package_var_name}_CFLAGS"
|
||||
|
||||
[ "$package_var_name" = "RUBY" ] && use_homebrew_readline || true
|
||||
[ "$package_var_name" = "RUBY" ] && use_freebsd_pkg || true
|
||||
|
||||
( if [ "${CFLAGS+defined}" ] || [ "${!PACKAGE_CFLAGS+defined}" ]; then
|
||||
export CFLAGS="$CFLAGS ${!PACKAGE_CFLAGS}"
|
||||
|
|
@ -918,6 +919,22 @@ use_homebrew_yaml() {
|
|||
fi
|
||||
}
|
||||
|
||||
use_freebsd_pkg() {
|
||||
# check if FreeBSD 11-R or later
|
||||
if [ "FreeBSD" = "$(uname -s)" ]; then
|
||||
if [ "$(uname -r | sed 's/[^[:digit:]].*//')" -ge 11 ]; then
|
||||
if $(pkg info -e libedit); then
|
||||
# use if libedit is installed
|
||||
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
|
||||
package_option ruby configure --with-readline-dir="/usr/local"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
use_homebrew_readline() {
|
||||
if [[ "$RUBY_CONFIGURE_OPTS" != *--with-readline-dir=* ]]; then
|
||||
local libdir="$(brew --prefix readline 2>/dev/null || true)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue