Page MenuHomeFreeBSD

x11-fonts/noto*: Restructure and update
ClosedPublic

Authored by tijl on Jan 19 2024, 10:29 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 28, 8:55 PM
Unknown Object (File)
Sun, Apr 28, 1:47 AM
Unknown Object (File)
Fri, Apr 26, 3:03 AM
Unknown Object (File)
Tue, Apr 23, 2:12 AM
Unknown Object (File)
Mon, Apr 22, 1:40 PM
Unknown Object (File)
Mon, Apr 22, 9:46 AM
Unknown Object (File)
Sat, Apr 6, 10:20 AM
Unknown Object (File)
Mar 23 2024, 1:46 PM

Details

Summary

Proposal to allow updating individual Noto fonts. This should fix https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275758. I've listed myself as maintainer of the new ports but let me know if you want to be maintainer.

I haven't uploaded any distfiles yet so if you want to test one of the new ports you have to run "make noto-fetch" first.

Commit log:

Split x11-fonts/noto-basic into separate ports so they can be updated separately. Keep noto-basic as a metaport but replace dependencies on it with dependencies on individual fonts as needed.

Adjust x11-fonts/noto-extra to resolve conflicts for now. Individual fonts can be split from this port later.

Let x11-fonts/noto-emoji install the monochrome Noto Emoji font and create a new port x11-fonts/noto-color-emoji for Noto Color Emoji.

Add the new ports to x11-fonts/noto metaport and make Noto Sans and Noto Serif non-optional because script-specific fonts depend on them.

Upstream does not provide useful tarballs so we create our own and host them on LOCAL. The new ports have a "make noto-fetch" target that creates a tarball in DISTDIR.

List of updates:

Noto Color Emoji 2.042
Noto Emoji 2.001
Noto Sans 2.013
Noto Sans Mono 2.014
Noto Sans Symbols 2.003
Noto Sans Symbols 2 2.008
Noto Serif 2.013

Diff Detail

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

Event Timeline

tijl requested review of this revision.Jan 19 2024, 10:29 AM
tijl created this revision.
arrowd added inline comments.
x11-fonts/noto-sans/noto.mk
40 ↗(On Diff #133023)

I'm a bit obscured by this target and NO_CHECKSUM. Can you please explain how all this stuff works?

x11-fonts/noto-sans/noto.mk
40 ↗(On Diff #133023)

When upstream tags a new version the port maintainer would run "make distfile" before running "make makesum". At that point there are no checksums to verify hence NO_CHECKSUM and DISABLE_SIZE. "make distfile" runs fetch with a different MASTER_SITES and DISTFILES so it fetches the individual font files and license file. Then it creates a tarball of DIST_SUBDIR (==DISTNAME). This tarball needs to be uploaded to MASTER_SITE_LOCAL. Regular "make fetch" will fetch this file.

x11-fonts/noto-sans/noto.mk
40 ↗(On Diff #133023)

Why do we have to repackage upstream distfiles into our own tarball?

x11-fonts/noto-sans/noto.mk
40 ↗(On Diff #133023)

There are no upstream distfiles, no small ones anyway.

In general I'm not in favour of re-rolling our own dist files because it mainly relies on a single person and that person wont be around forever or will always be available and it's most more convenient to use the same tarball as everyone else in terms of availability.

In general I'm not in favour of re-rolling our own dist files because it mainly relies on a single person and that person wont be around forever or will always be available and it's most more convenient to use the same tarball as everyone else in terms of availability.

I don't think it is a big problem in this case, as there is a make target that easily regenerates the distfile.

What I don't like about this change is creation of many ports. This looks like an ideal case to apply subpackages. @tijl would you be interested in doing that?

What I don't like about this change is creation of many ports. This looks like an ideal case to apply subpackages.

Each port has its own version number and release dates so subpackages don't really fit. The CJK and emoji fonts also have a different master site. I think separate ports fits better.

The Linux distributions are creating subpackages from a 1GiB distfile that is released every month, but their users are used to installing binary packages and don't care about build times or distfile sizes. FreeBSD users expect to be able to build their own packages and do care about such things. Also note that most fonts aren't updated every month, e.g. Noto Sans was last released in September. So with subpackages users would be rebuilding the fonts every month often without getting any updates to the fonts they have installed.

In D43509#992529, @tijl wrote:

What I don't like about this change is creation of many ports. This looks like an ideal case to apply subpackages.

Each port has its own version number and release dates so subpackages don't really fit. The CJK and emoji fonts also have a different master site. I think separate ports fits better.

The Linux distributions are creating subpackages from a 1GiB distfile that is released every month, but their users are used to installing binary packages and don't care about build times or distfile sizes. FreeBSD users expect to be able to build their own packages and do care about such things. Also note that most fonts aren't updated every month, e.g. Noto Sans was last released in September. So with subpackages users would be rebuilding the fonts every month often without getting any updates to the fonts they have installed.

Yes, I now completely agree with your approach. Thanks for taking time to explain this!

x11-fonts/noto-sans/noto.mk
41 ↗(On Diff #133023)

If the resulting file then should be put into distinfo, it'd make sense to compute the SIZE and SHA256 right away. Take a look at lang/ghc/Makefile and its create-bootstrap target.

tijl edited the summary of this revision. (Show Details)
  • Moved noto.mk to Mk/Uses.
  • Renamed "make distfile" to "make noto-fetch" and let "make makesum" call it.
  • Make distfile creation reproducible (reset uid, gid, file mode, and timestamps).
Mk/Uses/noto.mk
13

The Default: see code below. sentence looks weird. It basically adds no information - if there was none, a developer will go read the code anyways. How about just putting Optional. here to underline that a consuming port isn't required to define it?

45

I wonder if .ifmake makesum would work this? I'm using it for similar purpose in devel/hs-haskell-language-server

Mk/Uses/noto.mk
13

Right, that does look better.

45

No I tried that but it doesn't work. makesum in bsd.port.mk runs "make fetch" in a submake so make(makesum) is false. Either makesum should just depend on fetch instead of using a submake or it should become hookable so I can use _USES_makesum instead of _USES_fetch. Maybe both solutions should be looked into, but makesum isn't that important so the above conditional is good enough for now I think.

arrowd added inline comments.
Mk/Uses/noto.mk
71

Hmm, I'm not sure you can include .mk from other .mk. @mat is this allowed?

Mk/Uses/noto.mk
71

If you grep for USESDIR you'll see many examples of that.

This revision was not accepted when it landed; it landed in state Needs Review.Mar 23 2024, 1:46 PM
This revision was automatically updated to reflect the committed changes.