1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-17 19:39:43 +00:00

Mk/Uses: Fix feature checks after my previous {WITH,WITHOUT}_*_PORTS change

Test Plan:
Take cmake.mk for example. Choosing a port with USES=cmake and running
`make -V CMAKE_BUILD_TYPE` gives "Release" and
`make -V CMAKE_BUILD_TYPE WITH_DEBUG=yes` gives "Debug". However,
`make -V CMAKE_BUILD_TYPE WITH_DEBUG_PORTS=this/port` still gives "Release"
unless this change is applied.

Differential Revision: https://reviews.freebsd.org/D44748

Fixes:	d697653cff

Approved by:	bapt
This commit is contained in:
Gleb Popov 2024-04-11 15:13:15 +03:00
parent a032af2a95
commit 665b0219e5
8 changed files with 17 additions and 17 deletions

View File

@ -194,7 +194,7 @@ CARGO_INSTALL_ARGS+= --features='${CARGO_FEATURES:N--no-default-features}'
CARGO_TEST_ARGS+= --features='${CARGO_FEATURES:N--no-default-features}'
. endif
. if !defined(WITH_DEBUG)
. if !defined(_WITH_DEBUG)
CARGO_BUILD_ARGS+= --release
CARGO_TEST_ARGS+= --release
. else

View File

@ -83,13 +83,13 @@ BUILD_DEPENDS+= ${CMAKE_BIN}:devel/cmake-core
RUN_DEPENDS+= ${CMAKE_BIN}:devel/cmake-core
. endif
. if defined(WITH_DEBUG)
. if defined(_WITH_DEBUG)
CMAKE_BUILD_TYPE?= Debug
. elif defined(WITH_DEBUGINFO)
. elif defined(_WITH_DEBUGINFO)
CMAKE_BUILD_TYPE?= RelWithDebInfo
. else
CMAKE_BUILD_TYPE?= Release
. endif #defined(WITH_DEBUG)
. endif #defined(_WITH_DEBUG)
CMAKE_ARGS+= -DCMAKE_C_COMPILER:STRING="${CC}" \
-DCMAKE_CXX_COMPILER:STRING="${CXX}" \
@ -128,7 +128,7 @@ CMAKE_ARGS+= -DCMAKE_COLOR_MAKEFILE:BOOL=OFF
. endif
. if empty(cmake_ARGS:Mindirect)
. if defined(STRIP) && ${STRIP} != "" && !defined(WITH_DEBUG) && !defined(WITH_DEBUGINFO)
. if defined(STRIP) && ${STRIP} != "" && !defined(_WITH_DEBUG) && !defined(_WITH_DEBUGINFO)
INSTALL_TARGET?= install/strip
. endif
. endif

View File

@ -90,13 +90,13 @@ GO_PKGNAME= ${PORTNAME}
GO_TARGET?= ${GO_PKGNAME}
GO_TESTTARGET?= ./...
. if !defined(PIE_UNSAFE) && defined(WITH_PIE) && ${ARCH} == amd64
. if !defined(PIE_UNSAFE) && defined(_WITH_PIE) && ${ARCH} == amd64
GO_BUILDFLAGS+= -buildmode=pie
. else
GO_BUILDFLAGS+= -buildmode=exe
. endif
GO_BUILDFLAGS+= -v -trimpath
. if !defined(WITH_DEBUG) && empty(GO_BUILDFLAGS:M-ldflags*)
. if !defined(_WITH_DEBUG) && empty(GO_BUILDFLAGS:M-ldflags*)
GO_BUILDFLAGS+= -ldflags=-s
. endif
GO_TESTFLAGS+= -v

View File

@ -65,7 +65,7 @@ PLIST_SUB+= GRANTLEE_VERSION_FULL=${GRANTLEE_VERSION} \
# GrantleeMacros.cmake provides grantlee_adjust_plugin_name() which appends a
# letter 'd' to the library name in Debug mode. Provide a PLIST_SUB which can be
# appended in the plist.
. if defined(WITH_DEBUG)
. if defined(_WITH_DEBUG)
PLIST_SUB+= GRANTLEE_DEBUG_SUFFIX=d
. else
PLIST_SUB+= GRANTLEE_DEBUG_SUFFIX=""

