Patchwork [1/2] perl 5.10.1: fix archlib(exp) and privlib(exp) vars in target configs

login
register
mail settings
Submitter Roman Khimov
Date Dec. 29, 2010, 10:07 p.m.
Message ID <1293660478-3080-1-git-send-email-khimov@altell.ru>
Download mbox | patch
Permalink /patch/144/
State Accepted
Headers show

Comments

Roman Khimov - Dec. 29, 2010, 10:07 p.m.
These vars can be used to derive build flags for perl modules and thus should
point to build-time directories in staged configs.

Signed-off-by: Roman I Khimov <khimov@altell.ru>
---
 recipes/perl/perl_5.10.1.bb |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
Frans Meulenbroeks - Dec. 30, 2010, 5:35 p.m.
2010/12/29 Roman I Khimov <khimov@altell.ru>:
> These vars can be used to derive build flags for perl modules and thus should
> point to build-time directories in staged configs.
>
> Signed-off-by: Roman I Khimov <khimov@altell.ru>

Tested this patch and the next one together. They solve my libdatetime problem.
Thanks alot!

Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
> ---
>  recipes/perl/perl_5.10.1.bb |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/recipes/perl/perl_5.10.1.bb b/recipes/perl/perl_5.10.1.bb
> index d8c374b..4e6bc33 100644
> --- a/recipes/perl/perl_5.10.1.bb
> +++ b/recipes/perl/perl_5.10.1.bb
> @@ -5,7 +5,7 @@ LICENSE = "Artistic|GPLv1+"
>  PRIORITY = "optional"
>  # We need gnugrep (for -I)
>  DEPENDS = "virtual/db perl-native grep-native"
> -PR = "r18"
> +PR = "r19"
>
>  # 5.10.1 has Module::Build built-in
>  PROVIDES += "libmodule-build-perl"
> @@ -224,6 +224,13 @@ do_stage() {
>         install config.sh ${STAGING_LIBDIR}/perl/
>         # target configuration, used by native perl when cross-compiling
>         install lib/Config_heavy.pl ${STAGING_LIBDIR_NATIVE}/perl/${PV}/Config_heavy-${TARGET_SYS}.pl
> +       sed -r -i \
> +               -e "s,^(archlib=).*$,\1'${STAGING_LIBDIR}/perl/${PV}'," \
> +               -e "s,^(archlibexp=).*$,\1'${STAGING_LIBDIR}/perl/${PV}'," \
> +               -e "s,^(privlib=).*$,\1'${STAGING_DATADIR}/perl/${PV}'," \
> +               -e "s,^(privlibexp=).*$,\1'${STAGING_DATADIR}/perl/${PV}'," \
> +               ${STAGING_LIBDIR_NATIVE}/perl/${PV}/Config_heavy-${TARGET_SYS}.pl \
> +               ${STAGING_LIBDIR}/perl/config.sh
>        # target configuration
>         install lib/Config.pm       ${STAGING_LIBDIR}/perl/${PV}/
>        install lib/ExtUtils/typemap ${STAGING_DATADIR}/perl/${PV}/ExtUtils/
> --
> 1.6.4.2
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>

Patch

diff --git a/recipes/perl/perl_5.10.1.bb b/recipes/perl/perl_5.10.1.bb
index d8c374b..4e6bc33 100644
--- a/recipes/perl/perl_5.10.1.bb
+++ b/recipes/perl/perl_5.10.1.bb
@@ -5,7 +5,7 @@  LICENSE = "Artistic|GPLv1+"
 PRIORITY = "optional"
 # We need gnugrep (for -I)
 DEPENDS = "virtual/db perl-native grep-native"
-PR = "r18"
+PR = "r19"
 
 # 5.10.1 has Module::Build built-in
 PROVIDES += "libmodule-build-perl"
@@ -224,6 +224,13 @@  do_stage() {
         install config.sh ${STAGING_LIBDIR}/perl/
         # target configuration, used by native perl when cross-compiling
         install lib/Config_heavy.pl ${STAGING_LIBDIR_NATIVE}/perl/${PV}/Config_heavy-${TARGET_SYS}.pl
+	sed -r -i \
+		-e "s,^(archlib=).*$,\1'${STAGING_LIBDIR}/perl/${PV}'," \
+		-e "s,^(archlibexp=).*$,\1'${STAGING_LIBDIR}/perl/${PV}'," \
+		-e "s,^(privlib=).*$,\1'${STAGING_DATADIR}/perl/${PV}'," \
+		-e "s,^(privlibexp=).*$,\1'${STAGING_DATADIR}/perl/${PV}'," \
+		${STAGING_LIBDIR_NATIVE}/perl/${PV}/Config_heavy-${TARGET_SYS}.pl \
+		${STAGING_LIBDIR}/perl/config.sh
 	# target configuration
         install lib/Config.pm       ${STAGING_LIBDIR}/perl/${PV}/
 	install lib/ExtUtils/typemap ${STAGING_DATADIR}/perl/${PV}/ExtUtils/