Skip to contentSkip to conversation

perl packaging, Makefile.PL versus Build.PL?

DISCUSSION Robert P. J. Day 2 participants 2 messages Nov 18, 2016

lore
Share & tools
lore
#0 lore raw

still going to have a few more questions on the standards for
packaging perl source into OE recipes, here's the first one.

as i read it, there are two build standards for perl source in OE:

cpan.bbclass: Makefile.PL build-based
cpan_build.bbclass: (newer) Build.PL build-based

so if one peruses the source at CPAN, it should be obvious which build system is relevant, no? so what about source that has *both* those files?

https://metacpan.org/pod/Parse::DMIDecode

which has both of those install scripts in the top-level directory, although the INSTALL file clearly refers to the newer build system:

perl Build.PL
perl Build
perl Build test
perl Build install

does it make any logical sense for both of those files to be there? backward compatibility? any other reason? or am i just wildly misunderstanding something?

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#1 lore raw
Quoted 11 lines

Am 18.11.2016 um 11:24 schrieb Robert P. J. Day <[email protected]>:

still going to have a few more questions on the standards for
packaging perl source into OE recipes, here's the first one.

as i read it, there are two build standards for perl source in OE:

cpan.bbclass: Makefile.PL build-based
cpan_build.bbclass: (newer) Build.PL build-based

Err: Wrong - Module::Build has been written after ExtUtil::MakeMaker exists, but it has been removed from Perl core, because ExtUtils::MakeMaker is much better maintained and has better compatibilities (even if it still can improved ^^)

Quoted 5 lines

so if one peruses the source at CPAN, it should be obvious which build system is relevant, no? so what about source that has *both* those files?

https://metacpan.org/pod/Parse::DMIDecode

Look into it: https://metacpan.org/source/NICOLAW/Parse-DMIDecode-0.03/Makefile.PL
shows clearly, that the Makefile.PL is a wrapper for cpan shells which don't support Build.PL (very old, but when Nicola uploaded it in 2007, 5.8 was bleeding edge and 5.004 or 5.005 were widely spread.

You can also refer to https://github.com/rehsack/Packager-Utils/blob/master/lib/Packager/Utils/Role/Packages/Bitbake.pm#L507-L517 for some inspiration.

Quoted 11 lines

which has both of those install scripts in the top-level directory, although the INSTALL file clearly refers to the newer build system:

perl Build.PL
perl Build
perl Build test
perl Build install

does it make any logical sense for both of those files to be there? backward compatibility? any other reason? or am i just wildly misunderstanding something?

For some people: yes. For others: No.

Cheers
--
Jens Rehsack - [email protected]