[HEADSUP] Rework of perl infrastructure
Baptiste Daroussin
bapt at FreeBSD.org
Mon Jul 29 13:42:47 UTC 2013
Hi,
Andrej and I have been working together on reworking the perl infrastructure in
the ports tree.
What were we trying to solve?
1. each time perl is depend on at build time, perl is also appended to extract
and patch dependency phase. Most of the time uselessly. Fixing make the
dependency correct and gives us a 5% boost one package building order
calculation on the clusters.
2. so far all perl requires writing to make.conf which is very bad when perl has
to be setup on a box where / is readonly (the /usr/bin/perl symlink is yet
another problem for later)
3. nothing was providing a framwork to properly handle manpages in the perl
path.
4. bsd.perl.mk was included anyway, slowing down the infrastructure when not
needed and making every single change to bsd.perl.mk inpacting the whole ports
tree.
After some discussion wether we should create a new bsd.perlng.mk of a USES we
decided to go to the Uses infrastructure, but a special way.
the USES infrastructure allows us to only load on demand the perl mk, which is
good and fixes point 4
Problem ise perl5.mk can handle complex arguments which would have been ugly via
USES:
USES= perl5:5.14+:patch:configure
erk
So we decided to reuse USE_PERL5 and only USE_PERL5 the result it the following
Now each time a port depend on perl it will load the perl framework:
USES= perl5
If nothing more it added perl will become a build and run dependency.
If we want it to only be a run dependency:
USE_PERL5= run
if we want to specify a version:
USE_PERL5= 5.14+ run
if we want to only have perl as a patch dependency:
USE_PERL5= patch
If you have manpages that goes to /usr/local/lib/perl5/5.14/man/man3/
Just define:
P5MAN3= myman.3
A wiki page has been created to help the migration:
https://wiki.freebsd.org/Ports/Uses=perl5
Diff is here
http://people.freebsd.org/~bapt/newperl.diff
if USES=perl5 is defined than the old bsd.perl.mk is no read anymore.
Perl version can now be detected from /usr/local/etc/perl5_version (which will
be added later to the perl packages themself) or by calling perl directly, it is
not required anymore to modify /etc/make.conf
regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-perl/attachments/20130729/459512a2/attachment.sig>
More information about the freebsd-perl
mailing list