]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cpan.bbclass: Fix config error while patches to Makefile.PL
authorXin Ouyang <Xin.Ouyang@windriver.com>
Thu, 31 May 2012 07:46:12 +0000 (15:46 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 5 Jun 2012 21:50:01 +0000 (22:50 +0100)
If there is a patch to Makefile.PL, a Makefile.PL but no Makefile
will be placed in ${B}/.pc/xxx.patch/ after do_patch.
And no Makefile will be generated for *this* Makefile.PL.
While do_configure, the original code tries to sed Makefiles
matching with each Makefile.PL in {B}, so this would fail.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
meta/classes/cpan.bbclass

index 587e688bc284723e00cb5a7120477f7a147301b3..2e9432c0bb67bb306db4e25b348b2a9b33d37992 100644 (file)
@@ -23,6 +23,7 @@ cpan_do_configure () {
                # Use find since there can be a Makefile generated for each Makefile.PL
                for f in `find -name Makefile.PL`; do
                        f2=`echo $f | sed -e 's/.PL//'`
+                       test -f $f2 || continue
                        sed -i -e "s:\(PERL_ARCHLIB = \).*:\1${PERL_ARCHLIB}:" \
                                -e 's/perl.real/perl/' \
                                $f2