summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl_5.24.4.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/perl/perl_5.24.4.bb')
-rw-r--r--meta/recipes-devtools/perl/perl_5.24.4.bb354
1 files changed, 0 insertions, 354 deletions
diff --git a/meta/recipes-devtools/perl/perl_5.24.4.bb b/meta/recipes-devtools/perl/perl_5.24.4.bb
deleted file mode 100644
index 7b1ae7fec9..0000000000
--- a/meta/recipes-devtools/perl/perl_5.24.4.bb
+++ /dev/null
@@ -1,354 +0,0 @@
1require perl.inc
2
3# We need gnugrep (for -I)
4DEPENDS = "db grep-native gdbm zlib virtual/crypt"
5
6# Pick up patches from debian
7# http://ftp.de.debian.org/debian/pool/main/p/perl/perl_5.22.0-1.debian.tar.xz
8SRC_URI += " \
9 file://debian/cpan_definstalldirs.diff \
10 file://debian/db_file_ver.diff \
11 file://debian/doc_info.diff \
12 file://debian/enc2xs_inc.diff \
13 file://debian/errno_ver.diff \
14 file://debian/libperl_embed_doc.diff \
15 file://debian/fixes/respect_umask.diff \
16 file://debian/writable_site_dirs.diff \
17 file://debian/extutils_set_libperl_path.diff \
18 file://debian/no_packlist_perllocal.diff \
19 file://debian/prefix_changes.diff \
20 file://debian/instmodsh_doc.diff \
21 file://debian/ld_run_path.diff \
22 file://debian/libnet_config_path.diff \
23 file://debian/mod_paths.diff \
24 file://debian/prune_libs.diff \
25 file://debian/fixes/net_smtp_docs.diff \
26 file://debian/perlivp.diff \
27 file://debian/squelch-locale-warnings.diff \
28 file://debian/skip-upstream-git-tests.diff \
29 file://debian/skip-kfreebsd-crash.diff \
30 file://debian/fixes/document_makemaker_ccflags.diff \
31 file://debian/find_html2text.diff \
32 file://debian/perl5db-x-terminal-emulator.patch \
33 file://debian/cpan-missing-site-dirs.diff \
34 file://debian/fixes/memoize_storable_nstore.diff \
35 file://debian/regen-skip.diff \
36"
37
38SRC_URI += " \
39 file://Makefile.patch \
40 file://Makefile.SH.patch \
41 file://installperl.patch \
42 file://perl-archlib-exp.patch \
43 file://perl-dynloader.patch \
44 file://perl-moreconfig.patch \
45 file://letgcc-find-errno.patch \
46 file://generate-sh.patch \
47 file://native-perlinc.patch \
48 file://cross-generate_uudmap.patch \
49 file://fix_bad_rpath.patch \
50 file://dynaloaderhack.patch \
51 file://config.sh \
52 file://config.sh-32 \
53 file://config.sh-32-le \
54 file://config.sh-32-be \
55 file://config.sh-64 \
56 file://config.sh-64-le \
57 file://config.sh-64-be \
58 file://make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch \
59 file://t-run-switches.t-perl5-perl.patch \
60 file://ext-ODBM_File-hints-linux.pl-link-libgdbm_compat.patch \
61 file://ext-ODBM_File-t-odbm.t-fix-the-path-of-dbmt_common.p.patch \
62 file://perl-PathTools-don-t-filter-out-blib-from-INC.patch \
63 file://perl-errno-generation-gcc5.patch \
64 file://perl-fix-conflict-between-skip_all-and-END.patch \
65 file://perl-5.26.1-guard_old_libcrypt_fix.patch \
66 file://CVE-2018-12015.patch \
67 file://0001-ExtUtils-MM_Unix.pm-fix-race-issues.patch \
68 file://0001-Makefile.SH-Pod-Simple-requires-Getopt-Long.patch \
69"
70
71# Fix test case issues
72SRC_URI_append_class-target = " \
73 file://test/dist-threads-t-join.t-adjust-ps-option.patch \
74 file://test/ext-DynaLoader-t-DynaLoader.t-fix-calling-dl_findfil.patch \
75 file://0001-Skip-various-tests-if-PERL_BUILD_PACKAGING-is-set.patch \
76 "
77
78SRC_URI[md5sum] = "04622bc4d3941dc7eb571c52b7c02993"
79SRC_URI[sha256sum] = "7f080287ff64750270689843ae945f02159a33cb8f2fc910248c15befba5db84"
80
81inherit perlnative siteinfo
82
83# Where to find the native perl
84HOSTPERL = "${STAGING_BINDIR_NATIVE}/perl-native/perl${PV}"
85
86# Where to find .so files - use the -native versions not those from the target build
87export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${PV}/"
88
89# Where to find perl @INC/#include files
90# - use the -native versions not those from the target build
91export PERL_LIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${PV}/"
92export PERL_ARCHLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${PV}/"
93
94EXTRA_OEMAKE = "-e MAKEFLAGS="
95
96# LDFLAGS for shared libraries
97export LDDLFLAGS = "${LDFLAGS} -shared"
98
99LDFLAGS_append = " -fstack-protector"
100
101# We're almost Debian, aren't we?
102CFLAGS += "-DDEBIAN"
103
104do_configure() {
105 # Make hostperl in build directory be the native perl
106 ln -sf ${HOSTPERL} hostperl
107
108 if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
109 if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a -e Makefile ]; then
110 ${MAKE} clean
111 fi
112 find ${S} -name *.so -delete
113 fi
114 if [ -n "${CONFIGURESTAMPFILE}" ]; then
115 echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
116 fi
117
118 # Do our work in the cross subdir
119 cd Cross
120
121 # Generate configuration
122 rm -f config.sh-${TARGET_ARCH}-${TARGET_OS}
123 for i in ${WORKDIR}/config.sh \
124 ${WORKDIR}/config.sh-${SITEINFO_BITS} \
125 ${WORKDIR}/config.sh-${SITEINFO_BITS}-${SITEINFO_ENDIANNESS}; do
126 cat $i >> config.sh-${TARGET_ARCH}-${TARGET_OS}
127 done
128
129 # Fixups for musl
130 if [ "${TARGET_OS}" = "linux-musl" -o "${TARGET_OS}" = "linux-musleabi" -o "${TARGET_OS}" = "linux-muslx32" ]; then
131 sed -i -e "s,\(d_libm_lib_version=\)'define',\1'undef',g" \
132 -e "s,\(d_stdio_ptr_lval=\)'define',\1'undef',g" \
133 -e "s,\(d_stdio_ptr_lval_sets_cnt=\)'define',\1'undef',g" \
134 -e "s,\(d_stdiobase=\)'define',\1'undef',g" \
135 -e "s,\(d_stdstdio=\)'define',\1'undef',g" \
136 -e "s,\(d_getnetbyname_r=\)'define',\1'undef',g" \
137 -e "s,\(d_finitel=\)'define',\1'undef',g" \
138 -e "s,\(getprotobyname_r=\)'define',\1'undef',g" \
139 -e "s,\(getpwent_r=\)'define',\1'undef',g" \
140 -e "s,\(getservent_r=\)'define',\1'undef',g" \
141 -e "s,\(gethostent_r=\)'define',\1'undef',g" \
142 -e "s,\(getnetent_r=\)'define',\1'undef',g" \
143 -e "s,\(getnetbyaddr_r=\)'define',\1'undef',g" \
144 -e "s,\(getprotoent_r=\)'define',\1'undef',g" \
145 -e "s,\(getprotobynumber_r=\)'define',\1'undef',g" \
146 -e "s,\(getgrent_r=\)'define',\1'undef',g" \
147 -e "s,\(i_fcntl=\)'undef',\1'define',g" \
148 -e "s,\(h_fcntl=\)'false',\1'true',g" \
149 -e "s,-fstack-protector,-fno-stack-protector,g" \
150 config.sh-${TARGET_ARCH}-${TARGET_OS}
151 fi
152
153 # Update some paths in the configuration
154 sed -i -e 's,@ARCH@-thread-multi,,g' \
155 -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \
156 -e 's,@STAGINGDIR@,${STAGING_DIR_HOST},g' \
157 -e "s,@INCLUDEDIR@,${STAGING_INCDIR},g" \
158 -e "s,@LIBDIR@,${libdir},g" \
159 -e "s,@BASELIBDIR@,${base_libdir},g" \
160 -e "s,@EXECPREFIX@,${exec_prefix},g" \
161 -e 's,@USRBIN@,${bindir},g' \
162 -e "s,-lnsl,,g" \
163 config.sh-${TARGET_ARCH}-${TARGET_OS}
164
165 case "${TARGET_ARCH}" in
166 x86_64 | powerpc | s390)
167 sed -i -e "s,\(need_va_copy=\)'undef',\1'define',g" \
168 config.sh-${TARGET_ARCH}-${TARGET_OS}
169 ;;
170 arm)
171 sed -i -e "s,\(d_u32align=\)'undef',\1'define',g" \
172 config.sh-${TARGET_ARCH}-${TARGET_OS}
173 ;;
174 esac
175 # These are strewn all over the source tree
176 for foo in `grep -I --exclude="*.patch" --exclude="*.diff" --exclude="*.pod" --exclude="README*" --exclude="Glossary" -m1 "/usr/include/.*\.h" ${S}/* -r -l` ${S}/utils/h2xs.PL ; do
177 echo Fixing: $foo
178 sed -e 's|\([ "^'\''I]\+\)/usr/include/|\1${STAGING_INCDIR}/|g' -i $foo
179 done
180
181 rm -f config
182 echo "ARCH = ${TARGET_ARCH}" > config
183 echo "OS = ${TARGET_OS}" >> config
184}
185
186do_compile() {
187 # Fix to avoid recursive substitution of path
188 sed -i -e 's|(@libpath, ".*"|(@libpath, "${STAGING_LIBDIR}"|g' cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
189
190 cd Cross
191 oe_runmake perl LD="${CCLD}"
192}
193
194do_compile_append_class-target() {
195 # Remove build host references from numerous comments...
196 find "${S}/cpan/Encode" -type f \
197 \( -name '*.exh' -o -name '*.c' -o -name '*.h' \)\
198 -exec sed -i -e 's:${RECIPE_SYSROOT_NATIVE}::g' {} +
199 sed -i -e 's:${RECIPE_SYSROOT}::g' ${S}/perl.h ${S}/pp.h
200 sed -i -e 's:${RECIPE_SYSROOT_NATIVE}/usr/bin/perl-native/perl${PV}.real:/usr/bin/perl${PV}:g' \
201 ${S}/cpan/Compress-Raw-Bzip2/constants.h \
202 ${S}/cpan/Compress-Raw-Zlib/constants.h \
203 ${S}/cpan/IPC-SysV/const-c.inc \
204 ${S}/dist/Time-HiRes/const-c.inc
205}
206
207do_install() {
208 #export hostperl="${STAGING_BINDIR_NATIVE}/perl-native/perl${PV}"
209 oe_runmake install DESTDIR=${D}
210 # Add perl pointing at current version
211 ln -sf perl${PV} ${D}${bindir}/perl
212
213 ln -sf perl ${D}/${libdir}/perl5
214
215 # Remove unwanted file and empty directories
216 rm -f ${D}/${libdir}/perl/${PV}/.packlist
217 rmdir ${D}/${libdir}/perl/site_perl/${PV}
218 rmdir ${D}/${libdir}/perl/site_perl
219
220 # Fix up shared library
221 mv ${D}/${libdir}/perl/${PV}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV}
222 ln -sf libperl.so.${PV} ${D}/${libdir}/libperl.so.5
223 ln -sf ../../../libperl.so.${PV} ${D}/${libdir}/perl/${PV}/CORE/libperl.so
224
225 # target config, used by cpan.bbclass to extract version information
226 install config.sh ${D}${libdir}/perl
227
228 ln -s Config_heavy.pl ${D}${libdir}/perl/${PV}/Config_heavy-target.pl
229}
230
231do_install_append_class-nativesdk () {
232 create_wrapper ${D}${bindir}/perl \
233 PERL5LIB='$PERL5LIB:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/site_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/vendor_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/${PV}'
234}
235
236PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
237
238perl_package_preprocess () {
239 # Fix up installed configuration
240 sed -i -e "s,${D},,g" \
241 -e "s,${DEBUG_PREFIX_MAP},,g" \
242 -e "s,--sysroot=${STAGING_DIR_HOST},,g" \
243 -e "s,-isystem${STAGING_INCDIR} ,,g" \
244 -e "s,${STAGING_LIBDIR},${libdir},g" \
245 -e "s,${STAGING_BINDIR},${bindir},g" \
246 -e "s,${STAGING_INCDIR},${includedir},g" \
247 -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
248 -e "s,${STAGING_BINDIR_NATIVE}/,,g" \
249 -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
250 -e 's:${RECIPE_SYSROOT}::g' \
251 ${PKGD}${bindir}/h2xs \
252 ${PKGD}${bindir}/h2ph \
253 ${PKGD}${bindir}/pod2man \
254 ${PKGD}${bindir}/pod2text \
255 ${PKGD}${bindir}/pod2usage \
256 ${PKGD}${bindir}/podchecker \
257 ${PKGD}${bindir}/podselect \
258 ${PKGD}${libdir}/perl/${PV}/CORE/config.h \
259 ${PKGD}${libdir}/perl/${PV}/CORE/perl.h \
260 ${PKGD}${libdir}/perl/${PV}/CORE/pp.h \
261 ${PKGD}${libdir}/perl/${PV}/Config.pm \
262 ${PKGD}${libdir}/perl/${PV}/Config.pod \
263 ${PKGD}${libdir}/perl/${PV}/Config_heavy.pl \
264 ${PKGD}${libdir}/perl/${PV}/ExtUtils/Liblist/Kid.pm \
265 ${PKGD}${libdir}/perl/${PV}/FileCache.pm \
266 ${PKGD}${libdir}/perl/${PV}/pod/*.pod \
267 ${PKGD}${libdir}/perl/config.sh
268}
269
270PACKAGES = "perl-dbg perl perl-misc perl-dev perl-pod perl-doc perl-lib \
271 perl-module-cpan perl-module-cpanplus perl-module-unicore"
272FILES_${PN} = "${bindir}/perl ${bindir}/perl${PV} \
273 ${libdir}/perl/${PV}/Config.pm \
274 ${libdir}/perl/${PV}/strict.pm \
275 ${libdir}/perl/${PV}/warnings.pm \
276 ${libdir}/perl/${PV}/warnings \
277 ${libdir}/perl/${PV}/vars.pm \
278 "
279FILES_${PN}_append_class-nativesdk = " ${bindir}/perl.real"
280RPROVIDES_${PN} += "perl-module-strict perl-module-vars perl-module-config perl-module-warnings \
281 perl-module-warnings-register"
282FILES_${PN}-dev = "${libdir}/perl/${PV}/CORE"
283FILES_${PN}-lib = "${libdir}/libperl.so* \
284 ${libdir}/perl5 \
285 ${libdir}/perl/config.sh \
286 ${libdir}/perl/${PV}/Config_git.pl \
287 ${libdir}/perl/${PV}/Config_heavy.pl \
288 ${libdir}/perl/${PV}/Config_heavy-target.pl"
289FILES_${PN}-pod = "${libdir}/perl/${PV}/pod \
290 ${libdir}/perl/${PV}/*.pod \
291 ${libdir}/perl/${PV}/*/*.pod \
292 ${libdir}/perl/${PV}/*/*/*.pod "
293FILES_perl-misc = "${bindir}/*"
294FILES_${PN}-doc = "${libdir}/perl/${PV}/*/*.txt \
295 ${libdir}/perl/${PV}/*/*/*.txt \
296 ${libdir}/perl/${PV}/auto/XS/Typemap \
297 ${libdir}/perl/${PV}/B/assemble \
298 ${libdir}/perl/${PV}/B/cc_harness \
299 ${libdir}/perl/${PV}/B/disassemble \
300 ${libdir}/perl/${PV}/B/makeliblinks \
301 ${libdir}/perl/${PV}/CGI/eg \
302 ${libdir}/perl/${PV}/CPAN/PAUSE2003.pub \
303 ${libdir}/perl/${PV}/CPAN/SIGNATURE \
304 ${libdir}/perl/${PV}/CPANPLUS/Shell/Default/Plugins/HOWTO.pod \
305 ${libdir}/perl/${PV}/Encode/encode.h \
306 ${libdir}/perl/${PV}/ExtUtils/MANIFEST.SKIP \
307 ${libdir}/perl/${PV}/ExtUtils/NOTES \
308 ${libdir}/perl/${PV}/ExtUtils/PATCHING \
309 ${libdir}/perl/${PV}/ExtUtils/typemap \
310 ${libdir}/perl/${PV}/ExtUtils/xsubpp \
311 ${libdir}/perl/${PV}/ExtUtils/Changes_EU-Install \
312 ${libdir}/perl/${PV}/Net/*.eg \
313 ${libdir}/perl/${PV}/unicore/mktables \
314 ${libdir}/perl/${PV}/unicore/mktables.lst \
315 ${libdir}/perl/${PV}/unicore/version "
316
317FILES_perl-module-cpan += "${libdir}/perl/${PV}/CPAN \
318 ${libdir}/perl/${PV}/CPAN.pm"
319FILES_perl-module-cpanplus += "${libdir}/perl/${PV}/CPANPLUS \
320 ${libdir}/perl/${PV}/CPANPLUS.pm"
321FILES_perl-module-unicore += "${libdir}/perl/${PV}/unicore"
322
323# Create a perl-modules package recommending all the other perl
324# packages (actually the non modules packages and not created too)
325ALLOW_EMPTY_perl-modules = "1"
326PACKAGES_append = " perl-modules "
327
328PACKAGESPLITFUNCS_prepend = "split_perl_packages "
329
330python split_perl_packages () {
331 libdir = d.expand('${libdir}/perl/${PV}')
332 do_split_packages(d, libdir, 'auto/([^.]*)/[^/]*\.(so|ld|ix|al)', 'perl-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False)
333 do_split_packages(d, libdir, 'Module/([^\/]*)\.pm', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
334 do_split_packages(d, libdir, 'Module/([^\/]*)/.*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
335 do_split_packages(d, libdir, '(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/|auto\/)[^\/]).*)\.(pm|pl|e2x)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
336
337 # perl-modules should recommend every perl module, and only the
338 # modules. Don't attempt to use the result of do_split_packages() as some
339 # modules are manually split (eg. perl-module-unicore).
340 packages = filter(lambda p: 'perl-module-' in p, d.getVar('PACKAGES').split())
341 d.setVar(d.expand("RRECOMMENDS_${PN}-modules"), ' '.join(packages))
342}
343
344PACKAGES_DYNAMIC += "^perl-module-.*(?<!\-native)$"
345PACKAGES_DYNAMIC_class-nativesdk = "^nativesdk-perl-module-.*"
346
347RPROVIDES_perl-lib = "perl-lib"
348
349require perl-rdepends_${PV}.inc
350require perl-ptest.inc
351
352SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"
353
354BBCLASSEXTEND = "nativesdk"