2022-03-09
Smol or not?
Some time ago I started exploring Alpine Linux[a].
... I do like the fact that I can have a Linux system without python and perl and translations and a whole lot of other geek and automatic things.
Then I set out to compile emacs 29 from source. You might see, where this is going. Of course you need quite a bit of stuff, to make emacs compile. On Debian I use "apt-get build-dep emacs-gtk" to get there. For Alpine Linux I took inspiration from the aports details of emacs[b]. With that information available things worked remarkably well:
apk add autoconf automake linux-headers gawk ncurses-dev \
ncurses-libs gnutls-dev gmp-dev jansson-dev harfbuzz-dev \
glib-dev fontconfig-dev libpng-dev \
librsvg-dev giflib-dev libxpm-dev gtk+3.0-dev alsa-lib-dev \
libxml2-dev pango-dev tiff-dev libjpeg-turbo-dev libxaw-dev \
texinfo
mkdir Source
cd Source
git clone git://git.sv.gnu.org/emacs.git
cd emacs
./autogen.sh
./configure --with-pgtk --without-makeinfo --with-harfbuzz --with-json --with-gpm
time make -j8
doas make install
Needless to say
- There might lurk errors in the shell snippet above.
- I managed to get a working emacs executable of version "GNU Emacs 29.0.50".
- The "--with-pgtk" option will make emacs work with wayland, no xwayland needed!
- I did not have to jump through any hoops, everything just compiled away.
- I added my init.el file, which is based on the straight package manager for emacs. Everything was downloaded and processed. Amazing! My init.el is a whee bit longer than 1000 lines and loads some 40 packages. Maybe not a really big configuration by any means, but not particularly slim either.
And these things make me gaze in awe! I mean, emacs is not a small piece of software. And it just compiled. Yay!
However, looking at the fairly impressive list of build dependencies one might wonder, whether my initially smol Alpine Linux is not so smol any more, after all. No, I did not invest time to find out, how to squeeze a few MegaByte from this adventure.
Cheers,
~ew