summaryrefslogtreecommitdiff
path: root/eclass/ruby-fakegem.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-12-14 02:02:08 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-12-14 02:02:08 +0000
commit59d772d9463f8cf6a145a677bedbf377a0625aff (patch)
tree5a0e382968fd656a056c886e36cfb4491535b489 /eclass/ruby-fakegem.eclass
parent2a3e0d61b3d88306b6fae46756f9ba7d230222ae (diff)
gentoo auto-resync : 14:12:2024 - 02:02:07
Diffstat (limited to 'eclass/ruby-fakegem.eclass')
-rw-r--r--eclass/ruby-fakegem.eclass12
1 files changed, 12 insertions, 0 deletions
diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass
index eb6257a50cf9..fc78428be714 100644
--- a/eclass/ruby-fakegem.eclass
+++ b/eclass/ruby-fakegem.eclass
@@ -23,6 +23,8 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
+# flag-o-matic is only required for ruby31 support.
+inherit flag-o-matic
inherit ruby-ng
# @ECLASS_VARIABLE: RUBY_FAKEGEM_NAME
@@ -424,6 +426,16 @@ EOF
each_fakegem_configure() {
debug-print-function ${FUNCNAME} "$@"
+ # Ruby 3.1 has a varargs implementation that is not compatible with
+ # gnu23. Ruby 3.1 is EOL in March 2025 and will be removed shortly
+ # after that.
+ case ${RUBY} in
+ *ruby31)
+ append-flags -std=gnu17
+ filter-flags -std=gnu23
+ ;;
+ esac
+
tc-export PKG_CONFIG
for extension in "${RUBY_FAKEGEM_EXTENSIONS[@]}" ; do
CC=$(tc-getCC) ${RUBY} --disable=did_you_mean -C ${extension%/*} ${extension##*/} --with-cflags="${CFLAGS}" --with-ldflags="${LDFLAGS}" ${RUBY_FAKEGEM_EXTENSION_OPTIONS} || die