Porting to riscos c
Skills repository for RISC OS agents
npx -y skills add gerph/riscos-agent-skills --skill porting-to-riscos-cAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Port C projects to RISC OS using `riscos-cport`, RISC OS makefiles, and Norcroft/RISC OS build validation. Use when a repository needs a RISC OS library or command-line port, especially when you need to create a `RISCOS/` tree, generate `Makefile,fe1` files, or repair source for the RISC OS toolchain.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
3.1 KB, as published. Nobody here has run it
Porting To RISC OS C
Use this skill when the task is to turn a C repository into a RISC OS buildable port.
Prefer the repository's existing structure and let riscos-cport do the first pass.
Workflow
- Inspect the repository layout and detect the real entry points.
- Run
riscos-cporton the repository root. This will create Makefiles for each of the files and libraries it finds within the source directory. It will create symlinks within theRISCOS/candRISCOS/hwhich point to the original files. This should be sufficient to build the commands or libraries withriscos-amu exportorriscos-amu -f Makefile...,fe1. - Use overrides when discovery is wrong or incomplete. If the code is failing to build, there may be updates that are needed for the
riscos-cportcommand line to ignore certain files or explicitly set defines and includes. - Build the generated
RISCOS/tree withriscos-amu export. - Build any generated command makefiles with
riscos-amu -f Makefile...,fe1. - Patch source only when the Norcroft compiler or the RISC OS build model requires it.
Use The Tool
Prefer these switches when discovery needs help:
--namefor the RISC OS component/library name.--source,--header,--internal-header,--export-headerfor explicit file control.--exclude-sourceto remove sources autodiscovery picked up incorrectly.--command-sourcefor example tools and tests that containmain().--defineand--command-definefor compile-time configuration.--includeand--command-libfor extra include paths and libraries.
If a repository is mainly a command-line tool, treat the command source as the important artifact:
- keep the command Makefile(s)
- exclude unrelated sources from the command build
- add any required command-only defines or libraries explicitly
RISC OS Porting Rules
Read references/porting-process.md when you need the build rules, file layout, or validation sequence.
Source Fixes
- Keep edits narrow and RISC OS specific.
- Prefer compatibility defines and small header shims over broad rewrites.
- For RISC OS-specific changes, the define
__riscoswill be set for the platform. - For RISC OS 64-specific changes, the define
__riscos64will be set for the platform. - For feature-specific changes use a define to delineate the state (eg
ENABLE_CRYPTO).
- For RISC OS-specific changes, the define
- Preserve upstream comments and layout unless a change is required to compile.
- Rebuild after every meaningful source fix.
Validation
- Libraries:
riscos-amu export - Commands:
riscos-amu -f MakefileExample,fe1 - If a command fails because of an external dependency, note that separately rather than forcing the port to absorb it.