Page MenuHomeFreeBSD

Mk/bsd.port.mk: move WWW to Makefile
AbandonedPublic

Authored by tcberner on Apr 20 2022, 8:37 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 18 2024, 9:24 PM
Unknown Object (File)
Oct 10 2024, 2:35 AM
Unknown Object (File)
Oct 10 2024, 2:35 AM
Unknown Object (File)
Oct 10 2024, 2:14 AM
Unknown Object (File)
Oct 3 2024, 4:13 PM
Unknown Object (File)
Oct 3 2024, 10:27 AM
Unknown Object (File)
Sep 8 2024, 2:26 PM
Unknown Object (File)
Sep 5 2024, 8:24 AM
Subscribers

Details

Reviewers
se
bapt
Group Reviewers
portmgr
Summary

The WWW of a port was previously read from pkg-descr using a call to
awk during make describe. This change will read the new variable WWW
defined in the ports Makefile instead.

The ports tree can be converted using a script to move all the 'WWW:'
form their previous location in pkg-descr to the correspodning
Makefiles.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 45248
Build 42136: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Apr 20 2022, 8:40 AM

As previously discussed with Tobias, I had already worked out similar changes but did not create a review since I did not expect any reviewer to even take a look ...
My patches for this feature were slightly different but had the same effect:

  • I had kept the parsing of the pkg-descr file in case the WWW variable was not defined in some port's Makefile (in order to ease the transition).
  • I had made the "www-site" target just echo "${_WWW}" in case "make www-site" is used in some user's script.

Changes to documentation and other ports required to support the "WWW in Makefile" feature:

  • The documentation (Porter's Handbook) needs to be adjusted to mention "WWW=" in the Makefile instead of "WWW:" in the pkg-descr file.
  • The WWW macro should be introduced to "portlint", "portfmt", and "portclippy" (probably more).

If the WWW line is actually removed from pkg-descr of the ports, it should perhaps be appended to the copy of pkg-descr included in the package files - there might be down-stream tools that expect the WWW line to exist (instead of fetching this information from the MANIFEST).

Mk/bsd.port.mk
123

I'd suggest to move the definition of "WWW" to immediately follow "COMMENT" since it allows to access information about the port beyond the short description provided by ${COMMENT}.

4404

This definition of _WWW creates bogus URLs e.g. for all USE_GITHUB ports - I'm not convinced that this is a useful default value.
My version of this patch kept the parsing of the pkg-descr file in case ${WWW} was not defined, in order to allow non-converted port definitions to still be supported.

4440

I'd keep this target and would just echo the WWW variable.