Bug 257471 - games/openage: Fails to build with updated pygments: libopenage/main.h:15 expected identifier after 'namespace'
Summary: games/openage: Fails to build with updated pygments: libopenage/main.h:15 exp...
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: Thierry Thomas
URL: https://github.com/SFTtech/openage/re...
Keywords:
Depends on:
Blocks: 256995
  Show dependency treegraph
 
Reported: 2021-07-28 09:15 UTC by Thierry Thomas
Modified: 2023-11-30 08:31 UTC (History)
3 users (show)

See Also:
freebsd: maintainer-feedback+


Attachments
Full log for openage-0.3.0.1262_5 against py38-pygments-2.9.0 (65.37 KB, text/plain)
2021-07-28 09:15 UTC, Thierry Thomas
no flags Details
Preliminary patch (9.00 KB, patch)
2021-08-14 17:25 UTC, Thierry Thomas
no flags Details | Diff
games/openage: upgrade to v0.4.1 (15.27 KB, patch)
2021-08-17 11:26 UTC, Thierry Thomas
thierry: maintainer-approval? (freebsd)
Details | Diff
Poudriere log. (24.23 KB, application/x-bzip)
2021-08-17 11:28 UTC, Thierry Thomas
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Thomas freebsd_committer freebsd_triage 2021-07-28 09:15:53 UTC
Created attachment 226754 [details]
Full log for openage-0.3.0.1262_5 against py38-pygments-2.9.0

games/openage does not build with py38-pygments 2.9.0:

[  0% 3/303] cd /wrkdirs/usr/ports/games/openage/work/openage-0.3.0-1262-ga554ab49 && /usr/local/bin/python3.8 -m buildsystem.pxdgen --file-list /wrkdirs/usr/ports/games/openage/work/.build/py/pxdgen_sources && /usr/local/bin/cmake -E touch /wrkdirs/usr/ports/games/openage/work/.build/py/pxdgen_timefile
FAILED: py/pxdgen_timefile 
cd /wrkdirs/usr/ports/games/openage/work/openage-0.3.0-1262-ga554ab49 && /usr/local/bin/python3.8 -m buildsystem.pxdgen --file-list /wrkdirs/usr/ports/games/openage/work/.build/py/pxdgen_sources && /usr/local/bin/cmake -E touch /wrkdirs/usr/ports/games/openage/work/.build/py/pxdgen_timefile
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/wrkdirs/usr/ports/games/openage/work/openage-0.3.0-1262-ga554ab49/buildsystem/pxdgen.py", line 437, in <module>
    main()
  File "/wrkdirs/usr/ports/games/openage/work/openage-0.3.0-1262-ga554ab49/buildsystem/pxdgen.py", line 427, in main
    result = generator.generate(
  File "/wrkdirs/usr/ports/games/openage/work/openage-0.3.0-1262-ga554ab49/buildsystem/pxdgen.py", line 353, in generate
    result = "\n".join(self.get_pxd_lines())
  File "/wrkdirs/usr/ports/games/openage/work/openage-0.3.0-1262-ga554ab49/buildsystem/pxdgen.py", line 259, in get_pxd_lines
    self.parse()
  File "/wrkdirs/usr/ports/games/openage/work/openage-0.3.0-1262-ga554ab49/buildsystem/pxdgen.py", line 227, in parse
    raise self.parser_error(
__main__.ParserError: /wrkdirs/usr/ports/games/openage/work/openage-0.3.0-1262-ga554ab49/libopenage/main.h:15 expected identifier after 'namespace'
pxdgen: initfile libopenage/__init__.py


It seems that the version in the ports tree is quiet old, and newer releases are available: see
https://github.com/SFTtech/openage/releases

It is possible to upgrade it and check if it would pass with a recent Pygments?
Comment 1 Thierry Thomas freebsd_committer freebsd_triage 2021-08-14 17:24:31 UTC
Trying to upgrade it myself, with the attached patch, I encountered an error, reported at
https://github.com/SFTtech/openage/issues/1397
Comment 2 Thierry Thomas freebsd_committer freebsd_triage 2021-08-14 17:25:35 UTC
Created attachment 227187 [details]
Preliminary patch

Note: this patch is not the final one!
Comment 3 Martin Filla 2021-08-16 09:54:22 UTC
(In reply to Thierry Thomas from comment #2)
Please, you test patch with poudriere
Comment 4 Thierry Thomas freebsd_committer freebsd_triage 2021-08-17 11:26:40 UTC
Created attachment 227278 [details]
games/openage: upgrade to v0.4.1

games/openage: upgrade to v0.4.1
    
- release notes at <https://github.com/SFTtech/openage/releases/tag/v0.4.1>
    
- also chase the upgrade of py-Pygments to 2.9, with a patch from upstream
  commit 3aa91ea4d4a72a5f3b6f90ad0390b9e07de7aa77
Comment 5 Thierry Thomas freebsd_committer freebsd_triage 2021-08-17 11:28:38 UTC
Created attachment 227279 [details]
Poudriere log.

Poudriere log of the proposed patch against py38-pygments 2.9.0.
Comment 6 Tobias C. Berner freebsd_committer freebsd_triage 2021-08-17 11:35:58 UTC
Moin moin 

Instead of:

		BUILD_DEPENDS=eigen>0:math/eigen3 

you can use 

                USES=eigen:3


mfg Tobias
Comment 7 Thierry Thomas freebsd_committer freebsd_triage 2021-08-17 12:07:48 UTC
(In reply to Tobias C. Berner from comment #6)

Right!
Thanks.
Comment 8 Thierry Thomas freebsd_committer freebsd_triage 2022-01-20 21:47:40 UTC
Committed, thanks!
Comment 9 commit-hook freebsd_committer freebsd_triage 2022-01-20 21:47:43 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=05b6fd6a751dd7e9480d816bf176c4be22376ace

commit 05b6fd6a751dd7e9480d816bf176c4be22376ace
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2022-01-20 21:39:01 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2022-01-20 21:44:13 +0000

    games/openage: games/openage: upgrade to v0.4.1

    - release notes at <https://github.com/SFTtech/openage/releases/tag/v0.4.1>

    - also chase the upgrade of py-Pygments to 2.9, with a patch from upstream.

    PR:             257471
    Approved by:    freebsd (at) sysctl.cz (maintainer)

 games/openage/Makefile                             |  15 +--
 games/openage/distinfo                             |   8 +-
 .../files/patch-buildsystem_pxdgen.py (new)        |  23 ++++
 .../openage/files/patch-libopenage_CMakeLists.txt  | 125 +++++++++++----------
 games/openage/files/patch-openage_default__dirs.py |  10 +-
 games/openage/pkg-descr                            |   8 +-
 games/openage/pkg-plist                            |  15 ++-
 7 files changed, 120 insertions(+), 84 deletions(-)
Comment 10 commit-hook freebsd_committer freebsd_triage 2023-11-30 08:31:20 UTC
A commit in branch main references this bug:

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

commit 54aafbe1992cd05d62fbb689c8e3a4c6abdeee61
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2023-11-30 08:29:54 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2023-11-30 08:29:54 +0000

    games/openage: try to unbreak and undeprecate the port

    Earlier fix (see PR) was briefly helpful against Pygments
    v2.9, but had to be extended for version 2.10 and beyond.
    While here, remove rather useless `pre-configure' target.

    PR:     257471

 games/openage/Makefile                          | 9 +++------
 games/openage/files/patch-buildsystem_pxdgen.py | 9 +++++++++
 2 files changed, 12 insertions(+), 6 deletions(-)