Getting and building freeware can be quite a trial. Anything that makes the task easier is to be commended, particularly if it reduces error and duplication of effort. Consequently, I am very pleased to be able to present The Ports Collection, a service of the FreeBSD Project:

The FreeBSD Ports Collection offers a simple way for users and administrators to install applications. Each "port" listed here contains any patches necessary to make the original application source code compile and run on FreeBSD. Installing an application is as simple as downloading the port, unpacking it and typing make in the port directory.

The Makefile automatically fetches the application source code, either from a local disk or via ftp, unpacks it on your system, applies the patches, and compiles. If all goes well, simply type make install to install the application.

-- http://www.freebsd.org/ports/index.html

At this writing, there are well over 800 ports in the collection. A substantial increase, expected to appear soon, will push the collection to more than 1000 ports. The ports cover a wide range of applications, including Archivers (18), Astronomy (7), Audio (22), Benchmarks (7), CAD (9), Communications (11), Databases (15), Development Tools (53), Editors (33), Emulators (19), Games (75), Graphics (60), Languages (54), Mail (38), Math (22), Mbone (9), Miscellany (54), Netnews (22), Networks (72), Plan-9 (6), Printing (53), Security (23), Shells (7), System Utilities (20), WWW (46), and X11 (117). There are also language-related tools for Chinese (12), Japanese (78), Korean (3), Russian (8), and Vietnamese (7).

The Details

Because of a rather elegant hack, the Ports Collection itself is not all that large. The Gzipped archive is about 3 MB, or about 30 KB per ported application. Even uncompressed, we're only talking 100 KB per application!

The collection achieves this small size by limiting itself to control files, location information, and patches. As noted above, the Ports Collection first looks around on the local machine for any needed components. Failing that, it works its way through a series of mirror sites, with ftp://ftp.cdrom.com/ as the ultimate fallback.

Because the Collection is working from a known source "tarball" and targeting a known (FreeBSD) platform, it can encapsulate all of the needed configuration information in a relatively small amount of space. Consequently, it doesn't need to do much in the way of guessing, system inspection, or user dialog ("Should frammistat.a be stored in /usr/mugwump?").

And, because all of the configuration information is encoded in a compact and readable form, FreeBSD's port maintainers don't have all that much to do when a new release comes out. In fact, a brave programmer in the field should be able to update a configuration file enough to build a revised version of a freeware package.

I hate duplication of effort (particularly on my own part), so I like this aspect quite a bit. So do the OpenBSD (http://www.openbsd.org/) folks, who have adapted their system to take advantage of the Ports Collection. Courteously, the FreeBSD folks have agreed to accept the OpenBSD variants into their configuration files. As a result, either FreeBSD or OpenBSD users can do automated builds of several hundred freeware packages.

In theory, there is no reason that the Ports Collection could not be extended to service Linux, Solaris, or other UNIX variants. In proactice, of course, there would be a lot of Hard Work (tm) for someone to do. Still, the Ports Collection provides a working example of what can be done in this direction...