[packages/ruby/DEVEL-3.2] extensions subdir may include abi
atler
atler at pld-linux.org
Tue Apr 28 01:29:46 CEST 2026
commit 808431c46672de18193fb000038fdd1f5cee1ad8
Author: Jan Palus <atler at pld-linux.org>
Date: Mon Apr 27 19:42:14 2026 +0200
extensions subdir may include abi
ruby.spec | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/ruby.spec b/ruby.spec
index eb5041f..0c40f1f 100644
--- a/ruby.spec
+++ b/ruby.spec
@@ -930,7 +930,18 @@ ln -s %{gem_dir}/gems/bundler-%{bundler_ver}/lib/bundler.rb $RPM_BUILD_ROOT%{rub
# Move the binary extensions into proper place (if no gem has binary extension,
# the extensions directory might be empty).
-find $RPM_BUILD_ROOT${gem_dir}/extensions/*-%{_target_os}/%{ruby_version}.*/* -maxdepth 0 \
+
+# if abi contains number ruby strips it in convoluted logic (said
+# logic is already cleaned up in 4.0 so x32 will need to be included
+# too)
+# https://github.com/ruby/ruby/blob/5483bfc/lib/rubygems/platform.rb#L75
+%ifnarch x32
+# https://github.com/ruby/ruby/blob/5483bfc/configure.ac#L280
+if [ -n "%{?_gnu}" ] && [ "%{?_gnu}" != "-gnu" ] && [[ "%{_target_platform}" = *%{?_gnu} ]]; then
+ abi=$(echo "%{?_gnu}" | sed 's/^-gnu/-/')
+fi
+%endif
+find $RPM_BUILD_ROOT${gem_dir}/extensions/*-%{_target_os}$abi/%{ruby_version}.*/* -maxdepth 0 \
-exec mv '{}' $RPM_BUILD_ROOT%{_libdir}/gems/%{name}/ \; \
|| echo "No gem binary extensions to move."
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ruby.git/commitdiff/808431c46672de18193fb000038fdd1f5cee1ad8
More information about the pld-cvs-commit
mailing list