# Adjust SoX for uClibc first
/ffp/bin/wget -Nnv '
https://git.buildroot.net/buildroot/pla ... libc.patch'
patch -p1 < 0001-uclibc.patch
# Fix SoX bug:
https://sourceforge.net/p/sox/mailman/message/33499897/
/ffp/bin/wget -nv '
https://bogomips.org/sox.git/patch/?id= ... 4ac0217737' -O sox-dynamic.patch
patch -p1 < sox-dynamic.patch
# Adapt prefix for /ffp
grep -lrZ '/usr/local' . | xargs -r0 sed -i 's|/usr/local|/ffp|g'
grep -lrZ '/usr' . | xargs -r0 sed -i 's|/usr|/ffp|g'
find . -iname "config.*" -type f -exec sed -i -r 's/^#! ?\/bin\/sh/#!\/ffp\/bin\/sh/' {} +
find . -iname "config.*" -type f -exec sed -i -r 's/^#! ?\/bin\/bash/#!\/ffp\/bin\/bash/' {} +
find . -iname "config.*" -type f -exec sed -i -r 's/^#! ?\/usr\/bin\/env/#!\/ffp\/bin\/env/' {} +
find . -iname "configure" -type f -exec sed -i -r 's/^#! ?\/bin\/sh/#!\/ffp\/bin\/sh/' {} +
find . -iname "configure" -type f -exec sed -i -r 's/^#! ?\/bin\/bash/#!\/ffp\/bin\/bash/' {} +
find . -iname "configure" -type f -exec sed -i -r 's/^#! ?\/usr\/bin\/env/#!\/ffp\/bin\/env/' {} +
find . -executable -type f -exec sed -i -r 's/^#! ?\/bin\/sh/#!\/ffp\/bin\/sh/' {} +
find . -executable -type f -exec sed -i -r 's/^#! ?\/bin\/bash/#!\/ffp\/bin\/bash/' {} +
find . -executable -type f -exec sed -i -r 's/^#! ?\/usr\/bin\/env/#!\/ffp\/bin\/env/' {} +
find . -iname "*.py*" -type f -exec sed -i -r 's/^#! ?\/usr\/bin\/python/#!\/ffp\/bin\/python/' {} +
find . -iname "*.py*" -type f -exec sed -i -r 's/^#! ?\/usr\/bin\/env/#!\/ffp\/bin\/env/' {} +
find . -iname "*.py*" -type f -exec sed -i -r 's/^#! ?\/bin\/python/#!\/ffp\/bin\/python/' {} +
find . -iname "*.py*" -type f -exec sed -i -r 's/^#! ?\/bin\/env/#!\/ffp\/bin\/env/' {} +
find . -iname "*.pl*" -type f -exec sed -i -r 's/^#! ?\/usr\/bin\/perl/#!\/ffp\/bin\/perl/' {} +
find . -iname "*.pl*" -type f -exec sed -i -r 's/^#! ?\/usr\/bin\/env/#!\/ffp\/bin\/env/' {} +
find . -iname "*.pl*" -type f -exec sed -i -r 's/^#! ?\/bin\/perl/#!\/ffp\/bin\/perl/' {} +
find . -iname "*.pl*" -type f -exec sed -i -r 's/^#! ?\/bin\/env/#!\/ffp\/bin\/env/' {} +
# Reconfigure source code due to changes
autoreconf -fi
# And you are ready to go
ac_cv_header_fenv_h=no ./configure --prefix=/ffp --with-sysroot=/ffp --with-dyn-default --with-gsm --with-lpc10 --with-distro='Fonz Fun Plug'
make