aboutsummaryrefslogtreecommitdiffstats
path: root/packages/perl
diff options
context:
space:
mode:
authorJamie Lenehan <lenehan@twibble.org>2007-04-26 08:05:52 +0000
committerJamie Lenehan <lenehan@twibble.org>2007-04-26 08:05:52 +0000
commit0c0263c009bf9be6ffe9192d3e3c468a081e6382 (patch)
tree671f553b78982f1618719db46482350424b343a9 /packages/perl
parent17bf542a4ab65015d5d10c9fbbe7759294d4821c (diff)
downloadopenembedded-0c0263c009bf9be6ffe9192d3e3c468a081e6382.tar.gz
perl 5.8.8: Minor updates to the packaging:
* don't install packlists - we don't need them and it saves space (debian patch) * don't split POSIX module over perl and perl-arch dirs (debian patch) * add a -doc package and put all the random documentation and examples from the perl tree in it. * include all the .pod's from over the tree in the .pod package * include the .e2x files in the encode package
Diffstat (limited to 'packages/perl')
-rw-r--r--packages/perl/perl-5.8.8/09_fix_installperl.patch32
-rw-r--r--packages/perl/perl-5.8.8/52_debian_extutils_hacks.patch234
-rw-r--r--packages/perl/perl_5.8.8.bb42
3 files changed, 301 insertions, 7 deletions
diff --git a/packages/perl/perl-5.8.8/09_fix_installperl.patch b/packages/perl/perl-5.8.8/09_fix_installperl.patch
new file mode 100644
index 0000000000..f550537d02
--- /dev/null
+++ b/packages/perl/perl-5.8.8/09_fix_installperl.patch
@@ -0,0 +1,32 @@
+Correctly identify arch-specific modules in ext/ where the .pm files
+are under lib.
+
+Ensure that POSIX/SigAction is kept with the rest of the POSIX module
+under archlib.
+
+diff --exclude=debian -Naur perl-5.8.8.orig/installperl perl-5.8.8/installperl
+--- perl-5.8.8.orig/installperl 2006-01-29 02:35:28.000000000 +1100
++++ perl-5.8.8/installperl 2006-05-31 22:54:41.000000000 +1000
+@@ -156,11 +156,8 @@
+ if ("$File::Find::dir/$_" =~ m{^ext\b(.*)/([^/]+)\.pm$}) {
+ my($path, $modname) = ($1,$2);
+
+- # strip trailing component first
+- $path =~ s{/[^/]*$}{};
+-
+- # strip optional "/lib";
+- $path =~ s{/lib\b}{};
++ # strip to optional "/lib", or remove trailing component
++ $path =~ s{.*/lib\b}{} or $path =~ s{/[^/]*$}{};
+
+ # strip any leading /
+ $path =~ s{^/}{};
+@@ -851,7 +848,7 @@
+ }
+
+ if (-f $_) {
+- if (/\.(?:al|ix)$/ && !($dir =~ m[^auto/(.*)$] && $archpms{$1})) {
++ if (/\.(?:al|ix)$/ && !($dir =~ m[^auto/(.*)$])) {
+ $installlib = $installprivlib;
+ #We're installing *.al and *.ix files into $installprivlib,
+ #but we have to delete old *.al and *.ix files from the 5.000
diff --git a/packages/perl/perl-5.8.8/52_debian_extutils_hacks.patch b/packages/perl/perl-5.8.8/52_debian_extutils_hacks.patch
new file mode 100644
index 0000000000..8a964f9338
--- /dev/null
+++ b/packages/perl/perl-5.8.8/52_debian_extutils_hacks.patch
@@ -0,0 +1,234 @@
+Various debian-specific ExtUtils changes:
+
+ * Respect umask during installation, and set as appropriate for each of
+ perl, vendor and site (policy requires group writable site dirs).
+
+ * Don't install .packlist or perllocal.pod for perl or vendor.
+ * Fiddle with *PREFIX and variables written to the makefile so that
+ install directories may be changed when make is run by passing
+ PREFIX= to the "make install" command (used when packaging
+ modules).
+
+ * Set location of libperl.a to /usr/lib.
+ * Note that libperl-dev package is required for embedded linking.
+
+diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/Embed.pm perl-5.8.8/lib/ExtUtils/Embed.pm
+--- perl-5.8.8.orig/lib/ExtUtils/Embed.pm 2004-08-03 20:41:49.000000000 +1000
++++ perl-5.8.8/lib/ExtUtils/Embed.pm 2006-02-05 10:42:11.000000000 +1100
+@@ -300,6 +300,9 @@
+ Typically, an application B<Makefile> will invoke ExtUtils::Embed
+ functions while building your application.
+
++Note that on Debian systems the B<libperl-dev> package is required for
++compiling applications which embed an interpreter.
++
+ =head1 @EXPORT
+
+ ExtUtils::Embed exports the following functions:
+diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/Install.pm perl-5.8.8/lib/ExtUtils/Install.pm
+--- perl-5.8.8.orig/lib/ExtUtils/Install.pm 2005-10-21 22:00:01.000000000 +1000
++++ perl-5.8.8/lib/ExtUtils/Install.pm 2006-02-05 10:42:11.000000000 +1100
+@@ -173,8 +173,8 @@
+ if (-f $targetfile){
+ forceunlink($targetfile) unless $nonono;
+ } else {
+- mkpath($targetdir,0,0755) unless $nonono;
+- print "mkpath($targetdir,0,0755)\n" if $verbose>1;
++ mkpath($targetdir) unless $nonono;
++ print "mkpath($targetdir)\n" if $verbose>1;
+ }
+ copy($sourcefile, $targetfile) unless $nonono;
+ print "Installing $targetfile\n";
+diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/MM_Any.pm perl-5.8.8/lib/ExtUtils/MM_Any.pm
+--- perl-5.8.8.orig/lib/ExtUtils/MM_Any.pm 2005-04-13 17:49:53.000000000 +1000
++++ perl-5.8.8/lib/ExtUtils/MM_Any.pm 2006-02-05 11:17:52.000000000 +1100
+@@ -645,8 +645,6 @@
+ sub manifypods_target {
+ my($self) = shift;
+
+- my $man1pods = '';
+- my $man3pods = '';
+ my $dependencies = '';
+
+ # populate manXpods & dependencies:
+@@ -666,7 +664,7 @@
+ foreach my $section (qw(1 3)) {
+ my $pods = $self->{"MAN${section}PODS"};
+ push @man_cmds, $self->split_command(<<CMD, %$pods);
+- \$(NOECHO) \$(POD2MAN) --section=$section --perm_rw=\$(PERM_RW)
++ \$(NOECHO) \$(POD2MAN) --section=\$(MAN${section}EXT) --perm_rw=\$(PERM_RW)
+ CMD
+ }
+
+@@ -1080,9 +1078,11 @@
+ $self->{SITEPREFIX} ||= $sprefix;
+ $self->{VENDORPREFIX} ||= $vprefix;
+
+- # Lots of MM extension authors like to use $(PREFIX) so we
+- # put something sensible in there no matter what.
+- $self->{PREFIX} = '$('.uc $self->{INSTALLDIRS}.'PREFIX)';
++ my $p = $self->{PREFIX} = $self->{PERLPREFIX};
++ for my $t (qw/PERL SITE VENDOR/)
++ {
++ $self->{"${t}PREFIX"} =~ s!^\Q$p\E(?=/|$)!\$(PREFIX)!;
++ }
+ }
+
+ my $arch = $Config{archname};
+diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/MM_Unix.pm perl-5.8.8/lib/ExtUtils/MM_Unix.pm
+--- perl-5.8.8.orig/lib/ExtUtils/MM_Unix.pm 2005-05-21 19:42:56.000000000 +1000
++++ perl-5.8.8/lib/ExtUtils/MM_Unix.pm 2006-02-05 17:40:19.000000000 +1100
+@@ -2054,9 +2054,7 @@
+ $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
+
+ pure_perl_install ::
+- $(NOECHO) $(MOD_INSTALL) \
+- read }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \
+- write }.$self->catfile('$(DESTINSTALLARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \
++ $(NOECHO) umask 022; $(MOD_INSTALL) \
+ $(INST_LIB) $(DESTINSTALLPRIVLIB) \
+ $(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \
+ $(INST_BIN) $(DESTINSTALLBIN) \
+@@ -2068,7 +2066,7 @@
+
+
+ pure_site_install ::
+- $(NOECHO) $(MOD_INSTALL) \
++ $(NOECHO) umask 02; $(MOD_INSTALL) \
+ read }.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \
+ write }.$self->catfile('$(DESTINSTALLSITEARCH)','auto','$(FULLEXT)','.packlist').q{ \
+ $(INST_LIB) $(DESTINSTALLSITELIB) \
+@@ -2081,9 +2079,7 @@
+ }.$self->catdir('$(PERL_ARCHLIB)','auto','$(FULLEXT)').q{
+
+ pure_vendor_install ::
+- $(NOECHO) $(MOD_INSTALL) \
+- read }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \
+- write }.$self->catfile('$(DESTINSTALLVENDORARCH)','auto','$(FULLEXT)','.packlist').q{ \
++ $(NOECHO) umask 022; $(MOD_INSTALL) \
+ $(INST_LIB) $(DESTINSTALLVENDORLIB) \
+ $(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \
+ $(INST_BIN) $(DESTINSTALLVENDORBIN) \
+@@ -2092,37 +2088,19 @@
+ $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR)
+
+ doc_perl_install ::
+- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+- -$(NOECHO) $(DOC_INSTALL) \
+- "Module" "$(NAME)" \
+- "installed into" "$(INSTALLPRIVLIB)" \
+- LINKTYPE "$(LINKTYPE)" \
+- VERSION "$(VERSION)" \
+- EXE_FILES "$(EXE_FILES)" \
+- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
+
+ doc_site_install ::
+- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+- -$(NOECHO) $(DOC_INSTALL) \
++ $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLSITEARCH)/perllocal.pod
++ -$(NOECHO) umask 02; $(MKPATH) $(DESTINSTALLSITEARCH)
++ -$(NOECHO) umask 02; $(DOC_INSTALL) \
+ "Module" "$(NAME)" \
+ "installed into" "$(INSTALLSITELIB)" \
+ LINKTYPE "$(LINKTYPE)" \
+ VERSION "$(VERSION)" \
+ EXE_FILES "$(EXE_FILES)" \
+- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
++ >> }.$self->catfile('$(DESTINSTALLSITEARCH)','perllocal.pod').q{
+
+ doc_vendor_install ::
+- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+- -$(NOECHO) $(DOC_INSTALL) \
+- "Module" "$(NAME)" \
+- "installed into" "$(INSTALLVENDORLIB)" \
+- LINKTYPE "$(LINKTYPE)" \
+- VERSION "$(VERSION)" \
+- EXE_FILES "$(EXE_FILES)" \
+- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
+
+ };
+
+@@ -2131,13 +2109,12 @@
+ $(NOECHO) $(NOOP)
+
+ uninstall_from_perldirs ::
+- $(NOECHO) $(UNINSTALL) }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{
+
+ uninstall_from_sitedirs ::
+ $(NOECHO) $(UNINSTALL) }.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{
+
+ uninstall_from_vendordirs ::
+- $(NOECHO) $(UNINSTALL) }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{
++
+ };
+
+ join("",@m);
+@@ -2415,7 +2392,7 @@
+ ($lperl = $libperl) =~ s/\$\(A\)/$self->{LIB_EXT}/;
+ }
+ unless ($libperl && -f $lperl) { # Ilya's code...
+- my $dir = $self->{PERL_SRC} || "$self->{PERL_ARCHLIB}/CORE";
++ my $dir = $self->{PERL_SRC} || "/usr/lib";
+ $dir = "$self->{PERL_ARCHLIB}/.." if $self->{UNINSTALLED_PERL};
+ $libperl ||= "libperl$self->{LIB_EXT}";
+ $libperl = "$dir/$libperl";
+@@ -3007,8 +2984,7 @@
+ print STDERR " prefixify $var => $path\n" if $Verbose >= 2;
+ print STDERR " from $sprefix to $rprefix\n" if $Verbose >= 2;
+
+- if( $self->{ARGS}{PREFIX} && $self->file_name_is_absolute($path) &&
+- $path !~ s{^\Q$sprefix\E\b}{$rprefix}s )
++ if( $path !~ s{^\Q$sprefix\E\b}{$rprefix}s && $self->{ARGS}{PREFIX} )
+ {
+
+ print STDERR " cannot prefix, using default.\n" if $Verbose >= 2;
+diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/t/INST.t perl-5.8.8/lib/ExtUtils/t/INST.t
+--- perl-5.8.8.orig/lib/ExtUtils/t/INST.t 2005-10-21 19:12:39.000000000 +1000
++++ perl-5.8.8/lib/ExtUtils/t/INST.t 2006-02-05 17:48:56.000000000 +1100
+@@ -65,9 +65,7 @@
+ is( $mm->{NAME}, 'Big::Dummy', 'NAME' );
+ is( $mm->{VERSION}, 0.01, 'VERSION' );
+
+-my $config_prefix = $Config{installprefixexp} || $Config{installprefix} ||
+- $Config{prefixexp} || $Config{prefix};
+-is( $mm->{PERLPREFIX}, $config_prefix, 'PERLPREFIX' );
++is( $mm->{PERLPREFIX}, '$(PREFIX)', 'PERLPREFIX' );
+
+ is( !!$mm->{PERL_CORE}, !!$ENV{PERL_CORE}, 'PERL_CORE' );
+
+diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/t/INST_PREFIX.t perl-5.8.8/lib/ExtUtils/t/INST_PREFIX.t
+--- perl-5.8.8.orig/lib/ExtUtils/t/INST_PREFIX.t 2005-10-21 22:00:19.000000000 +1000
++++ perl-5.8.8/lib/ExtUtils/t/INST_PREFIX.t 2006-02-05 17:48:06.000000000 +1100
+@@ -16,7 +16,7 @@
+ }
+
+ use strict;
+-use Test::More tests => 52;
++use Test::More tests => 47;
+ use MakeMaker::Test::Utils;
+ use MakeMaker::Test::Setup::BFD;
+ use ExtUtils::MakeMaker;
+@@ -62,16 +62,16 @@
+ Writing\ $Makefile\ for\ Big::Dummy\n
+ }x );
+
+-is( $mm->{PREFIX}, '$(SITEPREFIX)', 'PREFIX set based on INSTALLDIRS' );
++#is( $mm->{PREFIX}, '$(SITEPREFIX)', 'PREFIX set based on INSTALLDIRS' );
+
+ isa_ok( $mm, 'ExtUtils::MakeMaker' );
+
+ is( $mm->{NAME}, 'Big::Dummy', 'NAME' );
+ is( $mm->{VERSION}, 0.01, 'VERSION' );
+
+-foreach my $prefix (qw(PREFIX PERLPREFIX SITEPREFIX VENDORPREFIX)) {
+- unlike( $mm->{$prefix}, qr/\$\(PREFIX\)/ );
+-}
++#foreach my $prefix (qw(PREFIX PERLPREFIX SITEPREFIX VENDORPREFIX)) {
++# unlike( $mm->{$prefix}, qr/\$\(PREFIX\)/ );
++#}
+
+
+ my $PREFIX = File::Spec->catdir('foo', 'bar');
diff --git a/packages/perl/perl_5.8.8.bb b/packages/perl/perl_5.8.8.bb
index 68b7d6f62b..d4124cda9a 100644
--- a/packages/perl/perl_5.8.8.bb
+++ b/packages/perl/perl_5.8.8.bb
@@ -5,7 +5,7 @@ LICENSE = "Artistic|GPL"
PRIORITY = "optional"
# We need gnugrep (for -I)
DEPENDS = "virtual/db perl-native grep-native"
-PR = "r5"
+PR = "r6"
# Major part of version
PVM = "5.8"
@@ -18,6 +18,8 @@ SRC_URI = "ftp://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \
file://perl-dynloader.patch;patch=1 \
file://perl-moreconfig.patch;patch=1 \
file://generate-sh.patch;patch=1 \
+ file://09_fix_installperl.patch;patch=1 \
+ file://52_debian_extutils_hacks.patch;patch=1 \
file://53_debian_mod_paths.patch;patch=1 \
file://54_debian_perldoc-r.patch;patch=1 \
file://58_debian_cpan_config_path.patch;patch=1 \
@@ -103,7 +105,10 @@ do_install() {
mv ${D}/${libdir}/perl/${PVM} ${D}/${libdir}/perl/${PV}
mv ${D}/${datadir}/perl/${PVM} ${D}/${datadir}/perl/${PV}
ln -sf ${PV} ${D}/${libdir}/perl/${PVM}
- ln -sf ${PV} ${D}/${datadir}/perl/${PVM}
+ ln -sf ${PV} ${D}/${datadir}/perl/${PVM}
+
+ # Remove unwanted file
+ rm -f ${D}/${libdir}/perl/${PV}/.packlist
# Fix up shared library
mv -f ${D}/${libdir}/perl/${PV}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV}
@@ -123,11 +128,14 @@ do_stage() {
install config.sh ${STAGING_DIR}/${HOST_SYS}/perl/
}
-PACKAGES = "perl-dbg perl perl-misc perl-lib perl-dev perl-pod"
+PACKAGES = "perl-dbg perl perl-misc perl-lib perl-dev perl-pod perl-doc"
FILES_${PN} = "${bindir}/perl ${bindir}/perl${PV}"
FILES_${PN}-lib = "${libdir}/libperl.so* ${libdir}/perl/${PVM} ${datadir}/perl/${PVM}"
FILES_${PN}-dev = "${libdir}/perl/${PV}/CORE"
-FILES_${PN}-pod = "${datadir}/perl/${PV}/pod"
+FILES_${PN}-pod = "${datadir}/perl/${PV}/pod \
+ ${datadir}/perl/${PV}/*/*.pod \
+ ${datadir}/perl/${PV}/*/*/*.pod \
+ ${libdir}/perl/${PV}/*.pod"
FILES_perl-misc = "${bindir}/*"
FILES_${PN}-dbg += "${libdir}/perl/${PV}/auto/*/.debug \
${libdir}/perl/${PV}/auto/*/*/.debug \
@@ -136,6 +144,26 @@ FILES_${PN}-dbg += "${libdir}/perl/${PV}/auto/*/.debug \
${datadir}/perl/${PV}/auto/*/*/.debug \
${datadir}/perl/${PV}/auto/*/*/*/.debug \
${libdir}/perl/${PV}/CORE/.debug"
+FILES_${PN}-doc = "${datadir}/perl/${PV}/*/*.txt \
+ ${datadir}/perl/${PV}/*/*/*.txt \
+ ${datadir}/perl/${PV}/Net/*.eg \
+ ${datadir}/perl/${PV}/CGI/eg \
+ ${datadir}/perl/${PV}/ExtUtils/PATCHING \
+ ${datadir}/perl/${PV}/ExtUtils/NOTES \
+ ${datadir}/perl/${PV}/ExtUtils/typemap \
+ ${datadir}/perl/${PV}/ExtUtils/MANIFEST.SKIP \
+ ${datadir}/perl/${PV}/CPAN/SIGNATURE \
+ ${datadir}/perl/${PV}/CPAN/PAUSE2003.pub \
+ ${datadir}/perl/${PV}/B/assemble \
+ ${datadir}/perl/${PV}/B/makeliblinks \
+ ${datadir}/perl/${PV}/B/disassemble \
+ ${datadir}/perl/${PV}/B/cc_harness \
+ ${datadir}/perl/${PV}/ExtUtils/xsubpp \
+ ${datadir}/perl/${PV}/Encode/encode.h \
+ ${datadir}/perl/${PV}/unicore/mktables \
+ ${datadir}/perl/${PV}/unicore/mktables.lst \
+ ${datadir}/perl/${PV}/unicore/version"
+
DEBIAN_NOAUTONAME_perl-lib = "1"
RPROVIDES_perl-lib = "perl-lib"
@@ -143,15 +171,15 @@ RPROVIDES_perl-lib = "perl-lib"
# packages (actually the non modules packages and not created too)
ALLOW_EMPTY_perl-modules = "1"
PACKAGES_append = " perl-modules "
-RRECOMMENDS_perl-modules = "${@bb.data.getVar('PACKAGES', d, 1).replace('perl-modules ', '').replace('perl-dbg ', '').replace('perl-misc ', '').replace('perl-dev ', '').replace('perl-pod ', '')}"
+RRECOMMENDS_perl-modules = "${@bb.data.getVar('PACKAGES', d, 1).replace('perl-modules ', '').replace('perl-dbg ', '').replace('perl-misc ', '').replace('perl-dev ', '').replace('perl-pod ', '').replace('perl-doc ', '')}"
python populate_packages_prepend () {
libdir = bb.data.expand('${libdir}/perl/${PV}', d)
do_split_packages(d, libdir, 'auto/(.*)(?!\.debug)/', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
- do_split_packages(d, libdir, '(.*)\.(pm|pl)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
+ do_split_packages(d, libdir, '(.*)\.(pm|pl|e2x)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
datadir = bb.data.expand('${datadir}/perl/${PV}', d)
do_split_packages(d, datadir, 'auto/(.*)(?!\.debug)/', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
- do_split_packages(d, datadir, '(.*)\.(pm|pl)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
+ do_split_packages(d, datadir, '(.*)\.(pm|pl|e2x)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
}
require perl-rdepends_${PV}.inc