- Get the webkit patch for emacs 27 (
0_all_webkit.patch
) here: https://gist.github.com/fuxialexander/0231e994fd27be6dd87db60339238813
- https://gist.github.com/orther/8c04af954bf746d7a020be75614a527c (gist fork, old don't use)
-
Clone Emacs repo locally:
git clone [email protected]:emacs-mirror/emacs.git emacs-mirror
-
Create branch for patch
git checkout -b nsxwidget-patch
-
Apply Patch:
git am --signoff < 0_all_webkit.patch
-
Build:
make clean
make
./configure --prefix=$HOME/work/emacs-mirror --with-xwidgets
make install
- Locate
Emacs.app
andemacsclient
:
ln -s /Users/brandon/work/code/emacs-mirror/nextstep/Emacs.app/Contents/MacOS/Emacs /usr/local/bin/emacs
ln -s /Users/brandon/work/code/emacs-mirror/nextstep/Emacs.app/Contents/MacOS/bin/emacsclient /usr/local/bin/emacsclient
May need to install texinfo with brew install texinfo
and export the PATH and LDFLAGS that brew prints. Mine were:
export PATH=/usr/local/opt/texinfo/bin:$PATH
export LDFLAGS=-L/usr/local/opt/texinfo/lib
Emacs macOS Install Guide: https://github.com/emacs-mirror/emacs/blob/cab400aacde04e4455caea4a6525b26ca7909850/INSTALL#L209
I have encountered a problem when applying the patch, following is the error message:
Applying: Support xwidget webkit for macOS X
error: patch failed: configure.ac:5481
error: configure.ac: patch does not apply
error: patch failed: nextstep/templates/Info.plist.in:675
error: nextstep/templates/Info.plist.in: patch does not apply
error: patch failed: src/emacs.c:1618
error: src/emacs.c: patch does not apply
error: patch failed: src/nsterm.m:4248
error: src/nsterm.m: patch does not apply
error: patch failed: src/xwidget.c:18
error: src/xwidget.c: patch does not apply
Patch failed at 0001 Support xwidget webkit for macOS X
Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".