* [meta-virtualization][m-c-s][PATCH] ruby: Add sysroot dir to the ldflags and process all the existing extconf.rb
@ 2020-04-29 10:31 Pablo Saavedra Rodi?o
2020-05-02 15:12 ` Bruce Ashfield
0 siblings, 1 reply; 2+ messages in thread
From: Pablo Saavedra Rodi?o @ 2020-04-29 10:31 UTC (permalink / raw)
To: meta-virtualization
* 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
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [meta-virtualization][m-c-s][PATCH] ruby: Add sysroot dir to the ldflags and process all the existing extconf.rb
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
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Ashfield @ 2020-05-02 15:12 UTC (permalink / raw)
To: meta-virtualization; +Cc: meta-virtualization
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
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-02 15:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.