diff options
Diffstat (limited to 'meta/recipes-devtools/perl/perl_5.8.8.bb')
| -rw-r--r-- | meta/recipes-devtools/perl/perl_5.8.8.bb | 218 |
1 files changed, 218 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl_5.8.8.bb b/meta/recipes-devtools/perl/perl_5.8.8.bb new file mode 100644 index 0000000000..5060705372 --- /dev/null +++ b/meta/recipes-devtools/perl/perl_5.8.8.bb | |||
| @@ -0,0 +1,218 @@ | |||
| 1 | DESCRIPTION = "Perl is a popular scripting language." | ||
| 2 | HOMEPAGE = "http://www.perl.org/" | ||
| 3 | SECTION = "devel" | ||
| 4 | LICENSE = "Artistic|GPL" | ||
| 5 | PRIORITY = "optional" | ||
| 6 | # We need gnugrep (for -I) | ||
| 7 | DEPENDS = "virtual/db perl-native grep-native" | ||
| 8 | PR = "r20" | ||
| 9 | |||
| 10 | # Major part of version | ||
| 11 | PVM = "5.8" | ||
| 12 | |||
| 13 | SRC_URI = "ftp://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \ | ||
| 14 | file://Makefile.patch;patch=1 \ | ||
| 15 | file://Makefile.SH.patch;patch=1 \ | ||
| 16 | file://makedepend-dash.patch;patch=1 \ | ||
| 17 | file://installperl.patch;patch=1 \ | ||
| 18 | file://perl-dynloader.patch;patch=1 \ | ||
| 19 | file://perl-moreconfig.patch;patch=1 \ | ||
| 20 | file://letgcc-find-errno.patch;patch=1 \ | ||
| 21 | file://generate-sh.patch;patch=1 \ | ||
| 22 | file://perl-5.8.8-gcc-4.2.patch;patch=1 \ | ||
| 23 | file://09_fix_installperl.patch;patch=1 \ | ||
| 24 | file://52_debian_extutils_hacks.patch;patch=1 \ | ||
| 25 | file://53_debian_mod_paths.patch;patch=1 \ | ||
| 26 | file://54_debian_perldoc-r.patch;patch=1 \ | ||
| 27 | file://58_debian_cpan_config_path.patch;patch=1 \ | ||
| 28 | file://60_debian_libnet_config_path.patch;patch=1 \ | ||
| 29 | file://62_debian_cpan_definstalldirs.patch;patch=1 \ | ||
| 30 | file://64_debian_enc2xs_inc.patch;patch=1 \ | ||
| 31 | file://asm-pageh-fix.patch;patch=1 \ | ||
| 32 | file://native-perlinc.patch;patch=1 \ | ||
| 33 | file://config.sh \ | ||
| 34 | file://config.sh-32 \ | ||
| 35 | file://config.sh-32-le \ | ||
| 36 | file://config.sh-32-be \ | ||
| 37 | file://config.sh-64 \ | ||
| 38 | file://config.sh-64-le \ | ||
| 39 | file://config.sh-64-be" | ||
| 40 | |||
| 41 | inherit siteinfo | ||
| 42 | |||
| 43 | # Where to find the native perl | ||
| 44 | HOSTPERL = "${STAGING_BINDIR_NATIVE}/perl${PV}" | ||
| 45 | |||
| 46 | # Where to find .so files - use the -native versions not those from the target build | ||
| 47 | export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl/${PV}/" | ||
| 48 | |||
| 49 | do_configure() { | ||
| 50 | # Make hostperl in build directory be the native perl | ||
| 51 | ln -s ${HOSTPERL} hostperl | ||
| 52 | |||
| 53 | # Do our work in the cross subdir | ||
| 54 | cd Cross | ||
| 55 | |||
| 56 | # Generate configuration | ||
| 57 | rm -f config.sh-${TARGET_ARCH}-${TARGET_OS} | ||
| 58 | for i in ${WORKDIR}/config.sh \ | ||
| 59 | ${WORKDIR}/config.sh-${@siteinfo_get_bits(d)} \ | ||
| 60 | ${WORKDIR}/config.sh-${@siteinfo_get_bits(d)}-${@siteinfo_get_endianess(d)}; do | ||
| 61 | cat $i >> config.sh-${TARGET_ARCH}-${TARGET_OS} | ||
| 62 | done | ||
| 63 | |||
| 64 | # Fixups for uclibc | ||
| 65 | if [ "${TARGET_OS}" = "linux-uclibc" -o "${TARGET_OS}" = "linux-uclibcgnueabi" ]; then | ||
| 66 | sed -i -e "s,\(d_crypt_r=\)'define',\1'undef',g" \ | ||
| 67 | -e "s,\(crypt_r_proto=\)'\w+',\1'0',g" \ | ||
| 68 | -e "s,\(d_getnetbyname_r=\)'define',\1'undef',g" \ | ||
| 69 | -e "s,\(getnetbyname_r_proto=\)'\w+',\1'0',g" \ | ||
| 70 | -e "s,\(d_getnetbyaddr_r=\)'define',\1'undef',g" \ | ||
| 71 | -e "s,\(getnetbyaddr_r_proto=\)'\w+',\1'0',g" \ | ||
| 72 | -e "s,\(d_getnetent_r=\)'define',\1'undef',g" \ | ||
| 73 | -e "s,\(getnetent_r_proto=\)'\w+',\1'0',g" \ | ||
| 74 | -e "s,\(d_sockatmark=\)'define',\1'undef',g" \ | ||
| 75 | -e "s,\(d_sockatmarkproto=\)'\w+',\1'0',g" \ | ||
| 76 | config.sh-${TARGET_ARCH}-${TARGET_OS} | ||
| 77 | fi | ||
| 78 | |||
| 79 | # Update some paths in the configuration | ||
| 80 | sed -i -e 's,@LIBDIR@,${libdir},g' \ | ||
| 81 | -e 's,@BINDIR@,${bindir},g' \ | ||
| 82 | -e 's,@MANDIR@,${mandir},g' \ | ||
| 83 | -e 's,@PREFIX@,${prefix},g' \ | ||
| 84 | -e 's,@DATADIR@,${datadir},g' \ | ||
| 85 | -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \ | ||
| 86 | -e "s%/usr/include/%${STAGING_INCDIR}/%g" \ | ||
| 87 | -e 's,/usr/,${exec_prefix}/,g' \ | ||
| 88 | config.sh-${TARGET_ARCH}-${TARGET_OS} | ||
| 89 | |||
| 90 | |||
| 91 | # These are strewn all over the source tree | ||
| 92 | for foo in `grep -I -m1 \/usr\/include\/.*\\.h ${WORKDIR}/* -r | cut -f 1 -d ":"` ; do | ||
| 93 | echo Fixing: $foo | ||
| 94 | sed -e "s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo | ||
| 95 | done | ||
| 96 | |||
| 97 | rm -f config | ||
| 98 | echo "ARCH = ${TARGET_ARCH}" > config | ||
| 99 | echo "OS = ${TARGET_OS}" >> config | ||
| 100 | } | ||
| 101 | |||
| 102 | do_compile() { | ||
| 103 | if test "${MACHINE}" != "native"; then | ||
| 104 | sed -i -e 's|/usr/include|${STAGING_INCDIR}|g' ext/Errno/Errno_pm.PL | ||
| 105 | fi | ||
| 106 | cd Cross | ||
| 107 | oe_runmake perl LD="${TARGET_SYS}-gcc" | ||
| 108 | } | ||
| 109 | |||
| 110 | do_install() { | ||
| 111 | oe_runmake 'DESTDIR=${D}' install | ||
| 112 | |||
| 113 | # Add perl pointing at current version | ||
| 114 | ln -sf perl${PV} ${D}${bindir}/perl | ||
| 115 | |||
| 116 | # Fix up versioned directories | ||
| 117 | mv ${D}/${libdir}/perl/${PVM} ${D}/${libdir}/perl/${PV} | ||
| 118 | mv ${D}/${datadir}/perl/${PVM} ${D}/${datadir}/perl/${PV} | ||
| 119 | ln -sf ${PV} ${D}/${libdir}/perl/${PVM} | ||
| 120 | ln -sf ${PV} ${D}/${datadir}/perl/${PVM} | ||
| 121 | |||
| 122 | # Remove unwanted file | ||
| 123 | rm -f ${D}/${libdir}/perl/${PV}/.packlist | ||
| 124 | |||
| 125 | # Fix up shared library | ||
| 126 | mv -f ${D}/${libdir}/perl/${PV}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV} | ||
| 127 | ln -sf libperl.so.${PV} ${D}/${libdir}/libperl.so.5 | ||
| 128 | |||
| 129 | # target config, used by cpan.bbclass to extract version information | ||
| 130 | install config.sh ${D}${libdir}/perl/ | ||
| 131 | |||
| 132 | install -d ${D}${datadir}/perl/${PV}/ExtUtils | ||
| 133 | install lib/ExtUtils/typemap ${D}${datadir}/perl/${PV}/ExtUtils/ | ||
| 134 | |||
| 135 | ln -s Config_heavy.pl ${D}${libdir}/perl/${PV}/Config_heavy-target.pl | ||
| 136 | } | ||
| 137 | |||
| 138 | PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess" | ||
| 139 | |||
| 140 | perl_package_preprocess () { | ||
| 141 | # Fix up installed configuration | ||
| 142 | sed -i -e "s,${D},,g" \ | ||
| 143 | -e "s,-isystem${STAGING_INCDIR} ,,g" \ | ||
| 144 | -e "s,${STAGING_LIBDIR},${libdir},g" \ | ||
| 145 | -e "s,${STAGING_BINDIR},${bindir},g" \ | ||
| 146 | -e "s,${STAGING_INCDIR},${includedir},g" \ | ||
| 147 | -e "s,${STAGING_BINDIR_NATIVE}/,,g" \ | ||
| 148 | ${PKGD}${bindir}/h2xs \ | ||
| 149 | ${PKGD}${bindir}/h2ph \ | ||
| 150 | ${PKGD}${datadir}/perl/${PV}/pod/*.pod \ | ||
| 151 | ${PKGD}${datadir}/perl/${PV}/cacheout.pl \ | ||
| 152 | ${PKGD}${datadir}/perl/${PV}/FileCache.pm \ | ||
| 153 | ${PKGD}${libdir}/perl/config.sh \ | ||
| 154 | ${PKGD}${libdir}/perl/${PV}/Config.pm \ | ||
| 155 | ${PKGD}${libdir}/perl/${PV}/Config_heavy.pl \ | ||
| 156 | ${PKGD}${libdir}/perl/${PV}/CORE/perl.h \ | ||
| 157 | ${PKGD}${libdir}/perl/${PV}/CORE/pp.h | ||
| 158 | } | ||
| 159 | |||
| 160 | PACKAGES = "perl-dbg perl perl-misc perl-lib perl-dev perl-pod perl-doc" | ||
| 161 | FILES_${PN} = "${bindir}/perl ${bindir}/perl${PV}" | ||
| 162 | FILES_${PN}-lib = "${libdir}/libperl.so* ${libdir}/perl/${PVM} ${datadir}/perl/${PVM}" | ||
| 163 | FILES_${PN}-dev = "${libdir}/perl/${PV}/CORE" | ||
| 164 | FILES_${PN}-pod = "${datadir}/perl/${PV}/pod \ | ||
| 165 | ${datadir}/perl/${PV}/*/*.pod \ | ||
| 166 | ${datadir}/perl/${PV}/*/*/*.pod \ | ||
| 167 | ${libdir}/perl/${PV}/*.pod" | ||
| 168 | FILES_perl-misc = "${bindir}/*" | ||
| 169 | FILES_${PN}-dbg += "${libdir}/perl/${PV}/auto/*/.debug \ | ||
| 170 | ${libdir}/perl/${PV}/auto/*/*/.debug \ | ||
| 171 | ${libdir}/perl/${PV}/auto/*/*/*/.debug \ | ||
| 172 | ${datadir}/perl/${PV}/auto/*/.debug \ | ||
| 173 | ${datadir}/perl/${PV}/auto/*/*/.debug \ | ||
| 174 | ${datadir}/perl/${PV}/auto/*/*/*/.debug \ | ||
| 175 | ${libdir}/perl/${PV}/CORE/.debug" | ||
| 176 | FILES_${PN}-doc = "${datadir}/perl/${PV}/*/*.txt \ | ||
| 177 | ${datadir}/perl/${PV}/*/*/*.txt \ | ||
| 178 | ${datadir}/perl/${PV}/Net/*.eg \ | ||
| 179 | ${datadir}/perl/${PV}/CGI/eg \ | ||
| 180 | ${datadir}/perl/${PV}/ExtUtils/PATCHING \ | ||
| 181 | ${datadir}/perl/${PV}/ExtUtils/NOTES \ | ||
| 182 | ${datadir}/perl/${PV}/ExtUtils/typemap \ | ||
| 183 | ${datadir}/perl/${PV}/ExtUtils/MANIFEST.SKIP \ | ||
| 184 | ${datadir}/perl/${PV}/CPAN/SIGNATURE \ | ||
| 185 | ${datadir}/perl/${PV}/CPAN/PAUSE2003.pub \ | ||
| 186 | ${datadir}/perl/${PV}/B/assemble \ | ||
| 187 | ${datadir}/perl/${PV}/B/makeliblinks \ | ||
| 188 | ${datadir}/perl/${PV}/B/disassemble \ | ||
| 189 | ${datadir}/perl/${PV}/B/cc_harness \ | ||
| 190 | ${datadir}/perl/${PV}/ExtUtils/xsubpp \ | ||
| 191 | ${datadir}/perl/${PV}/Encode/encode.h \ | ||
| 192 | ${datadir}/perl/${PV}/unicore/mktables \ | ||
| 193 | ${datadir}/perl/${PV}/unicore/mktables.lst \ | ||
| 194 | ${datadir}/perl/${PV}/unicore/version" | ||
| 195 | |||
| 196 | RPROVIDES_perl-lib = "perl-lib" | ||
| 197 | |||
| 198 | # Create a perl-modules package recommending all the other perl | ||
| 199 | # packages (actually the non modules packages and not created too) | ||
| 200 | ALLOW_EMPTY_perl-modules = "1" | ||
| 201 | PACKAGES_append = " perl-modules " | ||
| 202 | 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 ', '')}" | ||
| 203 | |||
| 204 | python populate_packages_prepend () { | ||
| 205 | libdir = bb.data.expand('${libdir}/perl/${PV}', d) | ||
| 206 | do_split_packages(d, libdir, 'auto/(.*)(?!\.debug)/', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True) | ||
| 207 | do_split_packages(d, libdir, '(.*)\.(pm|pl|e2x)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True) | ||
| 208 | datadir = bb.data.expand('${datadir}/perl/${PV}', d) | ||
| 209 | do_split_packages(d, datadir, 'auto/(.*)(?!\.debug)/', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True) | ||
| 210 | do_split_packages(d, datadir, '(.*)\.(pm|pl|e2x)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True) | ||
| 211 | } | ||
| 212 | |||
| 213 | PACKAGES_DYNAMIC = "perl-module-*" | ||
| 214 | |||
| 215 | require perl-rdepends_${PV}.inc | ||
| 216 | require perl-rprovides.inc | ||
| 217 | |||
| 218 | PARALLEL_MAKE = "" | ||
