1 DESCRIPTION
= "Perl is a popular scripting language."
2 HOMEPAGE
= "http://www.perl.org/"
4 LICENSE
= "Artistic|GPL"
6 # We need gnugrep
(for -I
)
7 DEPENDS
= "virtual/db perl-native grep-native"
10 # Major part of version
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://shared-ldflags.patch;patch=1 \
35 file://config.sh-32-le \
36 file://config.sh-32-be \
38 file://config.sh-64-le \
39 file://config.sh-64-be"
41 # Where
to find the native perl
42 HOSTPERL
= "${STAGING_BINDIR_NATIVE}/perl${PV}"
44 # Where
to find .so files
- use the
-native versions
not those from the target build
45 export PERLHOSTLIB
= "${STAGING_LIBDIR_NATIVE}/perl/${PV}/"
47 # LDFLAGS
for shared libraries
48 export LDDLFLAGS
= "${LDFLAGS} -shared"
51 # Make hostperl in build directory be the native perl
52 cp
-f $
{HOSTPERL
} hostperl
54 # Do out work in the cross subdir
57 # Generate configuration
58 rm
-f config.sh
-$
{TARGET_ARCH
}-$
{TARGET_OS
}
59 for i in $
{WORKDIR
}/config.sh \
60 $
{WORKDIR
}/config.sh
-$
{@siteinfo_get_bits
(d
)} \
61 $
{WORKDIR
}/config.sh
-$
{@siteinfo_get_bits
(d
)}-$
{@siteinfo_get_endianess
(d
)}; do
62 cat $i
>> config.sh
-$
{TARGET_ARCH
}-$
{TARGET_OS
}
66 if [ "${TARGET_OS}" = "linux-uclibc" -o
"${TARGET_OS}" = "linux-uclibcgnueabi" ]; then
67 sed
-i
-e
"s,\(d_crypt_r=\)'define',\1'undef',g" \
68 -e
"s,\(crypt_r_proto=\)'\w+',\1'0',g" \
69 -e
"s,\(d_getnetbyname_r=\)'define',\1'undef',g" \
70 -e
"s,\(getnetbyname_r_proto=\)'\w+',\1'0',g" \
71 -e
"s,\(d_getnetbyaddr_r=\)'define',\1'undef',g" \
72 -e
"s,\(getnetbyaddr_r_proto=\)'\w+',\1'0',g" \
73 -e
"s,\(d_getnetent_r=\)'define',\1'undef',g" \
74 -e
"s,\(getnetent_r_proto=\)'\w+',\1'0',g" \
75 -e
"s,\(d_sockatmark=\)'define',\1'undef',g" \
76 -e
"s,\(d_sockatmarkproto=\)'\w+',\1'0',g" \
77 config.sh
-$
{TARGET_ARCH
}-$
{TARGET_OS
}
80 # Update some paths in the configuration
81 sed
-i
-e 's
,@DESTDIR@
,$
{D
},g' \
82 -e 's
,@ARCH@
,$
{TARGET_ARCH
}-$
{TARGET_OS
},g' \
83 -e
"s%/usr/include/%${STAGING_INCDIR}/%g" \
84 config.sh
-$
{TARGET_ARCH
}-$
{TARGET_OS
}
86 if test
"${MACHINE}" != "native"; then
87 # These are strewn all over the source tree
88 for foo in `grep
-I
-m1 \
/usr\
/include\
/.
*\\.h $
{WORKDIR
}/* -r | cut
-f
1 -d
":"`
; do
90 sed
-e
"s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo
95 echo
"ARCH = ${TARGET_ARCH}" > config
96 echo
"OS = ${TARGET_OS}" >> config
99 if test
"${MACHINE}" != "native"; then
100 sed
-i
-e 's|
/usr
/include|$
{STAGING_INCDIR
}|g' ext
/Errno
/Errno_pm.PL
103 oe_runmake perl LD
="${TARGET_SYS}-gcc"
108 # Add perl pointing at current version
109 ln
-sf perl$
{PV
} $
{D
}/usr
/bin/perl
111 # Fix up versioned directories
112 mv $
{D
}/$
{libdir
}/perl
/$
{PVM
} $
{D
}/$
{libdir
}/perl
/$
{PV
}
113 mv $
{D
}/$
{datadir
}/perl
/$
{PVM
} $
{D
}/$
{datadir
}/perl
/$
{PV
}
114 ln
-sf $
{PV
} $
{D
}/$
{libdir
}/perl
/$
{PVM
}
115 ln
-sf $
{PV
} $
{D
}/$
{datadir
}/perl
/$
{PVM
}
117 # Remove unwanted file
118 rm
-f $
{D
}/$
{libdir
}/perl
/$
{PV
}/.packlist
120 # Fix up shared library
121 mv
-f $
{D
}/$
{libdir
}/perl
/$
{PV
}/CORE
/libperl.so $
{D
}/$
{libdir
}/libperl.so.$
{PV
}
122 ln
-sf libperl.so.$
{PV
} $
{D
}/$
{libdir
}/libperl.so
.5
124 # Fix up installed configuration
125 if test
"${MACHINE}" != "native"; then
126 sed
-i
-e
"s,${D},,g" \
127 -e
"s,-isystem${STAGING_INCDIR} ,,g" \
128 -e
"s,${STAGING_LIBDIR},${libdir},g" \
129 -e
"s,${STAGING_BINDIR},${bindir},g" \
130 -e
"s,${STAGING_INCDIR},${includedir},g" \
131 -e
"s,${CROSS_DIR}${base_bindir}/,,g" \
134 $
{D
}$
{datadir
}/perl
/$
{PV
}/pod
/*.pod \
135 $
{D
}$
{datadir
}/perl
/$
{PV
}/cacheout.pl \
136 $
{D
}$
{datadir
}/perl
/$
{PV
}/FileCache.pm \
137 $
{D
}$
{libdir
}/perl
/$
{PV
}/Config.pm \
138 $
{D
}$
{libdir
}/perl
/$
{PV
}/Config_heavy.pl \
139 $
{D
}$
{libdir
}/perl
/$
{PV
}/CORE
/perl.h \
140 $
{D
}$
{libdir
}/perl
/$
{PV
}/CORE
/pp.h
144 install
-d $
{STAGING_DIR_HOST
}/perl \
145 $
{STAGING_LIBDIR_NATIVE
}/perl
/$
{PV
} \
146 $
{STAGING_LIBDIR
}/perl
/$
{PV
}/CORE \
147 $
{STAGING_DATADIR
}/perl
/$
{PV
}/ExtUtils
148 # target config
, used by cpan.bbclass
to extract version information
149 install config.sh $
{STAGING_DIR_HOST
}/perl
/
150 # target configuration
, used by native perl when cross
-compiling
151 install lib
/Config_heavy.pl $
{STAGING_LIBDIR_NATIVE
}/perl
/$
{PV
}/Config_heavy
-target.pl
152 # target configuration
153 install lib
/Config.pm $
{STAGING_LIBDIR
}/perl
/$
{PV
}/
154 install lib
/ExtUtils
/typemap $
{STAGING_DATADIR
}/perl
/$
{PV
}/ExtUtils
/
155 # perl shared library headers
156 for i in av.h embed.h gv.h keywords.h op.h perlio.h pp.h regexp.h \
157 uconfig.h XSUB.h cc_runtime.h embedvar.h handy.h opnames.h \
158 perliol.h pp_proto.h regnodes.h unixish.h config.h EXTERN.h \
159 hv.h malloc_ctl.h pad.h perlsdio.h proto.h scope.h utf8.h \
160 cop.h fakesdio.h INTERN.h mg.h patchlevel.h perlsfio.h \
161 reentr.h sv.h utfebcdic.h cv.h fakethr.h intrpvar.h \
162 nostdio.h perlapi.h perlvars.h reentr.inc thrdvar.h util.h \
163 dosish.h form.h iperlsys.h opcode.h perl.h perly.h regcomp.h \
164 thread.h warnings.h
; do
165 install $i $
{STAGING_LIBDIR
}/perl
/$
{PV
}/CORE
169 PACKAGES
= "perl-dbg perl perl-misc perl-lib perl-dev perl-pod perl-doc"
170 FILES_$
{PN
} = "${bindir}/perl ${bindir}/perl${PV}"
171 FILES_$
{PN
}-lib
= "${libdir}/libperl.so* ${libdir}/perl/${PVM} ${datadir}/perl/${PVM}"
172 FILES_$
{PN
}-dev
= "${libdir}/perl/${PV}/CORE"
173 FILES_$
{PN
}-pod
= "${datadir}/perl/${PV}/pod \
174 ${datadir}/perl/${PV}/*/*.pod \
175 ${datadir}/perl/${PV}/*/*/*.pod \
176 ${libdir}/perl/${PV}/*.pod"
177 FILES_perl
-misc
= "${bindir}/*"
178 FILES_$
{PN
}-dbg
+= "${libdir}/perl/${PV}/auto/*/.debug \
179 ${libdir}/perl/${PV}/auto/*/*/.debug \
180 ${libdir}/perl/${PV}/auto/*/*/*/.debug \
181 ${datadir}/perl/${PV}/auto/*/.debug \
182 ${datadir}/perl/${PV}/auto/*/*/.debug \
183 ${datadir}/perl/${PV}/auto/*/*/*/.debug \
184 ${libdir}/perl/${PV}/CORE/.debug"
185 FILES_$
{PN
}-doc
= "${datadir}/perl/${PV}/*/*.txt \
186 ${datadir}/perl/${PV}/*/*/*.txt \
187 ${datadir}/perl/${PV}/Net/*.eg \
188 ${datadir}/perl/${PV}/CGI/eg \
189 ${datadir}/perl/${PV}/ExtUtils/PATCHING \
190 ${datadir}/perl/${PV}/ExtUtils/NOTES \
191 ${datadir}/perl/${PV}/ExtUtils/typemap \
192 ${datadir}/perl/${PV}/ExtUtils/MANIFEST.SKIP \
193 ${datadir}/perl/${PV}/CPAN/SIGNATURE \
194 ${datadir}/perl/${PV}/CPAN/PAUSE2003.pub \
195 ${datadir}/perl/${PV}/B/assemble \
196 ${datadir}/perl/${PV}/B/makeliblinks \
197 ${datadir}/perl/${PV}/B/disassemble \
198 ${datadir}/perl/${PV}/B/cc_harness \
199 ${datadir}/perl/${PV}/ExtUtils/xsubpp \
200 ${datadir}/perl/${PV}/Encode/encode.h \
201 ${datadir}/perl/${PV}/unicore/mktables \
202 ${datadir}/perl/${PV}/unicore/mktables.lst \
203 ${datadir}/perl/${PV}/unicore/version"
205 RPROVIDES_perl
-lib
= "perl-lib"
207 # Create a perl
-modules package recommending all the other perl
208 # packages
(actually the non modules packages
and not created too
)
209 ALLOW_EMPTY_perl
-modules
= "1"
210 PACKAGES_append
= " perl-modules "
211 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 ', '')}"
213 python populate_packages_prepend
() {
214 libdir
= bb.
data.expand
('$
{libdir
}/perl
/$
{PV
}'
, d
)
215 do_split_packages
(d
, libdir
, 'auto
/(.
*)(?
!\.debug
)/'
, 'perl
-module
-%s'
, 'perl module
%s'
, recursive
=True, allow_dirs
=False, match_path
=True)
216 do_split_packages
(d
, libdir
, '
(.
*)\.
(pm|pl|e2x
)'
, 'perl
-module
-%s'
, 'perl module
%s'
, recursive
=True, allow_dirs
=False, match_path
=True)
217 datadir
= bb.
data.expand
('$
{datadir
}/perl
/$
{PV
}'
, d
)
218 do_split_packages
(d
, datadir
, 'auto
/(.
*)(?
!\.debug
)/'
, 'perl
-module
-%s'
, 'perl module
%s'
, recursive
=True, allow_dirs
=False, match_path
=True)
219 do_split_packages
(d
, datadir
, '
(.
*)\.
(pm|pl|e2x
)'
, 'perl
-module
-%s'
, 'perl module
%s'
, recursive
=True, allow_dirs
=False, match_path
=True)
222 PACKAGES_DYNAMIC
= "perl-module-*"
224 require perl
-rdepends_$
{PV
}.inc
225 require perl
-rprovides.inc