Mac – Compiling (NS/Cocoa) Emacs on OSX with SVG support

developmentemacs

Can anyone explain how to build Emacs --with-ns and SVG support on OS X?

Notes:

  • --with-rsvg isn't working (when librsvg is installed, ie. via Homebrew)

  • FYI, The Emacs Mac port uses webkit to provide SVG support, although that build adds far too many things I don't want.

I want to just compile in support for SVG on Cocoa Emacs, I'm not averse to patching, and if no answers are available, I'll see if I can patch over from the Emacs Mac port

(Assume latest stable version of Emacs 24.2, building from source)

Update:

I've tried running brew install emacs --cocoa --svg without success.

Best Answer

The installation of the Emacs latest version (25.0.50) works fine using this command:

brew install emacs --HEAD --use-git-head --cocoa --with-gnutls --with-rsvg --with-imagemagick