Summary: | [NEW PORT] games/solver Math quiz game using SDL2 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | modex | ||||||||||||
Component: | Individual Port(s) | Assignee: | Jason W. Bacon <jwb> | ||||||||||||
Status: | Closed FIXED | ||||||||||||||
Severity: | Affects Only Me | CC: | diizzy, jwb | ||||||||||||
Priority: | --- | ||||||||||||||
Version: | Latest | ||||||||||||||
Hardware: | Any | ||||||||||||||
OS: | Any | ||||||||||||||
Attachments: |
|
Good morning, The port still needs a little work. You can start by running "portlint -A" from the solver directory and try to silence the errors and warnings it produces. Then add DEVELOPER=yes to your /etc/make.conf, so you will see stage-qa messages when installing. These two tools will catch most of the potential problems, but not all. Thanks for getting involved in ports! Created attachment 238140 [details]
port files for solver
(In reply to Jason W. Bacon from comment #1) Hello, I have run the portlint -a command. I believe the warnings and 1 fatal error have been fixed. WARN: /usr/ports/wip/solver/pkg-descr: the URL of the project website has been moved into the Makefile. Remove the WWW: line from this file and add "WWW=https://github.com/modexsoft/solver"to the Makefile immediately below the COMMENT line. WARN: Makefile: "WWW" has to appear earlier. 0 fatal errors and 2 warnings found. ===> Checking for items in STAGEDIR missing from pkg-plist Error: Orphaned: %%DATADIR%%/block_limit.png ===> Checking for items in pkg-plist which are not in STAGEDIR ===> Error: Plist issues found. *** Error code 1 Stop. make: stopped in /usr/ports/wip/solver Created attachment 238187 [details]
files for solver
updates makefile for the www error.
also removed the the file block_limit.png from the git repo.
(In reply to Jason W. Bacon from comment #4) The new shar has been updated. The png was a test file that was still in the github repo. It has been removed. The makefile and pkg-descr files have been updated for the www change. It builds cleanly now. pkg-descr should have a better description, at least a few sentences. On that note, the README on Github is empty and should have a complete description of the game's purpose and how to play it. I'm not seeing any way for users to find out what this program does. Adding a Makefile to the git repo that respects CC, CFLAGS, PREFIX, DESTDIR , and INSTALL (maybe a few other standard vars) would eliminate the need for do-build and do-install in the port. I tried running "solver" on a laptop and it just seemed to hang, taking up 100% CPU. Created attachment 238225 [details]
lastest share file
Add description to the pkg-descr file.
Add info to the Readme in github.
Introduced some basic cap functionality so the CPU will not run at 100%.
(In reply to Jason W. Bacon from comment #7) Thank you for all these tips and assistance. I have submitted a new shar. The only thing I had not done was the makefile in the git. I found a few example ports that do this and wanted to look them over before I do this for version 1.0 possibly. I also introduced some functionality to limit the CPU running at 100%. I completely went through the entire process on the oldest machine I had (a laptop from 2013) and a fresh hard drive using using FreeBSD 12.3. Please let me know if you have any other suggestions. For an example of a simple, port-friendly Makefile: https://github.com/auerlab/vcf-split The ports system (and pkgsrc) automatically provide all the information needed by this project Makefile (CC, CFLAGS, etc). The only thing we might need to do from the port is run "make depend", if you use that feature in your Makefile. Otherwise, the port Makefile will be trivial. https://github.com/outpaddling/freebsd-ports-wip/blob/master/vcf-split (In reply to Jason W. Bacon from comment #10) Thank you for this example. I will look it over. Is there anything else I need do for solver at this point? Worth noting that you might want to look into either CMake or Meson because it greatly reduces the effort of detecting libraries and can be easier to integrate into various "build frameworks". Locating libraries and other dependencies (and ensuring that they are installed) is the job of a package manager like FreeBSD ports, not the upstream build system. I explicitly avoid GNU configure, cmake, or anything else of that nature because I don't want to encourage people to do ad-hoc "caveman" builds that might grab the wrong version of a dependency unexpectedly. My project Makefiles are designed to look where the user or package manager tells them to look and nowhere else. The poudriere tests finally finished, and I ran a basic build test on aarch64. Everything is building cleanly now. The only potential issue I still see is the name. Would you consider renaming the project to something more descriptive? "Solver" doesn't really provide any clues about what the program does. A name that makes it obvious that this is a teaching tool for basic math would be nice, as would something that sounds fun. Changing the name of a port is problematic, so it would be better to address this before adding it to the tree. Created attachment 238279 [details]
latest share file
Updated the github readme and github description.
(In reply to Jason W. Bacon from comment #14) I added a subtitle to the Readme file in the github. I also added a description to the github. Everything else I would like to keep the same. I uploaded a new shar as well since the distinfo timestamp and such would have changed as well. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=35dc7ffe64b4fb05423d7bccff4b7aad032e164e commit 35dc7ffe64b4fb05423d7bccff4b7aad032e164e Author: Jason W. Bacon <jwb@FreeBSD.org> AuthorDate: 2022-11-23 13:46:28 +0000 Commit: Jason W. Bacon <jwb@FreeBSD.org> CommitDate: 2022-11-23 13:49:16 +0000 games/solver: Math training game using C and SDL2 Solver is a math training game. The goal of the game is to improve the user's confidence in using four basic math operations: addition, subtraction, multiplication and division. The user can set various options to create a custom game experience. These options include setting the time limit and the goal for correct/incorrect answers. This program uses C and SDL2. PR: 267373 Reported by: modex@danwin1210.de games/Makefile | 1 + games/solver/Makefile (new) | 26 ++++++++ games/solver/distinfo (new) | 3 + games/solver/pkg-descr (new) | 6 ++ games/solver/pkg-plist (new) | 152 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 188 insertions(+) Thanks! |
Created attachment 237663 [details] port files for solver Hello! I am submitting a new port: [NEW PORT] games/solver Math quiz game using SDL2 The shar file is attached.