diff mbox

[PATCHv2] git: fix perl binding installation

Message ID 1398335607-12046-1-git-send-email-koen.kooi@linaro.org
State New
Headers show

Commit Message

Koen Kooi April 24, 2014, 10:33 a.m. UTC
Git.pm wasn't ending up in the package because do_install removed it
with a misleading comment about multilib. Fix the problem at the source
so that Git.pm ends up in the correct dir *and* doesn't get deleted.

The perl.mak file gets updated during the regular do_install, so add an
extra make install step to install the *.pm files to the correct
directory.

This is the first step in making git-perltools actually work.

Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
---
 meta/recipes-devtools/git/git.inc | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

Comments

Richard Purdie April 24, 2014, 4:18 p.m. UTC | #1
On Thu, 2014-04-24 at 12:33 +0200, Koen Kooi wrote:
> Git.pm wasn't ending up in the package because do_install removed it
> with a misleading comment about multilib. Fix the problem at the source
> so that Git.pm ends up in the correct dir *and* doesn't get deleted.
> 
> The perl.mak file gets updated during the regular do_install, so add an
> extra make install step to install the *.pm files to the correct
> directory.
> 
> This is the first step in making git-perltools actually work.
> 
> Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
> ---
>  meta/recipes-devtools/git/git.inc | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/git/git.inc b/meta/recipes-devtools/git/git.inc
> index f5013f1..aa9ca28 100644
> --- a/meta/recipes-devtools/git/git.inc
> +++ b/meta/recipes-devtools/git/git.inc
> @@ -23,15 +23,24 @@ do_compile_prepend () {
>  	rm -f perl/perl.mak
>  }
>  
> +# The perl portion fails with -j16
> +PARALLEL_MAKEINST = ""
> +
>  do_install () {
>  	oe_runmake install DESTDIR="${D}" bindir=${bindir} \
>  		template_dir=${datadir}/git-core/templates \
>  		GIT_PYTHON_DIR=${D}${datadir}/git-core/python
>  
> +	sed -i -e 's#${STAGING_BINDIR_NATIVE}/perl-native/#${bindir}/#' \
> +	       -e 's#${STAGING_LIBDIR_NATIVE}/#${libdir}/#' \
> +	       -e 's#/lib/perl-native#/lib#g' \
> +	       ${S}/perl/perl.mak

Does this break git-native?

Cheers,

Richard

> +	cd ${S}/perl && oe_runmake install DESTDIR="${D}" bindir=${bindir}
> +
>  	# ${libdir} is not applicable here, perl-native files are always
>  	# installed to /usr/lib on both 32/64 bits targets.
>  	rm -rf ${D}${exec_prefix}/lib/perl-native
> -	rmdir ${D}${exec_prefix}/lib || true
>  }
>  
>  PERLSEDFIXUP = " \
> @@ -75,6 +84,7 @@ PERLTOOLS = " \
>  PACKAGES =+ "${PN}-perltools"
>  FILES_${PN}-perltools += " \
>      ${PERLTOOLS} \
> +    ${prefix}/lib/perl \
>      ${datadir}/perl \
>  "
>  RDEPENDS_${PN}-perltools = "${PN} perl perl-module-file-path findutils"
> -- 
> 1.9.0
>
diff mbox

Patch

diff --git a/meta/recipes-devtools/git/git.inc b/meta/recipes-devtools/git/git.inc
index f5013f1..aa9ca28 100644
--- a/meta/recipes-devtools/git/git.inc
+++ b/meta/recipes-devtools/git/git.inc
@@ -23,15 +23,24 @@  do_compile_prepend () {
 	rm -f perl/perl.mak
 }
 
+# The perl portion fails with -j16
+PARALLEL_MAKEINST = ""
+
 do_install () {
 	oe_runmake install DESTDIR="${D}" bindir=${bindir} \
 		template_dir=${datadir}/git-core/templates \
 		GIT_PYTHON_DIR=${D}${datadir}/git-core/python
 
+	sed -i -e 's#${STAGING_BINDIR_NATIVE}/perl-native/#${bindir}/#' \
+	       -e 's#${STAGING_LIBDIR_NATIVE}/#${libdir}/#' \
+	       -e 's#/lib/perl-native#/lib#g' \
+	       ${S}/perl/perl.mak
+
+	cd ${S}/perl && oe_runmake install DESTDIR="${D}" bindir=${bindir}
+
 	# ${libdir} is not applicable here, perl-native files are always
 	# installed to /usr/lib on both 32/64 bits targets.
 	rm -rf ${D}${exec_prefix}/lib/perl-native
-	rmdir ${D}${exec_prefix}/lib || true
 }
 
 PERLSEDFIXUP = " \
@@ -75,6 +84,7 @@  PERLTOOLS = " \
 PACKAGES =+ "${PN}-perltools"
 FILES_${PN}-perltools += " \
     ${PERLTOOLS} \
+    ${prefix}/lib/perl \
     ${datadir}/perl \
 "
 RDEPENDS_${PN}-perltools = "${PN} perl perl-module-file-path findutils"