summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2012-06-04 13:47:44 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-18 17:33:04 +0100
commite0a70547069fe7e8a2d6bdaffc985fb172d46c31 (patch)
treef3619beaea7feec3fa9ac101b66676460811cd43 /meta/recipes-devtools
parent83b53d32eb57c644d5a03a4b278d717a81ca7375 (diff)
downloadpoky-e0a70547069fe7e8a2d6bdaffc985fb172d46c31.tar.gz
perl: Allow perl to cross build and native build in a directory named "t"
If any directory in leading up to your tmp directory has the name "t" perl will fail to build with a very cryptic error shown below: pod/buildtoc: no pods at pod/buildtoc line 305. make[1]: *** [pod/perltoc.pod] Error 255 This is a result of the perl file checking making an assumption that it is only looking at files and directories with in the perl source directory. This assumption fails with the way bitbake sets up perl to properly cross compile. (From OE-Core rev: f8a054aca9962ebfd4c74fc1d34cd684de6b3568) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/perl/perl-5.14.2/perl-build-in-t-dir.patch42
-rw-r--r--meta/recipes-devtools/perl/perl-native_5.14.2.bb5
-rw-r--r--meta/recipes-devtools/perl/perl_5.14.2.bb3
3 files changed, 47 insertions, 3 deletions
diff --git a/meta/recipes-devtools/perl/perl-5.14.2/perl-build-in-t-dir.patch b/meta/recipes-devtools/perl/perl-5.14.2/perl-build-in-t-dir.patch
new file mode 100644
index 0000000000..16064ede92
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.14.2/perl-build-in-t-dir.patch
@@ -0,0 +1,42 @@
1Upstream-Status:Pending
2
3Perl cannot cross build in a path containing a directory that has the
4name of "t". As an example, you can make the perl build fail with
5"mkdir -p /tmp/build/t", go to the directory, unpack the sources,
6configure and cross build.
7
8You get an error like the following:
9 pod/buildtoc: no pods at pod/buildtoc line 305.
10 make[1]: *** [pod/perltoc.pod] Error 255
11
12The fix is to strip off the top directory that you are building in and
13then execute all the same logic as before against the path relative to
14the build directory.
15
16Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
17---
18 pod/buildtoc | 4 +++-
19 1 file changed, 3 insertions(+), 1 deletion(-)
20
21--- a/pod/buildtoc
22+++ b/pod/buildtoc
23@@ -274,8 +274,10 @@ if ($Build{toc}) {
24 find \&getpods => abs_from_top('lib/');
25
26 sub getpods {
27+ my $Top = $FindBin::Bin;
28 if (/\.p(od|m)$/) {
29 my $file = $File::Find::name;
30+ $file =~ s!^$Top!!;
31 return if $file =~ qr!/lib/Pod/Functions.pm\z!; # Used only by pod itself
32 return if $file =~ m!(?:^|/)t/!;
33 return if $file =~ m!lib/Attribute/Handlers/demo/!;
34@@ -283,7 +285,7 @@ if ($Build{toc}) {
35 return if $file =~ m!lib/Math/BigInt/t/!;
36 return if $file =~ m!/Devel/PPPort/[Hh]arness|lib/Devel/Harness!i;
37 return if $file =~ m!XS/(?:APItest|Typemap)!;
38- my $pod = $file;
39+ my $pod = $file = $File::Find::name;
40 return if $pod =~ s/pm$/pod/ && -e $pod;
41 unless (open my $f, '<', $_) {
42 warn "$0: bogus <$file>: $!";
diff --git a/meta/recipes-devtools/perl/perl-native_5.14.2.bb b/meta/recipes-devtools/perl/perl-native_5.14.2.bb
index c904c377ac..df8f0584ad 100644
--- a/meta/recipes-devtools/perl/perl-native_5.14.2.bb
+++ b/meta/recipes-devtools/perl/perl-native_5.14.2.bb
@@ -4,7 +4,7 @@ SECTION = "libs"
4LICENSE = "Artistic-1.0 | GPL-1.0" 4LICENSE = "Artistic-1.0 | GPL-1.0"
5LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \ 5LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
6 file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8" 6 file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8"
7PR = "r0" 7PR = "r1"
8 8
9LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \ 9LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
10 file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8" 10 file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8"
@@ -14,7 +14,8 @@ SRC_URI = "http://www.cpan.org/src/5.0/perl-${PV}.tar.gz \
14 file://perl-configpm-switch.patch \ 14 file://perl-configpm-switch.patch \
15 file://native-nopacklist.patch \ 15 file://native-nopacklist.patch \
16 file://native-perlinc.patch \ 16 file://native-perlinc.patch \
17 file://MM_Unix.pm.patch" 17 file://MM_Unix.pm.patch \
18 file://perl-build-in-t-dir.patch"
18 19
19SRC_URI[md5sum] = "3306fbaf976dcebdcd49b2ac0be00eb9" 20SRC_URI[md5sum] = "3306fbaf976dcebdcd49b2ac0be00eb9"
20SRC_URI[sha256sum] = "6488359573bd7d41761bf935f66f827dc220fb3df961ef9b775d51fbd66548d3" 21SRC_URI[sha256sum] = "6488359573bd7d41761bf935f66f827dc220fb3df961ef9b775d51fbd66548d3"
diff --git a/meta/recipes-devtools/perl/perl_5.14.2.bb b/meta/recipes-devtools/perl/perl_5.14.2.bb
index 809fc72d33..2452a4407e 100644
--- a/meta/recipes-devtools/perl/perl_5.14.2.bb
+++ b/meta/recipes-devtools/perl/perl_5.14.2.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
7# We need gnugrep (for -I) 7# We need gnugrep (for -I)
8DEPENDS = "virtual/db grep-native" 8DEPENDS = "virtual/db grep-native"
9DEPENDS += "gdbm zlib" 9DEPENDS += "gdbm zlib"
10PR = "r6" 10PR = "r7"
11 11
12# 5.10.1 has Module::Build built-in 12# 5.10.1 has Module::Build built-in
13PROVIDES += "libmodule-build-perl" 13PROVIDES += "libmodule-build-perl"
@@ -65,6 +65,7 @@ SRC_URI = "http://www.cpan.org/src/5.0/perl-${PV}.tar.gz \
65 file://perl-enable-gdbm.patch \ 65 file://perl-enable-gdbm.patch \
66 file://cross-generate_uudmap.patch \ 66 file://cross-generate_uudmap.patch \
67 file://fix_bad_rpath.patch \ 67 file://fix_bad_rpath.patch \
68 file://perl-build-in-t-dir.patch \
68 \ 69 \
69 file://config.sh \ 70 file://config.sh \
70 file://config.sh-32 \ 71 file://config.sh-32 \