From nobody Thu Feb 29 06:08:14 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tlgkl1glGz5C1SD; Thu, 29 Feb 2024 06:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tlgkl07xqz4Zdq; Thu, 29 Feb 2024 06:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709186895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YAX7gqPuYCLtBOhP2Jimqg0ll3L9KOFWE4WIQvyX3wM=; b=ifTvWppR/h/siC+3/FO8dgdm9KPAdfiAs+fSGAZFOdvUWkrCxuRaMA0XG031Y/0VvUd3Ku PEzfd4qn0vlb+ChQ4OIcMNBQbY8F3AN0OXNNdK9DYRezYSwEwmeHHsrnRccPljMbrV4h/+ /keIMZryghTfX2mb/jC71bNSXxP0kNjeot8UOTgUMf0aECo/d3ux2z8Q2zZ2A9WFkHrdja T368eZHZeuJPSQLSob/OxaKK1+0SLrjQLtS0VV9NL4HRfKnHaYopkv7naYHO8xiQ+JzQyD mGrZ3p3fu4EZvrzC525x9rh3yJIVCbwMae3EfDGBilkH12OFVqAssq0M/5eEXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709186895; a=rsa-sha256; cv=none; b=T1J/onOo+XGQlfbiRacbLUUDvRXTgOxZ1JfzBkoevqHBmpo6uiF2mYImGaLUFDMgKLB+b2 d2XMnaAF9figeSJ1+8MCwPDXq0NIsnP0RxQwGOdYj4eQnsJl4UHnoTkfpPTRF/UfrptXQ6 MJm2svd8ktHaX0wlLEsTk/hzS12kGq9MI7Aj8WAyxaBys76bJukaqqyTWltDOM01Zcsa4b +n3LcWnaYvmSk8ceIPn7f39a7cLV561/8GW5YOJxNmLIAFqolrLlKLtpuNxKF1JEoLNlEW RmRZFi5M3luNwwn6ZGmBo0keCYm26EM2VB/KMx8hCQT5Zx8ksaEeMpMLGRrEBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709186895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YAX7gqPuYCLtBOhP2Jimqg0ll3L9KOFWE4WIQvyX3wM=; b=YZ/xQ5hQcVJapbTILws37tlr+0mbDqNdPTuxC+IpqwKez0/u2GjdNoV2yd8Ui2OuWbABTT KFd1QTx6G5kgICf84L1cc+shhCIeCCMD6hDX7vUmnJfMtutoWTOOSRzMV+HDr+ofw9vSWL rlBxjdu6FCMtC3zQ0OAah7xdKIllxhHrxT7G9UYZVxmhujc1L7TBEH+FaKHs5nwy44jfcw JQSN0Z48fLm7gPZlHS+rLGq8UzGE/Dg7VZheGlgOmWwjabO1tF/2V5f2rHfbkAsxVILnL9 1/k68foKT1XE3T89Mj03NBaefcXQi8b7nnsylF7vyZpOXXnsQtQz9ofqDUNIdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tlgkk6sLHzTSV; Thu, 29 Feb 2024 06:08:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41T68Eau074390; Thu, 29 Feb 2024 06:08:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41T68Esf074387; Thu, 29 Feb 2024 06:08:14 GMT (envelope-from git) Date: Thu, 29 Feb 2024 06:08:14 GMT Message-Id: <202402290608.41T68Esf074387@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Gleb Popov Subject: git: d697653cffd1 - main - Mk/bsd.port.mk: Allow WITHOUT_FEATURE_PORTS to cancel WITH_FEATURE List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d697653cffd19ddaf3cdee2589a830c72ab39777 Auto-Submitted: auto-generated The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=d697653cffd19ddaf3cdee2589a830c72ab39777 commit d697653cffd19ddaf3cdee2589a830c72ab39777 Author: Gleb Popov AuthorDate: 2024-02-17 16:39:51 +0000 Commit: Gleb Popov CommitDate: 2024-02-29 06:07:12 +0000 Mk/bsd.port.mk: Allow WITHOUT_FEATURE_PORTS to cancel WITH_FEATURE Differential Revision: https://reviews.freebsd.org/D43949 Sponsored by: Serenity Cybersecurity, LLC --- Mk/bsd.port.mk | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 32baeb54b242..1ec1e6c52c66 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1322,18 +1322,39 @@ LDCONFIG32_DIR= libdata/ldconfig32 TMPDIR?= /tmp . endif # defined(PACKAGE_BUILDING) +# If user specified WITH_FEATURE=yes for a feature that is disabled by default +# treat it as enabled by default +. for feature in ${_LIST_OF_WITH_FEATURES} +. if ${_DEFAULT_WITH_FEATURES:N${feature}} +. if defined(WITH_${feature:tu}) +_DEFAULT_WITH_FEATURES+= ${feature} +. endif +. endif +. endfor + +. for feature in ${_LIST_OF_WITH_FEATURES} +# Create _{WITH,WITHOUT}_FEATURE vars based on user-provided {WITH,WITHOUT}_FEATURE +. if defined(WITH_${feature:tu}) +_WITH_${feature:tu}= ${WITH_${feature:tu}} +. endif +. if defined(WITHOUT_${feature:tu}) +_WITHOUT_${feature:tu}= ${WITHOUT_${feature:tu}} +. endif # For each Feature we support, process the # WITH_FEATURE_PORTS and WITHOUT_FEATURE_PORTS variables -. for feature in ${_LIST_OF_WITH_FEATURES} . if ${_DEFAULT_WITH_FEATURES:M${feature}} -_WITH_OR_WITHOUT= WITHOUT +. if defined(WITHOUT_${feature:tu}_PORTS) +. if ${WITHOUT_${feature:tu}_PORTS:M${PKGORIGIN}} +_WITHOUT_${feature:tu}= yes +.undef _WITH_${feature:tu} +. endif +. endif . else -_WITH_OR_WITHOUT= WITH -. endif - -. if defined(${_WITH_OR_WITHOUT}_${feature:tu}_PORTS) -. if ${${_WITH_OR_WITHOUT}_${feature:tu}_PORTS:M${PKGORIGIN}} -${_WITH_OR_WITHOUT}_${feature:tu}= yes +. if defined(WITH_${feature:tu}_PORTS) +. if ${WITH_${feature:tu}_PORTS:M${PKGORIGIN}} +_WITH_${feature:tu}= yes +.undef _WITHOUT_${feature:tu} +. endif . endif . endif . endfor @@ -1787,7 +1808,7 @@ CFLAGS:= ${CFLAGS:C/${_CPUCFLAGS}//} . endif . for f in ${_LIST_OF_WITH_FEATURES} -. if defined(WITH_${f:tu}) || ( ${_DEFAULT_WITH_FEATURES:M${f}} && !defined(WITHOUT_${f:tu}) ) +. if defined(_WITH_${f:tu}) || ( ${_DEFAULT_WITH_FEATURES:M${f}} && !defined(_WITHOUT_${f:tu}) ) .include "${PORTSDIR}/Mk/Features/$f.mk" . endif . endfor