# Note: depends on cmake
# Note: depends on libvncserver
# Note: depends on libXrender
# Note: depends on dbus
# Note: depends on qt4 (with libXrender and dbus support)
wget -c http://downloads.sourceforge.net/project/qtemu/qtemu/2.0alpha1/qtemu-2.0alpha1.tar.bz2
tar -xjf qtemu-2.0alpha1.tar.bz2
cd qtemu-2.0alpha1
# Some fixes
sed -i -e 's/.*-kqemu.*/0;/; 1i#include <unistd.h>' machineprocess.cpp
sed -i -e 's/error(/error_qtemu(/' vnc/vncview.cpp
sed -i -e '/TARGET_LINK_LIBRARIES/a    ${QT_QTNETWORK_LIBRARY}' CMakeLists.txt
sed -i -e '/findVersion->error/{s|^|// |;}' qtemuenvironment.cpp
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX="/usr" ..
make # Doesn't mind -j#
make install