MFC r352520 (partial):
The original commit was a direct commit to stable/12, as at the time it
was presumed it would not be necessary for head. However, when it is
time to create a releng branch or switch from PRERELEASE/STABLE to
BETA/RC, the pkg(7) Makefile needs further adjusting. This commit
includes those further adjustments, evaluating the BRANCH variable from
release/Makefile to determine the pkg(7) repository to use.
Approved by: re (kib, insta-MFC)
Sponsored by: Rubicon Communications, LLC (Netgate)