Bug 294311 - [NEW PORT] lang/SmallBASIC: Interpreter for the BASIC programming language
Summary: [NEW PORT] lang/SmallBASIC: Interpreter for the BASIC programming language
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: Robert Clausecker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-04-07 19:15 UTC by Mehul N. Sanghvi
Modified: 2026-09-02 10:59 UTC (History)
2 users (show)

See Also:


Attachments
0001-294311-new-port-lang-SmallBASIC (3.33 KB, patch)
2026-05-25 14:43 UTC, Mehul N. Sanghvi
no flags Details | Diff
Update MAINTAINER (754 bytes, patch)
2026-08-11 15:52 UTC, Mehul N. Sanghvi
no flags Details | Diff
Include EXAMPLES (811 bytes, patch)
2026-08-11 17:02 UTC, Mehul N. Sanghvi
no flags Details | Diff
Full patch for lang/smallbasic (2.89 KB, patch)
2026-08-11 21:58 UTC, Mehul N. Sanghvi
mehul.sanghvi: maintainer-approval? (fuz)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mehul N. Sanghvi 2026-04-07 19:15:55 UTC
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.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2026-05-19 01:27:34 UTC
^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 ?
Comment 2 Mehul N. Sanghvi 2026-05-19 04:31:29 UTC
I can upload a diff.  I’ve got a minimal, functional port setup.  I will clean it up and upload the git diff
Comment 3 Mehul N. Sanghvi 2026-05-25 14:43:24 UTC
Created attachment 271121 [details]
0001-294311-new-port-lang-SmallBASIC

This is the initial patch to create the new port.
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2026-07-20 14:34:15 UTC
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
Comment 5 Mehul N. Sanghvi 2026-07-22 03:39:25 UTC
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
Comment 6 Robert Clausecker freebsd_committer freebsd_triage 2026-07-22 05:31:04 UTC
(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.
Comment 7 Robert Clausecker freebsd_committer freebsd_triage 2026-07-30 16:48:33 UTC
Waiting for you to upload a new patch with the changes you have described.
Comment 8 Mehul N. Sanghvi 2026-07-30 16:59:39 UTC
I'm currently working on getting some documentation and samples included in the package.  Once that is complete I'll upload another patch.
Comment 9 Mehul N. Sanghvi 2026-08-11 05:03:46 UTC
Still working on get the documentation provided in man(1) format
Comment 10 Robert Clausecker freebsd_committer freebsd_triage 2026-08-11 08:29:57 UTC
(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.
Comment 11 Mehul N. Sanghvi 2026-08-11 15:52:59 UTC
Created attachment 273646 [details]
Update MAINTAINER
Comment 12 Mehul N. Sanghvi 2026-08-11 17:02:46 UTC
Created attachment 273651 [details]
Include EXAMPLES
Comment 13 Mehul N. Sanghvi 2026-08-11 17:21:47 UTC
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
Comment 14 Robert Clausecker freebsd_committer freebsd_triage 2026-08-11 18:35:47 UTC
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.
Comment 15 Mehul N. Sanghvi 2026-08-11 21:58:30 UTC
Created attachment 273660 [details]
Full patch for lang/smallbasic

I've added the full patch.  Could this be reviewed and approved?
Comment 16 Mark Linimon freebsd_committer freebsd_triage 2026-08-12 00:25:31 UTC
(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
Comment 17 Mehul N. Sanghvi 2026-08-12 01:17:59 UTC
(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.
Comment 18 Robert Clausecker freebsd_committer freebsd_triage 2026-08-15 18:07:30 UTC
(In reply to Mehul N. Sanghvi from comment #17)

Sorry, my dev righ just died.  Will get back to it next week.
Comment 19 Robert Clausecker freebsd_committer freebsd_triage 2026-08-29 15:53:31 UTC
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.
Comment 20 commit-hook freebsd_committer freebsd_triage 2026-09-02 10:51:39 UTC
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(+)
Comment 21 Robert Clausecker freebsd_committer freebsd_triage 2026-09-02 10:59:54 UTC
Thank you for your submission.
Please open additional issues for the remaining parts of the software.