Skip to content

Instantly share code, notes, and snippets.

@c4droid369
Last active February 17, 2025 08:53
Show Gist options
  • Select an option

  • Save c4droid369/f5379d911f66153a774c218390160a06 to your computer and use it in GitHub Desktop.

Select an option

Save c4droid369/f5379d911f66153a774c218390160a06 to your computer and use it in GitHub Desktop.
Building Emacs feature/igc branch in Docker
# Prepare environment
FROM alpine:latest
RUN sed -i 's#https\?://dl-cdn.alpinelinux.org/alpine#https://mirrors.tuna.tsinghua.edu.cn/alpine#g' /etc/apk/repositories
RUN apk update && \
apk upgrade && \
apk add --no-cache build-base make autoconf automake \
gnutls-dev ncurses-dev libxml2-dev libxpm-dev tiff-dev giflib-dev \
libpng-dev libjpeg-turbo-dev librsvg-dev lcms2-dev gnutls-dev zlib-dev \
harfbuzz-dev jansson-dev libgccjit-dev imagemagick-dev fetchmail texinfo git
# Build MPS
RUN git clone --depth 1 https://github.com/Ravenbrook/mps.git /mps
WORKDIR /mps/code
RUN gcc -O2 -c mps.c && ar rvs libmps.a mps.o
# Build GNU Emacs
RUN git clone --depth 1 https://github.com/emacs-mirror/emacs -b feature/igc /emacs
WORKDIR /emacs
RUN ./autogen.sh && \
CPPFLAGS=-I/mps/code LDFLAGS=-L/mps/code \
./configure --prefix=/usr \
--with-mailutils \
--with-x-toolkit=no \
--with-json \
--with-native-compilation=yes \
--with-mps=yes \
--without-pop \
--without-dbus && \
make -j$(nproc) -l$(nproc) && \
make install
WORKDIR /
CMD [ "emacs" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment