# aptitude install git-core cmake g++ libboost-dev flex bison re2c libmysqlclient-dev libxml2-dev libmcrypt-dev libicu-dev openssl binutils-dev libcap-dev libgd2-xpm-dev zlib1g-dev libtbb-dev libonig-dev libpcre3-dev autoconf libtool libcurl4-openssl-dev libboost-system1.35-dev libboost-program-options-dev libboost-filesystem-dev wget libmemcache-dev
# cd
~# mkdir hiphop
~# cd hiphop
~/hiphop# git clone git://github.com/facebook/hiphop-php.git
~/hiphop# cd hiphop-php
~/hiphop/hiphop-php# export CMAKE_PREFIX_PATH=`/bin/pwd`/../
~/hiphop/hiphop-php# export CMAKE_PREFIX_PATH=`/bin/pwd`/../
~/hiphop/hiphop-php# export HPHP_HOME=`/bin/pwd`
~/hiphop/hiphop-php# export HPHP_LIB=`/bin/pwd`/bin
~/hiphop/hiphop-php# git submodule init
~/hiphop/hiphop-php# git submodule update
~/hiphop/hiphop-php# cd ..
~/hiphop# wget http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz
~/hiphop# tar -xzvf libevent-1.4.13-stable.tar.gz
~/hiphop# cd libevent-1.4.13-stable
~/hiphop/libevent-1.4.13-stable# cp ../hiphop-php/src/third_party/libevent-1.4.13.fb-changes.diff .
~/hiphop/libevent-1.4.13-stable# patch -p1 < libevent-1.4.13.fb-changes.diff
~/hiphop/libevent-1.4.13-stable# ./configure --prefix=$CMAKE_PREFIX_PATH
~/hiphop/libevent-1.4.13-stable# make
~/hiphop/libevent-1.4.13-stable# make install
~/hiphop/libevent-1.4.13-stable# cd ..