summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/ruby
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2018-08-27 23:31:28 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-29 10:40:08 +0100
commit853e0499be449c71378c087e08b1926be8e2ac87 (patch)
tree861b6beb8e420d7c188af6f825ccbca819ed36a5 /meta/recipes-devtools/ruby
parent037d741c94dd7f8518b3499ee0beb91a343ffa6a (diff)
downloadopenembedded-core-contrib-853e0499be449c71378c087e08b1926be8e2ac87.tar.gz
ruby: improve reproducibility
Find out rbconfig.rb and created.rid from ${B}/.installed.list and remove build host directories - For rbconfig.rb, parse it like python's _sysconfigdata.py [snip rbconfig.rb] 26 CONFIG["INSTALL"] = 'install -c' [snip rbconfig.rb] - For created.rid, it records file created time, just strip ${WORKDIR} prefix. [snip created.rid] 840 /ruby-2.5.1/doc/maintainers.rdoc Fri, 22 Dec 2017 23:08:05 +0000 [snip created.rid] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/ruby')
-rw-r--r--meta/recipes-devtools/ruby/ruby_2.5.1.bb20
1 files changed, 20 insertions, 0 deletions
diff --git a/meta/recipes-devtools/ruby/ruby_2.5.1.bb b/meta/recipes-devtools/ruby/ruby_2.5.1.bb
index af2739a43dd..1197323e90a 100644
--- a/meta/recipes-devtools/ruby/ruby_2.5.1.bb
+++ b/meta/recipes-devtools/ruby/ruby_2.5.1.bb
@@ -35,6 +35,26 @@ do_install() {
oe_runmake 'DESTDIR=${D}' install
}
+do_install_append_class-target () {
+ # Find out rbconfig.rb from .installed.list
+ rbconfig_rb=`grep rbconfig.rb ${B}/.installed.list`
+ # Remove build host directories
+ sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
+ -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+ ${D}$rbconfig_rb
+
+ # Find out created.rid from .installed.list
+ created_rid=`grep created.rid ${B}/.installed.list`
+ # Remove build host directories
+ sed -i -e 's:${WORKDIR}::g' ${D}$created_rid
+
+}
+
PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc"
SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library"