2007-05-30 09:32:36 +00:00
|
|
|
#
|
|
|
|
# This is for perl modules that use the new Build.PL build system
|
|
|
|
#
|
|
|
|
inherit cpan-base
|
|
|
|
|
|
|
|
#
|
|
|
|
# We also need to have built libmodule-build-perl-native for
|
|
|
|
# everything except libmodule-build-perl-native itself (which uses
|
|
|
|
# this class, but uses itself as the provider of
|
|
|
|
# libmodule-build-perl)
|
|
|
|
#
|
|
|
|
def cpan_build_dep_prepend(d):
|
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-09 15:00:01 +00:00
|
|
|
if d.getVar('CPAN_BUILD_DEPS', 1):
|
2007-05-30 09:32:36 +00:00
|
|
|
return ''
|
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-09 15:00:01 +00:00
|
|
|
pn = d.getVar('PN', 1)
|
2007-05-30 09:32:36 +00:00
|
|
|
if pn in ['libmodule-build-perl', 'libmodule-build-perl-native']:
|
|
|
|
return ''
|
|
|
|
return 'libmodule-build-perl-native '
|
|
|
|
|
|
|
|
DEPENDS_prepend = "${@cpan_build_dep_prepend(d)}"
|
|
|
|
|
|
|
|
cpan_build_do_configure () {
|
|
|
|
if [ ${@is_target(d)} == "yes" ]; then
|
|
|
|
# build for target
|
2009-11-16 10:56:17 +00:00
|
|
|
. ${STAGING_LIBDIR}/perl/config.sh
|
2009-11-18 20:05:55 +00:00
|
|
|
|
2007-05-30 09:32:36 +00:00
|
|
|
perl Build.PL --installdirs vendor \
|
|
|
|
--destdir ${D} \
|
2010-12-30 20:27:54 +00:00
|
|
|
--install_path lib="${datadir}/perl" \
|
|
|
|
--install_path arch="${libdir}/perl" \
|
2007-05-30 09:32:36 +00:00
|
|
|
--install_path script=${bindir} \
|
|
|
|
--install_path bin=${bindir} \
|
|
|
|
--install_path bindoc=${mandir}/man1 \
|
|
|
|
--install_path libdoc=${mandir}/man3
|
|
|
|
else
|
|
|
|
# build for host
|
2009-11-18 20:05:55 +00:00
|
|
|
perl Build.PL --installdirs site --destdir ${D}
|
2007-05-30 09:32:36 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
cpan_build_do_compile () {
|
|
|
|
perl Build
|
|
|
|
}
|
|
|
|
|
|
|
|
cpan_build_do_install () {
|
2009-11-18 20:05:55 +00:00
|
|
|
perl Build install
|
2007-05-30 09:32:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
EXPORT_FUNCTIONS do_configure do_compile do_install
|