All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bruce Ashfield" <bruce.ashfield@gmail.com>
To: meta-virtualization@lists.yoctoproject.org
Cc: meta-virtualization@yoctoproject.org
Subject: Re: [meta-virtualization][m-c-s][PATCH] ruby: Add sysroot dir to the ldflags and process all the existing extconf.rb
Date: Sat, 2 May 2020 11:12:18 -0400	[thread overview]
Message-ID: <20200502151216.GA10315@gmail.com> (raw)
In-Reply-To: <20200429103120.10716-1-psaavedra@igalia.com>

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 <psaavedra@igalia.com>
> ---
>  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
> 

> 


      reply	other threads:[~2020-05-02 15:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 10:31 [meta-virtualization][m-c-s][PATCH] ruby: Add sysroot dir to the ldflags and process all the existing extconf.rb Pablo Saavedra Rodi?o
2020-05-02 15:12 ` Bruce Ashfield [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200502151216.GA10315@gmail.com \
    --to=bruce.ashfield@gmail.com \
    --cc=meta-virtualization@lists.yoctoproject.org \
    --cc=meta-virtualization@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.