http://www.berklix.com/~jhs/src/bsd/fixes/FreeBSD/ports/gen/Mk/bsd.port.mk.error_to_warn.REL=11.0-CURRENT.diff

beginning of discussion at:
 http://lists.freebsd.org/pipermail/freebsd-ports/2015-June/099568.html
is copied below:

To: ports@@@freebsd.org
cc: "Naram Qashat" <cyberbotx@@@cyberbotx.com>
Subject: bsd.port.mk reduce error to warning for UNAME_r OSVERSION mismatch
From: "Julian H. Stacey" <jhs@@@berklix.com>
Organization: http://www.berklix.com BSD Linux Unix Consultants, Munich Germany
User-agent: EXMH on FreeBSD http://www.berklix.com/free/
X-URL: http://www.berklix.com/~jhs/cv/
Date: Tue, 16 Jun 2015 17:06:22 +0200

bsd.port.mk test below is too agressive, let's have it just Warn, not Fail.
Also prefix text "Error: " or "Warning: " make it obvious which is happening.

It seems likely people may have different opinions if it should
just Warn or Error, so kets add an environent switch to stear that decision.
Which way the default setting of switch should be, I won't suggest
(in hope of enhancing chance of agreement to add the switch :-)
Whoever adds the switch could decide ?

Background:
  	current fails to make my /usr/ports/graphics/libspiro
  	I contacted cc'd MAINTAINER= who wrote me
	"my poudriere is running on 10"
	I dont run poudriere, but have a native 10 partition
	so simply did a chroot ...
I ran:
cd /s2; head -1 /etc/motd
	# FreeBSD 10.1-RELEASE (LAPR.small) #0: Sat Feb 28 16:29:20 CET 2015
cd /usr/ports/graphics/libspiro
make clean
	make: "/usr/ports/Mk/bsd.port.mk" line 1214: UNAME_r (11.0-CURRENT) and OSVERSION (1001000) do not agree on major version number.
make
	make: "/usr/ports/Mk/bsd.port.mk" line 1214: UNAME_r (11.0-CURRENT) and OSVERSION (1001000) do not agree on major version number.

Same forced error can be seen on current lines 1197 & 1199.

After I patched out the failing bsd.port.mk error I could continue my test 
of the port & see the port build with 10 src & ports on an 11 kernel.

Cheers,
Julian

