I use EAGLE schematic and PCB layout software because I was lucky to get an EAGLE 4.16 Professional license for very reasonable price from a former employer. I upgraded it to EAGLE 5.x, though I felt a bit gypped by what I got for the money. And now, EAGLE is at version 6, and I'm once again having a hard time justifying the upgrade price.

But there's a more important consideration than price. As I am a purveyor of open-source hardware, EAGLE isn't ideal software. It's a closed-source product, and is pay-ware. So it fails on both the "free-as-in-freedom" and "free-as-in-beer" tests. Yes, EAGLE is available in a "free" version, but is quite limited, especially for my designs, which tend to exceed those limits – both in terms of size and number of layers.

So what to do? There are two popular open-source packages for schematic capture and PCB layout: gEDA and KiCAD. I've always liked KiCAD in principle, and have tried a number of times to use it on Mac OS X, but the project's support for Mac is tepid at best. KiCAD is also dependent on wxWidgets, whose Mac OS X support lags other platforms. There are a number of Mac OS X builds of KiCAD out there, which have patches applied and are reasonably stable. But I wanted to build KiCAD (and wxWidgets) from source so I could participate in mainlining Mac OS X improvements – especially for multi-touch trackpad gestures. Here's a video of the touchpad improvements I made:

Below are my patches and notes for how to build wxWidgets and KiCAD on Mac OS X Lion, from their respective repositories. I'm assuming you have Xcode 4.3.2, and bzr and cmake installed somehow (I used MacPorts 2.1.0).

My patches to wxWidgets and KiCAD fix a CMake line formatting bug, a wxWidgets overlay bug, and a Boost #include bug. (Two of these patches are updated from KiCAD patches I found elsewhere.) The patches also add hacked-in support for the Mac OS X touchpad "magnify" event, so I can use the pinch-zoom gesture. I also modified the mouse scrollwheel support to implement horizontal and vertical scrolling using trackpad gestures.

Here are my build notes, derived from several posts I found about how to build on Mac OS X:

git clone git://gist.github.com/2763241.git
svn checkout http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets
cd wxWidgets
patch -p0 <../2763241/wxWidgets-kicad-overlay.patch
patch -p0 <../2763241/wxWidgets-magnify-macosx.patch
mkdir build-debug
cd build-debug
../configure --enable-debug --enable-unicode=yes --disable-shared --enable-monolithic --with-opengl --with-expat=builtin --enable-aui --with-osx_cocoa --with-macosx-version-min=10.7 --prefix=$PWD/../build-debug CFLAGS=-DMAC_OS_X_VERSION_MAX_ALLOWED=1070 CXXFLAGS=-DMAC_OS_X_VERSION_MAX_ALLOWED=1070
make
cd ../..
bzr branch lp:kicad
cd kicad
patch -p0 <../2763241/kicad-cmake-line-formatting.patch
patch -p0 <../2763241/kicad-boost-polygon-sort-adaptor.patch
patch -p0 <../2763241/kicad-magnify-macosx.patch
mkdir build-xcode
cd build-xcode
cmake -DwxWidgets_CONFIG_EXECUTABLE=$PWD/../../wxWidgets/build-debug/wx-config -DwxWidgets_wxrc_EXECUTABLE=$PWD/../../wxWidgets/build-debug/utils/wxrc/wxrc -DKICAD_TESTING_VERSION=ON -DCMAKE_CXX_FLAGS=-D__ASSERTMACROS__ -G Xcode ..
open -a Xcode kicad.xcodeproj

At this point, you're looking at the KiCAD project in Xcode, and can select the particular tool or application you want to build. I've noticed some odd behavior in Xcode, where it can't find #include file pcb_plot_params_lexer.h during the first build attempt, but works fine if you build again.

There are still plenty of bugs to fix. For instance, the overlay stuff doesn't seem to draw correctly when you move an object in the eeschema. It seems as if the overlay size isn't set correctly, but seems to fix itself if you resize the eeschema window. Hmmm…