Bug 277913 - emulators/wine-devel: build error: invalid option -- D
Summary: emulators/wine-devel: build error: invalid option -- D
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Gerald Pfeifer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-24 11:01 UTC by O. Hartmann
Modified: 2024-05-15 22:51 UTC (History)
1 user (show)

See Also:


Attachments
correct environment confusion using gmake (711 bytes, patch)
2024-03-24 11:01 UTC, O. Hartmann
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2024-03-24 11:01:41 UTC
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.
Comment 1 O. Hartmann 2024-05-09 17:04:09 UTC
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.
Comment 2 Gerald Pfeifer freebsd_committer freebsd_triage 2024-05-09 23:40:31 UTC
I'll take care. Thank you for the patch and even following up with
additional background, O.!
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-05-11 09:00:47 UTC
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(-)
Comment 4 Gerald Pfeifer freebsd_committer freebsd_triage 2024-05-11 09:32:09 UTC
Pushed. And I'll also look into doing this for the wine and wine8 ports.
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-05-12 10:44:43 UTC
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(-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2024-05-15 22:51:55 UTC
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(-)