Loading bin/ruby-build +27 −1 Original line number Diff line number Diff line Loading @@ -552,7 +552,9 @@ build_package_standard() { local PACKAGE_MAKE_INSTALL_OPTS_ARRAY="${package_var_name}_MAKE_INSTALL_OPTS_ARRAY[@]" local PACKAGE_CFLAGS="${package_var_name}_CFLAGS" [ "$package_var_name" = "RUBY" ] && use_homebrew_readline || true if [ "$package_var_name" = "RUBY" ]; then use_homebrew_readline || use_freebsd_pkg ||true fi ( if [ "${CFLAGS+defined}" ] || [ "${!PACKAGE_CFLAGS+defined}" ]; then export CFLAGS="$CFLAGS ${!PACKAGE_CFLAGS}" Loading Loading @@ -918,6 +920,30 @@ use_homebrew_yaml() { fi } use_freebsd_pkg() { # 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 release="$(uname -r)" if [ "${release%%.*}" -ge 11 ]; 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" fi fi fi } use_homebrew_readline() { if [[ "$RUBY_CONFIGURE_OPTS" != *--with-readline-dir=* ]]; then local libdir="$(brew --prefix readline 2>/dev/null || true)" Loading test/build.bats 100644 → 100755 +5 −5 Original line number Diff line number Diff line Loading @@ -204,7 +204,7 @@ OUT @test "number of CPU cores defaults to 2" { cached_tarball "ruby-2.0.0" stub uname '-s : echo Darwin' stub uname '-s : echo Darwin' false stub sysctl false stub_make_install Loading @@ -227,7 +227,7 @@ OUT @test "number of CPU cores is detected on Mac" { cached_tarball "ruby-2.0.0" stub uname '-s : echo Darwin' stub uname '-s : echo Darwin' false stub sysctl '-n hw.ncpu : echo 4' stub_make_install Loading @@ -251,7 +251,7 @@ OUT @test "number of CPU cores is detected on FreeBSD" { cached_tarball "ruby-2.0.0" stub uname '-s : echo FreeBSD' stub uname '-s : echo FreeBSD' false stub sysctl '-n hw.ncpu : echo 1' stub_make_install Loading Loading @@ -324,7 +324,7 @@ OUT @test "make on FreeBSD 9 defaults to gmake" { cached_tarball "ruby-2.0.0" stub uname "-s : echo FreeBSD" "-r : echo 9.1" stub uname "-s : echo FreeBSD" "-r : echo 9.1" false MAKE=gmake stub_make_install MAKE= install_fixture definitions/vanilla-ruby Loading @@ -337,7 +337,7 @@ OUT @test "make on FreeBSD 10" { cached_tarball "ruby-2.0.0" stub uname "-s : echo FreeBSD" "-r : echo 10.0-RELEASE" stub uname "-s : echo FreeBSD" "-r : echo 10.0-RELEASE" false stub_make_install MAKE= install_fixture definitions/vanilla-ruby Loading test/compiler.bats 100644 → 100755 +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ DEF mkdir -p "$INSTALL_ROOT" cd "$INSTALL_ROOT" stub uname '-s : echo Darwin' stub uname '-s : echo Darwin' '-s : echo Darwin' stub sw_vers '-productVersion : echo 10.10' stub cc 'false' stub brew 'false' Loading Loading
bin/ruby-build +27 −1 Original line number Diff line number Diff line Loading @@ -552,7 +552,9 @@ build_package_standard() { local PACKAGE_MAKE_INSTALL_OPTS_ARRAY="${package_var_name}_MAKE_INSTALL_OPTS_ARRAY[@]" local PACKAGE_CFLAGS="${package_var_name}_CFLAGS" [ "$package_var_name" = "RUBY" ] && use_homebrew_readline || true if [ "$package_var_name" = "RUBY" ]; then use_homebrew_readline || use_freebsd_pkg ||true fi ( if [ "${CFLAGS+defined}" ] || [ "${!PACKAGE_CFLAGS+defined}" ]; then export CFLAGS="$CFLAGS ${!PACKAGE_CFLAGS}" Loading Loading @@ -918,6 +920,30 @@ use_homebrew_yaml() { fi } use_freebsd_pkg() { # 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 release="$(uname -r)" if [ "${release%%.*}" -ge 11 ]; 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" fi fi fi } use_homebrew_readline() { if [[ "$RUBY_CONFIGURE_OPTS" != *--with-readline-dir=* ]]; then local libdir="$(brew --prefix readline 2>/dev/null || true)" Loading
test/build.bats 100644 → 100755 +5 −5 Original line number Diff line number Diff line Loading @@ -204,7 +204,7 @@ OUT @test "number of CPU cores defaults to 2" { cached_tarball "ruby-2.0.0" stub uname '-s : echo Darwin' stub uname '-s : echo Darwin' false stub sysctl false stub_make_install Loading @@ -227,7 +227,7 @@ OUT @test "number of CPU cores is detected on Mac" { cached_tarball "ruby-2.0.0" stub uname '-s : echo Darwin' stub uname '-s : echo Darwin' false stub sysctl '-n hw.ncpu : echo 4' stub_make_install Loading @@ -251,7 +251,7 @@ OUT @test "number of CPU cores is detected on FreeBSD" { cached_tarball "ruby-2.0.0" stub uname '-s : echo FreeBSD' stub uname '-s : echo FreeBSD' false stub sysctl '-n hw.ncpu : echo 1' stub_make_install Loading Loading @@ -324,7 +324,7 @@ OUT @test "make on FreeBSD 9 defaults to gmake" { cached_tarball "ruby-2.0.0" stub uname "-s : echo FreeBSD" "-r : echo 9.1" stub uname "-s : echo FreeBSD" "-r : echo 9.1" false MAKE=gmake stub_make_install MAKE= install_fixture definitions/vanilla-ruby Loading @@ -337,7 +337,7 @@ OUT @test "make on FreeBSD 10" { cached_tarball "ruby-2.0.0" stub uname "-s : echo FreeBSD" "-r : echo 10.0-RELEASE" stub uname "-s : echo FreeBSD" "-r : echo 10.0-RELEASE" false stub_make_install MAKE= install_fixture definitions/vanilla-ruby Loading
test/compiler.bats 100644 → 100755 +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ DEF mkdir -p "$INSTALL_ROOT" cd "$INSTALL_ROOT" stub uname '-s : echo Darwin' stub uname '-s : echo Darwin' '-s : echo Darwin' stub sw_vers '-productVersion : echo 10.10' stub cc 'false' stub brew 'false' Loading