Changeset View
Changeset View
Standalone View
Standalone View
Mk/bsd.sanity.mk
# MAINTAINER: portmgr@FreeBSD.org | # MAINTAINER: portmgr@FreeBSD.org | ||||
# | # | ||||
# Warnings for everyone | # Warnings for everyone | ||||
.for opt in ${ALL_OPTIONS:NDEBUG} | .for opt in ${ALL_OPTIONS:NDEBUG} | ||||
.if defined(WITH_${opt}) | . if defined(WITH_${opt}) | ||||
WARNING+= "WITH_${opt} is unsupported, use WITH=${opt} on the command line, or one of these in /etc/make.conf, OPTIONS_SET+=${opt} to set it globally, or ${OPTIONS_NAME}_SET+=${opt} for only this port." | WARNING+= "WITH_${opt} is unsupported, use WITH=${opt} on the command line, or one of these in /etc/make.conf, OPTIONS_SET+=${opt} to set it globally, or ${OPTIONS_NAME}_SET+=${opt} for only this port." | ||||
.endif | . endif | ||||
.if defined(WITHOUT_${opt}) | . if defined(WITHOUT_${opt}) | ||||
WARNING+= "WITHOUT_${opt} is unsupported, use WITHOUT=${opt} on the command line, or one of these in /etc/make.conf, OPTIONS_UNSET+=${opt} to set it globally, or ${OPTIONS_NAME}_UNSET+=${opt} for only this port." | WARNING+= "WITHOUT_${opt} is unsupported, use WITHOUT=${opt} on the command line, or one of these in /etc/make.conf, OPTIONS_UNSET+=${opt} to set it globally, or ${OPTIONS_NAME}_UNSET+=${opt} for only this port." | ||||
.endif | . endif | ||||
.endfor | .endfor | ||||
ALL_UNSUPPORTED= WITHOUT_NLS NOPORTDOCS NOPORTEXAMPLES WITH_BDB_VER \ | ALL_UNSUPPORTED= WITHOUT_NLS NOPORTDOCS NOPORTEXAMPLES WITH_BDB_VER \ | ||||
OVERRIDE_LINUX_BASE_PORT WITH_OPENSSL_PORT \ | OVERRIDE_LINUX_BASE_PORT WITH_OPENSSL_PORT \ | ||||
WITH_OPENSSL_BASE PYTHON_DEFAULT_VERSION \ | WITH_OPENSSL_BASE PYTHON_DEFAULT_VERSION \ | ||||
PYTHON2_DEFAULT_VERSION PYTHON3_DEFAULT_VERSION | PYTHON2_DEFAULT_VERSION PYTHON3_DEFAULT_VERSION | ||||
ALL_DEPRECATED= | ALL_DEPRECATED= | ||||
ALL_NOTNEEDED= WITH_NEW_XORG WITHOUT_NEW_XORG WITH_KMS WITHOUT_KMS | ALL_NOTNEEDED= WITH_NEW_XORG WITHOUT_NEW_XORG WITH_KMS WITHOUT_KMS | ||||
Show All 9 Lines | |||||
WITHOUT_NEW_XORG_ALT= ${WITH_NEW_XORG_ALT} | WITHOUT_NEW_XORG_ALT= ${WITH_NEW_XORG_ALT} | ||||
WITH_MKS_ALT= "removed and has no effect" | WITH_MKS_ALT= "removed and has no effect" | ||||
WITHOUT_MKS_ALT= ${WITH_MKS_ALT} | WITHOUT_MKS_ALT= ${WITH_MKS_ALT} | ||||
PYTHON_DEFAULT_VERSION_ALT= "DEFAULT_VERSIONS=python=${PYTHON_DEFAULT_VERSION:S/^python//}" | PYTHON_DEFAULT_VERSION_ALT= "DEFAULT_VERSIONS=python=${PYTHON_DEFAULT_VERSION:S/^python//}" | ||||
PYTHON2_DEFAULT_VERSION_ALT= "DEFAULT_VERSIONS=python2=${PYTHON2_DEFAULT_VERSION:S/^python//}" | PYTHON2_DEFAULT_VERSION_ALT= "DEFAULT_VERSIONS=python2=${PYTHON2_DEFAULT_VERSION:S/^python//}" | ||||
PYTHON3_DEFAULT_VERSION_ALT= "DEFAULT_VERSIONS=python3=${PYTHON3_DEFAULT_VERSION:S/^python//}" | PYTHON3_DEFAULT_VERSION_ALT= "DEFAULT_VERSIONS=python3=${PYTHON3_DEFAULT_VERSION:S/^python//}" | ||||
.for a in ${ALL_DEPRECATED} | .for a in ${ALL_DEPRECATED} | ||||
.if defined(${a}) | . if defined(${a}) | ||||
WARNING+= "${a} is deprecated, please use ${${a}_ALT}" | WARNING+= "${a} is deprecated, please use ${${a}_ALT}" | ||||
.endif | . endif | ||||
.endfor | .endfor | ||||
.for a in ${ALL_NOTNEEDED} | .for a in ${ALL_NOTNEEDED} | ||||
.if defined(${a}) | . if defined(${a}) | ||||
WARNING+= "${a} is not needed: ${${a}_REASON}" | WARNING+= "${a} is not needed: ${${a}_REASON}" | ||||
.endif | . endif | ||||
.endfor | .endfor | ||||
.for a in ${ALL_UNSUPPORTED} | .for a in ${ALL_UNSUPPORTED} | ||||
.if defined(${a}) | . if defined(${a}) | ||||
ERROR+= "${a} is unsupported, please use ${${a}_ALT}" | ERROR+= "${a} is unsupported, please use ${${a}_ALT}" | ||||
.endif | . endif | ||||
.endfor | .endfor | ||||
# Warnings only when DEVELOPER=yes | # Warnings only when DEVELOPER=yes | ||||
.if exists(${.CURDIR}/../../Mk/bsd.port.mk) || ${OVERLAYS:tA:M${.CURDIR:H:H}} == ${.CURDIR:H:H} | .if exists(${.CURDIR}/../../Mk/bsd.port.mk) || ${OVERLAYS:tA:M${.CURDIR:H:H}} == ${.CURDIR:H:H} | ||||
.if ${.CURDIR:H:T} != ${PKGCATEGORY} | . if ${.CURDIR:H:T} != ${PKGCATEGORY} | ||||
DEV_ERROR+= "The first entry in CATEGORIES should be the directory where the port lives" | DEV_ERROR+= "The first entry in CATEGORIES should be the directory where the port lives" | ||||
.endif | . endif | ||||
.else | .else | ||||
DEV_WARNING+= "Not validating first entry in CATEGORIES due to being outside of PORTSDIR. Please ensure this is proper when committing." | DEV_WARNING+= "Not validating first entry in CATEGORIES due to being outside of PORTSDIR. Please ensure this is proper when committing." | ||||
.endif | .endif | ||||
.if defined(USE_PERL5) && ${USE_PERL5} == yes | .if defined(USE_PERL5) && ${USE_PERL5} == yes | ||||
DEV_ERROR+= "USE_PERL5=yes is unsupported, please use USES=perl5 instead" | DEV_ERROR+= "USE_PERL5=yes is unsupported, please use USES=perl5 instead" | ||||
.endif | .endif | ||||
Show All 29 Lines | |||||
DEV_WARNING+= "USE_GNOME=desktopfileutils is deprecated, please use USES=desktop-file-utils" | DEV_WARNING+= "USE_GNOME=desktopfileutils is deprecated, please use USES=desktop-file-utils" | ||||
.endif | .endif | ||||
.if defined(LIB_DEPENDS) && ${LIB_DEPENDS:Nlib*} | .if defined(LIB_DEPENDS) && ${LIB_DEPENDS:Nlib*} | ||||
DEV_ERROR+= "All LIB_DEPENDS should use the new format and start out with lib. \(libfoo.so vs foo.so\)" | DEV_ERROR+= "All LIB_DEPENDS should use the new format and start out with lib. \(libfoo.so vs foo.so\)" | ||||
.endif | .endif | ||||
.if defined(LICENSE) | .if defined(LICENSE) | ||||
.if ${LICENSE:MBSD} | . if ${LICENSE:MBSD} | ||||
DEV_WARNING+= "LICENSE must not contain BSD, instead use BSD[234]CLAUSE" | DEV_WARNING+= "LICENSE must not contain BSD, instead use BSD[234]CLAUSE" | ||||
.endif | . endif | ||||
.elif !defined(DISABLE_LICENSES) | .elif !defined(DISABLE_LICENSES) | ||||
. if empty(USES:Mmetaport) | . if empty(USES:Mmetaport) | ||||
DEV_WARNING+= "Please set LICENSE for this port" | DEV_WARNING+= "Please set LICENSE for this port" | ||||
. endif | . endif | ||||
.endif | .endif | ||||
.for _a in ${ONLY_FOR_ARCHS} | .for _a in ${ONLY_FOR_ARCHS} | ||||
.if defined(ONLY_FOR_ARCHS_REASON_${_a}) | . if defined(ONLY_FOR_ARCHS_REASON_${_a}) | ||||
DEV_WARNING+= "ONLY_FOR_ARCHS_${_a} is defined and ${_a} is in ONLY_FOR_ARCHS, the message will never be used." | DEV_WARNING+= "ONLY_FOR_ARCHS_${_a} is defined and ${_a} is in ONLY_FOR_ARCHS, the message will never be used." | ||||
.endif | . endif | ||||
.endfor | .endfor | ||||
.if defined(USE_PYDISTUTILS) && ${USE_PYDISTUTILS} == "easy_install" | .if defined(USE_PYDISTUTILS) && ${USE_PYDISTUTILS} == "easy_install" | ||||
DEV_ERROR+= "USE_PYDISTUTILS=easy_install is no longer supported, please use USE_PYDISTUTILS=yes" | DEV_ERROR+= "USE_PYDISTUTILS=easy_install is no longer supported, please use USE_PYDISTUTILS=yes" | ||||
.endif | .endif | ||||
.if defined(USE_PYTHON) && (${USE_PYTHON} == "yes" || ${USE_PYTHON:C/[-0-9.+]*//} == "") | .if defined(USE_PYTHON) && (${USE_PYTHON} == "yes" || ${USE_PYTHON:C/[-0-9.+]*//} == "") | ||||
_PYTHON_VAL := ${USE_PYTHON} | _PYTHON_VAL := ${USE_PYTHON} | ||||
.if ${_PYTHON_VAL} != "yes" | . if ${_PYTHON_VAL} != "yes" | ||||
DEV_ERROR+= "USE_PYTHON=${_PYTHON_VAL} is no longer supported, please use USES=python:${_PYTHON_VAL}" | DEV_ERROR+= "USE_PYTHON=${_PYTHON_VAL} is no longer supported, please use USES=python:${_PYTHON_VAL}" | ||||
.else | . else | ||||
DEV_ERROR+= "USE_PYTHON=yes is no longer supported, please use USES=python" | DEV_ERROR+= "USE_PYTHON=yes is no longer supported, please use USES=python" | ||||
.endif | . endif | ||||
.endif | .endif | ||||
.if defined(USE_PYTHON_RUN) | .if defined(USE_PYTHON_RUN) | ||||
.if ${USE_PYTHON_RUN} != "yes" | . if ${USE_PYTHON_RUN} != "yes" | ||||
DEV_ERROR+= "USE_PYTHON_RUN is no longer supported, please use USES=python:${USE_PYTHON_RUN},run" | DEV_ERROR+= "USE_PYTHON_RUN is no longer supported, please use USES=python:${USE_PYTHON_RUN},run" | ||||
.else | . else | ||||
DEV_ERROR+= "USE_PYTHON_RUN is no longer supported, please use USES=python:run" | DEV_ERROR+= "USE_PYTHON_RUN is no longer supported, please use USES=python:run" | ||||
.endif | . endif | ||||
.endif | .endif | ||||
.if defined(USE_PYTHON_BUILD) | .if defined(USE_PYTHON_BUILD) | ||||
.if ${USE_PYTHON_BUILD} != "yes" | . if ${USE_PYTHON_BUILD} != "yes" | ||||
DEV_ERROR+= "USE_PYTHON_BUILD is no longer supported, please use USES=python:${USE_PYTHON_BUILD},build" | DEV_ERROR+= "USE_PYTHON_BUILD is no longer supported, please use USES=python:${USE_PYTHON_BUILD},build" | ||||
.else | . else | ||||
DEV_ERROR+= "USE_PYTHON_BUILD is no longer supported, please use USES=python:build" | DEV_ERROR+= "USE_PYTHON_BUILD is no longer supported, please use USES=python:build" | ||||
.endif | . endif | ||||
.endif | .endif | ||||
.if defined(USE_RC_SUBR) && ${USE_RC_SUBR:tu} == YES | .if defined(USE_RC_SUBR) && ${USE_RC_SUBR:tu} == YES | ||||
DEV_ERROR+= "USE_RC_SUBR=yes has not been supported for a long time, remove it." | DEV_ERROR+= "USE_RC_SUBR=yes has not been supported for a long time, remove it." | ||||
.endif | .endif | ||||
.if defined(USE_TCL) || defined(USE_TCL_BUILD) || defined(USE_TCL_RUN) || defined(USE_TCL_WRAPPER) || \ | .if defined(USE_TCL) || defined(USE_TCL_BUILD) || defined(USE_TCL_RUN) || defined(USE_TCL_WRAPPER) || \ | ||||
defined(USE_TK) || defined(USE_TK_BUILD) || defined(USE_TK_RUN) || defined(USE_TK_WRAPPER) | defined(USE_TK) || defined(USE_TK_BUILD) || defined(USE_TK_RUN) || defined(USE_TK_WRAPPER) | ||||
▲ Show 20 Lines • Show All 134 Lines • ▼ Show 20 Lines | |||||
USE_QT5_ALT= USES=qt:5 and USE_QT=${USE_QT5} | USE_QT5_ALT= USES=qt:5 and USE_QT=${USE_QT5} | ||||
QT_NONSTANDARD_ALT= USES=qmake:no_env | QT_NONSTANDARD_ALT= USES=qmake:no_env | ||||
XORG_CAT_ALT= USES=xorg-cat:${XORG_CAT} | XORG_CAT_ALT= USES=xorg-cat:${XORG_CAT} | ||||
CARGO_USE_GITHUB_ALT= CARGO_CRATES \(regenerate it with make cargo-crates\) | CARGO_USE_GITHUB_ALT= CARGO_CRATES \(regenerate it with make cargo-crates\) | ||||
CARGO_USE_GITLAB_ALT= CARGO_CRATES \(regenerate it with make cargo-crates\) | CARGO_USE_GITLAB_ALT= CARGO_CRATES \(regenerate it with make cargo-crates\) | ||||
CARGO_GIT_SUBDIR_ALT= CARGO_CRATES \(regenerate it with make cargo-crates\) | CARGO_GIT_SUBDIR_ALT= CARGO_CRATES \(regenerate it with make cargo-crates\) | ||||
.for a in ${SANITY_DEPRECATED} | .for a in ${SANITY_DEPRECATED} | ||||
.if defined(${a}) | . if defined(${a}) | ||||
DEV_WARNING+= "${a} is deprecated, please use ${${a}_ALT}" | DEV_WARNING+= "${a} is deprecated, please use ${${a}_ALT}" | ||||
.endif | . endif | ||||
.endfor | .endfor | ||||
.for a in ${SANITY_NOTNEEDED} | .for a in ${SANITY_NOTNEEDED} | ||||
.if defined(${a}) | . if defined(${a}) | ||||
DEV_WARNING+= "${a} is not needed: ${${a}_REASON}" | DEV_WARNING+= "${a} is not needed: ${${a}_REASON}" | ||||
.endif | . endif | ||||
.endfor | .endfor | ||||
.for a in ${SANITY_UNSUPPORTED} | .for a in ${SANITY_UNSUPPORTED} | ||||
.if defined(${a}) | . if defined(${a}) | ||||
DEV_ERROR+= "${a} is unsupported, please use ${${a}_ALT}" | DEV_ERROR+= "${a} is unsupported, please use ${${a}_ALT}" | ||||
.endif | . endif | ||||
.endfor | .endfor |