ruby: make ext module fiddle can compile success
PATCH 1/2 ruby: make ext module fiddle can compile success
From: Changqing Li <[email protected]>
ext module fiddle depend on libffi, in ruby source tree, there is in internal libffi in case target platfrom don't install libffi, but autotools.bbclass delete configure
under libffi and not run autoreconf to regenerate one.so
we met this error:
ruby-2.5.3/ext/fiddle/libffi-3.2.1/configure: No such file or directory
the fix is add depend and extra_oeconf to use libffi in the system
Signed-off-by Changqing Li <[email protected]>
--- meta/recipes-devtools/ruby/ruby.inc | 2 +- meta/recipes-devtools/ruby/ruby_2.5.3.bb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
meta/recipes-devtools/ruby/ruby.inc +1 -1
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "\ file://LEGAL;md5=23a79bb4c1a40f6cc9bcb6f4e7c39799 \ " -DEPENDS = "ruby-native zlib openssl tcl libyaml gdbm readline" +DEPENDS = "ruby-native zlib openssl tcl libyaml gdbm readline libffi" DEPENDS_class-native = "openssl-native libyaml-native readline-native" SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
meta/recipes-devtools/ruby/ruby_2.5.3.bb +1 -0
@@ -28,6 +28,7 @@ EXTRA_OECONF = "\ --disable-dtrace \ --enable-shared \ --enable-load-relative \ + --with-pkg-config=pkg-config \ " do_install() {
Signature · 1 line
2.7.4
PATCH 2/2 ruby: add ptest
From: Changqing Li <[email protected]>
Signed-off-by Changqing Li <[email protected]>
--- meta/recipes-devtools/ruby/ruby.inc | 2 +- meta/recipes-devtools/ruby/ruby/run-ptest | 13 +++++++++++++ meta/recipes-devtools/ruby/ruby_2.5.3.bb | 10 ++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/ruby/ruby/run-ptest
meta/recipes-devtools/ruby/ruby.inc +1 -1
@@ -24,7 +24,7 @@ SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \ " UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/" -inherit autotools +inherit autotools ptest # This snippet lets compiled extensions which rely on external libraries,
meta/recipes-devtools/ruby/ruby/run-ptest new file +13 -0
@@ -0,0 +1,13 @@ +#!/bin/sh + +test_fullname=`find test -name test_*.rb` + +for i in ${test_fullname}; do + ruby ./test/runner.rb ${i} 2>&1 > /dev/null + ret=$? + if [ $ret != 0 ]; then + echo "FAIL: ${i}" + else + echo "PASS: ${i}" + fi +done
meta/recipes-devtools/ruby/ruby_2.5.3.bb +10 -0
@@ -3,6 +3,7 @@ require ruby.inc SRC_URI += " \ file://ruby-CVE-2017-9226.patch \ file://ruby-CVE-2017-9228.patch \ + file://run-ptest \ " SRC_URI[md5sum] = "20c85b67846d49622ef3b24230803fef"
@@ -55,6 +56,13 @@ do_install_append_class-target () { } +do_install_ptest () { + cp -rf ${S}/test ${D}${PTEST_PATH}/ + cp -r ${S}/include ${D}/${libdir}/ruby/ + test_case_rb=`grep rubygems/test_case.rb ${B}/.installed.list` + sed -i -e 's:../../../test/:../../../ptest/test/:g' ${D}/$test_case_rb +} + PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc" SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library"
@@ -67,4 +75,6 @@ FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc" FILES_${PN} += "${datadir}/rubygems" +FILES_${PN}-ptest_append_class-target += "${libdir}/ruby/include" + BBCLASSEXTEND = "native"
Signature · 1 line
2.7.4