A new question: What if the program is missing in the current ports collection? Does that mean there will be no dependency check and no BSD Makefile and Plist will be generated?
If the program isn't in the ports collection then there won't be a so called "BSD Makefile" or PLIST. These will have to be written by whomever is building the package. Checkout the contents of the cdf port I generated. It can be downloaded here:
cdf.tar.gz Untar the contents and look at the Makefile and pkg/PLIST. If you type
make in the cdf directory then it will attempt to download the cdf application sources to /usr/ports/distfiles and begin the build process. This includes in a nut shell checking if all the applications build dependencies exist, and running
configure if they do. Anytime a program is compiled it always checks to ensure that it's build dependencies exist. This is done by
configure which in the end generates the system specific "application Makefile." There is a difference between the "BSD Makefile" and the "application Makefile." The "BSD Makefile" can be considered a pre-application make used to setup the environment. It will make sure that any dependencies that an application needs are installed and pass to
configure any arguments that need to be specified. There's alot more to it but I'm not a teacher. Checkout the following for more information:
Building an OpenBSD port