Bug 280826

Summary: emulators/ares: unbreak i386 build
Product: Ports & Packages Reporter: Stefan Schlosser <bsdcode>
Component: Individual Port(s)Assignee: Vladimir Druzenko <vvd>
Status: Closed FIXED    
Severity: Affects Some People CC: vvd
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://pkg-status.freebsd.org/beefy21/data/140i386-default/ac90984a4ba1/logs/ares-139.20240809.log
Attachments:
Description Flags
unbreak i386 build
bsdcode: maintainer-approval+
unbreak i386 build
bsdcode: maintainer-approval+
unbreak i386 build bsdcode: maintainer-approval+

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.