This is a short guide to compiling Naev on *nix-based systems.
First install the Naev dependencies. They should be fairly common on most systems. They are:
Building is faster if these are also available:
Runtime dependencies for Naev can be installed with:
apt-get install libsdl2-2.0-0 libsdl2-image-2.0-0 libgl1-mesa-dri\ libxml2 libfreetype6 libpng-dev libopenal1 libvorbis0a libzip6 libphysfs1 libwebp7 libcholmod3 libcxsparse3 libopenblas-baseFor compiling, you'll need the additional:
apt-get install build-essential git meson libsdl2-dev libsdl2-image-dev\ libgl1-mesa-dev libxml2-dev libfreetype-dev libpng-dev libopenal-dev\ libvorbis-dev binutils-dev libwebp-dev libiberty-dev intltool python3-yaml\ libfontconfig1-dev libphysfs-dev libopenblas-dev libsuitesparse-devYou'll also want libglpk-dev (if your OS has a good one -- 4.65 in Ubuntu 18.04 appears to be defective). Otherwise, you'll need to use the included SuiteSparse package (Meson option:--force-fallback-for=glpk,SuiteSparse), orexport CPPFLAGS=-I/usr/include/suitesparse before configuring Meson.
(Dependencies here are out-of-date, contributors welcome!)
emerge media-libs/libsdl media-libs/sdl-image virtual/opengl\ dev-libs/libxml2 media-libs/freetype media-libs/libpng media-libs/openal\ media-libs/libvorbis sys-devel/binutils dev-libs/libzip sci-libs/openblas\ sci-libs/suitesparse sci-mathematics/glpk(Dependencies here are probably out-of-date, contributors welcome!)First make sure you have autotools and pkg-config installed:
pacman -S --needed automake autoconf autoconf-archive pkg-config mesonThen, install the dependencies:
pacman -S --needed sdl2 sdl2_image libxml2 freetype2 libpng libvorbis libzip openblas openal suitesparse glpk physfs cmakepacman might tell you thatopenblas andblas are in conflict, but the regularblas package doesn't work (as of 14-08-2022). Replace it.
First make sure you have the build tools installed:
sudo dnf install meson ninja-build gccThen, install these build-time dependencies:
sudo dnf install binutils-devel cmark-devel fontconfig-devel freetype-devel enet-devel glpk-devel libpng12-devel libxml2-devel\ libvorbis-devel libwebp-devel libunibreak-devel luajit-devel nativefiledialog-extended-devel openal-soft-devel openblas-devel physfs-devel\ python3-pyyaml SDL2-devel SDL2_image-devel suitesparse-devel libyaml-develIf needed, you can install the following packages to allow for generation of documentation.
sudo dnf install doxygen lua-ldoc graphvizFirst, clone the git repository with all git submodules by running:
git clone --recursive https://codeberg.org/naev/naev.git naevcd naevNext, setup the build directory with:
meson setup build .#or ("meson build", which is a shortcut for the same thing and NOT its own Meson command)Move into the build directory with:
cd buildAnd proceed to compile with:
meson compileIf all went well you should see something like:
$ meson compileFound runner: ['/usr/bin/ninja']ninja: Entering directory `.'[21/196] Generating gen-desktop-entry with a custom commandCreating new desktop-entry file 'org.naev.naev.desktop' using data from 'org.naev.naev.metainfo.xml'[40/196] Generating ldoc with a custom commandreading configuration from ../docs/lua/config.ldoutput written to /tmp/naev/build/docs/lua[196/196] Linking target naevIndicating the binary was built. Now you can run naev with:
./naev.shEnjoy!
Lore is being removed from the Wiki and moved intodocs/manual/lore/.
Deleting the wiki page "Compiling on nix" cannot be undone. Continue?