All of lore.kernel.org
 help / color / mirror / Atom feed
* meta-openembedded/meta-ruby: ruby-1.9.3-disable-versioned-paths.patch misses one path
@ 2015-11-05 12:38 Ulf Magnusson
  2015-11-05 12:57 ` Martin Jansa
  0 siblings, 1 reply; 3+ messages in thread
From: Ulf Magnusson @ 2015-11-05 12:38 UTC (permalink / raw)
  To: openembedded-devel, mark.asselstine, jackie.huang, amy.fong,
	kergoth, Martin.Jansa

Hello,

ruby-1.9.3-disable-versioned-paths.patch adds the
--disable-versioned-paths option, which strips Ruby's version number
from some install paths. The patch misses a spot however, which causes
TOPDIR to get an incorrect value (nil) in rbconfig.rb. This in turn
causes problems e.g. when trying to cross-compile native extensions.

The following patch fixes this. It assumes
ruby-1.9.3-disable-versioned-paths.patch has already been applied.

---
 tool/mkconfig.rb | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
index 10dbe65..aa54512 100755
--- a/tool/mkconfig.rb
+++ b/tool/mkconfig.rb
@@ -44,6 +44,7 @@ vars = {}
 continued_name = nil
 continued_line = nil
 path_version = "/$(ruby_version)"
+prefix_version = "/#{version}"
 File.foreach "config.status" do |line|
   next if /^#/ =~ line
   name = nil
@@ -149,7 +150,10 @@ File.foreach "config.status" do |line|
     when "ruby_version"
       version = val[/\A"(.*)"\z/, 1]
     when /^USE_VERSIONED_PATHS$/
-      path_version = nil if /NO/ =~ val
+      if /NO/ =~ val
+        path_version = nil
+        prefix_version = nil
+      end
     end
   end
 #  break if /^CEOF/
@@ -157,7 +161,7 @@ end

 drive = File::PATH_SEPARATOR == ';'

-prefix = "/#{v_runtime[:libdir] || 'lib'}/ruby/#{version}/#{arch}"
+prefix = "/#{v_runtime[:libdir] || 'lib'}/ruby#{prefix_version}/#{arch}"
 print "  TOPDIR = File.dirname(__FILE__).chomp!(#{prefix.dump})\n"
 print "  DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " :
""), "'' unless defined? DESTDIR\n"
 print <<'ARCH' if universal
-- 
2.1.4


Another "bug" is that meta/recipes-devtools/ruby (i.e., the newer Ruby
recipe) uses --disable-versioned-paths too even though afaics no such
option exists in that version. Maybe I should report that separately.

Cheers,
Ulf


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-05 13:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-05 12:38 meta-openembedded/meta-ruby: ruby-1.9.3-disable-versioned-paths.patch misses one path Ulf Magnusson
2015-11-05 12:57 ` Martin Jansa
2015-11-05 13:36   ` Ulf Magnusson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.