FreeBSD Handbook : Installing Applications: The Ports collection
Previous: GNU Info Files
Next: Why Have a Ports Collection?

4. Installing Applications: The Ports collection

Contributed by James Raynard <jraynard@freebsd.org>.

The FreeBSD Ports collection allows you to compile and install a very wide range of applications with a minimum of effort.

For all the hype about open standards, getting a program to work on different versions of Unix in the real world can be a tedious and tricky business, as anyone who has tried it will know. You may be lucky enough to find that the program you want will compile cleanly on your system, install itself in all the right places and run flawlessly ``out of the box'', but this is unfortunately rather rare. With most programs, you will find yourself doing a fair bit of head-scratching, and there are quite a few programs that will result in premature greying, or even chronic alopecia...

Some software distributions have attacked this problem by providing configuration scripts. Some of these are very clever, but they have an unfortunate tendency to triumphantly announce that your system is something you have never heard of and then ask you lots of questions that sound like a final exam in system-level Unix programming (``Does your system's gethitlist function return a const pointer to a fromboz or a pointer to a const fromboz? Do you have Foonix style unacceptable exception handling? And if not, why not?'').

Fortunately, with the Ports collection, all the hard work involved has already been done, and you can just type 'make install' and get a working program.

4.1. Why Have a Ports Collection?

4.2. How Does the Ports Collection Work?

4.3. Getting a FreeBSD Port

4.3.1. Compiling ports from CDROM
4.3.2. Compiling ports from the Internet

4.4. Skeletons

4.4.1. Makefile
4.4.2. The files directory
4.4.3. The patches directory
4.4.4. The pkg directory

4.5. What to do when a port does not work.

4.6. Some Questions and Answers

4.7. Making a port yourself

4.7.1. Quick Porting
4.7.2. Slow Porting
4.7.3. Configuring the Makefile
4.7.4. Special Considerations
4.7.5. The pkg Subdirectory
4.7.6. Licensing Problems
4.7.7. Upgrading
4.7.8. Do's and Dont's
4.7.9. A Sample Makefile
4.7.10. Package Names
4.7.11. Categories
4.7.12. Changes to this document and the ports system
4.7.13. That is It, Folks!

FreeBSD Handbook : Installing Applications: The Ports collection
Previous: GNU Info Files
Next: Why Have a Ports Collection?