Commit Graph

24 Commits

Author SHA1 Message Date
Jens Rehsack 2d0c4999a7 perl: fix Perl5 module builds
This patch fixes some issues in classes providing cpan module build support:

* add support even for xs modules with more than 3 levels as
  B::Hooks::End::Of::Scope or Math::Random::ISAAC::XS
* correct handling of Module::Build (as far as stolen from pkgsrc
  and my humble knowledge)
* configure to install to vendor_libs as default, even when
  inherited do_install remains unused (overwritten do_install)

(From OE-Core rev: 6948d2bd35cda57f520f0180a6bb43cc70262f41)

Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-29 07:31:17 +00:00
Robert Yang 9c0d4f5ba2 cpan.bbclass: matches more lines
Fixed:
- There might be a space between "#!" and "/pat/to/usr/bin/perl", e.g.:
  "#! /usr/bin/perl", now also matches it.

- There might be the lines like the following in the body:
  eval 'exec /path/to/usr/bin/perl-native/perl -S $0 ${1+"$@"}'

  Now we only check "#! */path/to/usr/bin/perl" to make sure it is a
  perl script, but match and fix the lines in both header and body.

(From OE-Core rev: 0d2e2ac137465885a1d55103010ccfdec579f1ce)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28 15:12:43 +01:00
Olof Johansson b71aa9758a cpan.bbclass: Fail unless Makefile.PL generates Makefile
Makefile.PLs can exit with success without generating a Makefile,
e.g. in cases of missing configure time dependencies. This is
considered a best practice by cpantesters.org. See:

 * http://wiki.cpantesters.org/wiki/CPANAuthorNotes
 * http://www.nntp.perl.org/group/perl.qa/2008/08/msg11236.html

(From OE-Core rev: 0a2dffefc6fbca37ce9604117cebc2f7d4abc1c6)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29 13:08:59 +01:00
Marcin Juszkiewicz 3e79775a82 cpan.bbclass: use '|' as sed separator for entry with paths
With normal toolchain it works. But fails badly when external Linaro
toolchain is used. And this is why:

-e "s/^\(CCFLAGS =.*\)/\1  -isystem/home/hrw/devel/canonical/aarch64/openembedded/build/linaro-tcwg/gcc-linaro-aarch64-linux-gnu-4.7-2013.04-20130415_linux//aarch64-linux-gnu/include  -O2 -pipe -g -feliminate-unused-debug-types/" \

(From OE-Core rev: f6244a9d3da7c301f19efc114c2aaf39e5eec299)

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-29 14:45:06 +01:00
Xin Ouyang a5bb0bdcf0 cpan.bbclass: Fix CCFLAGS.
We should not just replace CCFLAGS with CFLAGS while compiling, because
this may cause run-time errors with perl's DynaLoader.pm.

Tested on qemux86 with new libnet-libidn-perl bb recipe:

root@qemux86:~# perl -e "use Net::LibIDN"
Not a CODE reference at /usr/lib/perl/5.14.2//DynaLoader.pm line 213.
END failed--call queue aborted at /usr/lib/perl/vendor_perl/5.14.2//Net/LibIDN.pm line 213.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

(From OE-Core rev: 855211ae7a224f96663862d4a0e58a90d945dd48)

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-17 10:53:56 +01:00
Xin Ouyang d0fac332cf cpan.bbclass: Fix config error while patches to Makefile.PL
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.

(From OE-Core rev: 7c99105d70a16aa9e42429224abed28743e627b2)

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-05 22:56:30 +01:00
Saul Wold 4669760ac1 cpan.bbclass: fix native perl issue
(From OE-Core rev: acfe8c657dd2496ae8669ce69def96a0b04d061c)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-07 22:54:16 +01:00
Tom Rini 6a52bad2f4 cpan.bbclass: Perform more mangling for perl path
On hosts where we may already be past the #! limit this is required
and this is safe on the target as well.  This is be7fe31 in oe.dev.
Related to this we now bump all PRs for recipes that inherit cpan.
Note that in oe.dev we mangle for perl but here we use the new
nativeperl script.

(From OE-Core rev: 682a213dc732074985bf86f508305fc6eafe18d9)

Signed-off-by: Tom Rini <tom_rini@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-21 10:59:18 +01:00
Dexuan Cui c13b10a6ae cpan.bbclass, cpan-base.bbclas: update them for the perlnative change
Since perl-native now populates into its own dir, here we need
change accordingly.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2011-06-09 16:58:34 +01:00
Nitin A Kamble cd5a32e2ee cpan.bbclass: export PERLHOSTLIB for perl modules
This makes sure that native perl .so can get loaded at the buildtime, and
avoids following kind of errors while building perl modules:

Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/20

