Page MenuHomeFreeBSD

Add the possibility to use regular expressions for the makeplist stage of the PLIST_SUB life.
ClosedPublic

Authored by mat on Jul 27 2016, 12:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 27 2024, 3:01 PM
Unknown Object (File)
Oct 25 2024, 3:04 PM
Unknown Object (File)
Sep 27 2024, 9:29 PM
Unknown Object (File)
Sep 26 2024, 7:47 PM
Unknown Object (File)
Sep 25 2024, 2:10 PM
Unknown Object (File)
Sep 23 2024, 8:40 PM
Unknown Object (File)
Sep 19 2024, 6:01 AM
Unknown Object (File)
Sep 16 2024, 12:54 PM
Subscribers

Details

Summary

From time to time, the values are too generic, and they get in the way of other stuff.

This adds the possibility to have a VAR_regex=regex that will be used instead of the VAR=string to search for possible replacements.

For example, build lang/perl5-devel, then:

root@10amd64-ports-perl5-devel:/usr/ports/lang/perl5-devel # touch `make -V STAGEDIR`/usr/local/lib/perl5/5.25/mach/foo
root@10amd64-ports-perl5-devel:/usr/ports/lang/perl5-devel # touch `make -V STAGEDIR`/usr/local/lib/machine

Without the patch, it will do:

root@10amd64-ports-perl5-devel:/usr/ports/lang/perl5-devel # make check-plist
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: lib/%%PERL_ARCH%%ine
Error: Orphaned: %%ARCH_LIB%%/foo
===> Checking for items in pkg-plist which are not in STAGEDIR
===> Error: Plist issues found.
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/perl5-devel

With it will do a more correct version:

root@10amd64-ports-perl5-devel:/usr/ports/lang/perl5-devel # make check-plist
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: lib/machine
Error: Orphaned: %%ARCH_LIB%%/foo
===> Checking for items in pkg-plist which are not in STAGEDIR
===> Error: Plist issues found.
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/perl5-devel

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mat retitled this revision from to Add the possibility to use regular expressions for the makeplist stage of the PLIST_SUB life..
mat updated this object.
mat edited the test plan for this revision. (Show Details)
mat edited edge metadata.
bdrewery added a reviewer: bdrewery.
bdrewery added a subscriber: bdrewery.

Works for me, so long as it still works everywhere. This is hard to review. I was hoping for a more automatic solution but this is fine for now.

This revision is now accepted and ready to land.Aug 9 2016, 5:50 PM

If somehow we could use \<word\> or [[:<:]]word[[:>:]] that would be nice

This revision was automatically updated to reflect the committed changes.