And one more detail. If you build binaries from source, you now need to build dependencies in the depends directory before the main build.
First you need to install cmake and curl packages.
Then you need to run make in depends, before calling configure for the main build. If everything goes right, then a directory with dependency binaries should appear in depends. Depending on your OS it can have different name, for example x86_64-pc-linux-gnu for 64-bit Linux systems.
After which, when you call configure, you need to add the --prefix `pwd`/depends/<host> parameter, for example:
./configure --prefix `pwd`/depends/x86_64-pc-linux-gnu
Everything else is as usual. But on older versions of Ubuntu (<16.04) and Debian (<9) you may face with problems due to older versions of packages.