From nobody Fri Apr 12 10:31:46 2024
X-Original-To: dev-commits-ports-all@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 4VGCY11hRsz5H7fx;
	Fri, 12 Apr 2024 10:31:49 +0000 (UTC)
	(envelope-from bapt@freebsd.org)
Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83])
	(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 "smtp.freebsd.org", Issuer "R3" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4VGCY10MQ3z4KH0;
	Fri, 12 Apr 2024 10:31:49 +0000 (UTC)
	(envelope-from bapt@freebsd.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1712917909;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
	 in-reply-to:in-reply-to:references:references;
	bh=g6MAlhrYg02oKCF3f3Ma1T3+gM7omLtBxUlKx5cTYqk=;
	b=cPbuRXyHYxeP80n5zsHM+GOsgKlp4R4JO8cLzkSvHMQS306bZ8mzHuzEJEEN0gsI+RwbNL
	ChHjGmBUFeTLRPMMKjupsysfmNaJPiv0hqhOfq/yXn4becSPSMW2gaDeZw303NtbbAajIx
	uO/Q/M/0PKvn/ws3QGx/Q/Mlffp1tXv2Z7TIUPTUEYzb4E5dbdqbyMdrcHIohgEZwnMz0o
	13G+5yJOY1pwSbO8+mXHPw2We7BAJdG38O1Tn8XUbfLuaUuM3Zk8xOEn6sfTnQvz2Ehu6Z
	1x0k0EifIcoV3Gr5uY9y3rAy4KUuu7+UaFMJQ84qYMhvL+CHhAZJVfnRUIRKAQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712917909; a=rsa-sha256; cv=none;
	b=o5aCUXn5gucfScPjtA8yAV1//fQfeil6Ro3AYXLUzIKfvHD8F2NU2rgVgBzPSl+3uUs4WQ
	i6Aysky03wy9/dfd4RxbIqeSq/A+SlUkNl+JjDmt8Czhq5wiqVluAwniI4cwzM7EP6Qhcs
	Pu7TphjAvgLxjvGn43qpJB9/vuKvwR1YucEm+8ry/umi2kJfo6cI2mj1yvP3pY40rrkaRI
	D00C3yFIYD9UcYSy6Q0XBSt2L536DQKNzTYJsK4Ro06WJHG+bb6T69fmnTlykunzsSof3x
	fe9oVEaHXrLJKotKnxBGNbc9zlX6btzK7BMckwETUPV4HKGImz2HtiOqbrxVEQ==
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=1712917909;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
	 in-reply-to:in-reply-to:references:references;
	bh=g6MAlhrYg02oKCF3f3Ma1T3+gM7omLtBxUlKx5cTYqk=;
	b=aFf0wp2ODZgsrafvoiBbqBtHKlxHI7J7ROSOkJ2uUa2QmuXsCWdgIB18gImtotXhZDg1eG
	+tvMZbHalXx8UnAMRCztQ0y8sP9V0QPek3/09j2+3Mm7+OyaLk35mB7HseSinB3BYTSCTK
	JAfMeyFLOMzNcEvqqHD8W5D9AeNS86Ss8K5nWx4MqC+x/0qZYFW2Nx+SU7yxn9MrMW85Rg
	UYI09TR4s7qtpAMO8kMCARtfoREnJvCGwqpz4uCBjof+SE5fxYQP47ZIBoJeXNlVw0v6eB
	VEvr9oUvcqWsQHDoYM/eVG+2NXe98wiHIjOmhdsURPEX+af6kMYl93Jh6D2HCQ==
Received: from aniel.nours.eu (nours.eu [IPv6:2001:41d0:8:3a4d::1])
	(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)
	(Authenticated sender: bapt)
	by smtp.freebsd.org (Postfix) with ESMTPSA id 4VGCY06XTbzKZ9;
	Fri, 12 Apr 2024 10:31:48 +0000 (UTC)
	(envelope-from bapt@freebsd.org)
Received: by aniel.nours.eu (Postfix, from userid 1001)
	id 0C8101499C7; Fri, 12 Apr 2024 12:31:47 +0200 (CEST)
Date: Fri, 12 Apr 2024 12:31:46 +0200
From: Baptiste Daroussin <bapt@freebsd.org>
To: Max Brazhnikov <makc@freebsd.org>
Cc: Mathieu Arnold <mat@freebsd.org>, ports-committers@freebsd.org, 
	dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org
Subject: Re: git: 0660187ad07f - main - cleanup: remove occurrences of
 WITH_DEBUG
Message-ID: <davu5htys26yyf442qtsw5xpbanx57vvrodiituwqj4jbf2q2f@3eet3tcmdzzj>
References: <202404120607.43C674EB042318@gitrepo.freebsd.org>
 <CAJie3ypkRa2+_oF72WfjnxdRV8hxNCCV4aTexBP83XAhtdqPFA@mail.gmail.com>
List-Id: Commit messages for all branches of the ports repository <dev-commits-ports-all.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all
List-Help: <mailto:dev-commits-ports-all+help@freebsd.org>
List-Post: <mailto:dev-commits-ports-all@freebsd.org>
List-Subscribe: <mailto:dev-commits-ports-all+subscribe@freebsd.org>
List-Unsubscribe: <mailto:dev-commits-ports-all+unsubscribe@freebsd.org>
X-BeenThere: dev-commits-ports-all@freebsd.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAJie3ypkRa2+_oF72WfjnxdRV8hxNCCV4aTexBP83XAhtdqPFA@mail.gmail.com>

On Fri 12 Apr 12:41, Max Brazhnikov wrote:
> I don't quite understand something about ports options and features.
> 
> Can we have the same knob as an option and as a feature?
> 
> For example, graphics/glaxnimate has DEBUG in the OPTIONS_DEFINE and
> the following lines in the Makefile:
> 
> .if !${PORT_OPTIONS:MDEBUG}
> CXXFLAGS:=      ${CXXFLAGS:C/-O([2-9]|[sz]|fast)/-O1/}
> -fstack-protector-strong -fno-strict-aliasing
> .endif
> 
> Now to build this port in the debug mode I have to set WITH_DEBUG and
> enable DEBUG option at the same time.
> 
> We should either disallow having DEBUG in the options and check only
> for WITH_DEBUG everywhere,
> or WITH_DEBUG feature should set DEBUG option automatically.
> 
> Max
all options about DEBUG should be removed and only the feature being used.

The port should test if WITH_DEBUG is defined (after .pre.mk or .options.mk)
inclusion to add port specific things if needed.

Best regards,
Bapt