Created attachment 249441 [details] correct environment confusion using gmake On recent CURRENT (FreeBSD 15.0-CURRENT #6 main-n268966-a200093c2163: Sat Mar 23 08:34:05 CET 2024 amd64), building emulators/wine-devel fails with: [...] ===> Building for wine-devel-9.4,1 cd /usr/ports/emulators/wine-devel/work/wine-9.4 && gmake depend : invalid option -- D Usage: gmake [options] [target] ... Options: -b, -m Ignored for compatibility. -B, --always-make Unconditionally make all targets. -C DIRECTORY, --directory=DIRECTORY [...] The solution/workaround has recently been discussed here, I guess this error is a late fallout. See patch.
See ports/CHANGES: [...] 20240229: AUTHOR: tijl@FreeBSD.org A new command SETENVI that clears the environment and a new variable WRK_ENV that contains a basic environment to use with SETENVI have been added. Ports that run (parts of) the upstream build system directly using commands like "${SETENV} ${MAKE_ENV} ${MAKE_CMD} ..." should change that to "${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ...". This way the build system runs with a clean environment without interference from the user environment or ports framework environment. Ports can add extra environment variables to WRK_ENV similar to CONFIGURE_ENV, MAKE_ENV, TEST_ENV, and so on, but WRK_ENV is used in all targets while the latter are target-specific. [...] Adjusting the port accordingly unbreaks the build for portmaster.
I'll take care. Thank you for the patch and even following up with additional background, O.!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=c9fcc6ef30cbe906a069a0721797f37f88a14da0 commit c9fcc6ef30cbe906a069a0721797f37f88a14da0 Author: O. Hartmann <ohartmann@walstatt.org> AuthorDate: 2024-05-11 08:41:48 +0000 Commit: Gerald Pfeifer <gerald@FreeBSD.org> CommitDate: 2024-05-11 09:00:19 +0000 emulators/wine-devel: Clean environment for gmake PR: 277913 emulators/wine-devel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Pushed. And I'll also look into doing this for the wine and wine8 ports.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=07042622f3af82e624f996fb442a4627678abdf4 commit 07042622f3af82e624f996fb442a4627678abdf4 Author: Gerald Pfeifer <gerald@FreeBSD.org> AuthorDate: 2024-05-12 10:43:15 +0000 Commit: Gerald Pfeifer <gerald@FreeBSD.org> CommitDate: 2024-05-12 10:43:15 +0000 emulators/wine: Clean environment for gmake Backport c9fcc6ef30 from emulators/wine-devel. PR: 277913 emulators/wine/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=af5e803d13e8ed05979561eb435dcf6bde24b11b commit af5e803d13e8ed05979561eb435dcf6bde24b11b Author: Gerald Pfeifer <gerald@FreeBSD.org> AuthorDate: 2024-05-15 22:50:52 +0000 Commit: Gerald Pfeifer <gerald@FreeBSD.org> CommitDate: 2024-05-15 22:50:52 +0000 emulators/wine8: Clean environment for gmake Backport c9fcc6ef30 from emulators/wine-devel. PR: 277913 emulators/wine8/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)