Bug 280826 - emulators/ares: unbreak i386 build
Summary: emulators/ares: unbreak i386 build
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL: https://pkg-status.freebsd.org/beefy2...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-15 09:01 UTC by Stefan Schlosser
Modified: 2024-08-15 17:39 UTC (History)
1 user (show)

See Also:


Attachments
unbreak i386 build (2.83 KB, patch)
2024-08-15 09:01 UTC, Stefan Schlosser
bsdcode: maintainer-approval+
Details | Diff
unbreak i386 build (2.84 KB, patch)
2024-08-15 16:36 UTC, Stefan Schlosser
bsdcode: maintainer-approval+
Details | Diff
unbreak i386 build (2.90 KB, patch)
2024-08-15 17:19 UTC, Stefan Schlosser
bsdcode: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Schlosser 2024-08-15 09:01:04 UTC
Created attachment 252772 [details]
unbreak i386 build

- recognize i386 architecture in upstream GNUmakefile
- use LLD_UNSAFE with OPENAL option
- change WWW to homepage
- fix typo in pkg-descr
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-15 15:38:11 UTC
This work for me:
-  ifneq ($(filter i686-%,$(machine_str)),)
+  ifneq ($(filter i386-% i686-%,$(machine_str)),)

Probably for upstream best is:
+  ifneq ($(filter i%86-%,$(machine_str)),)
Or
+  ifneq ($(filter i386-% i486-% i586-% i686-%,$(machine_str)),)

Can you suggest this for upstream?
Comment 2 Stefan Schlosser 2024-08-15 15:59:09 UTC
I have another idea: the original GNUmakefile looks for the i686- prefix only to set the "arch" variable to it. It's not used for anything else. We could leave the i686-% unaltered in place and just add "MAKE_ARGS= arch=${ARCH}" to our Makefile. This works.

What do you think?

Of course I can suggest your improvement to upstream.
Comment 3 Stefan Schlosser 2024-08-15 16:04:24 UTC
Sorry, forget my last comment. The GNUmakefile does specific stuff with explicit values acquired from this search. It's probably best to do it as you suggested. Will provide patch soon.
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-15 16:31:00 UTC
$(filter i%86-%,$(machine_str)) doesn't work - filter takes only one wildcard.
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-15 16:32:24 UTC
(In reply to Stefan Schlosser from comment #3)
Pick one from:
  ifneq ($(filter i386-% i686-%,$(machine_str)),)
  ifneq ($(filter i386-% i486-% i586-% i686-%,$(machine_str)),)
Comment 6 Stefan Schlosser 2024-08-15 16:36:12 UTC
Created attachment 252780 [details]
unbreak i386 build

Applied your first suggestion. Will propose it upstream soon and remove our patch again when we update the port the next time.
Comment 7 Stefan Schlosser 2024-08-15 17:19:21 UTC
Created attachment 252781 [details]
unbreak i386 build

Upstream PR is submitted. Updated patch accordingly.
Comment 8 commit-hook freebsd_committer freebsd_triage 2024-08-15 17:37:33 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5e2e6a2f8e5d14fd4322863cbae3a779c83c3278

commit 5e2e6a2f8e5d14fd4322863cbae3a779c83c3278
Author:     Stefan Schlosser <bsdcode@disroot.org>
AuthorDate: 2024-08-15 17:31:25 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-08-15 17:35:42 +0000

    emulators/ares: unbreak i386 build

    - recognize i386 architecture in upstream GNUmakefile
      (upstream pool request:
      https://github.com/ares-emulator/ares/pull/1600)
    - use LLD_UNSAFE with OPENAL option
    - change WWW to homepage
    - fix typo in pkg-descr

    PR:     280826

 emulators/ares/Makefile                     | 9 ++++++++-
 emulators/ares/files/patch-nall_GNUmakefile | 9 +++++++++
 emulators/ares/pkg-descr                    | 2 +-
 3 files changed, 18 insertions(+), 2 deletions(-)
Comment 9 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-15 17:39:06 UTC
Thanks.