Bug 241325 - games/colobot: fix build on ARM and PPC
Summary: games/colobot: fix build on ARM and PPC
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-18 12:05 UTC by Piotr Kubaj
Modified: 2019-10-21 10:05 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (fernape)
koobs: merge-quarterly?


Attachments
patch (1.20 KB, patch)
2019-10-18 12:05 UTC, Piotr Kubaj
fernape: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 2019-10-18 12:05:08 UTC
Created attachment 208403 [details]
patch

ARM and PPC use unsigned char by default.

Upstream PR: https://github.com/colobot/colobot/pull/1278
Comment 1 Piotr Kubaj freebsd_committer 2019-10-18 12:07:11 UTC
Otherwise I get this error:
/tmp/usr/ports/games/colobot/work/colobot-colobot-gold-0.1.12-alpha/src/object/task/taskgoto.cpp:1720:22: error: result of comparison of constant -1 with expression of type 'char' is always false [-Werror,-Wtautological-constant-out-of-range-compare]
    if ( m_bmIter[i] == -1 )
         ~~~~~~~~~~~ ^  ~~
1 error generated.
ninja: build stopped: subcommand failed.
Comment 2 Fernando Apesteguía freebsd_committer 2019-10-18 15:41:29 UTC
Hi Piotr,

Thanks for the patch.

I don't have an ARM or PPC arch to test on, but the change makes sense. Let me see if it builds fine in other archs and I'll get back to you soon.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2019-10-18 18:46:41 UTC
Approved as mentor (builds on ppcports) pending maintainer review.
Comment 4 Fernando Apesteguía freebsd_committer 2019-10-18 18:53:03 UTC
Comment on attachment 208403 [details]
patch

LGTM

It builds in {11.2,11.3,12.0}{i386,amd64} and runs fine in 12.0amd64.
Comment 5 commit-hook freebsd_committer 2019-10-21 10:05:44 UTC
A commit references this bug:

Author: pkubaj
Date: Mon Oct 21 10:05:15 UTC 2019
New revision: 515096
URL: https://svnweb.freebsd.org/changeset/ports/515096

Log:
  games/colobot: fix build on ARM and PPC

  PR:		241325
  Approved by:	fernape (maintainer), linimon (mentor)

Changes:
  head/games/colobot/files/
  head/games/colobot/files/patch-src_object_task_taskgoto.h