The latest Minetest 5.4.0 was released last February 23, 2021. But the latest Minetest version that is on the Debian Backports repository is 4 5.3.0, and on the Debian Stable repo is 0.4.17. They are… old. I decided to compile the latest Minetest, here are the steps that I did:

  1. Get the 5.4.0 source code on the Minetest Github
  2. Install Pre-requisite for compiling Minetest
  3. Compile Minetest
  4. Play Minetest

Getting the Minetest 5.4.0 Source Code

The official Minetest git repository can be found at: https://github.com/minetest/minetest. I just grabbed a compressed source code at the Releases page: https://github.com/minetest/minetest/archive/5.4.0.tar.gz.
To extract the tar.gz: tar -xf 5.4.0.tar.gz

$ wget 'https://github.com/minetest/minetest/archive/5.4.0.tar.gz'
$ tar -xf 5.4.0.tar.gz
$ cd minetest-5.4.0

Alternatively you can git clone the stable-5 branch:

$ git clone --branch stable-5 https://github.com/minetest/minetest

Cloning into 'minetest'...
remote: Enumerating objects: 25, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 71127 (delta 8), reused 10 (delta 4), pack-reused 71102
Receiving objects: 100% (71127/71127), 77.69 MiB | 1.20 MiB/s, done.
Resolving deltas: 100% (51145/51145), done.

$ cd minetest

Installing Pre-requisites

$ sudo apt install g++ make libc6-dev libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev

[sudo] password for user:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libbz2-dev is already the newest version (1.0.6-9.2~deb10u1).
libcurl4-gnutls-dev is already the newest version (7.64.0-4+deb10u1).
libfreetype6-dev is already the newest version (2.9.1-3+deb10u2).
g++ is already the newest version (4:8.3.0-1).
libc6-dev is already the newest version (2.28-10).
libgmp-dev is already the newest version (2:6.1.2+dfsg-4).
libirrlicht-dev is already the newest version (1.8.4+dfsg1-1.1).
libjpeg-dev is already the newest version (1:1.5.2-2+deb10u1).
libjsoncpp-dev is already the newest version (1.7.4-3).
libogg-dev is already the newest version (1.3.2-1+b1).
libpng-dev is already the newest version (1.6.36-6).
libvorbis-dev is already the newest version (1.3.6-2).
libxxf86vm-dev is already the newest version (1:1.1.4-1+b2).
make is already the newest version (4.2.1-1.2).
libgl1-mesa-dev is already the newest version (18.3.6-2+deb10u1).
libopenal-dev is already the newest version (1:1.19.1-1).
libsqlite3-dev is already the newest version (3.27.2-3+deb10u1).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-1).
cmake is already the newest version (3.16.3-3~bpo10+1).

As you can see, the required packages are already installed on my system.

Compiling Minetest

Make sure you are in the minetest source code directoty:

$ cmake . -DRUN_IN_PLACE=TRUE -B build
$ cd build
$ make -j$(nproc)

RUN_IN_PLACE parameter will let Minetest to run directly in the source directory and the make parameter -j$(nproc) will utilize all your CPU to make the compilation faster.

This took 15 minutes to complete on a 1.86GHz Intel Core 2 Duo Thinkpad Laptop.

Playing Minetest

Running the compiled Minetest:

$ ./bin/minetest

Note: The compiled Minetest does not contain the Minetest Game, it is only an engine.

References:

https://github.com/minetest/minetest

Except where otherwise noted, this work is licensed under Creative Commons Attribution-ShareAlike 4.0 International License (http://creativecommons.org/licenses/by-sa/4.0/).