At last! I'm able to go through my TODO list and work on the items in it :-) Today I've chosen one that said "Improve the Kaffe packages" (in pkgsrc). I'm going to explain why they were wrong from pkgsrc's point of view and needed to be changed.

Until today, there were two packages for Kaffe, both mutually exclusive: kaffe-nox11, which provided kaffe built without AWT support, and kaffe, which provided everything. Conflicting packages should be avoided where possible, as they are a PITA for the end user. For example, suppose you have installed kaffe-nox11 and a bunch of packages that depend on it, only to realize later that you need to run AWT applications.

Furthermore, there was a Makefile knob, USE_ESOUND to enable or disable sound support during the build. Why is this wrong? Because it only works when installing from sources. Users installing from binary packages (me, for example, on my server) won't have a choice: they'll have to use whatever the package builder decided, be it with esound or without it.

In some scenarios, it's impossible to go another way, specially if the package builds a single, monolithic binary program (like, unfortunately, mplayer). But Kaffe is different: both AWT and sound support are provided by optional libraries, which can be installed at will.

So I removed the X11 and esound features from the main kaffe package, while doing some cleanup. Then, I removed the oddly named kaffe-nox11 package and added two more: kaffe-x11 and kaffe-esound. These two depend on the base package, and there are no conflicts between them at all. What they do is build and install the specific shared libraries needed to add these features, which are later loaded by Kaffe at runtime.

You see, problem gone. No more conflicts and people using binary packages have a choice about what they want to run on their systems ;-) Keep this in mind if you ever plan to help pkgsrc.