Up Up Home Home

Setting up SDL for BoxStar

Installing

The SDL source packages you need are listed on the front page. However, all Linux distributions should include precompiled SDL packages.

Debian packages

Debian and similar distributions such as Ubuntu have a number of packages whose name starts with libsdl1.2debian- to support different audio drivers; libsdl1.2debian-all supports all available sound drivers and some extra video drivers not enabled in the other packages. Additionally you need libsdl-ttf2.0-0 and libsdl-image1.2. See below if you require DirectFB and don't have libsdl1.2debian-all 1.2.9-1 or newer.

Selecting a driver/backend in boxstar

SDL has a number of drivers which can be selected by setting environment variables eg SDL_VIDEODRIVER = directfb. You can configure these variables with the env tag in boxstar's config files, because the variables are set before initialising SDL. This is how the directfb profile works.

DirectFB

My Linux TV HOWTO has some tips and links for setting up DirectFB. To use it with boxstar use the directfb or dfbmga profile.

DirectFB 0.9.24

SDL 1.2.9 doesn't support DirectFB versions newer than 0.9.23. You can upgrade SDL to work with 0.9.24 (and hopefully newer versions) by applying the patch from the Debian package. Download the Debian package patch and apply it in a temporary directory eg:

patch < ~/Desktop/libsdl1.2-1.2.9-0.1-to-1.0.diff
Just press Return each time it complains about not being able to find the file to patch and then 'y', you do want to skip this patch. You'll be left with a file called 007_directfb_924_fix.diff which you can apply to SDL's source tree eg:
cd /usr/src/SDL-1.2.9/
patch -p 1 < /tmp/007_directfb_924_fix.diff

Rebuilding old Debian packages for DirectFB

This should no longer be an issue, but in the unlikely event you have an old Debian-based distribution with libsdl1.2debian-all 1.2.9-0, such as Ubuntu dapper (6.06LTS)you can add DirectFB support with this patch eg:

apt-get source libsdl1.2debian-all
sudo apt-get build-dep libsdl1.2debian-all
cd libsdl1.2-*
patch -p 1 < ~/Desktop/libsdl1.2-1.2.9-0.1-to-1.0.diff
dpkg-buildpackage -rfakeroot
cd ..
sudo dpkg -i libsdl1.2debian-all*.deb
Some hunks may be rejected if you don't have exactly the same version as the one the patch was written for, but hopefully this will only affect the changelog and not matter.

Up Up Home Home