I have been wanting to learn how to make a port and contribute for a long time. when I came across SmallBASIC and realised there was no package or port for it, this seemed to be the right way to learn porting and contribute. I have a minimal port functioning locally but am missing FLAVOR support as SmallBASIC supports a few different versions, from simple console based interpreter to an IDE.
^Triage: in general we only accept new-port submissions if they include a git diff. Otherwise, would you like me to add this to https://wiki.freebsd.org/WantedPorts ?
I can upload a diff. I’ve got a minimal, functional port setup. I will clean it up and upload the git diff
Created attachment 271121 [details] 0001-294311-new-port-lang-SmallBASIC This is the initial patch to create the new port.
Here are some comments on your port: - please use the same address for the MAINTAINER field as you do on Bugzilla so that bugs can automatically be assigned to you - please unbundle stb and miniaudio, both of which we ship in ports - check if you can add options DOCS and EXAMPLES and ship documentation and samples if they are set - it seems like the SDL and web frontends could be packaged, too
I've added the upstream issue for reference https://github.com/smallbasic/SmallBASIC/issues/282 - I've updated MAINTAINER so that it is consistent with my Bugzilla email - Unbundling `stb` and `miniaudio` looks like a heavy lift in the way the package is being built by upstream. I've asked upstream about it. - There are no man pages but there is some documentation and samples that can be included in the package - The idea was to get the console version packaged up first and then add FLAVORS for SDL, web, gui, etc. as I become more familiar with ports and packaging
(In reply to Mehul N. Sanghvi from comment #5) For unbundling, the easiest solution is usually a site-patch that changes the include directories from the project-local ones to something based on LOCALBASE. Until there is an upstream solution, you can install documentation and samples using COPYTREE_SHARE. > - The idea was to get the console version packaged up first and then add FLAVORS for SDL, web, gui, etc. as I become more familiar with ports and packaging While it would be preferrable to put it all in in one go, that is a way you can do it. Not sure if flavours are the right approach here, perhaps slave ports may work better.
Waiting for you to upload a new patch with the changes you have described.
I'm currently working on getting some documentation and samples included in the package. Once that is complete I'll upload another patch.
Still working on get the documentation provided in man(1) format
(In reply to Mehul N. Sanghvi from comment #9) It's not mandatory to have man page to add a port to the FreeBSD ports tree. Documentation can be in other formats or be entirely absent if it does not exist.
Created attachment 273646 [details] Update MAINTAINER
Created attachment 273651 [details] Include EXAMPLES
EXAMPLES has been tested with: make clean && make stage && sudo make install As can be seen below, the examples did get installed % ls /usr/local/share/examples/SmallBASIC/ README.TXT distro-examples/ procs/ archive/ modules/ qb-original-sources/ % ls /usr/local/share/examples/SmallBASIC/archive/ add_brace.bas comment_out.bas help.bas snarf.bas bget.bas comport.bas indent.bas welcome.bas box_comments.bas dos2unix.bas pcre-test.bas comment_in.bas external_library_example.bas publish.bas
Please let me know when you are ready to have this one reviewed and landed. Mark the patch with "maintainer-approval" to show that you want it to be landed. Post a full patch with the whole port included as you want me to commit it, not incremental changes. Bugzilla has a tool to do an interdiff, so I can easily see the differences if needed.
Created attachment 273660 [details] Full patch for lang/smallbasic I've added the full patch. Could this be reviewed and approved?
(In reply to Mehul N. Sanghvi from comment #15) Please understand that in FreeBSD, Problem Reports usually do not get committed immediately. I can only advise patience. Here are some statistics: 31 "new ports" PRs in the last 30 days 370 All outstanding "new ports" PRs 149 All ports PRs with patches in the last 30 days 1324 All ports PRs with patches 2712 All ports PRs
(In reply to Mark Linimon from comment #16) No a problem at all. I wasn't sure if just selecting "maintainer approval" was enough or I had to request in the comments also. On the other hand that is a lot of ports related PRs. I wouldn't mind lending a helping hand once I have a few things under my belt.
(In reply to Mehul N. Sanghvi from comment #17) Sorry, my dev righ just died. Will get back to it next week.
Sorry for the delay. I have made some minor changes to the port and will attempt to land it soon. Please work on unbundling the dependencies and porting the rest of the project.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=09d15c116646759ffc62e919ffca441f10a6c6e1 commit 09d15c116646759ffc62e919ffca441f10a6c6e1 Author: Mehul N. Sanghvi <mehul.sanghvi@gmail.com> AuthorDate: 2026-08-29 15:53:49 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2026-09-02 10:49:36 +0000 lang/smallbasic: Interpreter for the BASIC programming language SmallBASIC is a fast and easy to learn BASIC language interpreter ideal for everyday calculations, scripts and prototypes. SmallBASIC includes trigonometric, matrices and algebra functions, a built in IDE, a powerful string library, system, sound, and graphic commands along with structured programming syntax. WWW: https://smallbasic.github.io/ PR: 294311 lang/Makefile | 1 + lang/smallbasic/Makefile (new) | 31 +++++++++++++++++++++++++++++++ lang/smallbasic/distinfo (new) | 11 +++++++++++ lang/smallbasic/pkg-descr (new) | 5 +++++ lang/smallbasic/pkg-plist (new) | 3 +++ 5 files changed, 51 insertions(+)
Thank you for your submission. Please open additional issues for the remaining parts of the software.