Commit 83b8068a authored by Mislav Marohnić's avatar Mislav Marohnić
Browse files

Merge branch 'freebsd-gmake'

parents 092b8dac d6af53ef
Loading
Loading
Loading
Loading
+6 −9
Original line number Diff line number Diff line
@@ -1320,15 +1320,12 @@ fi

if [ -z "$MAKE" ]; then
  if [ "FreeBSD" = "$(uname -s)" ]; then
    if [ "$(echo $1 | sed 's/-.*$//')" = "jruby" ]; then
    # Workaround for Ruby bug 16331: https://bugs.ruby-lang.org/issues/16331
    # Due to this bug, build will fail with FreeBSD's make after #1368
    # The bug is already fixed in upstream but GNU make is still required
    # when building older releases of Ruby. Use GNU make rather than switching
    # depending of Ruby version.
    export MAKE="gmake"
    else
      if [ "$(uname -r | sed 's/[^[:digit:]].*//')" -lt 10 ]; then
        export MAKE="gmake"
      else
        export MAKE="make"
      fi
    fi
  else
    export MAKE="make"
  fi
+2 −26
Original line number Diff line number Diff line
@@ -373,10 +373,10 @@ OUT
  assert [ -x ./here/bin/package ]
}

@test "make on FreeBSD 9 defaults to gmake" {
@test "make on FreeBSD defaults to gmake" {
  cached_tarball "ruby-2.0.0"

  stub uname "-s : echo FreeBSD" "-r : echo 9.1" false
  stub uname "-s : echo FreeBSD" false
  MAKE=gmake stub_make_install

  MAKE= install_fixture definitions/vanilla-ruby
@@ -386,30 +386,6 @@ OUT
  unstub uname
}

@test "make on FreeBSD 10" {
  cached_tarball "ruby-2.0.0"

  stub uname "-s : echo FreeBSD" "-r : echo 10.0-RELEASE" false
  stub_make_install

  MAKE= install_fixture definitions/vanilla-ruby
  assert_success

  unstub uname
}

@test "make on FreeBSD 11" {
  cached_tarball "ruby-2.0.0"

  stub uname "-s : echo FreeBSD" "-r : echo 11.0-RELEASE" false
  stub_make_install

  MAKE= install_fixture definitions/vanilla-ruby
  assert_success

  unstub uname
}

@test "can use RUBY_CONFIGURE to apply a patch" {
  cached_tarball "ruby-2.0.0"