The file in FTP ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.49.tar.gz is no longer exists please replace it with ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.50.tar.gz in ./build.sh
Also change folder name in line 48 at ./build.sh to cd "$BUILD_DIR/libpng-1.2.50" instead of cd "$BUILD_DIR/libpng-1.2.49"
The file in FTP ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.49.tar.gz is no longer exists please replace it with ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.50.tar.gz in ./build.sh
Also change folder name in line 48 at ./build.sh to cd "$BUILD_DIR/libpng-1.2.50" instead of cd "$BUILD_DIR/libpng-1.2.49"