summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-11-18 20:05:55 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-11-18 20:05:55 +0000
commitca5f36ee6ad756e1e540288a56a504c1d8ecc7a3 (patch)
tree9ad90f44e75c449f54f30bb702aa797ee8083a78 /meta
parent06685d7558891dc50b439cf82c394cfadc3ee1d4 (diff)
downloadpoky-ca5f36ee6ad756e1e540288a56a504c1d8ecc7a3.tar.gz
perl: Update from OE.dev and convert to use do_install for staging
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/cpan-base.bbclass13
-rw-r--r--meta/classes/cpan.bbclass48
-rw-r--r--meta/classes/cpan_build.bbclass25
-rw-r--r--meta/packages/perl/files/perl-5.8.8-gcc-4.2.patch2
-rw-r--r--meta/packages/perl/libxml-parser-perl-native_2.36.bb (renamed from meta/packages/perl/libxml-parser-perl-native_2.34.bb)6
-rw-r--r--meta/packages/perl/libxml-parser-perl_2.36.bb (renamed from meta/packages/perl/libxml-parser-perl_2.34.bb)8
-rw-r--r--meta/packages/perl/perl-5.8.8/Makefile.SH.patch4
-rw-r--r--meta/packages/perl/perl-5.8.8/config.sh87
-rw-r--r--meta/packages/perl/perl-5.8.8/native-perlinc.patch14
-rw-r--r--meta/packages/perl/perl-5.8.8/native-ssp.patch2
-rw-r--r--meta/packages/perl/perl-native_5.8.8.bb110
-rw-r--r--meta/packages/perl/perl.inc63
-rw-r--r--meta/packages/perl/perl_5.8.8.bb80
13 files changed, 189 insertions, 273 deletions
diff --git a/meta/classes/cpan-base.bbclass b/meta/classes/cpan-base.bbclass
index 82fd5b459a..c90a8fbc27 100644
--- a/meta/classes/cpan-base.bbclass
+++ b/meta/classes/cpan-base.bbclass
@@ -24,20 +24,10 @@ def get_perl_version(d):
24 return m.group(1) 24 return m.group(1)
25 return None 25 return None
26 26
27# Only 5.8.7 and 5.8.4 existed at the time we moved to the new layout
28def is_new_perl(d):
29 ver = get_perl_version(d)
30 if ver == "5.8.4" or ver == "5.8.7":
31 return "no"
32 return "yes"
33
34# Determine where the library directories are 27# Determine where the library directories are
35def perl_get_libdirs(d): 28def perl_get_libdirs(d):
36 libdir = bb.data.getVar('libdir', d, 1) 29 libdir = bb.data.getVar('libdir', d, 1)
37 if is_new_perl(d) == "yes": 30 libdirs = libdir + '/*/*/perl5'
38 libdirs = libdir + '/perl5'
39 else:
40 libdirs = libdir + '/*/*/perl5'
41 return libdirs 31 return libdirs
42 32
43def is_target(d): 33def is_target(d):
@@ -45,7 +35,6 @@ def is_target(d):
45 return "yes" 35 return "yes"
46 return "no" 36 return "no"
47 37
48IS_NEW_PERL = "${@is_new_perl(d)}"
49PERLLIBDIRS = "${@perl_get_libdirs(d)}" 38PERLLIBDIRS = "${@perl_get_libdirs(d)}"
50 39
51FILES_${PN}-dbg += "${PERLLIBDIRS}/auto/*/.debug \ 40FILES_${PN}-dbg += "${PERLLIBDIRS}/auto/*/.debug \
diff --git a/meta/classes/cpan.bbclass b/meta/classes/cpan.bbclass
index 66054bc755..3b1280c07b 100644
--- a/meta/classes/cpan.bbclass
+++ b/meta/classes/cpan.bbclass
@@ -14,54 +14,26 @@ export PERL_LIB = "${STAGING_DATADIR}/perl/${@get_perl_version(d)}"
14export PERL_ARCHLIB = "${STAGING_LIBDIR}/perl/${@get_perl_version(d)}" 14export PERL_ARCHLIB = "${STAGING_LIBDIR}/perl/${@get_perl_version(d)}"
15 15
16cpan_do_configure () { 16cpan_do_configure () {
17 export PERL5LIB="${PERL_ARCHLIB}"
17 yes '' | perl Makefile.PL ${EXTRA_CPANFLAGS} 18 yes '' | perl Makefile.PL ${EXTRA_CPANFLAGS}
18 if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then 19 if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
19 . ${STAGING_LIBDIR}/perl/config.sh 20 . ${STAGING_LIBDIR}/perl/config.sh
20 if [ "${IS_NEW_PERL}" = "yes" ]; then 21 # Use find since there can be a Makefile generated for each Makefile.PL
21 sed -i -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:" \ 22 for f in `find -name Makefile.PL`; do
22 -e "s:\(SITEARCHEXP = \).*:\1${sitearchexp}:" \ 23 f2=`echo $f | sed -e 's/.PL//'`
23 -e "s:\(INSTALLVENDORLIB = \).*:\1${D}${datadir}/perl5:" \ 24 sed -i -e "s:\(PERL_ARCHLIB = \).*:\1${PERL_ARCHLIB}:" \
24 -e "s:\(INSTALLVENDORARCH = \).*:\1${D}${libdir}/perl5:" \ 25 $f2
25 -e "s:\(LDDLFLAGS.*\)${STAGING_LIBDIR_NATIVE}:\1${STAGING_LIBDIR}:" \ 26 done
26 Makefile
27 else
28 sed -i -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:" \
29 -e "s:\(SITEARCHEXP = \).*:\1${sitearchexp}:" \
30 -e "s:\(INSTALLVENDORLIB = \).*:\1${D}${libdir}/perl5/site_perl/${version}:" \
31 -e "s:\(INSTALLVENDORARCH = \).*:\1${D}${libdir}/perl5/site_perl/${version}:" \
32 -e "s:\(LDDLFLAGS.*\)${STAGING_LIBDIR_NATIVE}:\1${STAGING_LIBDIR}:" \
33 Makefile
34 fi
35 fi 27 fi
36} 28}
37 29
38cpan_do_compile () { 30cpan_do_compile () {
39 if [ "${IS_NEW_PERL}" = "yes" ]; then 31 oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" LD="${CCLD}"
40 oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" LD="${CCLD}"
41 else
42 # You must use gcc to link on sh
43 OPTIONS=""
44 if test ${TARGET_ARCH} = "sh3" -o ${TARGET_ARCH} = "sh4"; then
45 OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc"
46 fi
47 if test ${TARGET_ARCH} = "powerpc" ; then
48 OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc"
49 fi
50 oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" $OPTIONS
51 fi
52} 32}
53 33
34NATIVE_INSTALL_WORKS = "1"
54cpan_do_install () { 35cpan_do_install () {
55 if [ ${@is_target(d)} = "yes" ]; then 36 oe_runmake DESTDIR="${D}" install_vendor
56 oe_runmake install_vendor
57 fi
58}
59
60cpan_do_stage () {
61 if [ ${@is_target(d)} = "no" ]; then
62 oe_runmake install_vendor
63 fi
64} 37}
65
66 38
67EXPORT_FUNCTIONS do_configure do_compile do_install do_stage 39EXPORT_FUNCTIONS do_configure do_compile do_install do_stage
diff --git a/meta/classes/cpan_build.bbclass b/meta/classes/cpan_build.bbclass
index 6cac85c5fe..944e8d4ac0 100644
--- a/meta/classes/cpan_build.bbclass
+++ b/meta/classes/cpan_build.bbclass
@@ -23,7 +23,7 @@ cpan_build_do_configure () {
23 if [ ${@is_target(d)} == "yes" ]; then 23 if [ ${@is_target(d)} == "yes" ]; then
24 # build for target 24 # build for target
25 . ${STAGING_LIBDIR}/perl/config.sh 25 . ${STAGING_LIBDIR}/perl/config.sh
26 if [ "${IS_NEW_PERL}" = "yes" ]; then 26
27 perl Build.PL --installdirs vendor \ 27 perl Build.PL --installdirs vendor \
28 --destdir ${D} \ 28 --destdir ${D} \
29 --install_path lib="${datadir}/perl5" \ 29 --install_path lib="${datadir}/perl5" \
@@ -32,19 +32,9 @@ cpan_build_do_configure () {
32 --install_path bin=${bindir} \ 32 --install_path bin=${bindir} \
33 --install_path bindoc=${mandir}/man1 \ 33 --install_path bindoc=${mandir}/man1 \
34 --install_path libdoc=${mandir}/man3 34 --install_path libdoc=${mandir}/man3
35 else
36 perl Build.PL --installdirs vendor \
37 --destdir ${D} \
38 --install_path lib="${libdir}/perl5/site_perl/${version}" \
39 --install_path arch="${libdir}/perl5/site_perl/${version}/${TARGET_SYS}" \
40 --install_path script=${bindir} \
41 --install_path bin=${bindir} \
42 --install_path bindoc=${mandir}/man1 \
43 --install_path libdoc=${mandir}/man3
44 fi
45 else 35 else
46 # build for host 36 # build for host
47 perl Build.PL --installdirs site 37 perl Build.PL --installdirs site --destdir ${D}
48 fi 38 fi
49} 39}
50 40
@@ -52,16 +42,9 @@ cpan_build_do_compile () {
52 perl Build 42 perl Build
53} 43}
54 44
45NATIVE_INSTALL_WORKS = "1"
55cpan_build_do_install () { 46cpan_build_do_install () {
56 if [ ${@is_target(d)} == "yes" ]; then 47 perl Build install
57 perl Build install
58 fi
59}
60
61do_stage () {
62 if [ ${@is_target(d)} == "no" ]; then
63 perl Build install
64 fi
65} 48}
66 49
67EXPORT_FUNCTIONS do_configure do_compile do_install 50EXPORT_FUNCTIONS do_configure do_compile do_install
diff --git a/meta/packages/perl/files/perl-5.8.8-gcc-4.2.patch b/meta/packages/perl/files/perl-5.8.8-gcc-4.2.patch
index d9869e1974..653a4758f4 100644
--- a/meta/packages/perl/files/perl-5.8.8-gcc-4.2.patch
+++ b/meta/packages/perl/files/perl-5.8.8-gcc-4.2.patch
@@ -1,4 +1,4 @@
1See http://bugs.openembedded.org/show_bug.cgi?id=2168 1See http://bugs.openembedded.net/show_bug.cgi?id=2168
2Fix for gcc 4.2 2Fix for gcc 4.2
3 3
4--- perl-5.8.8/makedepend.SH.ark 2006-11-01 16:32:05.000000000 +0100 4--- perl-5.8.8/makedepend.SH.ark 2006-11-01 16:32:05.000000000 +0100
diff --git a/meta/packages/perl/libxml-parser-perl-native_2.34.bb b/meta/packages/perl/libxml-parser-perl-native_2.36.bb
index 93b831b5dc..6ba56b3b89 100644
--- a/meta/packages/perl/libxml-parser-perl-native_2.34.bb
+++ b/meta/packages/perl/libxml-parser-perl-native_2.36.bb
@@ -1,7 +1,7 @@
1SECTION = "libs" 1SECTION = "libs"
2 2
3inherit native
4
5require libxml-parser-perl_${PV}.bb 3require libxml-parser-perl_${PV}.bb
6 4
7DEPENDS = "expat-native perl-native" 5inherit native
6
7DEPENDS = "expat-native perl-native" \ No newline at end of file
diff --git a/meta/packages/perl/libxml-parser-perl_2.34.bb b/meta/packages/perl/libxml-parser-perl_2.36.bb
index dd502a8f63..818840504a 100644
--- a/meta/packages/perl/libxml-parser-perl_2.34.bb
+++ b/meta/packages/perl/libxml-parser-perl_2.36.bb
@@ -1,7 +1,6 @@
1SECTION = "libs" 1SECTION = "libs"
2LICENSE = "Artistic" 2LICENSE = "Artistic"
3DEPENDS += "expat expat-native" 3DEPENDS += "expat expat-native"
4PR = "r11"
5 4
6SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Parser-${PV}.tar.gz" 5SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Parser-${PV}.tar.gz"
7 6
@@ -11,5 +10,12 @@ EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}
11 10
12inherit cpan 11inherit cpan
13 12
13do_compile() {
14 export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
15 cpan_do_compile
16}
17
18
19
14FILES_${PN} = "${PERLLIBDIRS}/auto/XML/Parser/Expat/* \ 20FILES_${PN} = "${PERLLIBDIRS}/auto/XML/Parser/Expat/* \
15 ${PERLLIBDIRS}/XML" 21 ${PERLLIBDIRS}/XML"
diff --git a/meta/packages/perl/perl-5.8.8/Makefile.SH.patch b/meta/packages/perl/perl-5.8.8/Makefile.SH.patch
index a30074be2b..ab9c4b7d63 100644
--- a/meta/packages/perl/perl-5.8.8/Makefile.SH.patch
+++ b/meta/packages/perl/perl-5.8.8/Makefile.SH.patch
@@ -62,7 +62,7 @@ Index: perl-5.8.8/Makefile.SH
62+# @echo " "; 62+# @echo " ";
63+# @echo " Everything is up to date. Type '$(MAKE) test' to run test suite." 63+# @echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
64+ 64+
65+all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) 65+all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) $(unidatafiles)
66+ 66+
67+more: extra.pods $(private) $(public) 67+more: extra.pods $(private) $(public)
68+ 68+
@@ -208,7 +208,7 @@ Index: perl-5.8.8/Makefile.SH
208- 208-
209-install.man: all installman 209-install.man: all installman
210- $(LDLIBPTH) ./perl installman --destdir=$(DESTDIR) $(INSTALLFLAGS) 210- $(LDLIBPTH) ./perl installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
211+ ./hostperl -Ifake_config_library -Ilib -MConfig installperl $(INSTALLFLAGS) $(STRIPFLAGS) 211+ ./hostperl -Ifake_config_library -Ilib -MConfig installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
212 212
213 # XXX Experimental. Hardwired values, but useful for testing. 213 # XXX Experimental. Hardwired values, but useful for testing.
214 # Eventually Configure could ask for some of these values. 214 # Eventually Configure could ask for some of these values.
diff --git a/meta/packages/perl/perl-5.8.8/config.sh b/meta/packages/perl/perl-5.8.8/config.sh
index ac8d237cac..8d1f904f20 100644
--- a/meta/packages/perl/perl-5.8.8/config.sh
+++ b/meta/packages/perl/perl-5.8.8/config.sh
@@ -668,34 +668,34 @@ inc_version_list=' '
668inc_version_list_init='0' 668inc_version_list_init='0'
669incpath='' 669incpath=''
670inews='' 670inews=''
671installarchlib='@DESTDIR@/usr/lib/perl/5.8' 671installarchlib='@LIBDIR@/perl/5.8'
672installbin='@DESTDIR@/usr/bin' 672installbin='@BINDIR@'
673installhtml1dir='' 673installhtml1dir=''
674installhtml3dir='' 674installhtml3dir=''
675installman1dir='@DESTDIR@/usr/share/man/man1' 675installman1dir='@MANDIR@/man1'
676installman3dir='@DESTDIR@/usr/share/man/man3' 676installman3dir='@MANDIR@/man3'
677installprefix='@DESTDIR@/usr' 677installprefix='@PREFIX@'
678installprefixexp='@DESTDIR@/usr' 678installprefixexp='@PREFIX@/usr'
679installprivlib='@DESTDIR@/usr/share/perl/5.8' 679installprivlib='@DATADIR@/perl/5.8'
680installscript='@DESTDIR@/usr/bin' 680installscript='@BINDIR@'
681installsitearch='@DESTDIR@/usr/local/lib/perl/5.8.8' 681installsitearch='@PREFIX@/local/lib/perl/5.8.8'
682installsitebin='@DESTDIR@/usr/local/bin' 682installsitebin='@PREFIX@/local/bin'
683installsitehtml1dir='' 683installsitehtml1dir=''
684installsitehtml3dir='' 684installsitehtml3dir=''
685installsitelib='@DESTDIR@/usr/local/share/perl/5.8.8' 685installsitelib='@PREFIX@/local/share/perl/5.8.8'
686installsiteman1dir='@DESTDIR@/usr/local/man/man1' 686installsiteman1dir='@PREFIX@/local/man/man1'
687installsiteman3dir='@DESTDIR@/usr/local/man/man3' 687installsiteman3dir='@PREFIX@/local/man/man3'
688installsitescript='@DESTDIR@/usr/local/bin' 688installsitescript='@PREFIX@/local/bin'
689installstyle='lib/perl5' 689installstyle='lib/perl5'
690installusrbinperl='define' 690installusrbinperl='define'
691installvendorarch='@DESTDIR@/usr/lib/perl5' 691installvendorarch='@LIBDIR@/perl5'
692installvendorbin='@DESTDIR@/usr/bin' 692installvendorbin='@BINDIR@'
693installvendorhtml1dir='' 693installvendorhtml1dir=''
694installvendorhtml3dir='' 694installvendorhtml3dir=''
695installvendorlib='@DESTDIR@/usr/share/perl5' 695installvendorlib='@DATADIR@/perl5'
696installvendorman1dir='@DESTDIR@/usr/share/man/man1' 696installvendorman1dir='@MANDIR@/man1'
697installvendorman3dir='@DESTDIR@/usr/share/man/man3' 697installvendorman3dir='@MANDIR@/man3'
698installvendorscript='@DESTDIR@/usr/bin' 698installvendorscript='@BINDIR@'
699intsize='4' 699intsize='4'
700issymlink='test -h' 700issymlink='test -h'
701ivdformat='"ld"' 701ivdformat='"ld"'
@@ -981,36 +981,35 @@ zcat=''
981zip='zip' 981zip='zip'
982# Configure command line arguments. 982# Configure command line arguments.
983config_arg0='Configure' 983config_arg0='Configure'
984config_args='-des -Doptimize=-O2 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Open Embedded -Dinstallprefix=@DESTDIR@ -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dotherlibdirs=/usr/lib/perl5/5.8.8 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Ud_dosuid -Dd_semctl_semun -Ui_db -Ui_ndbm -Ui_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr' 984config_args='-des -Doptimize=-O2 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Open Embedded -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dotherlibdirs=/usr/lib/perl5/5.8.8 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Ud_dosuid -Dd_semctl_semun -Ui_db -Ui_ndbm -Ui_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr'
985config_argc=28 985config_argc=27
986config_arg1='-des' 986config_arg1='-des'
987config_arg2='-Doptimize=-O2' 987config_arg2='-Doptimize=-O2'
988config_arg3='-Dmyhostname=localhost' 988config_arg3='-Dmyhostname=localhost'
989config_arg4='-Dperladmin=root@localhost' 989config_arg4='-Dperladmin=root@localhost'
990config_arg5='-Dcc=gcc' 990config_arg5='-Dcc=gcc'
991config_arg6='-Dcf_by=Open Embedded' 991config_arg6='-Dcf_by=Open Embedded'
992config_arg7='-Dinstallprefix=@DESTDIR@' 992config_arg7='-Dprefix=/usr'
993config_arg8='-Dprefix=/usr' 993config_arg8='-Dvendorprefix=/usr'
994config_arg9='-Dvendorprefix=/usr' 994config_arg9='-Dsiteprefix=/usr'
995config_arg10='-Dsiteprefix=/usr' 995config_arg10='-Dotherlibdirs=/usr/lib/perl5/5.8.8'
996config_arg11='-Dotherlibdirs=/usr/lib/perl5/5.8.8' 996config_arg11='-Duseshrplib'
997config_arg12='-Duseshrplib' 997config_arg12='-Dusethreads'
998config_arg13='-Dusethreads' 998config_arg13='-Duseithreads'
999config_arg14='-Duseithreads' 999config_arg14='-Duselargefiles'
1000config_arg15='-Duselargefiles' 1000config_arg15='-Ud_dosuid'
1001config_arg16='-Ud_dosuid' 1001config_arg16='-Dd_semctl_semun'
1002config_arg17='-Dd_semctl_semun' 1002config_arg17='-Ui_db'
1003config_arg18='-Ui_db' 1003config_arg18='-Ui_ndbm'
1004config_arg19='-Ui_ndbm' 1004config_arg19='-Ui_gdbm'
1005config_arg20='-Ui_gdbm' 1005config_arg20='-Di_shadow'
1006config_arg21='-Di_shadow' 1006config_arg21='-Di_syslog'
1007config_arg22='-Di_syslog' 1007config_arg22='-Dman3ext=3pm'
1008config_arg23='-Dman3ext=3pm' 1008config_arg23='-Duseperlio'
1009config_arg24='-Duseperlio' 1009config_arg24='-Dinstallusrbinperl'
1010config_arg25='-Dinstallusrbinperl' 1010config_arg25='-Ubincompat5005'
1011config_arg26='-Ubincompat5005' 1011config_arg26='-Uversiononly'
1012config_arg27='-Uversiononly' 1012config_arg27='-Dpager=/usr/bin/less -isr'
1013config_arg28='-Dpager=/usr/bin/less -isr'
1014PERL_REVISION=5 1013PERL_REVISION=5
1015PERL_VERSION=8 1014PERL_VERSION=8
1016PERL_SUBVERSION=8 1015PERL_SUBVERSION=8
diff --git a/meta/packages/perl/perl-5.8.8/native-perlinc.patch b/meta/packages/perl/perl-5.8.8/native-perlinc.patch
index aea38a0b56..6dc4b9538d 100644
--- a/meta/packages/perl/perl-5.8.8/native-perlinc.patch
+++ b/meta/packages/perl/perl-5.8.8/native-perlinc.patch
@@ -1,12 +1,20 @@
1Index: perl-5.8.8/lib/ExtUtils/MM_Unix.pm 1Index: perl-5.8.8/lib/ExtUtils/MM_Unix.pm
2=================================================================== 2===================================================================
3--- perl-5.8.8.orig/lib/ExtUtils/MM_Unix.pm 2007-05-30 15:16:47.000000000 +1000 3--- perl-5.8.8.orig/lib/ExtUtils/MM_Unix.pm 2008-10-31 22:01:35.000000000 +0000
4+++ perl-5.8.8/lib/ExtUtils/MM_Unix.pm 2007-05-30 15:18:12.000000000 +1000 4+++ perl-5.8.8/lib/ExtUtils/MM_Unix.pm 2008-11-08 16:01:12.000000000 +0000
5@@ -1597,6 +1597,11 @@ 5@@ -1597,6 +1597,19 @@
6 $self->{PERL_LIB} ||= $Config{privlibexp}; 6 $self->{PERL_LIB} ||= $Config{privlibexp};
7 $self->{PERL_ARCHLIB} ||= $Config{archlibexp}; 7 $self->{PERL_ARCHLIB} ||= $Config{archlibexp};
8 $self->{PERL_INC} = $self->catdir("$self->{PERL_ARCHLIB}","CORE"); # wild guess for now 8 $self->{PERL_INC} = $self->catdir("$self->{PERL_ARCHLIB}","CORE"); # wild guess for now
9+ # Check for environment override so we'll find the headers in the correct place 9+ # Check for environment override so we'll find the headers in the correct place
10+ if (defined $ENV{PERL_LIB})
11+ {
12+ $self->{PERL_LIB} = $ENV{PERL_LIB};
13+ }
14+ if (defined $ENV{PERL_ARCHLIB})
15+ {
16+ $self->{PERL_ARCHLIB} = $ENV{PERL_ARCHLIB};
17+ }
10+ if (defined $ENV{PERL_INC}) 18+ if (defined $ENV{PERL_INC})
11+ { 19+ {
12+ $self->{PERL_INC} = $ENV{PERL_INC}; 20+ $self->{PERL_INC} = $ENV{PERL_INC};
diff --git a/meta/packages/perl/perl-5.8.8/native-ssp.patch b/meta/packages/perl/perl-5.8.8/native-ssp.patch
index f815aad452..1c825f50d0 100644
--- a/meta/packages/perl/perl-5.8.8/native-ssp.patch
+++ b/meta/packages/perl/perl-5.8.8/native-ssp.patch
@@ -1,5 +1,5 @@
1Fix for compiling with ssp enabled gcc: 1Fix for compiling with ssp enabled gcc:
2See http://bugs.openembedded.org/show_bug.cgi?id=1980 2See http://bugs.openembedded.net/show_bug.cgi?id=1980
3 3
4diff -Naur perl-5.8.7.orig/cflags.SH perl-5.8.7/cflags.SH 4diff -Naur perl-5.8.7.orig/cflags.SH perl-5.8.7/cflags.SH
5--- perl-5.8.7.orig/cflags.SH 2002-09-30 10:59:07.000000000 +0000 5--- perl-5.8.7.orig/cflags.SH 2002-09-30 10:59:07.000000000 +0000
diff --git a/meta/packages/perl/perl-native_5.8.8.bb b/meta/packages/perl/perl-native_5.8.8.bb
index fb8be281bf..05b4c1e64e 100644
--- a/meta/packages/perl/perl-native_5.8.8.bb
+++ b/meta/packages/perl/perl-native_5.8.8.bb
@@ -20,49 +20,75 @@ S = "${WORKDIR}/perl-${PV}"
20inherit native 20inherit native
21 21
22do_configure () { 22do_configure () {
23 ./Configure \ 23 ./Configure \
24 -Dcc="${CC}" \ 24 -Dcc="${CC}" \
25 -Dcflags="${CFLAGS}" \ 25 -Dcflags="${CFLAGS}" \
26 -Dldflags="${LDFLAGS}" \ 26 -Dldflags="${LDFLAGS}" \
27 -Dcf_by="Open Embedded" \ 27 -Dcf_by="Open Embedded" \
28 -Dprefix=${prefix} \ 28 -Dprefix=${prefix} \
29 -Dvendorprefix=${prefix} \ 29 -Dvendorprefix=${prefix} \
30 -Dvendorprefix=${prefix} \ 30 -Dvendorprefix=${prefix} \
31 -Dsiteprefix=${prefix} \ 31 -Dsiteprefix=${prefix} \
32 \ 32 \
33 -Dprivlib=${STAGING_LIBDIR}/perl/${PV} \ 33 -Dprivlib=${STAGING_LIBDIR}/perl/${PV} \
34 -Darchlib=${STAGING_LIBDIR}/perl/${PV} \ 34 -Darchlib=${STAGING_LIBDIR}/perl/${PV} \
35 -Dvendorlib=${STAGING_LIBDIR}/perl/${PV} \ 35 -Dvendorlib=${STAGING_LIBDIR}/perl/${PV} \
36 -Dvendorarch=${STAGING_LIBDIR}/perl/${PV} \ 36 -Dvendorarch=${STAGING_LIBDIR}/perl/${PV} \
37 -Dsitelib=${STAGING_LIBDIR}/perl/${PV} \ 37 -Dsitelib=${STAGING_LIBDIR}/perl/${PV} \
38 -Dsitearch=${STAGING_LIBDIR}/perl/${PV} \ 38 -Dsitearch=${STAGING_LIBDIR}/perl/${PV} \
39 \ 39 \
40 -Duseshrplib \ 40 -Duseshrplib \
41 -Dusethreads \ 41 -Dusethreads \
42 -Duseithreads \ 42 -Duseithreads \
43 -Duselargefiles \ 43 -Duselargefiles \
44 -Ud_dosuid \ 44 -Dnoextensions=ODBM_File \
45 -Ui_db \ 45 -Ud_dosuid \
46 -Ui_ndbm \ 46 -Ui_db \
47 -Ui_gdbm \ 47 -Ui_ndbm \
48 -Di_shadow \ 48 -Ui_gdbm \
49 -Di_syslog \ 49 -Di_shadow \
50 -Duseperlio \ 50 -Di_syslog \
51 -Dman3ext=3pm \ 51 -Duseperlio \
52 -Uafs \ 52 -Dman3ext=3pm \
53 -Ud_csh \ 53 -Uafs \
54 -Uusesfio \ 54 -Ud_csh \
55 -Uusenm -des 55 -Uusesfio \
56 sed 's!${STAGING_DIR}/bin!${STAGING_BINDIR}!; 56 -Uusenm -des
57 s!${STAGING_DIR}/lib!${STAGING_LIBDIR}!' < config.sh > config.sh.new
58 mv config.sh.new config.sh
59} 57}
60do_stage_append() { 58
61 # We need a hostperl link for building perl 59NATIVE_INSTALL_WORKS = "1"
62 ln -sf ${STAGING_BINDIR_NATIVE}/perl${PV} ${STAGING_BINDIR_NATIVE}/hostperl 60do_install () {
63 # Store native config in non-versioned directory 61 oe_runmake 'DESTDIR=${D}' install
64 install -d ${STAGING_LIBDIR}/perl 62
65 install config.sh ${STAGING_LIBDIR}/perl 63 # We need a hostperl link for building perl
64 ln -sf perl${PV} ${D}${bindir}/hostperl
65
66 install -d ${D}${libdir}/perl/${PV}/CORE \
67 ${D}${datadir}/perl/${PV}/ExtUtils
68
69 # Save native config
70 install config.sh ${D}${libdir}/perl
71 install lib/Config.pm ${D}${libdir}/perl/${PV}/
72 install lib/ExtUtils/typemap ${D}${datadir}/perl/${PV}/ExtUtils/
73
74 # perl shared library headers
75 for i in av.h embed.h gv.h keywords.h op.h perlio.h pp.h regexp.h \
76 uconfig.h XSUB.h cc_runtime.h embedvar.h handy.h opnames.h \
77 perliol.h pp_proto.h regnodes.h unixish.h config.h EXTERN.h \
78 hv.h malloc_ctl.h pad.h perlsdio.h proto.h scope.h utf8.h \
79 cop.h fakesdio.h INTERN.h mg.h patchlevel.h perlsfio.h \
80 reentr.h sv.h utfebcdic.h cv.h fakethr.h intrpvar.h \
81 nostdio.h perlapi.h perlvars.h reentr.inc thrdvar.h util.h \
82 dosish.h form.h iperlsys.h opcode.h perl.h perly.h regcomp.h \
83 thread.h warnings.h; do
84 install $i ${D}${libdir}/perl/${PV}/CORE
85 done
86}
87do_install_append_nylon() {
88 # get rid of definitions not supported by the gcc version we use for nylon...
89 for i in ${D}${libdir}/perl/${PV}/Config_heavy.pl ${D}${libdir}/perl/config.sh; do
90 perl -pi -e 's/-Wdeclaration-after-statement //g' ${i}
91 done
66} 92}
67 93
68PARALLEL_MAKE = "" 94PARALLEL_MAKE = ""
diff --git a/meta/packages/perl/perl.inc b/meta/packages/perl/perl.inc
deleted file mode 100644
index 15ae55cf17..0000000000
--- a/meta/packages/perl/perl.inc
+++ /dev/null
@@ -1,63 +0,0 @@
1DESCRIPTION = "Perl is a popular scripting language."
2HOMEPAGE = "http://www.perl.org/"
3LICENSE = "Artistic|GPL"
4SECTION = "devel"
5PRIORITY = "optional"
6DEPENDS = "virtual/db perl-native"
7
8SRC_URI = "ftp://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \
9 file://Makefile.patch;patch=1 \
10 file://config.sh-arm-linux.patch;patch=1 \
11 file://libperl-5.8.3-create-libperl-soname.patch;patch=1;pnum=0 \
12 file://Makefile.SH.patch"
13
14HOSTPERL="${STAGING_BINDIR_NATIVE}/perl${PV}"
15
16do_compile() {
17 sed -i -e 's|/usr/include|${STAGING_INCDIR}|g' ext/Errno/Errno_pm.PL
18 cd Cross
19 # You must use gcc to link on sh
20 OPTIONS=""
21 if test ${TARGET_ARCH} = "sh3" -o ${TARGET_ARCH} = "sh4"; then
22 OPTIONS="LD=${TARGET_SYS}-gcc"
23 fi
24 # You must use gcc to link on powerpc also
25 if test ${TARGET_ARCH} = "powerpc" ; then
26 OPTIONS="LD=${TARGET_SYS}-gcc"
27 fi
28
29 oe_runmake perl $OPTIONS
30}
31
32do_install() {
33 oe_runmake install
34 mv ${D}/${libdir}/perl5/${PV}/${TARGET_ARCH}-${TARGET_OS}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV}
35 ( cd ${D}/usr/bin/; rm -f perl; ln -s perl${PV} perl )
36}
37
38do_stage() {
39 install -d ${STAGING_LIBDIR}/perl/
40 install config.sh ${STAGING_LIBDIR}/perl/
41}
42
43PACKAGES_DYNAMIC = "perl-module-*"
44
45python populate_packages_prepend () {
46 libdir = bb.data.expand('${libdir}/perl5/${PV}', d)
47 archlibdir = bb.data.expand('${libdir}/perl5/${PV}/${TARGET_ARCH}-${TARGET_OS}', d)
48 do_split_packages(d, archlibdir, 'auto/(.*)(?!\.debug)/', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
49 do_split_packages(d, archlibdir, '(.*)\.(pm|pl)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
50 do_split_packages(d, libdir, '(.*)\.(pm|pl)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
51}
52
53PACKAGES = "perl-dbg perl perl-misc perl-lib perl-dev perl-pod"
54FILES_${PN} = "/usr/bin/perl /usr/bin/perl${PV}"
55FILES_${PN}-lib = "/usr/lib/libperl.so*"
56FILES_${PN}-dev = "/usr/lib/perl5/${PV}/${TARGET_ARCH}-${TARGET_OS}/CORE/"
57FILES_${PN}-pod = "/usr/lib/perl5/${PV}/pod"
58FILES_perl-misc = "/usr/bin/*"
59FILES_${PN}-dbg += " \
60 ${libdir}/perl5/${PV}/${TARGET_ARCH}-${TARGET_OS}/auto/*/.debug \
61 ${libdir}/perl5/${PV}/${TARGET_ARCH}-${TARGET_OS}/auto/*/*/.debug \
62 ${libdir}/perl5/${PV}/${TARGET_ARCH}-${TARGET_OS}/auto/*/*/*/.debug"
63
diff --git a/meta/packages/perl/perl_5.8.8.bb b/meta/packages/perl/perl_5.8.8.bb
index 0696de577f..fa1a8d34c9 100644
--- a/meta/packages/perl/perl_5.8.8.bb
+++ b/meta/packages/perl/perl_5.8.8.bb
@@ -29,6 +29,7 @@ SRC_URI = "ftp://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \
29 file://62_debian_cpan_definstalldirs.patch;patch=1 \ 29 file://62_debian_cpan_definstalldirs.patch;patch=1 \
30 file://64_debian_enc2xs_inc.patch;patch=1 \ 30 file://64_debian_enc2xs_inc.patch;patch=1 \
31 file://asm-pageh-fix.patch;patch=1 \ 31 file://asm-pageh-fix.patch;patch=1 \
32 file://native-perlinc.patch;patch=1 \
32 file://config.sh \ 33 file://config.sh \
33 file://config.sh-32 \ 34 file://config.sh-32 \
34 file://config.sh-32-le \ 35 file://config.sh-32-le \
@@ -74,23 +75,28 @@ do_configure() {
74 fi 75 fi
75 76
76 # Update some paths in the configuration 77 # Update some paths in the configuration
77 sed -i -e 's,@DESTDIR@,${D},g' \ 78 sed -i -e 's,@LIBDIR@,${libdir},g' \
79 -e 's,@BINDIR@,${bindir},g' \
80 -e 's,@MANDIR@,${mandir},g' \
81 -e 's,@PREFIX@,${prefix},g' \
82 -e 's,@DATADIR@,${datadir},g' \
78 -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \ 83 -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \
79 -e "s%/usr/include/%${STAGING_INCDIR}/%g" \ 84 -e "s%/usr/include/%${STAGING_INCDIR}/%g" \
85 -e 's,/usr/,${exec_prefix}/,g' \
80 config.sh-${TARGET_ARCH}-${TARGET_OS} 86 config.sh-${TARGET_ARCH}-${TARGET_OS}
81 87
82 if test "${MACHINE}" != "native"; then 88
83 # These are strewn all over the source tree 89 # These are strewn all over the source tree
84 for foo in `grep -I -m1 \/usr\/include\/.*\\.h ${WORKDIR}/* -r | cut -f 1 -d ":"` ; do 90 for foo in `grep -I -m1 \/usr\/include\/.*\\.h ${WORKDIR}/* -r | cut -f 1 -d ":"` ; do
85 echo Fixing: $foo 91 echo Fixing: $foo
86 sed -e "s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo 92 sed -e "s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo
87 done 93 done
88 fi
89 94
90 rm -f config 95 rm -f config
91 echo "ARCH = ${TARGET_ARCH}" > config 96 echo "ARCH = ${TARGET_ARCH}" > config
92 echo "OS = ${TARGET_OS}" >> config 97 echo "OS = ${TARGET_OS}" >> config
93} 98}
99
94do_compile() { 100do_compile() {
95 if test "${MACHINE}" != "native"; then 101 if test "${MACHINE}" != "native"; then
96 sed -i -e 's|/usr/include|${STAGING_INCDIR}|g' ext/Errno/Errno_pm.PL 102 sed -i -e 's|/usr/include|${STAGING_INCDIR}|g' ext/Errno/Errno_pm.PL
@@ -98,11 +104,12 @@ do_compile() {
98 cd Cross 104 cd Cross
99 oe_runmake perl LD="${TARGET_SYS}-gcc" 105 oe_runmake perl LD="${TARGET_SYS}-gcc"
100} 106}
107
101do_install() { 108do_install() {
102 oe_runmake install 109 oe_runmake 'DESTDIR=${D}' install
103 110
104 # Add perl pointing at current version 111 # Add perl pointing at current version
105 ln -sf perl${PV} ${D}/usr/bin/perl 112 ln -sf perl${PV} ${D}${bindir}/perl
106 113
107 # Fix up versioned directories 114 # Fix up versioned directories
108 mv ${D}/${libdir}/perl/${PVM} ${D}/${libdir}/perl/${PV} 115 mv ${D}/${libdir}/perl/${PVM} ${D}/${libdir}/perl/${PV}
@@ -117,44 +124,33 @@ do_install() {
117 mv -f ${D}/${libdir}/perl/${PV}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV} 124 mv -f ${D}/${libdir}/perl/${PV}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV}
118 ln -sf libperl.so.${PV} ${D}/${libdir}/libperl.so.5 125 ln -sf libperl.so.${PV} ${D}/${libdir}/libperl.so.5
119 126
127 # target config, used by cpan.bbclass to extract version information
128 install config.sh ${D}${libdir}/perl/
129
130 install -d ${D}${datadir}/perl/${PV}/ExtUtils
131 install lib/ExtUtils/typemap ${D}${datadir}/perl/${PV}/ExtUtils/
132}
133
134PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
135
136perl_package_preprocess () {
120 # Fix up installed configuration 137 # Fix up installed configuration
121 if test "${MACHINE}" != "native"; then 138 sed -i -e "s,${D},,g" \
122 sed -i -e "s,${D},,g" \
123 -e "s,-isystem${STAGING_INCDIR} ,,g" \ 139 -e "s,-isystem${STAGING_INCDIR} ,,g" \
124 -e "s,${STAGING_LIBDIR},${libdir},g" \ 140 -e "s,${STAGING_LIBDIR},${libdir},g" \
125 -e "s,${STAGING_BINDIR},${bindir},g" \ 141 -e "s,${STAGING_BINDIR},${bindir},g" \
126 -e "s,${STAGING_INCDIR},${includedir},g" \ 142 -e "s,${STAGING_INCDIR},${includedir},g" \
127 -e "s,${CROSS_DIR}${base_bindir}/,,g" \ 143 -e "s,${CROSS_DIR}${base_bindir}/,,g" \
128 ${D}${bindir}/h2xs \ 144 ${PKGD}${bindir}/h2xs \
129 ${D}${bindir}/h2ph \ 145 ${PKGD}${bindir}/h2ph \
130 ${D}${datadir}/perl/${PV}/pod/*.pod \ 146 ${PKGD}${datadir}/perl/${PV}/pod/*.pod \
131 ${D}${datadir}/perl/${PV}/cacheout.pl \ 147 ${PKGD}${datadir}/perl/${PV}/cacheout.pl \
132 ${D}${datadir}/perl/${PV}/FileCache.pm \ 148 ${PKGD}${datadir}/perl/${PV}/FileCache.pm \
133 ${D}${libdir}/perl/${PV}/Config.pm \ 149 ${PKGD}${libdir}/perl/config.sh \
134 ${D}${libdir}/perl/${PV}/Config_heavy.pl \ 150 ${PKGD}${libdir}/perl/${PV}/Config.pm \
135 ${D}${libdir}/perl/${PV}/CORE/perl.h \ 151 ${PKGD}${libdir}/perl/${PV}/Config_heavy.pl \
136 ${D}${libdir}/perl/${PV}/CORE/pp.h 152 ${PKGD}${libdir}/perl/${PV}/CORE/perl.h \
137 fi 153 ${PKGD}${libdir}/perl/${PV}/CORE/pp.h
138}
139do_stage() {
140 install -d ${STAGING_LIBDIR_NATIVE}/perl/${PV} \
141 ${STAGING_LIBDIR}/perl/${PV}/CORE
142 # target config, used by cpan.bbclass to extract version information
143 install config.sh ${STAGING_LIBDIR}/perl/
144 # target configuration, used by native perl when cross-compiling
145 install lib/Config_heavy.pl ${STAGING_LIBDIR_NATIVE}/perl/${PV}/Config_heavy-target.pl
146 # perl shared library headers
147 for i in av.h embed.h gv.h keywords.h op.h perlio.h pp.h regexp.h \
148 uconfig.h XSUB.h cc_runtime.h embedvar.h handy.h opnames.h \
149 perliol.h pp_proto.h regnodes.h unixish.h config.h EXTERN.h \
150 hv.h malloc_ctl.h pad.h perlsdio.h proto.h scope.h utf8.h \
151 cop.h fakesdio.h INTERN.h mg.h patchlevel.h perlsfio.h \
152 reentr.h sv.h utfebcdic.h cv.h fakethr.h intrpvar.h \
153 nostdio.h perlapi.h perlvars.h reentr.inc thrdvar.h util.h \
154 dosish.h form.h iperlsys.h opcode.h perl.h perly.h regcomp.h \
155 thread.h warnings.h; do
156 install $i ${STAGING_LIBDIR}/perl/${PV}/CORE
157 done
158} 154}
159 155
160PACKAGES = "perl-dbg perl perl-misc perl-lib perl-dev perl-pod perl-doc" 156PACKAGES = "perl-dbg perl perl-misc perl-lib perl-dev perl-pod perl-doc"