#!/bin/bash # Build PortAudio locally in user space if system lib missing set -e cd /tmp if [ -d portaudio ]; then echo "portaudio src exists, skipping clone" else git clone https://github.com/PortAudio/portaudio.git fi cd portaudio ./configure --prefix=$HOME/.local --without-jack make -j$(nproc) make install echo "Installed to ~/.local/lib" echo "Add to LD_LIBRARY_PATH: export LD_LIBRARY_PATH=\$HOME/.local/lib:\$LD_LIBRARY_PATH" ldconfig -n $HOME/.local/lib || true