GNU-Darwin ports help ease Linux envy
by Jason McIntosh
Related link: http://gnu-darwin.sourceforge.net/ports/
While searching for a Darwin port of
killall, a simple, very useful, and Linux-standard Unix utility for sending signals to processes by name instead of PID, I stumbled into the GNU-Darwin project's ports page. This explains how to set up a large filesystem known as FreeBSD ports on your Mac, which contains lots and lots of categorically organized directories named after various Unix programs, many of which don't come with Apple's OS X distribution. Each of these directories contains a little Makefile and a subdirectory of patches intended to modify that program's public source code into something that will run flawlessly on FreeBSD, and hence Darwin. Running
make within one of these directories will apply the patches (attempting to download the source if you haven't done so yourself) and compile the program. It's pretty nice.
The ports don't seem to be 100 percent perfect yet from a Darwin perspective... while my newly patched
killall compiled, for example, the program expects to see process information in my machine's
/proc directory, which, this being OS X, I don't have. It's still pretty neat to watch the system at work.
A few hints for its use (or at least its use on my particular machine):
While setting up the ports system, you need to run the
configure program in the libmd distribution with the argument
--host=powerpc-apple. Otherwise, it will complain about being unable to guess your system type.
The individual port directories' Makefiles contain FTP-based URLs for source, and some of these seem out of date. In this case, you'll have to find and download the right source tarball yourself (make sure you grab one with the same version as that named in the directory's
distinfo file) and then place it in the
distfiles directory at the system's root.