Monday, January 12, 2015

Getting Started With pkgsrc

(UPDATE: The server at is temporarily down. You can use this new one in the meantime.)

Package managers are fun. Package managers are an easy way to get updated software onto your system and keep them up to date, and also an essential tool in maintaining a legacy system like OS X on PowerPC. The best known package managers on OS X are MacPorts and Homebrew (Tigerbrew on PowerPC), but there's another one from BSD land called pkgsrc. Sevan from GeekLAN has made a repository of pkgsrc binaries available for PowerPC users, so here's a quick rundown on how to start using pkgsrc.

Open and enter the following to download and install the pkgsrc tools (all one line):

curl -s | sudo tar -zxpf - -C /

Then add the following two lines to your ~/.bash_profile (you can create the file if it doesn't exist):

export PATH=/usr/pkg/sbin:/usr/pkg/bin:$PATH

export PKG_PATH=

(don't leave out the trailing / on that last url) Tiger users can then use "sudo nano" to open /usr/share/misc/man.conf and add this line (Leopard instructions are slightly different, please reference the above GeekLAN post for details):


Finally, close the Terminal window and open a new one so that your new paths are in effect. Now you can begin installing software. Let's say you want GnuPG for use with Enigmail or to encrypt files and folders with gpg encryption, for instance. Simply enter the command:

sudo pkg_add gnupg

You can also try the "-i" option if you're feeling social. After 20 seconds or so the install should be complete and you'll find your gpg tools in /usr/pkg/bin, all ready to go.

So what are the advantages of pkgsrc? You'll notice no compiling was necessary, in contrast to MacPorts which compiles everything, including dependencies already native to OS X. There's a good reason MacPorts does that, but still, it takes forever. Homebrew alleviates this somewhat by relying on native OS X frameworks instead of installing its separate set of dependencies, but Homebrew embeds itself in your /usr/local, which makes it hard to get out of the way if you're juggling more than one package manager. Pkgsrc creates its own directory, /usr/pkg, which can easily be moved with the mv command when you need it out of your path.

The binaries Sevan has built are easily browsable at, so go check it out.

Package managers are fun. You can use them to install simple console programs, or you can install groups of dependencies that can allow you to compile software, like this person who compiled RawTherapee to run on Leopard.

More on pkgsrc here, including how to build packages from source.


  1. Wow, that RawTherapee build just opened up my PowerBook to be able to edit another half a decades worth of RAW files. This is really awesome!

  2. Great News guys!!!!
    Radeon HD 6570 2gb DDR3 is Running on my Quad G5 !!!

  3. Hi, seems to down. Do you another address for these PPC sources ?

    1. It's down for me, too. I don't have any other sources. Maybe word will come from the GeekLAN blog linked above.