Compiling the Blinkentools on Mac OS X Panther

There have been some troubles with compiling the Blinkenlights toolkit on Mac OS X and other BSD UNIX operating systems due to the heritage of the code (our production system is running on Debian Linux) but most of these issues have been ironed out and the current release of blib, blinkensim, blinkenthemes and blinkentools can be brought to OS X quite easily. Well, I say „quite“ as compiling UNIX software is not for everybody. So I‘ll go ahead and describe a viable procedure that involves Darwin Ports, the upcoming package standard for Mac OS X.

Readers of this blog might wonder now because I have referred to the rival system fink quite often recently. I have been using fink for a long time and it somehow worked. I had trouble with early versions of Darwin Ports instead so I put it on hold. Running into troubles with fink‘s package dependencies I decided to give Darwin Ports another try. And, surprise! Its not only working, it is a damn good tool right now.

Here are the steps you have to take in an overview. I‘ll describe each step afterwards in detail. If you have already installed Darwin Ports, you can skip the first two steps. If you have installed glib2 and gtk2 by means of other tools like fink (or no tools at all) you can skip to step four.

  1. Make sure you have installed the Mac OS X Developer Tools and Apple‘s X11
  2. X11 – the UNIX windowing system – is part of CD 3 of Mac OS X. If you haven‘t explicitly selected it when you installed MAc OS X you might have to reinstall it from that CD. That is easy.

    The Developer Tools are a part of the Mac OS X distribution. Install the default system plus the X11 SDK. Don‘t uncheck the BSD subsystem.

  3. Get the Darwin Ports base package and ports collection via CVS
  4. Follow the instructions on the Get DarwinPorts page to extract the files from CVS. This will result in a directory tree at the place where you execute the commands.

  5. Compile and install the Darwin Ports base package
  6. Change into the „darwinports/base“ directory and type ./configure then make and finally sudo make install to configure, build and install the base package. This makes the port command available to your system.

    The DarwinPorts get installed into /opt/local by default. Add /usr/local/bin and /usr/local/sbin to your PATH environment variable so that you can actually use it without typing the full path all the time.

  7. Install glib2 and gtk2 via Darwin Ports
  8. Install these modules by simply typing "sudo port install gtk2". This will install glib2 as well, as gtk2 depends on it. The DarwinPorts system manages all the dependencies for you and will install a couple of other packages as well. Don‘t bother. Most of them are needed for many other packages as well and can be considered to be a basic building block of your UNIX subsystem.

    Compiling and installing all these packages takes a while. Get a coffee.

  9. Download and install blib, blinkensim and blinkenthemes
  10. Get the three tarballs from http://sven.gimp.org/blinkenlights/. Then, extract the files.

    Build the blib first: enter the unpacked directory, type ./configure --prefix=/opt/local then make and finally sudo make install. This will place blib in the /opt/local/lib directory. Then add the environment variable PKG_CONFIG_PATH to /opt/local/lib/pkgconfig. When this is done, repeat the above procedure with blinkenthemes and blinkensim.

  11. Run X11 and blinkensim
  12. The compilation of the packages has created the blinkensim-gtk command. This is blinkensim running on top of GTK. For Linux, there is a second option for DirectFB which is not available on Mac OS X yet.

    Everything should be fine now. To run the Blinkenlights simulator start the X11 application residing in /Applications/Utilities. This brings up a xterm terminal window. From within this terminal window type:

    /opt/local/bin/blinkensim-gtk hdl-640x480 proxy.blinkenlights.de

    You should now see the current data stream of the building on your screen in full glory. If only the simulator appears but no images, the stream is either down or your firewall or router does not allow UDP traffic to your computer.

    There are other resolutions and themes available. You can view the other installed themes by invoking blinkensim-gtk --list.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.