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)
Fri, Mar 29, 8:11 PM
Unknown Object (File)
Dec 22 2023, 10:38 PM
Unknown Object (File)
Dec 10 2023, 6:29 PM
Unknown Object (File)
Nov 23 2023, 2:35 AM
Unknown Object (File)
Nov 19 2023, 2:15 AM
Unknown Object (File)
Nov 11 2023, 12:52 PM
Unknown Object (File)
Oct 10 2023, 6:30 PM
Unknown Object (File)
Aug 14 2023, 10:28 PM
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.