Bug 267442 - games/barony: fix build on armv7
Summary: games/barony: fix build on armv7
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Only Me
Assignee: Nuno Teixeira
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-30 20:21 UTC by Robert Clausecker
Modified: 2022-11-14 20:07 UTC (History)
2 users (show)

See Also:
fuz: maintainer-feedback-
eduardo: merge-quarterly+


Attachments
games/barony: fix build on armv7 (22.12 KB, patch)
2022-10-30 20:21 UTC, Robert Clausecker
fuz: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Clausecker freebsd_committer freebsd_triage 2022-10-30 20:21:22 UTC
Created attachment 237728 [details]
games/barony: fix build on armv7

The type real_t is float on ARM but double on other platforms.  Pepper in a bunch of extra casts to make clang happy.

The alternative of making real_t a double on ARM does not work.

Tested with Poudriere on armv7 arm64 FreeBSD 13.1.
Please MFH if possible.
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2022-11-14 15:27:04 UTC
Comment on attachment 237728 [details]
games/barony: fix build on armv7

Maintainer timeout.
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2022-11-14 15:27:13 UTC
maintainer timeout
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-11-14 20:04:15 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=835b479670531fb700f0f3aad9333f121e144852

commit 835b479670531fb700f0f3aad9333f121e144852
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-11-14 20:00:55 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2022-11-14 20:03:54 +0000

    games/barony: Fix build on armv7

    The type real_t is float on ARM but double on other platforms.  Pepper
    in a bunch of extra casts to make clang happy.

    The alternative of making real_t a double on ARM does not work.

    PR:             267442
    Approved by:    maintainer timeout, >2 weeks
    MFH:            2022Q4

 games/barony/Makefile                              |  2 +-
 games/barony/files/patch-src_actarrow.cpp (new)    | 28 ++++++++++
 games/barony/files/patch-src_actdoor.cpp (new)     | 16 ++++++
 games/barony/files/patch-src_actgate.cpp (new)     | 11 ++++
 .../barony/files/patch-src_acthudweapon.cpp (new)  | 22 ++++++++
 games/barony/files/patch-src_actitem.cpp (new)     | 20 ++++++++
 games/barony/files/patch-src_actmonster.cpp (new)  | 60 ++++++++++++++++++++++
 games/barony/files/patch-src_actplayer.cpp (new)   | 27 ++++++++++
 games/barony/files/patch-src_actthrown.cpp (new)   | 11 ++++
 games/barony/files/patch-src_game.cpp (new)        | 11 ++++
 ...ch-src_interface_updatecharactersheet.cpp (new) | 11 ++++
 games/barony/files/patch-src_item__tool.cpp (new)  | 31 +++++++++++
 games/barony/files/patch-src_items.cpp (new)       | 26 ++++++++++
 .../files/patch-src_magic_actmagic.cpp (new)       | 57 ++++++++++++++++++++
 .../files/patch-src_magic_castSpell.cpp (new)      | 18 +++++++
 .../files/patch-src_monster__lichfire.cpp (new)    | 22 ++++++++
 .../files/patch-src_monster__sentrybot.cpp (new)   | 18 +++++++
 games/barony/files/patch-src_net.cpp (new)         | 11 ++++
 18 files changed, 401 insertions(+), 1 deletion(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-11-14 20:06:17 UTC
A commit in branch 2022Q4 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=54eb60004afcd4ca42a1d6fa4a8b9c49ec016edd

commit 54eb60004afcd4ca42a1d6fa4a8b9c49ec016edd
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-11-14 20:00:55 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2022-11-14 20:05:06 +0000

    games/barony: Fix build on armv7

    The type real_t is float on ARM but double on other platforms.  Pepper
    in a bunch of extra casts to make clang happy.

    The alternative of making real_t a double on ARM does not work.

    PR:             267442
    Approved by:    maintainer timeout, >2 weeks
    MFH:            2022Q4

    (cherry picked from commit 835b479670531fb700f0f3aad9333f121e144852)

 games/barony/Makefile                              |  2 +-
 games/barony/files/patch-src_actarrow.cpp (new)    | 28 ++++++++++
 games/barony/files/patch-src_actdoor.cpp (new)     | 16 ++++++
 games/barony/files/patch-src_actgate.cpp (new)     | 11 ++++
 .../barony/files/patch-src_acthudweapon.cpp (new)  | 22 ++++++++
 games/barony/files/patch-src_actitem.cpp (new)     | 20 ++++++++
 games/barony/files/patch-src_actmonster.cpp (new)  | 60 ++++++++++++++++++++++
 games/barony/files/patch-src_actplayer.cpp (new)   | 27 ++++++++++
 games/barony/files/patch-src_actthrown.cpp (new)   | 11 ++++
 games/barony/files/patch-src_game.cpp (new)        | 11 ++++
 ...ch-src_interface_updatecharactersheet.cpp (new) | 11 ++++
 games/barony/files/patch-src_item__tool.cpp (new)  | 31 +++++++++++
 games/barony/files/patch-src_items.cpp (new)       | 26 ++++++++++
 .../files/patch-src_magic_actmagic.cpp (new)       | 57 ++++++++++++++++++++
 .../files/patch-src_magic_castSpell.cpp (new)      | 18 +++++++
 .../files/patch-src_monster__lichfire.cpp (new)    | 22 ++++++++
 .../files/patch-src_monster__sentrybot.cpp (new)   | 18 +++++++
 games/barony/files/patch-src_net.cpp (new)         | 11 ++++
 18 files changed, 401 insertions(+), 1 deletion(-)
Comment 5 Nuno Teixeira freebsd_committer freebsd_triage 2022-11-14 20:07:13 UTC
Committed, thanks!