-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix compilation of Ruby 3.2.x on FreeBSD #2187
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this!
How come these checks are scoped only to FreeBSD 11 or later?
bin/ruby-build
Outdated
if pkg info -e libyaml > /dev/null; then | ||
package_option ruby configure --with-libyaml-dir="$(pkg info --prefix libyaml | cut -wf2)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we just get away with calling pkg info --prefix libyaml
once instead of pkg info -e libyaml && pkg info --prefix
?
And what is the full output of pkg info --prefix
before it gets cut?
Not sure. I used the same style as was used in the already committed/merged
It's possible. However I think that then we need to check for empty string after command
Not sure what
Output is seen above. |
I'd vote for that approach instead of separately checking
Yep, you're welcome to remove checks for FreeBSD 11! Thanks |
@mislav made all the relevant changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks; looking good! Only style suggestions remain
bin/ruby-build
Outdated
|
||
freebsd_package_prefix() { | ||
local package="$1" | ||
echo "$(pkg info --prefix "$package" 2>/dev/null | cut -wf2)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about just unwrapping this instead of capturing the output and echo-ing it?
echo "$(pkg info --prefix "$package" 2>/dev/null | cut -wf2)" | |
pkg info --prefix "$package" 2>/dev/null | cut -wf2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for noticing this silly code :) Fixed it.
bin/ruby-build
Outdated
use_freebsd_yaml() { | ||
if is_freebsd; then | ||
local libyaml_prefix="$(freebsd_package_prefix libyaml)" | ||
if [ "$libyaml_prefix" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: although it might be functionally equivalent, I do like the explicitness of testing strings for not being blank, i.e.
if [ "$libyaml_prefix" ]; then | |
if [ -n "$libyaml_prefix" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explicit checks added.
This commit contains two updates: 20230424 and 20230428. ``` - 20230424: - Fall back on shasum if sha256sum is unavailable by @jas14 in rbenv/ruby-build#2177 - Mark EOL status to Ruby 2.6 and 2.7 by @hsbt in rbenv/ruby-build#2180 - Fix uploading SARIF reports from Differential Shellcheck by @mislav in rbenv/ruby-build#2181 - Fix compilation of Ruby 3.2.x on FreeBSD by @jarmo in rbenv/ruby-build#2187 - Fix truffleruby+graalvm-dev download URLs by @eregon in rbenv/ruby-build#2189 - 20230428: - Add TruffleRuby 23.0.0-preview1 by @eregon in rbenv/ruby-build#2190 - Add TruffleRuby+GraalVM 23.0.0-preview1 by @eregon in rbenv/ruby-build#2191 ```
This commit contains two updates: 20230424 and 20230428. ``` - 20230424: - Fall back on shasum if sha256sum is unavailable by @jas14 in rbenv/ruby-build#2177 - Mark EOL status to Ruby 2.6 and 2.7 by @hsbt in rbenv/ruby-build#2180 - Fix uploading SARIF reports from Differential Shellcheck by @mislav in rbenv/ruby-build#2181 - Fix compilation of Ruby 3.2.x on FreeBSD by @jarmo in rbenv/ruby-build#2187 - Fix truffleruby+graalvm-dev download URLs by @eregon in rbenv/ruby-build#2189 - 20230428: - Add TruffleRuby 23.0.0-preview1 by @eregon in rbenv/ruby-build#2190 - Add TruffleRuby+GraalVM 23.0.0-preview1 by @eregon in rbenv/ruby-build#2191 ```
Related to #2184