# ------------
# *** current-2015-06-19/ports/Mk/bsd.port.mk	Tue Jun 16 17:10:28 2015
# --- new/ports/Mk/bsd.port.mk	Fri Jun 19 16:19:28 2015
# ***************
# *** 1194,1202 ****
#   # Skip if OSVERSION specified on cmdline for testing. Only works for bmake.
#   .if !defined(.MAKEOVERRIDES) || !${.MAKEOVERRIDES:MOSVERSION}
#   .if ${_OSVERSION_MAJOR} != ${UNAMER:R}
# ! .error UNAME_r (${UNAMER}) and OSVERSION (${OSVERSION}) do not agree on major version number.
#   .elif ${_OSVERSION_MAJOR} != ${OSREL:R}
# ! .error OSREL (${OSREL}) and OSVERSION (${OSVERSION}) do not agree on major version number.
#   .endif
#   .endif
#   
# --- 1194,1210 ----
#   # Skip if OSVERSION specified on cmdline for testing. Only works for bmake.
#   .if !defined(.MAKEOVERRIDES) || !${.MAKEOVERRIDES:MOSVERSION}
#   .if ${_OSVERSION_MAJOR} != ${UNAMER:R}
# ! .ifndef BERKLIX
# ! .error Fatal Error: UNAME_r (${UNAMER}) and OSVERSION (${OSVERSION}) do not agree on major version number.
# ! .else
# ! .warning Warning: UNAME_r (${UNAMER}) and OSVERSION (${OSVERSION}) do not agree on major version number.
# ! .endif
#   .elif ${_OSVERSION_MAJOR} != ${OSREL:R}
# ! .ifndef BERKLIX
# ! .error Fatal Error: OSREL (${OSREL}) and OSVERSION (${OSVERSION}) do not agree on major version number.
# ! .else
# ! .warning Warning: OSREL (${OSREL}) and OSVERSION (${OSVERSION}) do not agree on major version number.
# ! .endif
#   .endif
#   .endif
#   
# ------------
# *** 12.0-CURRENT-2016-09-06/ports/Mk/bsd.port.mk	Tue Sep  6 11:47:05 2016
# --- new-generic/ports/Mk/bsd.port.mk	Tue Sep  6 11:52:20 2016
# ***************
# *** 1174,1182 ****
#   # Skip if OSVERSION specified on cmdline for testing. Only works for bmake.
#   .if !defined(.MAKEOVERRIDES) || !${.MAKEOVERRIDES:MOSVERSION}
#   .if ${_OSVERSION_MAJOR} != ${_OSRELEASE:R}
# ! .error UNAME_r (${_OSRELEASE}) and OSVERSION (${OSVERSION}) do not agree on major version number.
#   .elif ${_OSVERSION_MAJOR} != ${OSREL:R}
# ! .error OSREL (${OSREL}) and OSVERSION (${OSVERSION}) do not agree on major version number.
#   .endif
#   .endif
#   
# --- 1174,1184 ----
#   # Skip if OSVERSION specified on cmdline for testing. Only works for bmake.
#   .if !defined(.MAKEOVERRIDES) || !${.MAKEOVERRIDES:MOSVERSION}
#   .if ${_OSVERSION_MAJOR} != ${_OSRELEASE:R}
# ! # .error UNAME_r (${_OSRELEASE}) and OSVERSION (${OSVERSION}) do not agree on major version number.
# ! .warning UNAME_r (${_OSRELEASE}) and OSVERSION (${OSVERSION}) do not agree on major version number.
#   .elif ${_OSVERSION_MAJOR} != ${OSREL:R}
# ! # .error OSREL (${OSREL}) and OSVERSION (${OSVERSION}) do not agree on major version number.
# ! .warning OSREL (${OSREL}) and OSVERSION (${OSVERSION}) do not agree on major version number.
#   .endif
#   .endif
#   
*** 14.3-RELEASE/ports/Mk/bsd.port.mk.orig	Thu Sep  4 01:21:10 2025
--- 14.3-RELEASE/ports/Mk/bsd.port.mk	Thu Sep  4 01:43:01 2025
***************
*** 1189,1198 ****
  .    if !defined(.MAKEOVERRIDES) || !${.MAKEOVERRIDES:MOSVERSION}
  .      if ${_OSVERSION_MAJOR} != ${_OSRELEASE:R}
  .        if !defined(I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE)
! .error UNAME_r (${_OSRELEASE}) and OSVERSION (${OSVERSION}) do not agree on major version number.
  .        endif
  .      elif ${_OSVERSION_MAJOR} != ${OSREL:R}
! .error OSREL (${OSREL}) and OSVERSION (${OSVERSION}) do not agree on major version number.
  .      endif
  .    endif
  
--- 1189,1200 ----
  .    if !defined(.MAKEOVERRIDES) || !${.MAKEOVERRIDES:MOSVERSION}
  .      if ${_OSVERSION_MAJOR} != ${_OSRELEASE:R}
  .        if !defined(I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE)
! # .error UNAME_r (${_OSRELEASE}) and OSVERSION (${OSVERSION}) do not agree on major version number.
! .warning UNAME_r (${_OSRELEASE}) and OSVERSION (${OSVERSION}) do not agree on major version number.
  .        endif
  .      elif ${_OSVERSION_MAJOR} != ${OSREL:R}
! # .error OSREL (${OSREL}) and OSVERSION (${OSVERSION}) do not agree on major version number.
! .warning OSREL (${OSREL}) and OSVERSION (${OSVERSION}) do not agree on major version number.
  .      endif
  .    endif
  
