Intro to porting with IRIXPorts


Feb 8, 2019
Intro to porting with IRIXPorts


Porting Stuff

This is my workflow. there are many like it, but this one is mine.

  • Determine a thing you want to port with irixports. I recommend something you've already ported, or rooting around in @onre's garbage.
  • Get a link to that thing's source code in a tarball format. (You can use a git repo, but that's for grownups, not you.) Since I'm lazy, I just download the thing, then right-click, copy download link.
cd irixports

Make a new branch named for what you're porting

git checkout -b thing
mkdir thing

I use zlib as a basis for porting, as it's simple and works

cp zlib/ thing/.

Now crack open and edit It looks like this:

#!/opt/local/bin/mksh ../
files=" zlib-1.2.11.tar.gz e6d119755acdf9104d7ba236b1242696940ed6dd"

Change the bits to reflect what you're porting:

#!/opt/local/bin/mksh ../
files=" thing-0.5.2.tar.gz e6d119755acdf9104d7ba236b1242696940ed6dd"

I leave the hash for now, as I don't know what the value will be.

Run It'll fetch the tarball, then flip out over the hash. But hey, now you have the tarball!

Get the sha1 via

openssl sha1 thing-0.5.2.tar.gz

Add this number into

Now run ./ again. If you're amazingly lucky (or this app is really tiny and dumb) it'll just work! You'll be able to confirm this if irixports tells you it's added thing-0.5.2 to its database.

Add your changes to, commit and push it to your branch in your repo on Github.

git add
git commit -m "ported thing"
git push origin thing

On, create a new pull request.
Left side, base repository = larb0b/irixports base: master. Right side: yourname/irixports base: thing.

Back on your IRIX box:

git checkout master
git pull origin master

At some point you'll get an email that @lbdm has merged your request. At this point you should merge his upstream repo into the master branch of your repo.

On, create a new pull request.
Left side, base repository = yourname/irixports base: master. Right side: larb0b/irixports base: master.

Divergence - or how to handle the normal state where something fails to magically port without you screwing around with it for a while.

Scenario 1: I already ported this sucker and it works.

Great! Follow all the above steps up to getting the sha1 hash and updating

Copy the extracted source code directory to a backup dir:

cp -Ra thing-0.5.2/ thing-0.5.2.orig/

Make your needed changes in the non-orig directory, ie thing-0.5.2/ .

Create a patches directory.

mkdir patches

Generate a patchdiff, written straight into the patch dir.

diff -Naur thing-0.5.2.orig/ thing-0.5.2/ > patches/thing052-001

(You can keep this patch naming convention or not. irixports doesn't care. It does apply patches alphanumerically, and patches need to be applied in the order in which they were generated.)

Now clean up your thing-0.5.2 directory and see if irixports will build properly.

./ clean
./ fetch

The fetch stage downloads and applies all patches in patches/. If this worked, try ./ again.

./ clean

That worked. Great! Add your changes to your repo, commit, push, and perform PRs as per above.

git add
git add patches/thing052-001
git commit -m "ported thing"
git push origin thing
Last edited:

About us

  • Silicon Graphics User Group (SGUG) is a community for users, developers, and admirers of Silicon Graphics (SGI) products. We aim to be a friendly hobbyist community for discussing all aspects of SGIs, including use, software development, the IRIX Operating System, and troubleshooting, as well as facilitating hardware exchange.

User Menu