Building libfreenect with patched libusb under Mac OS X

Prerequisites

  • macports
  • The following installed macports:
    • git-core
    • cmake
    • libtool
    • libusb-devel

Get the sources

  • libfreenect:
    • git clone¬†https://github.com/OpenKinect/libfreenect.git
  • libusb:
    • git clone git://git.libusb.org/libusb.git

Apply the patch and build libusb

  1. cd path/to/libusb
  2. ./autogen.sh
  3. patch -p1 < path/to/libfreenect/platform/osx/libusb-osx-kinect.diff
  4. ./configure LDFLAGS=’-framework IOKit -framework CoreFoundation’
  5. make
  6. sudo make install

Start building libfreenect

  1. cd path/to/libfreenect
  2. mkdir build
  3. cd build
  4. ccmake ..
      With the following changes:

    • LIBUSB_1_INCLUDE_DIR: /usr/local/include
    • LIBUSB_1_LIBRARY: /usr/local/lib/libusb-1.0.dylib
  5. press ‘c’ and afterwards ‘g’ to generate and exit
  6. cmake ..
  7. make
  8. sudo make install
Building libfreenect with patched libusb under Mac OS X

Emacs for Mac OS X adjustments

To use Emacs on Mac OS X you have to adjust some properties.

Map the alt and meta key
Go to “Emacs” – “Preferences” – “Environment” – “Ns : GNUstep/Mac OS X specific features” and change the following:

  • Ns Command Modifier” -> “meta
  • Ns Alternate Modifier” -> “No modifier

Now you can use your alt and meta keys as usual.

Change the background and mouse color

  • open your “~/.emacs
  • paste the following code snippet:
(setq default-frame-alist
    (append default-frame-alist
        '((foreground-color . "LawnGreen")
          (background-color . "Black")
          (cursor-color . "LawnGreen"))))
Emacs for Mac OS X adjustments