View File

@ -51,9 +51,9 @@ CONFIGURE_ARGS+= -Db_colorout=never
INSTALL_TARGET= install
# should we have strip separate from WITH_DEBUG?
. if defined(WITH_DEBUG)
. if defined(_WITH_DEBUG)
CONFIGURE_ARGS+= --buildtype debug
. elif defined(WITH_DEBUGINFO)
. elif defined(_WITH_DEBUGINFO)
CONFIGURE_ARGS+= --buildtype debugoptimized
. else
CONFIGURE_ARGS+= --buildtype release \

View File

@ -208,7 +208,7 @@ PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts
PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts
. endif
. if defined(WITH_DEBUG)
. if defined(_WITH_DEBUG)
PHP_EXT_DIR:= ${PHP_EXT_DIR}-debug
. endif
PHP_SAPI?= ""

View File

@ -16,7 +16,7 @@
# norecursive Don't pass -recursive argument to qmake binary
# outsource Perform an out-of-source build
# no_env Suppress modification of configure and make environment.
# no_configure Don't add the configure target -- this is implied by
# no_configure Don't add the configure target -- this is implied by
# HAS_CONFIGURE=yes and GNU_CONFIGURE=yes
#
#
@ -75,7 +75,7 @@ QMAKE_ARGS+= -spec ${QMAKESPEC} \
QMAKE_CXXFLAGS_RELEASE="" \
PREFIX="${PREFIX}"
. if defined(WITH_DEBUG)
. if defined(_WITH_DEBUG)
PLIST_SUB+= DEBUG=""
QMAKE_ARGS+= CONFIG+="debug separate_debug_info" \
CONFIG-="release"
@ -83,7 +83,7 @@ QMAKE_ARGS+= CONFIG+="debug separate_debug_info" \
PLIST_SUB+= DEBUG="@comment "
QMAKE_ARGS+= CONFIG+="release" \
CONFIG-="debug separate_debug_info"
. endif # defined(WITH_DEBUG)
. endif # defined(_WITH_DEBUG)
# We set -recursive by default to keep qmake from running in the build stage.
. if ! ${qmake_ARGS:Mnorecursive}

View File

@ -239,7 +239,7 @@ CONFIGURE_ARGS+= -no-use-gold-linker
CONFIGURE_ARGS+= -recheck-all
. endif # ${_QT_VER:M5}
. if defined(WANT_QT_DEBUG) || defined(WITH_DEBUG)
. if defined(WANT_QT_DEBUG) || defined(_WITH_DEBUG)
WITH_DEBUG= yes
STRIP= # It's done prior to bsd.qt.mk inclusion.
CONFIGURE_ARGS+= -debug -separate-debug-info
@ -250,7 +250,7 @@ QMAKE_ARGS+= QT_CONFIG+="debug separate_debug_info" \
CONFIGURE_ARGS+= -release -no-separate-debug-info
QMAKE_ARGS+= QT_CONFIG+="release" \
QT_CONFIG-="debug separate_debug_info"
. endif # defined(WANT_QT_DEBUG) || defined(WITH_DEBUG)
. endif # defined(WANT_QT_DEBUG) || defined(_WITH_DEBUG)
. if defined(WANT_QT_VERBOSE_CONFIGURE)
CONFIGURE_ARGS+= -verbose
@ -302,7 +302,7 @@ QMAKE_ARGS+= QT_CONFIG-="${QT_CONFIG:M-*:O:u:C/^-//}"
PLIST_SUB+= SHORTVER=${_QT_VERSION:R} \
FULLVER=${_QT_VERSION:C/-.*//}
. if defined(WITH_DEBUG)
. if defined(_WITH_DEBUG)
PLIST_SUB+= DEBUG="" \
NO_DEBUG="@comment "
. else