Created attachment 269481 [details] Patch New port: games/suika3 Suika3 is a 2D game & visual novel scripting engine with high portability and hybrid JIT/AOT scripting. The JIT target includes i386, amd64, arm, arm64, powerpc, and riscv. WWW: https://github.com/awemorris/suika3
Created attachment 269483 [details] Poudriere log
According to https://github.com/awemorris/suika3/blob/main/docs/mkdocs-en/docs/build.md#freebsd you should use cmake to build, so add cmake to USES and remove GNU_CONFIGURE= yes . That will also automatically switch to the right CMAKE_BUILD_TYPE depending on WITH_DEBUG being used and makes sure other flags are correctly passed to cmake and automatically uses the install/strip target when the binaries should get stripped, so that post-install should be unneeded after that too. The primary URL seems to be https://suika3.vn/ so add that as first entry in WWW GH_TAGNAME defaults to DISTVERSION so you don't need to duplicate it, same with GH_PROJECT defaulting to PORTNAME. There are some dependencies bundled in external, can those be converted to individual ports?
Created attachment 269485 [details] Patch Add the main site to WWW. Removed GH_PROJECT and GH_TAGNAME.
Hi Benjamin, thank you for reviewing. Regarding the build system (CMake vs. configure): There is an upstream policy for these two methods: - CMake: The build instructions you pointed out are intended for static builds (including libpng, libvorbis, etc.), primarily for standalone distribution. - configure && make: This method is specifically designed for packaging systems like FreeBSD Ports. It correctly links against shared libraries and preserves debug information, which is consistent with other packaging standards like Debian. Regarding the sub-projects in external/: - These are not external dependencies in the traditional sense. - This repository serves as the UPSTREAM for these components. - While separate repositories exist for these sub-projects, they are maintained and developed primarily within the Suika3 codebase. - Improvements and fixes are periodically backported from here to the standalone repositories, rather than the other way around. - Therefore, bundling them is the most appropriate way to ensure architectural integrity and build stability. I have also updated the Makefile to fix WWW, GH_PROJECT, and GH_TAGNAME as you suggested. Please check and review again. Best regards,
(In reply to Awe Morris from comment #4) That configure script doesn't allow to properly choose the CMAKE_BUILD_TYPE, it just uses Release, while Debug should be used when WITH_DEBUG is set or RelWithDebInfo when WITH_DEBUGINFO is set. It doesn't pass LDFLAGS and CXXFLAGS to cmake too. In the ports tree USES=cmake ensures that cmake properly gets passed what it should get, additionally ninja should be used as generator, except in the cases it doesn't work. The only things that configure script does is detecting JIT support (which seems to be there on all architectures FreeBSD supports as far as I can see), setting SUIKA_ENABLE_DIST and setting the dirs for SUIKA_DIR_DOCS and SUIKA_DIR_GAME, the rest seems to be what is set by default in CMakeLists.txt or would be handled by USES=cmake. So that should be done by: CMAKE_ARGS= -DSUIKA_DIR_DOCS="share/doc/suika3" \ -DSUIKA_DIR_GAME="share/examples/suika3" CMAKE_ON= PLAYFIELD_ENABLE_JIT SUIKA_ENABLE_DIST Or maybe even make JIT optional via OPTIONS_DEFINE= JIT OPTIONS_DEFAULT= JIT JIT_DESC= Enable just-in-time compiler JIT_CMAKE_ON= PLAYFIELD_ENABLE_JIT [0]: https://docs.freebsd.org/en/books/porters-handbook/uses/#uses-cmake [1]: https://docs.freebsd.org/en/books/porters-handbook/special/#using-cmake [2]: https://docs.freebsd.org/en/books/porters-handbook/makefiles/#makefile-options [3]: ports/Mk/Uses/cmake.mk
(In reply to Awe Morris from comment #3) Seems like you reuploded the original patch by accident instead of the new patch (In reply to Awe Morris from comment #4) As this is the upstream location for those libs, could they made into shared libs, so that other ports can depend on them and when subpackages land eventually they can get their own packages.
Created attachment 269495 [details] Patch
Created attachment 269496 [details] poudriere log
Created attachment 269497 [details] Patch
(In reply to Benjamin Takacs from comment #5) I've updated the port to use CMake, as you noticed. In addition, I replaced a font file with a symlink. (In reply to Benjamin Takacs from comment #6) For now, I believe it is better to keep the external libraries statically linked. The external projects are the following: * NoctLang: the scripting language. In this games/suika3 port, NoctLang needs to be built with certain options disabled for security reasons, namely `NOCTLANG_API_SYSTEM` and `NOCTLANG_API_CONSOLE`. * StratoHAL: the graphics and audio HAL. Since this library is not maintained as a separately hosted standalone project, I think it is reasonable to keep it statically linked in the games/suika3 port. * Playfield Engine: the base r2D engine. In this games/suika3 port, Playfield Engine is built with a specific option, `PLAYFIELD_ENABLE_INITHOOK`, so that suika3 can hook into the engine initialization from its C code. Given that integration, I think it is also reasonable to keep it statically linked. Please review and give me advice. Best regards,
(In reply to Awe Morris from comment #10) It looks fine to me now, thanks for your contribution. As these libs currently aren't used by anything else, it should be fine. If and when additional ports want to use them, we can find some solution that avoids duplicating the updating and fixing work. You can think about changing some of the cmake booleans into options, but that would increase your work (as each combination of options can potentially have problems) and can happen after this port got added to the tree.
Created attachment 269499 [details] Patch
(In reply to Benjamin Takacs from comment #11) Thank you for the review, Benjamin. I've updated the patch to use LOCALBASE. I wanted to make JIT an option, but I couldn't get it to work locally. I'd like to revisit this once I've gained more experience with ports. Thank you again for your help.
Created attachment 269520 [details] Patch
I've updated the patch to address kenrap's review comments on Discord.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=f188994f5b67a03b3afe1448610de8a514737792 commit f188994f5b67a03b3afe1448610de8a514737792 Author: Awe Morris <awe@noctvm.io> AuthorDate: 2026-04-08 13:55:12 +0000 Commit: Kenneth Raplee <kenrap@FreeBSD.org> CommitDate: 2026-04-09 18:23:56 +0000 games/suika3: New port: Portable 2D and visual novel engine PR: 294320 Reviewed by: makc (mentor) Approved by: arrowd (co-mentor) games/Makefile | 1 + games/suika3/Makefile (new) | 56 ++++++++++++++++++++++++++++++++++++++++++++ games/suika3/distinfo (new) | 3 +++ games/suika3/pkg-descr (new) | 6 +++++ games/suika3/pkg-plist (new) | 8 +++++++ 5 files changed, 74 insertions(+)
Thanks for your submission! :)