Bug 209591 - games/chromium-bsu: Fix build with libc++ 3.8.0
Summary: games/chromium-bsu: Fix build with libc++ 3.8.0
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: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks: 208158
  Show dependency treegraph
 
Reported: 2016-05-17 21:24 UTC by Dimitry Andric
Modified: 2016-05-18 03:24 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (amdmi3)


Attachments
Include <cmath> so abs(double) can be found (874 bytes, patch)
2016-05-17 21:24 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer 2016-05-17 21:24:46 UTC
Created attachment 170419 [details]
Include <cmath> so abs(double) can be found

During the exp-run in bug 208158, it was found that games/chromium-bsu gives errors with libc++ 3.8.0 [1]:

MainSDL_Event.cpp:420:73: error: call to 'abs' is ambiguous
                if( keystate[SDLK_LEFT]  || keystate[SDLK_KP4] ) key_speed_x -= 2.0 + abs(key_speed_x)*0.4;
                                                                                      ^~~

This is because key_speed_x is a floating point value, but <cmath> is not included, and abs() for floating point values comes from that header.  Fix it by including <cmath>.

[1] http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-05-01_10h29m48s/logs/errors/chromium-bsu-0.9.15.1_4.log
Comment 1 commit-hook freebsd_committer 2016-05-18 01:29:34 UTC
A commit references this bug:

Author: amdmi3
Date: Wed May 18 01:29:30 UTC 2016
New revision: 415422
URL: https://svnweb.freebsd.org/changeset/ports/415422

Log:
  - Fix build with libc++ 3.8.0 [1]
  - While here, switch to USES=localbase and update WWW

  PR:		209591 [1]
  Submitted by:	dim [1]

Changes:
  head/games/chromium-bsu/Makefile
  head/games/chromium-bsu/pkg-descr
Comment 2 Jan Beich freebsd_committer 2016-05-18 01:45:20 UTC
I don't see the patch from here in that commit. Did you forget |svn add| ?
Comment 3 Dmitry Marakasov freebsd_committer 2016-05-18 03:24:11 UTC
True, thanks for noticing!
Comment 4 commit-hook freebsd_committer 2016-05-18 03:24:39 UTC
A commit references this bug:

Author: amdmi3
Date: Wed May 18 03:23:58 UTC 2016
New revision: 415424
URL: https://svnweb.freebsd.org/changeset/ports/415424

Log:
  - Add forgotten patch for the previous commit

  PR:		209591
  Submitted by:	dim
  Reported by:	jbeich

Changes:
  head/games/chromium-bsu/files/
  head/games/chromium-bsu/files/patch-src_MainSDL__Event.cpp