sudo apt update
sudo apt -y install git g++ pkg-config libgtk2.0-dev libxml++2.6-dev libboost-filesystem-dev libboost-test-dev \
libboost-locale-dev libboost-regex-dev libboost-date-time-dev libboost-thread-dev libssl-dev libxmlsec1-dev \
cmake libx264-dev yasm libsndfile-dev libmagick++-dev libpulse-dev libasound2-dev libsamplerate-dev wget curl \
libpangomm-1.4-dev libssh-dev libcurl4-openssl-dev libzip-dev nettle-dev devscripts libfftw3-dev autoconf \
libxerces-c-dev python libgtk-3-dev libgl1-mesa-dev libglu1-mesa-dev
git clone git://git.carlh.net/git/libcxml.git
cd libcxml
./waf configure build
sudo ./waf install
cd ..
git clone git://git.carlh.net/git/openjpeg.git
cd openjpeg
git checkout carl-2
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_PKGCONFIG_FILES=ON -DBUILD_SHARED_LIBS=OFF
make
sudo make install
cd ..
git clone git://git.carlh.net/git/asdcplib.git
cd asdcplib
git checkout carl
./waf configure build
sudo ./waf install
cd ..
git clone git://git.carlh.net/git/libdcp.git
cd libdcp
./waf configure build
sudo ./waf install
cd ..
git clone git://git.carlh.net/git/libsub.git
cd libsub
./waf configure build
sudo ./waf install
cd ..
git clone git://git.carlh.net/git/ffmpeg.git
cd ffmpeg
git checkout carl-dcpomatic-14
sed -i "s/--enable-libdav1d//g" carl-configure
bash carl-configure
make -j8
sudo make install
cd ..
git clone git://git.carlh.net/git/leqm-nrt.git
cd leqm-nrt
git checkout carl
./waf configure --without-libsndfile build
sudo ./waf install
cd ..
wget https://dcpomatic.com/deps/linux/wxWidgets-3.1.5.tar.bz2
tar xjf wxWidgets-3.1.5.tar.bz2
cd wxWidgets-3.1.5
./configure --with-gtk=3 --prefix=/usr/local
make -j8
sudo make install
cd ..
git clone git://git.carlh.net/git/rtaudio.git
cd rtaudio
git checkout carl
./configure --prefix=/usr/local --with-pulse --with-alsa
make -j8
sudo make install
cd ..
cd /usr/local/bin
sudo ln -s $(which openssl) dcpomatic2_openssl
git clone git://git.carlh.net/git/dcpomatic.git
cd dcpomatic
./waf configure build
sudo ./waf install
cd ..