Skip to content

Instantly share code, notes, and snippets.

@tek-nishi
Last active April 12, 2022 02:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tek-nishi/603314c1e482a60a569d559c1a960e7b to your computer and use it in GitHub Desktop.
Save tek-nishi/603314c1e482a60a569d559c1a960e7b to your computer and use it in GitHub Desktop.
emacsをビルドするスクリプト
#!/bin/bash
EMACS_VER=28.1
MACPORT_VER=9.0
tar xvfz emacs-${EMACS_VER}.tar.gz
tar xvfz emacs-${EMACS_VER}-mac-${MACPORT_VER}.tar.gz
cd emacs-${EMACS_VER}
patch -p 1 < ../emacs-${EMACS_VER}-mac-${MACPORT_VER}/patch-mac
cp -r ../emacs-${EMACS_VER}-mac-${MACPORT_VER}/mac mac
cp ../emacs-${EMACS_VER}-mac-${MACPORT_VER}/src/* src
cp ../emacs-${EMACS_VER}-mac-${MACPORT_VER}/lisp/term/mac-win.el lisp/term
cp nextstep/Cocoa/Emacs.base/Contents/Resources/Emacs.icns mac/Emacs.app/Contents/Resources/Emacs.icns
installprefix=`pwd`/build
app_dir=$installprefix/Emacs.app/Contents/Resources
compver=x86_64-apple-darwin`uname -r`
# LIBXML2 for Catalina
MACSDK=`xcrun --show-sdk-path`
export LIBXML2_CFLAGS="-I${MACSDK}/usr/include/libxml2"
export LIBXML2_LIBS="-lxml2"
set -e
./autogen.sh
./configure --without-x --without-dbus --without-xpm CC=clang CFLAGS='-Os' --enable-mac-app=$installprefix --prefix=$installprefix --enable-mac-self-contained --with-native-compilation
make
make install
set +e
echo 'Done! Find your Emacs.app at '$installprefix'.'
@tek-nishi
Copy link
Author

28.1対応

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment