Created attachment 202363 [details]
patch to databases/postgresql11-server
Support for GSSAPI authentication with Kerberos has been broken in the master port's makefile for several years.
First problem: selection of Kerberos libraries is inexplicably limited to ancient (no longer supported) PostgreSQL releases.
Second problem: the actual Kerberos library dependency is only recorded if Kerberos is already installed at build time, which is a violation of ports conventions and fails to configure when building packages because package builds always run in a clean environment with no undeclared dependencies installed.
The attached patch makes 9.4 build, package, and function properly (tested only with MIT Kerberos, we don't use Heimdal here) and more recent releases build and package.
This is still a problem now that the master port has been updated to 12.x.