Building Amarok 1.2.x under FreeBSD

amarok is a media player for the KDE desktop environment.

The ‘configure’ script is a bit broken under FreeBSD. Thankfully, we know what the root of the problem is, being, that parameters are not being properly passed, and it’s not making the files it needs for the program to function.

I wrote a quick little shell script, which, if dropped into the source tree for amarok, will do all of the proper patching to make amarok buildable.

I posted my simple little hack on the KDE board, and will hopefully be cleaned up and added to the amarok port, if the configuration is not patched. However, since most folks who find this will be through Google, here’s the code:

#!/bin/sh MYDIR=`pwd` if [ -d amarok/src ]; then cd amarok/src echo ”>>> Compiling configurations…” kconfig_compiler ./engine/gst/config/gstconfig.kcfg /engine/gst/config/gstconfi g.kcfgc kconfig_compiler ./amarokcore/amarok.kcfg /amarokcore/amarokconfig.kcfgc cd ../.. ./configure LDFLAGS=-pthread $* MYFILES=`find . -name \*.ui -print` for n in $MYFILES; do THISDIR=`dirname $n` THISFILE=`basename $n` CPPFILE=`echo $THISFILE | sed s,ui,cpp,` HEADERFILE=`echo $THISFILE | sed s,ui,h,` cd $THISDIR echo ”>>> Processing $THISFILE…” uic -o $HEADERFILE $THISFILE uic -o $CPPFILE -impl $HEADERFILE $THISFILE cd $MYDIR done sed s,”KWizard”,”QWizard”, < amarok/src/firstrunwizard.cpp > amarok/src/firstrunwizard.cpp1 mv amarok/src/firstrunwizard.cpp amarok/src/firstrunwizard.cpp.bak mv amarok/src/firstrunwizard.cpp1 amarok/src/firstrunwizard.cpp echo ”>>> Ready to build amarok!” else echo ”>>> Error: You must place this file in the amarok source directory!” echo ”>>> You are in: $MYDIR” exit 1 fi

For the terminally lazy (pun not intended), I’ve created a tarball of a modified /usr/ports/audio/amarok tree for amarok 1.2.2.

%gzip -dc amarok-1.2.2-FreeBSD-port.tar.gz | (cd /usr/ports/audio; tar xvf -); cd /usr/ports/audio/amarok; make install clean

Good luck!