summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog7
-rw-r--r--debian/patches/0005-extconf.rb-use-Rbconfig-CONFIG-instead-of-mkmf-CONFI.patch30
-rw-r--r--debian/patches/series1
3 files changed, 38 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index fd04a56..0b912a3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+ruby-shadow (2.5.1-2) unstable; urgency=medium
+
+ * Team upload
+ * Add patch to fix build on ruby3.2+
+
+ -- Antonio Terceiro <terceiro@debian.org> Wed, 28 Aug 2024 11:47:55 -0300
+
ruby-shadow (2.5.1-1) unstable; urgency=medium
* Team upload.
diff --git a/debian/patches/0005-extconf.rb-use-Rbconfig-CONFIG-instead-of-mkmf-CONFI.patch b/debian/patches/0005-extconf.rb-use-Rbconfig-CONFIG-instead-of-mkmf-CONFI.patch
new file mode 100644
index 0000000..f8eaf87
--- /dev/null
+++ b/debian/patches/0005-extconf.rb-use-Rbconfig-CONFIG-instead-of-mkmf-CONFI.patch
@@ -0,0 +1,30 @@
+From: Mamoru TASAKA <mtasaka@fedoraproject.org>
+Date: Thu, 1 Dec 2022 12:23:05 +0900
+Subject: extconf.rb: use Rbconfig::CONFIG instead of mkmf CONFIG
+
+In mkmf.rb CONFIG is defined as CONFIG is defined as RbConfig::MAKEFILE_CONFIG
+and RbConfig::MAKEFILE_CONFIG is almost same as RbConfig::CONFIG
+except that RbConfig::MAKEFILE_CONFIG uses reference for other variables.
+
+Using CONFIG in extconf.rb causes error with ruby3.2 because now
+CONFIG['host_os'] uses reference for target_os variable, and extconf.rb
+expects that this variable is all expanded. So instead, use RbConfig::CONFIG .
+
+Closes #30
+---
+ extconf.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/extconf.rb b/extconf.rb
+index 7606eaf..908d3a6 100644
+--- a/extconf.rb
++++ b/extconf.rb
+@@ -9,7 +9,7 @@ require 'rbconfig'
+
+ $CFLAGS += ' -DRUBY19'
+
+-implementation = case CONFIG['host_os']
++implementation = case RbConfig::CONFIG['host_os']
+ when /linux/i; 'shadow'
+ when /gnu/i; 'shadow' # Debian GNU/kFreeBSD and Hurd have shadow.h
+ when /sunos|solaris/i; 'shadow'
diff --git a/debian/patches/series b/debian/patches/series
index 6028998..9bfb454 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
dont-overwrite-compiler-flags
use-shadow-implementation-on-gnu-archs
drop-tainted-strings
+0005-extconf.rb-use-Rbconfig-CONFIG-instead-of-mkmf-CONFI.patch