Skip to content

Instantly share code, notes, and snippets.

@dpeek
Last active October 12, 2015 06:27
Show Gist options
  • Save dpeek/3984469 to your computer and use it in GitHub Desktop.
Save dpeek/3984469 to your computer and use it in GitHub Desktop.
Building Neko and Haxe from Source on OS X 10.8

Requirements

  • OS X Mountain Lion (10.8.1)
  • XCode 4.5.1 with "Command Line Tools" installed in Preferences > Downloads > Components
  • MacPorts Mountain Lion installer.

Install dependencies: (you might want a grab a coffee)

sudo port install boehmgc pcre mysql5 ocaml

Part One: Neko

Check out the sources, I put mine in /ws/sdk but that's just me.

mkdir -p /ws/sdk
cd /ws/sdk
svn checkout http://nekovm.googlecode.com/svn/trunk/ neko
svn checkout http://haxe.googlecode.com/svn/trunk/ haxe

You can optionally check out a particular version using one of the available tags:

svn co http://haxe.googlecode.com/svn/tags/v2-10 haxe

Build and install:

cd /ws/sdk/neko
make os=osx
sudo make install os=osx

During compilation you will be prompted for the location of some header files. You can skip Apache 1.3 unless you need to support that. When prompted for Carbon.h enter the path:

/System/Library/Frameworks/Carbon.framework/Versions/A/Headers/

Add the following to your shell profile (.profile, .bash_profile or similar)

export NEKOPATH=/usr/local/lib/neko
export PATH=$NEKOPATH:$PATH

Test it worked:

source ~/.profile
neko

Part Two: Haxe

Build binaries:

cd /ws/sdk/haxe
make

Install:

sudo rm -rf /usr/lib/haxe
sudo mkdir /usr/lib/haxe
sudo cp -r haxe haxedoc haxelib std doc /usr/lib/haxe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment