Files
build-emacs-for-macos/README.md
Jim Myhrberg a840bffefa Update and fix things for current Emacs trunk (24.4)
Notes:
- The sRGB patch is now a simple text-replacement, as diff/patch files
  seem to just fail. Even Homebrew's emacs formula does it this way.
- Removed fullscreen patch, as Emacs 24.4 includes fullscreen support on
  OS X, both native and pre-Lion style fullscreen. More details here:
  http://www.emacswiki.org/emacs/FullScreen#toc23
2013-10-20 18:55:07 +01:00

60 lines
2.0 KiB
Markdown

# build-emacs-for-osx
Use this script at your own risk. It currently works for me on my own machine,
which as of writing is:
* OS X 10.8.5 (12F45)
* Xcode 5.0 (5A1413)
Your luck might vary. Do note that it does not build a universal application.
The CPU architecture of the built application will be that of the machine it
was built on.
## Why?
I've been using [Homebrew][] the past few
months to build from HEAD. Homebrew comes with a number of patches, including
the [sRGB][] patches which I use.
[homebrew]: http://mxcl.github.com/homebrew/
[srgb]: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8402
Homebrew does not build a self-contained application though, which caused
issues for me when I needed to rollback to a specific build. I found the
easiest way to build a completely self-contained Emacs.app nightly from a
specific date with custom patches was to do it manually.
So I decided to quickly hack together a script to automate that manual
process. The code is a horrible hack, but it (seemingly) works as I'm writing
this in Emacs built with it.
## Usage
Myself I run the following command which will download a tarball of the
`master` branch, apply the sRGB patch, and build Emacs.app:
./build-emacs-for-osx
Or for example if you want to build the `emacs-24.3` tag, run:
./build-emacs-for-osx emacs-24.3
Resulting applications are saved to the `builds` directory in a bzip2
compressed tarball.
## Internals
I decided to pull Emacs' source from a GitHub [mirror][repo] rather than the
official Bzr repo cause I'm not familiar with Bzr, and GitHub lets you easily
download tarballs of any branch, commit or tag. And the tarballs from GitHub
are just over 30MB, compared to ~1GB to pull the offical Bzr repo.
[repo]: https://github.com/mirrors/emacs
The only option passed in `./configure` is `--with-ns`, meaning the resulting
application only supports the CPU architecture of the system is was built on.
There might be more side-effects to, but I haven't noticed any.