Created attachment 247572 [details] Patch that adds games/freeciv21 Freeciv21 takes its roots in the well-known FOSS game Freeciv (games/freeciv) and extends it for more fun, with a revived focus on competitive multiplayer environments. Players can choose from over 500 nations and can play against the computer or other people in an active online community. All local patches have been upstreamed and will no longer be required with release 3.1 at the latest. QA: * portclippy: ok * portlint -AC: looks fine * poudriere testport: 14.0 amd64 okay (for the different port options) * I am currently playing a match on longturn.net using this port.
Additional QA: * stage-qa: passes
Created attachment 247625 [details] Patch that adds games/freeciv21 Updated patch to depend on devel/elfutils for libdw to enable better debugging information when anything goes wrong.
Hi, Please use DISTVERSION instead of PORTVERSION and avoid being elaborative. Is there a reason why we can't use the official release archives? https://github.com/longturn/freeciv21/releases/tag/v3.0-patch.2 See warning in Porters Handbook https://docs.freebsd.org/en/books/porters-handbook/makefiles/#makefile-master_sites-github You can also use this approach to reference backports of patches on GitHub https://cgit.freebsd.org/ports/tree/irc/irssi/Makefile?id=bc97cc7b70dea8f491605a7670932805dcb9ea97#n7 Best regards, Daniel
Created attachment 247642 [details] Patch that adds games/freeciv21 (In reply to Daniel Engberg from comment #3) Hi Daniel, I applied your tip to fetch the upstream patches from github, instead of keeping them local. I don't think I can use DISTVERSION. DISTVERSION v3.0-patch.2 would result in PORTVERSION 3.0.p.2 and `pkg version` interprets the `p` not as `patch` but as `prerelease` and messes up the version comparisons. You are right, we could use the official release archives, but I don't know how to fetch them and the Porters Handbook is not very helpful in this case. I guess it would work automatically if I would set DISTVERSION and DISTVERSIONPREFIX and drop GH_TAGNAME, but I can't set DISTVERSION. Will I have to drop USE_GITHUB and set MASTER_SITE and DISTNAME explicitly? Thanks for taking the time to help me on this PR. Best regards, Tobias
Created attachment 247643 [details] Patch that adds games/freeciv21 Updated patch fixes the commit message. Sorry for the noise.
Hi, USE_GITHUB isn't aware of release assets and is only intended when there aren't any available or suitable for some reason. Otherwise you should use MASTER_SITES and handle it like any other site. In this case the framework will get it wrong due to odd naming. If you use MASTER_SITES follow the directions in Porters Handbook. (PORTVERSION + DISTNAME) https://docs.freebsd.org/en/books/porters-handbook/book/#makefile-distname . If you were to use USE_GITHUB: DISTVERSION (set something sane) + GH_TAGNAME to whatever upstream names it or commit. https://docs.freebsd.org/en/books/porters-handbook/book/#makefile-master_sites-github Hope that helps Best regards, Daniel
Created attachment 247651 [details] Patch that adds games/freeciv21 Patch updated: Remove USE_GITHUB and friends, fetch the release archive instead. I hope I am getting closer. I am learning a lot along the way :)
Hmm... You probably want to add the following so it doesn't pick up Sphinx by accident and starts building documentation or add it as an option CMAKE_ON= CMAKE_DISABLE_FIND_PACKAGE_Sphinx https://github.com/longturn/freeciv21/blob/master/docs/CMakeLists.txt And possibly CMAKE_DISABLE_FIND_PACKAGE_Git https://github.com/longturn/freeciv21/blob/master/cmake/AutoRevision.cmake#L24 I would also argue that FC21_VERSION= should be placed before CMAKE_* and menu options definitions. Best regards, Daniel
Created attachment 247674 [details] Patch that adds games/freeciv21 I didn't explicitly disable the optional dependencies because the packages are built in a clean environment. But of course, at this point it's better to be defensive in case someone builds directly from the ports tree. Done. I moved FC21_VERSION up as far as it will go without portlint complaining. I could drag it before the USE_* declarations, but that looks wrong.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=35a287f77a4a5b38296eaccdda7d281b1a275cfb commit 35a287f77a4a5b38296eaccdda7d281b1a275cfb Author: Tobias Rehbein <tobias.rehbein@web.de> AuthorDate: 2024-01-18 19:17:22 +0000 Commit: Daniel Engberg <diizzy@FreeBSD.org> CommitDate: 2024-01-18 19:20:35 +0000 games/freeciv21: New port: Freeciv for the 21st century Freeciv21 takes its roots in the well-known FOSS game Freeciv (games/freeciv) and extends it for more fun, with a revived focus on competitive multiplayer environments. Players can choose from over 500 nations and can play against the computer or other people in an active online community. PR: 276244 games/Makefile | 1 + games/freeciv21/Makefile (new) | 48 + games/freeciv21/distinfo (new) | 15 + games/freeciv21/pkg-descr (new) | 11 + games/freeciv21/pkg-plist (new) | 3954 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 4029 insertions(+)
While portfmt utils disagrees (they do work well in general however) a general rule of thumb is to have build system options last before defining menu options simply because of readability reasons. Committed, thanks for your patience!