merged! Bruce
In message: [meta-virtualization][m-c-s][PATCH] ruby: Add sysroot dir to the ldflags and process all the existing extconf.rb on 29/04/2020 Pablo Saavedra Rodi?o wrote: > * add lib path of the sysroot directory [1] to avoid ld errors during > the installation > * ruby_do_compile() find the extconf.rb file in the sources instance of > assume a single file. > > [1] > https://www.yoctoproject.org/docs/1.8/ref-manual/ref-manual.html#var-STAGING_LIBDIR > > Signed-off-by: Pablo Saavedra <[email protected]> > --- > classes/ruby.bbclass | 34 +++++++++++++++++++++------------- > 1 file changed, 21 insertions(+), 13 deletions(-) > > diff --git a/classes/ruby.bbclass b/classes/ruby.bbclass > index 15ac9f4..5fb8e6b 100644 > --- a/classes/ruby.bbclass > +++ b/classes/ruby.bbclass > @@ -104,23 +104,31 @@ EOF > system("perl -p -i -e 's#^arch =.*#arch = ${ruby_arch}#' Makefile") > system("perl -p -i -e 's#^LIBPATH =.*#LIBPATH = -L.#' Makefile") > system("perl -p -i -e 's#^dldflags =.*#dldflags = ${LDFLAGS}#' Makefile") > + system("perl -p -i -e 's#^ldflags =.*#ldflags = -L${STAGING_LIBDIR}#' > Makefile") > EOF > } > > ruby_do_compile() { > - if [ -f extconf.rb -a ! -f extconf.rb.orig ] ; then > - grep create_makefile extconf.rb > append2 || (exit 0) > - ruby_gen_extconf_fix > - cp extconf.rb extconf.rb.orig > - # Patch extconf.rb for cross compile > - cat append >> extconf.rb > - fi > - for gem in ${RUBY_BUILD_GEMS}; do > - ${RUBY_COMPILE_FLAGS} gem build $gem > - done > - if [ -f extconf.rb.orig ] ; then > - mv extconf.rb.orig extconf.rb > - fi > + EXTCONF_FILES=$(find . -name extconf.rb -exec ls {} \;) > + for e in $EXTCONF_FILES > + do > + if [ -f $e -a ! -f $e.orig ] ; then > + grep create_makefile $e > append2 || continue > + ruby_gen_extconf_fix > + cp $e $e.orig > + # Patch extconf.rb for cross compile > + cat append >> $e > + fi > + done > + for gem in ${RUBY_BUILD_GEMS}; do > + ${RUBY_COMPILE_FLAGS} gem build $gem > + done > + for e in $EXTCONF_FILES > + do > + if [ -f $e.orig ] ; then > + mv $e.orig $e > + fi > + done > } > > > -- > 2.11.0 > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#5305): https://lists.yoctoproject.org/g/meta-virtualization/message/5305 Mute This Topic: https://lists.yoctoproject.org/mt/73349803/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/leave/6693005/1014668956/xyzzy [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
