Skip to content

Instantly share code, notes, and snippets.

@IronOxidizer
Last active March 9, 2022 00:55
Show Gist options
  • Save IronOxidizer/0ac058fb145eadd3cfd0fdfa1e5454c9 to your computer and use it in GitHub Desktop.
Save IronOxidizer/0ac058fb145eadd3cfd0fdfa1e5454c9 to your computer and use it in GitHub Desktop.
Buildscript for Minetest for the PinePhone
sudo apk add build-base git cmake bzip2-dev libpng-dev jpeg-dev libxxf86vm-dev mesa-dev sqlite-dev libogg-dev libvorbis-dev openal-soft-dev curl-dev freetype-dev zlib-dev gmp-dev jsoncpp-dev luajit-dev
git clone --recursive --depth 1 -b ogl-es https://github.com/zaki/irrlicht
git clone https://github.com/minetest/minetest
cd irrlicht/source/Irrlicht
sed -i '1s/^/#define NO_IRR_COMPILE_WITH_OGLES1_\n#define NO_IRR_COMPILE_WITH_OPENGL_\n/' ../../include/IrrCompileConfig.h
sed -i 's/<GLES\/egl\.h>/<EGL\/egl\.h>/g' CEGLManager.h
make -j$(nproc)
cd ../../../minetest
cmake . -DRUN_IN_PLACE=TRUE -DENABLE_GLES=1 \
-DBUILD_SERVER=NO \
-DEGL_INCLUDE_DIR=/usr/include/EGL/egl.h \
-DEGL_LIBRARY=/usr/lib/libEGL.so \
-DOPENGLES2_INCLUDE_DIR=/usr/include/GLES2/gl2.h \
-DOPENGLES2_LIBRARY=/usr/lib/libGLESv2.so \
-DIRRLICHT_SOURCE_DIR=../irrlicht/source/Irrlicht/ \
-DIRRLICHT_LIBRARY=../irrlicht/lib/Linux/libIrrlicht.a \
-DIRRLICHT_INCLUDE_DIR=../irrlicht/include/
make -j$(nproc)
cp -r ../irrlicht/media/Shaders client/shaders/Irrlicht
echo -e 'default_game=devtest\nenable_shaders=false\nvideo_driver=ogles2' > minetest.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment