summaryrefslogtreecommitdiffstats
path: root/classes/ruby.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/ruby.bbclass')
-rw-r--r--classes/ruby.bbclass27
1 files changed, 25 insertions, 2 deletions
diff --git a/classes/ruby.bbclass b/classes/ruby.bbclass
index 384ece9..eb19e37 100644
--- a/classes/ruby.bbclass
+++ b/classes/ruby.bbclass
@@ -1,5 +1,6 @@
1# 1#
2# Copyright (C) 2014 Wind River Systems, Inc. 2# Copyright (C) 2014 Wind River Systems, Inc.
3# Copyright (c) 2024 Bruce Ashfield, Inc.
3# 4#
4DEPENDS += " \ 5DEPENDS += " \
5 ruby-native \ 6 ruby-native \
@@ -24,7 +25,7 @@ def get_rubyversion(p):
24 return found_version 25 return found_version
25 26
26 version = subprocess.Popen([cmd, "--version"], stdout=subprocess.PIPE).communicate()[0] 27 version = subprocess.Popen([cmd, "--version"], stdout=subprocess.PIPE).communicate()[0]
27 28
28 r = re.compile("ruby ([0-9]+\.[0-9]+\.[0-9]+)*") 29 r = re.compile("ruby ([0-9]+\.[0-9]+\.[0-9]+)*")
29 m = r.match(version) 30 m = r.match(version)
30 if m: 31 if m:
@@ -66,7 +67,7 @@ def get_rubygemsversion(p):
66 return found_version 67 return found_version
67 68
68 version = subprocess.Popen([cmd, "env", "gemdir"], stdout=subprocess.PIPE).communicate()[0] 69 version = subprocess.Popen([cmd, "env", "gemdir"], stdout=subprocess.PIPE).communicate()[0]
69 70
70 r = re.compile(".*([0-9]+\.[0-9]+\.[0-9]+)$") 71 r = re.compile(".*([0-9]+\.[0-9]+\.[0-9]+)$")
71 m = r.match(version.decode("utf-8")) 72 m = r.match(version.decode("utf-8"))
72 if m: 73 if m:
@@ -108,6 +109,11 @@ EOF
108} 109}
109 110
110ruby_do_compile() { 111ruby_do_compile() {
112 if [ -f ${UNPACKDIR}/extconf.rb ]; then
113 cp extconf.rb extconf.orig
114 cp ${UNPACKDIR}/extconf.rb extconf.rb
115 fi
116
111 if [ -f extconf.rb -a ! -f extconf.rb.orig ] ; then 117 if [ -f extconf.rb -a ! -f extconf.rb.orig ] ; then
112 grep create_makefile extconf.rb > append2 || (exit 0) 118 grep create_makefile extconf.rb > append2 || (exit 0)
113 ruby_gen_extconf_fix 119 ruby_gen_extconf_fix
@@ -164,3 +170,20 @@ FILES:${PN} += " \
164FILES:${PN}-doc += " \ 170FILES:${PN}-doc += " \
165 ${libdir}/ruby/gems/${RUBY_GEM_VERSION}/doc \ 171 ${libdir}/ruby/gems/${RUBY_GEM_VERSION}/doc \
166 " 172 "
173
174# copied from rubyv2.bbclass
175
176# the ruby dynamic linker just uses plain .so files
177# so we have to supply symlinks as part of the base package
178INSANE_SKIP:${PN} += "dev-so"
179# sadly the shared objects also contain some hard coded
180# host paths, which are not easy to be removed
181INSANE_SKIP:${PN} += "buildpaths"
182# we don't care what is actually needed for the dev-package
183INSANE_SKIP:${PN}-dev += "file-rdeps"
184# same issue for the dev package with buildpaths
185INSANE_SKIP:${PN}-dev += "buildpaths"
186# some of the doc utils contain host specific full paths
187# as they are mostly in binary format we are just going to
188# ignore it here
189INSANE_SKIP:${PN}-doc += "buildpaths"