# Note: depends on libffi
# Note: depends on cmake
# Note: depends on onetbb
# Note: depends on cereal
# Note: depends on nlopt
# Note: depends on openvdb
# Note: depends on boost
# Note: depends on pkg-config
# Note: depends on curl
# Note: depends on mesa
# Note: depends on CGAL
# Note: depends on glu (for wxWidgets GL component)
# Note: depends on webkitgtk (for wxWidgets web component)
# Note: depends on wxWidgets
wget -c https://github.com/prusa3d/PrusaSlicer/archive/version_2.3.0/PrusaSlicer-version_2.3.0.tar.gz
tar -xzf PrusaSlicer-version_2.3.0.tar.gz
cd PrusaSlicer-version_2.3.0
rm -rf src/avrdude/windows/giveio.sys deps/*/
sed -i -e 's@path_to_binary = .*@path_to_binary = "/usr/bin/prusa-slicer";@' src/PrusaSlicer.cpp # Fix running from PATH
sed -i -e 's/^  *{ [0-9]/GCodeViewer::Color&/' src/slic3r/GUI/GCodeViewer.cpp
mkdir -p build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX="/usr" -DSLIC3R_GTK=3
make # Doesn't mind -j#
make install