Where should I install new (source code) software on a Mac?
To start we should define a few terms. An install from source code means that the software needs to be built before it can be executed.

So your first step is to find a place on your computer to perform the build. The best place for this is a directory in your home directory. I use a directory at ~/src/ to hold the packages. So, create this folder and unpack your source into here. Then you can build the software here.

When it comes to the executable files man hier will tell you that /usr/local is the place to install things not included in the OS. Homebrew, for example, will install into here. So executables should go into /usr/local/bin. Most software packages will have an install tool that will perform this step. Of course /usr/local/bin needs to be in your PATH variable.

This is identical to Ubuntu in almost every respect.