Every license the ports carry, under one name
A Licenses tab: 866 licenses across the BSD ports trees, each under one name with a link to its text and a count per system.
Every port declares its license, and every tree spells it differently.
FreeBSD writes BSD2CLAUSE, pkgsrc writes 2-clause-bsd, MidnightBSD
writes bsd2. They all mean the same text. Until now this site showed
whatever the tree said. The new Licenses tab puts each license
under one name and counts its ports in every system.
One name per license
Where a license has an SPDX identifier, that is its name here: MIT,
GPL-2.0-only, BSD-3-Clause. The link next to it opens the license text
where it is defined: gnu.org for the GNU licenses, apache.org, mozilla.org,
creativecommons.org and so on; opensource.org for a license nobody
publishes but OSI approved, such as MIT and the BSD licenses; spdx.org for
the rest. A catalogue of 91 SPDX licenses maps the trees' spellings onto
them, and covers 97% of all the licenses the ports declare.
The other 3% keep the name their tree gives them. Most are licenses of one
program, such as a font foundry's terms or a game's own conditions: 288
licenses are used by a single port. A pkgsrc name links to its file in
pkgsrc's licenses/ directory, because that is where its text is.
Some values are not licenses. NA, unknown, and variables the ports
framework never expanded (${PERL5_LICENSE}) are left out. pkgsrc writes
expressions such as gnu-gpl-v2 OR artistic, and a port under one of those
counts under each license. 14,787 ports count under more than one.
What the numbers say
| License | Ports |
|---|---|
| MIT | 19,597 |
| GPL-2.0-only | 13,199 |
| Artistic-1.0 | 9,732 |
| Apache-2.0 | 7,782 |
| BSD-3-Clause | 7,761 |
| GPL-1.0-or-later | 7,418 |
MIT leads in FreeBSD, DragonFly and MidnightBSD. In NetBSD, GPL-2.0-only
leads with 6,218 ports, almost twice FreeBSD's 3,179. pkgsrc's
gnu-gpl-v2 does not say whether later versions are allowed, so it counts
as GPL-2.0-only. OPNsense's own ports are almost all BSD-2-Clause, as
OPNsense itself is. Artistic-1.0 and GPL-1.0-or-later are nearly all Perl
modules: 9,553 of the 9,732 Artistic ports are p5- ports. Perl is offered
under either license and its modules inherit that, which puts the Artistic
License third.
Each license page lists its ports and counts them per system. The LPPL, for
example, appears only in pkgsrc, with 1,798 ports. Nearly all of them are
tex- packages, because pkgsrc packages TeX Live one package per module.
The gap
OpenBSD's ports have no license field, so none of its 10,576 ports appears here. The Licenses page says so at the top. In the other trees, 78–100% of ports declare a license.
In the API
A port's JSON keeps license as its tree wrote it and gains licenses,
the names this page uses. It is an addition, so nothing that reads the old
field changes. See /api/.