Bug 237773 - games/openmw: fix build with GCC-based architectures
Summary: games/openmw: fix build with GCC-based architectures
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: Piotr Kubaj
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-07 13:37 UTC by Piotr Kubaj
Modified: 2019-05-08 08:13 UTC (History)
1 user (show)

See Also:
tobik: maintainer-feedback+


Attachments
patch (8.70 KB, patch)
2019-05-07 13:37 UTC, Piotr Kubaj
tobik: 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 freebsd_triage 2019-05-07 13:37:40 UTC
Created attachment 204246 [details]
patch

After mygui upgrade, a couple of include <memory> are needed to build with GCC.

Tested on powerpc64 and amd64.
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2019-05-07 14:17:42 UTC
Comment on attachment 204246 [details]
patch

Without any failure logs I cannot really make a well-informed decision here.
The latest package build on powerpc64 shows openmw as ignored [1], so
I cannot go there to look it up.

Looks like there is something similar upstream already [2], so if you want add
them.

[1] http://pylon.nyi.freebsd.org/build.html?mastername=head-powerpc64-default&build=p500451_s346935
[2] https://gitlab.com/OpenMW/openmw/commit/216e1ab16f88b9db6f8559bce2095e84c0ebbcbd
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2019-05-07 16:05:05 UTC
(In reply to Tobias Kortkamp from comment #1)
For reference, error:
https://talos.anongoth.pl/data/latest-per-pkg/openmw/0.45.0_2/powerpc64-default.log

Patch for qt5 is also sent to BZ, if you want to test building it.
Comment 3 Piotr Kubaj freebsd_committer freebsd_triage 2019-05-07 16:23:53 UTC
(In reply to Piotr Kubaj from comment #2)
I applied the upstream patch and rebuilt.
I'm getting error:
/usr/local/poudriere/ports/default/games/openmw/work/openmw-openmw-0.45.0/apps/openmw/mwgui/jailscreen.cpp: In member function 'void MWGui::JailScreen::onJailFinished()':
/usr/local/poudriere/ports/default/games/openmw/work/openmw-openmw-0.45.0/apps/openmw/mwgui/jailscreen.cpp:106:28: error: 'replace' is not a member of 'Misc::StringUtils'
         Misc::StringUtils::replace(message, "%d", std::to_string(mDays).c_str(), 2);
                            ^~~~~~~
/usr/local/poudriere/ports/default/games/openmw/work/openmw-openmw-0.45.0/apps/openmw/mwgui/jailscreen.cpp:116:32: error: 'replace' is not a member of 'Misc::StringUtils'
             Misc::StringUtils::replace(skillMsg, "%s", skillName.c_str(), 2);
                                ^~~~~~~
/usr/local/poudriere/ports/default/games/openmw/work/openmw-openmw-0.45.0/apps/openmw/mwgui/jailscreen.cpp:117:32: error: 'replace' is not a member of 'Misc::StringUtils'
             Misc::StringUtils::replace(skillMsg, "%d", std::to_string(skillValue).c_str(), 2);
                                ^~~~~~~


I will apply my patch if my mentors accept.
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-05-08 08:12:57 UTC
A commit references this bug:

Author: pkubaj
Date: Wed May  8 08:12:39 UTC 2019
New revision: 501004
URL: https://svnweb.freebsd.org/changeset/ports/501004

Log:
  games/openmw: fix build with GCC-based architectures

  After mygui upgrade, a couple of include <memory> are needed to build with GCC.

  Errors:
  /wrkdirs/usr/ports/games/openmw/work/openmw-openmw-0.45.0/apps/openmw/mwgui/alchemywindow.hpp:78:14: error: 'unique_ptr' in namespace 'std' does not name a template type

    std::unique_ptr<MWMechanics::Alchemy> mAlchemy;
         ^~~~~~~~~~

  /wrkdirs/usr/ports/games/openmw/work/openmw-openmw-0.45.0/apps/openmw/mwgui/alchemywindow.hpp:78:9: note: 'std::unique_ptr' is defined in header '<memory>'; did you forget to
  +'#include <memory>'?
  /wrkdirs/usr/ports/games/openmw/work/openmw-openmw-0.45.0/apps/openmw/mwgui/alchemywindow.hpp:14:1:
  +#include <memory>

  PR:		237773
  Approved by:	tobik (maintainer), mat (mentor)
  Differential Revision:	https://reviews.freebsd.org/D20184

Changes:
  head/games/openmw/files/patch-apps_openmw_mwgui_alchemywindow.hpp
  head/games/openmw/files/patch-apps_openmw_mwgui_bookpage.hpp
  head/games/openmw/files/patch-apps_openmw_mwgui_loadingscreen.hpp
  head/games/openmw/files/patch-apps_openmw_mwgui_mapwindow.hpp
  head/games/openmw/files/patch-apps_openmw_mwgui_race.hpp
  head/games/openmw/files/patch-apps_openmw_mwgui_savegamedialog.hpp
  head/games/openmw/files/patch-apps_openmw_mwgui_screenfader.hpp
  head/games/openmw/files/patch-apps_openmw_mwgui_spellview.hpp
  head/games/openmw/files/patch-apps_openmw_mwgui_videowidget.hpp
  head/games/openmw/files/patch-components_crashcatcher_crashcatcher.cpp
Comment 5 Piotr Kubaj freebsd_committer freebsd_triage 2019-05-08 08:13:26 UTC
Committed, thanks.