My Apple iBook G4 - development

Contents
This is the fifth part of the “My Apple iBook G4” series of articles, and it’s all about setting up a development environment with modern-ish tools on my iBook retrobook.
You can install all the software you want, and all the games available for the PowerPC architecture and OS X 10.5 Leopard, but if you want to setup a development environment on a 20-years old machine, you will definitely need to jump through some hurdles. But in the end you will have a decent machine to write code (and test) on, unless you need specialized stuff like NodeJS, Docker, Golang, Redis, or things that require an octacore CPU and 64GB of RAM. But for that you should use a better-suited machine, anyway.
Without further ado, let’s proceed.
Prerequisites
You need to have OS X 10.5 Leopard installed and you also need Macports. Download and install the last version of Macports for OS X Leopard. Make sure you have lots of free time and your iBook is placed somewhere chilly, because compiling all the required stuff will take a while.
If you are an advanced user you might want to configure Macports to use this macOS PowerPC Macports repo as a Macports overlay. For that, you need to edit some configuration files:
- You need to add those lines at the end of
/opt/local/etc/archive_sites.conf:
name MacOS-PowerPC
urls http://macos-powerpc.org/packages/
name macports_archives
- You need to add this line at the end of
/opt/local/etc/sources.conf, but before thersync://rsync.macports.org/macports/release/tarballs/ports.tar.gz [default]line:
rsync://macos-powerpc.org/macos-powerpc/PPCPorts/powerpc-ports.tar
- You also need to retrieve the macOS PowerPC public key and save it to
/opt/local/share/macports/macos-powerpc-pubkey.pem:
$ sudo wget https://raw.githubusercontent.com/macos-powerpc/macports-base/refs/heads/master/macos-powerpc-pubkey.pem -O /opt/local/share/macports/macos-powerpc-pubkey.pem
/opt/local/etc/pubkeys.conf:/opt/local/share/macports/macos-powerpc-pubkey.pem
After doing all the changes and performing a port sync, a lot more Macports ports will build because Kirill has special patches for them.
$ sudo port sync
Terminal setup
You will need a terminal emulator and iTerm2 2.0 is the best and last version you can get (can always use the default OS X Terminal app as an alternative). You will also need an upgraded shell, so you can opt to install either bash (5.2.37) or zsh (5.9.3) from Macports, since OS X Leopard comes with bash 3.2.17 and zsh 4.3.4 and those are ancient versions. Git is a requirement for some of the shenanigans we’re going to do later.
$ sudo port install bash zsh git
Set zsh as default shell for your user:
$ chsh -s /opt/local/bin/zsh
If you don’t want to customize your terminal, you’re done with this section, if you want a bit of color and extra features, continue reading.
Installing oh-my-zsh is recommended too, because it provides some enhancements to zsh.
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
oh-my-zsh are zsh-autosuggestions, zsh-completions and zsh-syntax-highlighting, you might want to install them too.$ git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
$ git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
Add the plugins to .zshrc:
plugins=(zsh-autosuggestions zsh-completions zsh-syntax-highlighting)
Powerlevel10k is a theme for zsh, emphasizing speed, flexibility and a nice-looking out-of-the box experience.
$ git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
Edit your .zshrc to activate the new theme, changing ZSH_THEME to powerlevel10k/powerlevel10k:
ZSH_THEME="powerlevel10k/powerlevel10k"
Install the four Meslo patched fonts if you want pretty glyphs in your terminal: 1, 2, 3, 4. Restart iTerm2 one more time so the Powerlevel10k configuration script starts automatically. As a final configuration step, you might want Fira Code font installed for any of your editors/IDEs.
Code editors
For simple text editing, either Coda, BBEdit, TextWrangler or TextMate are very good. If you need more complex IDEs, Netbeans 6.8 is pretty good, or Eclipse Juno, Jetbrains IDEA 8, etc. None of the other Jetbrains IDEs will work on PowerPC since they require a newer version of Java VM. My favorites are TextMate for simple editing and Netbeans for more complex projects.
Emacs can be installed using Macports1 too.
$ sudo port install emacs
Application development
C and C++
Gcc2 14 is your best friend here, but llvm3 7.1.1 is an alternative. If you choose to compile gcc 14 from Macports, be aware that it will take about three days. OS X 10.5 Leopard comes with gcc 4.0.1 available at /usr/bin/gcc, and llvm 4.2 available at /Developer/usr/bin/llvm-ccp-4.2 only if you install Xcode.
$ sudo port install gcc14
or
$ sudo port install llvm-powerpc
Python
Last version of Python available in Macports4 is 3.13 and that one will work just fine for anything you throw at it. OS X 10.5 Leopard comes with Python 2.5.1 available at /usr/bin/python.
$ sudo port install python313
Additional Python modules can be installed using the py<VERSION>-<MODULE> format, for example, to install the Python 3.13 cryptography module:
$ sudo port install py313-cryptography
Pascal
Lazarus 1.2.6 and FreePascal Compiler (FPC) 2.6.4 work great, install the 3 packages (fpc, fpcsrc and lazarus) and that’s about it. If you want fpc 3.2.2 you can install it from here (Macports5 version might work too, I didn’t test it), know that the source package is not available as a dmg but as an archive, and you will need to manually extract it to /usr/local/share/fpcsrc/ so Lazarus can pick it up.
fpc.cfg file, but you can download this one (it’s from the 2.6.4 fpc package and it works) and place it inside /etc/ to stop Lazarus from erroring out with fpc.cfg not found.$ sudo wget http://sizeof.cat/post/ibook-g4-development/files/fpc.cfg -O /etc/fpc.cfg
C#
Last version of Mono with support for PowerPC and OS X is 2.10.2, you can download both MDK and MRE, and install it normally. Macports6 has Mono version 6.12.0.182 but I haven’t tested it since I don’t use C#.
$ sudo port install mono
Perl
Perl 5.34.3 is available in Macports7, so it can be easily installed. OS X 10.5 Leopard comes with Perl 5.8.8 available at /usr/bin/perl.
$ sudo port install p5.34
Additional Perl modules can be installed using the p<VERSION>-<MODULE> format, for example, to install the Perl 5.34 XML parser module:
$ sudo port install p5.34-xml-parser
Java
If you used OS X’s Software Update to update your system to the last version available for PowerPC arch, 10.5.8, you will automatically update Java to the last version by Apple, which is 1.5.0_30-b03. A headless version of OpenJDK (no GUI) is available in Macports8 as openjdk8-powerpc version 8u442 and will bump the Java version to 1.8.0, but it can only be used for terminal (again, no GUI) stuff.
$ sudo port install openjdk8-powerpc
Erlang
Erlang is a programming language used to build massively scalable soft real-time systems with requirements on high availability. Erlang/OTP current version 28 is in Macports9.
$ sudo port install erlang
Web development
For web development I’m assuming you will need a modern version of PHP, MySQL/Mariadb, nginx or Apache and a text editor. Macports is your best friend.
$ sudo port install nginx php80 php80-cgi mariadb-11.4
If you need a SSL certificate for your test website, certbot-nginx will help, install it using Macports too.
Additional PHP modules can be installed using the php<VERSION>-<MODULE> format, for example, to install the PHP 8 MySQL module:
$ sudo port install php80-mysql
PostgreSQL 12.22 and SQLite3 3.50.1 are available in Macports too.
$ sudo port install postgresql12 sqlite3
You will also need a proper browser and you can install either Fukurou, or Aquafox.
For a FTP client with support for SCP the only option is FileZilla 3.68 from Macports, and to use it you will need xorg-server-legacy too.
$ sudo port install FileZilla
If you only need a FTP client, any of Fetch, Forklift, Transmit, will do.
If you were a fan of Macromedia Dreamweaver or Adobe Dreamweaver, you can install the Adobe CS4 Suite.
Source Configuration Management
Git
Git is a distributed version control system that tracks versions of files. It is often used to control source code by programmers who are developing software collaboratively. Current version 2.49 of git can be installed using Macports.
$ sudo port install git
If you want a GUI git application, install qGit from Macports.
$ sudo port install qgit
Fossil
Fossil is a software configuration management, bug tracking system and wiki software server for use in software development created by D. Richard Hipp. Current version 2.25 of fossil can be installed using Macports.
$ sudo port install fossil
Subversion
Apache Subversion (often abbreviated SVN, after its command name svn) is a version control system distributed as open source under the Apache License. Current version 1.14.3 of Subversion can be installed using Macports.
$ sudo port install subversion
CVS
Concurrent Versions System (CVS, or Concurrent Versioning System) is a version control system originally developed by Dick Grune in July 1986. Current version 1.11.23 of CVS can be installed using Macports.
$ sudo port install cvs
Others
Last version of Qt with support for PowerPC is 4.8.7 and can be installed from Macports. Qt 5 is not going to work and neither is 6, as expected. You can install the QT Creator (2.8.1) suite too if you want.
$ sudo port install qt4-mac qt4-creator-mac
Arduino IDE version 1.0.4 is what you want and can install on OS X Leopard. Works great and is not bloated and slow like the latest version.
Apple Xcode 3.1.4 can be installed and works as expected, if you want to use the default (and obsolete) Apple development tools.
If you need a hex editor, HexEdit is the best thing, while 0xED is a good alternative.
Old developers might remember CodeWarrior Development Studio 10.
Have fun!
https://github.com/macports/macports-ports/blob/master/editors/emacs/Portfile ↩︎
https://github.com/macports/macports-ports/blob/master/lang/gcc14/Portfile ↩︎
https://github.com/macos-powerpc/powerpc-ports/blob/main/lang/llvm-powerpc/Portfile ↩︎
https://github.com/macos-powerpc/powerpc-ports/blob/main/lang/python313/Portfile ↩︎
https://github.com/macports/macports-ports/blob/master/lang/fpc/Portfile ↩︎
https://github.com/macports/macports-ports/blob/master/devel/mono/Portfile ↩︎
https://github.com/macports/macports-ports/blob/master/lang/perl5/Portfile ↩︎
https://github.com/macos-powerpc/powerpc-ports/blob/main/java/openjdk8-powerpc/Portfile ↩︎
https://github.com/macos-powerpc/powerpc-ports/blob/main/lang/erlang/Portfile ↩︎
permalink http://sizeof.cat/post/ibook-g4-development/
created June 20, 2025
words 1637
tags #apple, #retro, #ibook, #g4, #os x, #powerpc, #leopard, #development
A series is usually a collection of multiple website posts about the same subject and dependent of each others. This article is from the Apple iBook G4 series:
























