getsolus / ypkg

Modern, declarative, structured build format
https://getsol.us
GNU General Public License v3.0
22 stars 11 forks source link

Modernize Perl Macros #65

Closed joebonrichie closed 6 months ago

joebonrichie commented 6 months ago

We currently prefer Build.PL however Module::Build isn't well maintained so we should consider defaulting back to Makefile.PL as ExtUtils::MakeMaker is part of the standard perl package.

https://fedoraproject.org/wiki/Perl/Tips#Makefile.PL_vs_Build.PL

ermo commented 6 months ago

Unless Tracey overrules this, I think we should follow fedora's advice and go with ExtUtils::MakeMaker based macros.

They look fine in Serpent, so we already merged them there.

TraceyC77 commented 6 months ago

The discussion that Fedora page links to is from 2013, and the information on that page is out of date. Module::Build was last updated 2023-04-28. Module::Build can't be the "new kid on the block" if it's been around since before 2013. (The new kids on the block these days are things like dzil). I did confirm that Module::Build was removed from perl core as of 5.22.0 (the current perl version is 5.38.2).

With that said, I agree that we should default to Makefile.PL and fall back to Build.PL if it exists. Additional current data below (might be useful if we make a docs page for this).

Most of the modules I have experience with use ExtUtils::MakeMaker, it's a well used standard and a more mature project. It's more actively developed than Module::Build. You can see this if you look at their module pages, particularly activity, testers and bus factor count: ExtUtils::MakeMaker - last modified 2023-03-26 Module::Build - last modified 2023-04-29

The official perl docs on making modules result in a Makefile.PL. Additionally, newer module packaging utilities like dzil produce a Makefile.PL.

TraceyC77 commented 6 months ago

Note: Changes would be in https://github.com/getsolus/ypkg/blob/master/ypkg2/rc.yml