Skip to content

Use yaml from homebrew #1928

@dreyks

Description

@dreyks

Homebrew is no longer located in /usr/local on Apple Silicon. It is now in /opt/homebrew. This leads to brew-originated yaml not being picked up during the build

We should probably manage yaml the same way we do it with readline. Looking at the code there's already a function that should do what is needed but it's not being called anywhere

ruby-build/bin/ruby-build

Lines 1029 to 1037 in cbdbc6e

use_homebrew_yaml() {
local libdir="$(brew --prefix libyaml 2>/dev/null || true)"
if [ -d "$libdir" ]; then
echo "ruby-build: using libyaml from homebrew"
package_option ruby configure --with-libyaml-dir="$libdir"
else
return 1
fi
}

should we call it here?

ruby-build/bin/ruby-build

Lines 581 to 583 in cbdbc6e

if [ "$package_var_name" = "RUBY" ]; then
use_homebrew_readline || use_freebsd_pkg ||true
fi

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions