kdmurray.blog

The crossroads of life and tech

MacPorts: Subversion setup

In trying to upload my first WordPress plugin to the subversion servers at wp-plugins.org, I found that I didn’t have Subversion installed on the Macbook yet. So I turned to my first source for all Mac tools which originated in the Linux/Unix realm and that’s MacPorts.

MacPorts (formerly DarwinPorts) is a package manager for Mac OS X which can handle the installation, removal and updating of many tools. The vast majority of these are command-line programs. They run the spectrum from development tool like Subversion or Ruby on Rails, to network tools like bind or arpwatch.

Typical syntax for installing a MacPort is:

sudo port install some-application

A quick note about the Subversion install: you may need to ensure that your MacPorts install is up-to-date. I needed to run a “self update” of MacPorts before my subversion install would complete. See the transcript below to see what I mean…

titanium:~/Projects/WP-Plugins kdmurray$ su root

titanium:/Users/kdmurray/Projects/WP-Plugins root# port install subversion +tools Error: Unable to execute port: wrong # args: should be "proc name args body"

titanium:/Users/kdmurray/Projects/WP-Plugins root# port selfupdate DarwinPorts base version 1.400 installed Downloaded MacPorts base version 1.5 Configuring, Building and Installing new MacPorts base selfupdate done!

titanium:/Users/kdmurray/Projects/WP-Plugins root# port install subversion +tools

If you’re working with command-line tools on your Mac, and trying to compile linux tools from scratch, give MacPorts a shot. It will quite literally save you hours of time and frustration.