[rubygems] Fix regex for creating native extension directory

Mamoru Tasaka mtasaka at fedoraproject.org
Tue Mar 5 07:33:30 UTC 2013


commit 519e6b222170e5c18828af25b8c9ffb0c31abd9e
Author: TASAKA Mamoru <mtasaka at localhost.localdomain>
Date:   Tue Mar 5 16:33:24 2013 +0900

    Fix regex for creating native extension directory
    
      (Vít Ondruch <vondruch at redhat.com>)

 rubygems-2.0.0-binary-extensions.patch |   30 ++++++++++++++++++++++++++++++
 rubygems.spec                          |    8 ++++++--
 2 files changed, 36 insertions(+), 2 deletions(-)
---
diff --git a/rubygems-2.0.0-binary-extensions.patch b/rubygems-2.0.0-binary-extensions.patch
index 91b570e..3d159d7 100644
--- a/rubygems-2.0.0-binary-extensions.patch
+++ b/rubygems-2.0.0-binary-extensions.patch
@@ -317,6 +317,36 @@ index f1f2ad7..e1577fc 100644
 1.8.1.2
 
 
+From 4d9675cab5decaef3c9f7f91b2f9c9abd2a19cea Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch at redhat.com>
+Date: Tue,  5 Mar 2013 16:02:00 +0900
+Subject: [PATCH 8/9] mkmf does not create folder for binary extensions
+ anymore.
+
+This was dropped in Ruby r37016 for some reasons :/
+---
+ lib/rubygems/ext/builder.rb | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb
+index d7d953f..812c20c 100644
+--- a/lib/rubygems/ext/builder.rb
++++ b/lib/rubygems/ext/builder.rb
+@@ -21,6 +21,10 @@ class Gem::Ext::Builder
+     mf = mf.gsub(/^RUBYLIBDIR\s*=\s*\$[^$]*/, "RUBYLIBDIR = #{dest_path}")
+     mf = mf.gsub(/\s*\S+\.time$/, "")
+ 
++    # Folder creation was dropped in r37016 for some reasons :/
++    target_prefix = mf[/^target_prefix\s*=[^\S\n]*(.*)$/, 1]
++    FileUtils.mkdir_p File.join(dest_path, target_prefix) rescue nil # in case of perms issues -- lame
++
+     File.open('Makefile', 'wb') {|f| f.print mf}
+ 
+     # try to find make program from Ruby configure arguments first
+-- 
+1.8.1.2
+
+
 From 062a11c59731f5875d5a8821a212c8a41cb84577 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch at redhat.com>
 Date: Fri, 15 Feb 2013 17:07:07 +0100
diff --git a/rubygems.spec b/rubygems.spec
index 215ef61..6276ebc 100644
--- a/rubygems.spec
+++ b/rubygems.spec
@@ -26,7 +26,7 @@ Summary:	The Ruby standard for packaging ruby libraries
 Name:		rubygems
 Version:	2.0.0
 # Bump release for now
-Release:	105%{?dist}
+Release:	106%{?dist}
 Group:		Development/Libraries
 License:	Ruby or MIT
 
@@ -258,8 +258,12 @@ testrb test || testrb test -x test_gem_installer.rb
 
 
 %changelog
+* Tue Mar  5 2013 Mamoru Tasaka <mtasaka at fedoraproject.org> - 2.0.0-106
+- Fix regex for creating native extension directory
+  (Vít Ondruch <vondruch at redhat.com>)
+
 * Sun Mar  3 2013 Mamoru TASAKA <mtasaka at fedoraproject.org> - 2.0.0-105
-- Kill creating unneeded LOCAL_RPMS\ = directory under
+- Kill creating unneeded LOCAL_LIBS\ = directory under
   %%gem_libdir when building native extension
 
 * Wed Feb 27 2013 Mamoru TASAKA <mtasaka at fedoraproject.org> - 2.0.0-104


More information about the scm-commits mailing list