git: 3507fb3e4ec9 - main - Mk/Uses/meson.mk: add --auto-features=enabled to improve determinism

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Sat, 01 Apr 2023 08:54:59 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3507fb3e4ec9d733a3be2d41cb19adb060c5e43f

commit 3507fb3e4ec9d733a3be2d41cb19adb060c5e43f
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-03-20 13:30:11 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-04-01 08:44:11 +0000

    Mk/Uses/meson.mk: add --auto-features=enabled to improve determinism
    
    PR:             270361
    Inspired by:    Alpine, Arch, NixPkgs, OpenBSD, Void
    Exp-run by:     antoine
---
 Mk/Uses/meson.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Mk/Uses/meson.mk b/Mk/Uses/meson.mk
index 043c6e1e4c7a..f58addcb230a 100644
--- a/Mk/Uses/meson.mk
+++ b/Mk/Uses/meson.mk
@@ -36,6 +36,10 @@ CONFIGURE_ARGS+=	--prefix ${PREFIX} \
 			--mandir man \
 			--infodir ${INFO_PATH}
 
+# Enable all optional features to make builds deterministic. Consumers can
+# expose those as port OPTIONS_* or explicitly pass -D<option>=disabled
+CONFIGURE_ARGS+=	--auto-features=enabled
+
 # Disable color output.  Meson forces it on by default, Ninja
 # strips it before it goes to the log, but Samurai does not, so we
 # might end up with ANSI escape sequences in the logs.