Bug 232016

Summary: games/nxengine: fix build with powerpc64
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: Nikolai Lifanov <lifanov>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: linimon, pkubaj
Priority: --- Flags: bugzilla: maintainer-feedback? (lifanov)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch none

Description Piotr Kubaj freebsd_committer freebsd_triage 2018-10-06 19:16:20 UTC
Created attachment 197851 [details]
patch

Building this port on powerpc64 currently fails with:
/tmp/usr/local/poudriere/ports/default/games/nxengine/work/nxengine-evo-2.6.3/src/player.cpp:763:53: error: narrowing conversion of '-1' from 'int' to 'char' i
nside { } [-Wnarrowing]
    { LEFTKEY, RIGHTKEY, UPKEY, JUMPKEY, FIREKEY, -1 };
                                                     ^

Fix this by adding -Wno-error=narrowing to CXXFLAGS for powerpc64.

Hardware sponsored by IntegriCloud.
Comment 1 Nikolai Lifanov freebsd_committer freebsd_triage 2018-10-15 00:02:32 UTC
I don't have powerpc64 hardware to test on, but the fix seems reasonable.
I'm going to commit it as-is.
Comment 2 Nikolai Lifanov freebsd_committer freebsd_triage 2018-10-15 00:05:39 UTC
Actually, I'm going to appy the same fix for everything.
aarch64, armv6, and armv7 are broken in the same way.
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-10-15 00:13:27 UTC
A commit references this bug:

Author: lifanov
Date: Mon Oct 15 00:13:06 UTC 2018
New revision: 482126
URL: https://svnweb.freebsd.org/changeset/ports/482126

Log:
  unbreak games/nxengine on powerpc64 and others

  PR:		232016
  Submitted by:	Piotr Kubaj

Changes:
  head/games/nxengine/Makefile
Comment 4 Nikolai Lifanov freebsd_committer freebsd_triage 2018-10-15 00:13:27 UTC
I made the CXXFLAGS addition global to also unbreak arm platforms.
Comment 5 Nikolai Lifanov freebsd_committer freebsd_triage 2018-10-15 00:13:47 UTC
Committed, thanks!
Comment 6 Piotr Kubaj freebsd_committer freebsd_triage 2018-12-27 09:50:22 UTC
Could you replace -Wno-error-narrowing with -Wno-error=narrowing? The former is not supported by GCC, the latter is supported by both Clang and GCC.