Skip to content
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

ruby-devel: update to upstream, fix build on < 10.7 #24868

Closed
wants to merge 7 commits into from
29 changes: 21 additions & 8 deletions lang/ruby-devel/Portfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4

Check warning on line 1 in lang/ruby-devel/Portfile

View workflow job for this annotation

GitHub Actions / macos-12

port lint ruby-devel: Warning: Dependency path:bin/pkg-config:pkgconfig specified multiple times in depends_build

Check warning on line 1 in lang/ruby-devel/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port lint ruby-devel: Warning: Dependency path:bin/pkg-config:pkgconfig specified multiple times in depends_build

Check warning on line 1 in lang/ruby-devel/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port lint ruby-devel: Warning: Dependency path:bin/pkg-config:pkgconfig specified multiple times in depends_build

PortSystem 1.0
PortGroup compiler_blacklist_versions 1.0
Expand All @@ -15,13 +15,13 @@
# ruby/openssl since ruby-3.2 supports openssl-3
openssl.branch 3

github.setup ruby ruby 478ada0e2bb11c5aaac0f8d30cdef12a967c2c03
github.setup ruby ruby 7472fff7f1b5296fbfcde0e2b7411a1d87781f3f

set ruby_ver 3.4
set ruby_patch 0
set ruby_ver_nodot [string map {. {}} ${ruby_ver}]
name ruby-devel
version 2024.07.04
version 2024.07.14
revision 0

categories lang ruby
Expand All @@ -37,9 +37,9 @@
homepage https://www.ruby-lang.org
license {Ruby BSD}

checksums rmd160 d9ac9fcfbb46fed60011416d68d6b55482653fab \
sha256 cf797f282ab9bc2f4ee1425c4806d5dd92ef2e9ec9078b5f80f03ff1c6ecfd3e \
size 16515586
checksums rmd160 94f8f5e8960d57ae4034f573dc1e5866d24187a2 \
sha256 a45c69ef10d14dd08c0beb0a7f156b79c7c56fd65454032b0ff43fdbe3dbff6a \
size 16472175
github.tarball_from archive

universal_variant no
Expand Down Expand Up @@ -68,11 +68,13 @@
port:cctools \
port:gperf \
port:libtool \
path:bin/pkg-config:pkgconfig \
port:ruby${baseruby_ver_nodot}

depends_run-append port:ruby_select

depends_skip_archcheck pkgconfig
depends_skip_archcheck \
path:bin/pkg-config:pkgconfig

select.group ruby
select.file ${filespath}/ruby${ruby_ver_nodot}
Expand All @@ -86,6 +88,8 @@
# ENV["GEM_COMMAND"]&.shellsplit || ["gem"]
# end
reinplace -E "s/(shellsplit .. .)(\"gem\")/\\1\"gem${ruby_ver}\"/g" ${worksrcpath}/lib/bundler/gem_helper.rb
# get meaningful output during the build:
reinplace "s/\$(Q) \$(CC)/\$(CC)/g" ${worksrcpath}/template/Makefile.in
}

compiler.blacklist-append {clang < 901}
Expand Down Expand Up @@ -125,7 +129,16 @@
depends_build-append port:gmake
build.cmd ${prefix}/bin/gmake
configure.args-append --disable-dtrace
configure.cflags-append -std=c99
if {[string match *gcc* ${configure.compiler}]} {
configure.cflags-append -std=gnu99
} else {
configure.cflags-append -std=c99
}
}

# Until this is fixed: https://trac.macports.org/ticket/70350
if {${os.major} < 10 || ${configure.build_arch} eq "ppc"} {
configure.args-append ac_cv_func_fgetattrlist=no
}

if {${os.major} < 9} {
Expand Down Expand Up @@ -165,7 +178,7 @@

variant jemalloc description "use jemalloc" {
configure.args-delete --without-jemalloc
depends_lib-append port:jemalloc
depends_lib-append path:lib/pkgconfig/jemalloc.pc:jemalloc
}

variant yjit description "use YJIT" {
Expand Down