+ perl Makefile.PL
EXPATLIBPATH=/disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib
EXPATINCPATH=/disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/include
*** Module name IN:
/disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/Cwd.pm
*** Module name OUT:
/disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/Cwd.pm
*** Module name IN:
/disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/Fcntl.pm
*** Module name OUT:
/disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/Fcntl.pm
Can't load
'/disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/auto/Fcntl/Fcntl.so'
for module Fcntl:
/disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/auto/Fcntl/Fcntl.so:
wrong ELF class: ELFCLASS32 at
/disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/XSLoader.pm
line 79.
 at
/disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/Fcntl.pm
line 215
BEGIN failed--compilation aborted at
/disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/Fcntl.pm
line 216.
Compilation failed in require at
/disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/File/Temp.pm
line 146.
BEGIN failed--compilation aborted at
/disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/File/Temp.pm
line 146.
Compilation failed in require at inc/Devel/CheckLib.pm line 12.
BEGIN failed--compilation aborted at inc/Devel/CheckLib.pm line 12.
Compilation failed in require at Makefile.PL line 5.
BEGIN failed--compilation aborted at Makefile.PL line 5.
ERROR: Function 'do_configure' failed (see
/disk0/pokybuild/build0/tmp/work/i586-poky-linux/libxml-parser-perl-2.40-r0/temp/log.do_configure.16956
for further information)

(From OE-Core rev: 485e41f618286d048162fea0077f314e2ff4f4da)

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-24 22:50:36 +01:00
Nitin A Kamble d52b9ff86d cpan.bbclass: add a new parameter EXTRA_PERLFLAGS
We use host perl while building target perl modules. When some of the
prebuilt perl modules such as scalar::util are used in the build process
directly or indirectly, perl needs to load the arch specific .so library
file. If perl can not find the .so library files, then perl
tries to use the target pm files which ends up in circular perl module
depedancy causing build time perl invocation to fail.

Adding this new parameter viz EXTRA_PERLFLAGS to cpan.bbclass allows perl
module recipes to specify the location of such host .so files for hostperl,
so that build time invocation of perl does not fail.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2011-01-12 00:55:48 -08:00
Nitin A Kamble 83796edd29 cpan.bbclass: use LIBDIR instead of DATADIR
perl 5.12.2 does not use /usr/share/perl path, and all that stuff goes
in /usr/lib/perl. This commit fixes cpan class which depends on
/usr/share/perl.

cpan.base/build.bbclass: change /usr/lib/perl5 to /usr/lib/perl

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2011-01-12 00:55:48 -08:00
Richard Purdie dc807f54f8 Finally deprecate all legacy do_stage functions. This changes the existing warning
into a fatal error if any legacy do_stage functions are found.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-22 11:44:28 +01:00
Richard Purdie ca5f36ee6a perl: Update from OE.dev and convert to use do_install for staging
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-18 20:05:55 +00:00
Richard Purdie 7acfa9467f perl: Standardise config.sh location
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-16 10:56:17 +00:00
Marcin Juszkiewicz 40eb81cc21 cpan.bbclass: remove bashisms
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4153 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-04-01 09:37:34 +00:00
Richard Purdie 4b55118c3c cpan.bbclass: Fix native staging functions (sync with OE.dev)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4063 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-03-19 16:07:05 +00:00
Richard Purdie b17670211a Remove hardcoded staging layout assumptions
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3117 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-11-12 11:10:08 +00:00
Marcin Juszkiewicz 80bab8a5df cpan.bbclass: sync another fix from OE - this time for uclibc mode
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1826 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-05-30 13:47:29 +00:00
Marcin Juszkiewicz 6c47cd48af cpan classes: sync Perl with OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1815 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-05-30 09:32:36 +00:00
Richard Purdie 2ee4cf3f5e cpan.bbclass: Add perl to DEPENDS
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1625 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-05-09 13:50:59 +00:00
Richard Purdie e09dab0614 classes: Sync with OE - mainly quoting fixes or other minor updates
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@885 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-11-20 15:19:39 +00:00
Richard Purdie 93a8d0662e classes: Sync with OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@651 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-08-27 16:01:33 +00:00
Richard Purdie b2f192faab Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-07-21 10:10:31 +00:00