This page describes stuff relating to perl and p5-* ports in tree for perl@

perl@ PRs

Open Perl Bugzilla Issues

Team

committers

contributors

How to commit for perl@?

Actually, it's not definitive, but tobez@ submitted this idea:

  1. the committer made at least 10 commits for unique perl@-maintained port
  2. the committer maintains at least 10 p5-ports on their own

IRC

You can find some of perl@ people on #bsdperl on IRC MagNet. Feel free to connect and ask questions or discuss a future of perl ports on FreeBSD.

Tips and Tricks

Testing Perl Ports

To test whether a port is missing dependencies, Perl ports often can and should be tested using "make test" from within the port directory once the build is finished. An easy way to do this is to use "poudriere testport -i" to perform interactive testing after the port has been built. Refer to the Porter's Handbook for further details.

# poudriere testport -j JAILNAME -i CATEGORY/PORT

Once the build is complete and you are provided with a shell prompt within the jail:

# cd /usr/ports/CATEGORY/PORT/
# make test

It should however be noted that CPAN is not canonical; it is very easy to write the Makefile in such a way that CPAN misses dependencies entirely. Look in the file ${WRKSRC}/META.yml; it should provide a clearer picture of the dependencies, though it too can easily be wrong as it's generated automatically.

Test Dependencies

I (tobez@) found it useful recently to add TEST_DEPENDS clause to the ports I commit to. It has exactly the same syntax as old good BUILD_DEPENDS and RUN_DEPENDS (which almost always means listing versioned package dependencies). It is not currently supported in any way by bsd.{port,perl}.mk framework, and portlint will produce a warning (which I happily ignore) about it. But it is immediately useful:

  1. It is clear at a glance what ports needs to be installed in order for make test to have a chance to be successful.
  2. In the future someone might implement support for it in the ports framework.
  3. My own pre-commit test scripts understand this clause, which increases my productivity quite a bit.

So, in brief, I'd like to see this practice expanding.

I (swills@) have been adding quite a few TEST_DEPENDS and have added some support to the ports tinderbox for TEST_DEPENDS as well. There is also a patch:

which adds some logic for it. With this patch, you can add:

to your tinderbox/scripts/etc/env/GLOBAL file and tinderbox will run the tests for you.

You may also want this patch:

As it makes tinderbox add the RUN_DEPENDS to the TEST_DEPENDS.

If you wish to make tinderbox fail the build if the tests fail, you can change this line of tinderbox/scripts/lib/buildscript:

to this:

I've been using this to test and fix all the p5- ports that don't pass their tests, but there are many and help is welcome. I hope to add support to ports proper for testing eventually.

CPAN shortcut for expanding author/id/X/XX/XXX

I (az@) found it useful recently to add CPAN:CPANID clause to the ports I commit to.

It happened that CPAN modules /by-module symlink is no longer available for new modules versions. CPAN /modules/by-author is still available but maybe it will have the same fate. Therefore to properly use the only correct method of /author/id.

Examples of replacement:

BEFORE

AFTER

MASTER_SITES= CPAN
MASTER_SITE_SUBDIR= ../by-authors/id/J/JP/JPEACOCK

MASTER_SITES= CPAN
MASTER_SITE_SUBDIR= CPAN:JPEACOCK

MASTER_SITES= CPAN../by-authors/id/J/JP/JPEACOCK

MASTER_SITES= CPAN
MASTER_SITE_SUBDIR= CPAN:JPEACOCK

MASTER_SITES= CPAN
MASTER_SITE_SUBDIR= ../by-authors/id/J/JP/JPEACOCK/DIRECTORY

MASTER_SITES= CPAN
MASTER_SITE_SUBDIR= CPAN:JPEACOCK/DIRECTORY

In this examples CPAN:JPEACOCK will be expanded to authors/id/J/JPEACOCK and this magic works only while you using CPAN keywork inside MASTER_SITES. I think this is a transitional solution, and when all p5-ports will have the current syntax, I would like to see such syntax: <CPAN>/<AUTHORID>/<ANYTHING INSIDE AUTOR DIRECTORY>.

EXAMPLE OF FUTURE SYNTAX

MASTER_SITES= CPAN
MASTER_SITE_SUBDIR= JPEACOCK

MASTER_SITES= CPAN/JPEACOCK

MASTER_SITES= CPAN
MASTER_SITE_SUBDIR= JPEACOCK/DIRECTORY

MASTER_SITES= CPAN/JPEACOCK/DIRECTORY

Patches

Comment

http://people.freebsd.org/~az/perl/bsd.sites.mk.diff

Allow also use new syntax with overloaded MASTER_SITE_PERL_CPAN inside /etc/make.conf

Ports Long Term Targets


CategoryPorts CategoryTeam

Perl (last edited 2023-06-26T14:18:59+0000 by MateuszPiotrowski)