Warning: there may be occasional oddness due to css and blog edits. **KNOWN ISSUE: possible hidden text**

Thursday, April 9, 2026

luanti-dev gets sdl3

I like to periodically check the upstream build for new features so that I can adjust my own unofficial port makefiles to add them as configurable options.  The new features are not always announced since I am tracking sometimes daily upstream commits rather than releases which will get the larger fanfare.  Not long ago I checked luanti to discover that along with a commit that mentioned sdl3, there was also a configuration toggle to adopt.

What I did, was enter my luanti-dev directory, adjusted the Makefile for the newer commit tag, made a new checksum (distinfo) file, and finally did make extract.  This will obtain and expand the source tarball, creating a subdirectory within the work directory as I defined in the Makefile as WRKSRC= ${WRKDIR}/${PORTNAME}-${GH_TAGNAME} which would be something like luanti-2a9430961330eabfcba7cec266e8ab4a965048e6 containing all the source and additional directories.

Discovering the options for cmake is one command, cmake -L | awk '{if(f)print} /-- Cache values/{f=1}' which gives the output below.

root@ichigo:/home/tigersharke/luanti-dev/work/luanti-2a9430961330eabfcba7cec266e8ab4a965048e6 # cmake -L | awk '{if(f)print} /-- Cache values/{f=1}'
CMake Warning:
  No source or binary directory provided.   Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.

APPLY_LOCALE_BLACKLIST:BOOL=ON
BUILD_BENCHMARKS:BOOL=FALSE
BUILD_CLIENT:BOOL=TRUE
BUILD_DOCUMENTATION:BOOL=TRUE
BUILD_SERVER:BOOL=FALSE
BUILD_UNITTESTS:BOOL=TRUE
BUILD_WITH_TRACY:BOOL=FALSE
CMAKE_BUILD_TYPE:STRING=Release
CMAKE_INSTALL_PREFIX:PATH=/usr/local
CUSTOM_BINDIR:STRING=
CUSTOM_DOCDIR:STRING=
CUSTOM_EXAMPLE_CONF_DIR:STRING=
CUSTOM_ICONDIR:STRING=
CUSTOM_LOCALEDIR:STRING=
CUSTOM_MANDIR:STRING=
CUSTOM_SHAREDIR:STRING=
CUSTOM_XDG_APPS_DIR:STRING=
ENABLE_CURL:BOOL=ON
ENABLE_CURSES:BOOL=OFF
ENABLE_GETTEXT:BOOL=ON
ENABLE_GLES2:BOOL=OFF
ENABLE_LEVELDB:BOOL=ON
ENABLE_LTO:BOOL=TRUE
ENABLE_LUAJIT:BOOL=ON
ENABLE_OPENGL:BOOL=ON
ENABLE_OPENGL3:BOOL=ON
ENABLE_OPENSSL:BOOL=ON
ENABLE_POSTGRESQL:BOOL=ON
ENABLE_PROMETHEUS:BOOL=OFF
ENABLE_REDIS:BOOL=ON
ENABLE_SOUND:BOOL=ON
ENABLE_SPATIAL:BOOL=ON
ENABLE_SYSTEM_GMP:BOOL=ON
ENABLE_SYSTEM_JSONCPP:BOOL=ON
ENABLE_UPDATE_CHECKER:BOOL=(;NOT;TRUE;)
FETCH_TRACY_GIT_TAG:STRING=master
GETTEXT_MSGFMT:FILEPATH=/usr/local/bin/msgfmt
INSTALL_DEVTEST:BOOL=FALSE
LEVELDB_INCLUDE_DIR:PATH=/usr/include
LEVELDB_LIBRARY:FILEPATH=LEVELDB_LIBRARY-NOTFOUND
PRECOMPILED_HEADERS_PATH:FILEPATH=
PRECOMPILE_HEADERS:BOOL=OFF
REDIS_INCLUDE_DIR:PATH=REDIS_INCLUDE_DIR-NOTFOUND
REDIS_LIBRARY:FILEPATH=REDIS_LIBRARY-NOTFOUND
REQUIRE_LUAJIT:BOOL=OFF
RUN_IN_PLACE:BOOL=FALSE
SDL2_DIR:PATH=/usr/local/lib/cmake/SDL2
SPATIAL_INCLUDE_DIR:PATH=/usr/local/include
SPATIAL_LIBRARY:FILEPATH=/usr/local/lib/libspatialindex.so
USE_GPROF:BOOL=FALSE
USE_SDL2_STATIC:BOOL=OFF
USE_SDL3:BOOL=OFF
USE_SDL3_STATIC:BOOL=OFF
VERSION_EXTRA:STRING=
WARN_ALL:BOOL=TRUE
root@ichigo:/home/tigersharke/luanti-dev/work/luanti-2a9430961330eabfcba7cec266e8ab4a965048e6 #

Now that I see the sdl3 cmake option I can add it to the Makefile but due to the dual nature of the makefile, it is a little more complicated than simply adding the options.  There has to be a condition for whether the client is built because much of what a client requires is not necessary for simply running a server.  The unusual conditional we have for sdl2 now gets duplicated with a small adjustment for sdl3.

# diff --color=always -y -W 170 Makefile Makefile-new | colordiff
### PORTNAME block ##-------------------------------------------------------------      ### PORTNAME block ##-------------------------------------------------------------
PORTNAME=               luanti                                                          PORTNAME=               luanti
DISTVERSION=    g20260221                                                               DISTVERSION=    g20260221
CATEGORIES=             games                                                           CATEGORIES=             games
MASTER_SITES=   GH                                                                      MASTER_SITES=   GH
PKGNAMESUFFIX=  -dev                                                                    PKGNAMESUFFIX=  -dev
DISTNAME=               ${PORTNAME}-${GH_TAGNAME}                                       DISTNAME=               ${PORTNAME}-${GH_TAGNAME}
DIST_SUBDIR=    ${PORTNAME}${PKGNAMESUFFIX}                                             DIST_SUBDIR=    ${PORTNAME}${PKGNAMESUFFIX}
                                                                                        
# Maintainer block ##-------------------------------------------------------------      # Maintainer block ##-------------------------------------------------------------
MAINTAINER=             nope@nothere                                                    MAINTAINER=             nope@nothere
COMMENT=                Near-infinite-world block sandbox game                          COMMENT=                Near-infinite-world block sandbox game
WWW=                    https://www.luanti.org/                                         WWW=                    https://www.luanti.org/
                                                                                        
### License block ##--------------------------------------------------------------      ### License block ##--------------------------------------------------------------
LICENSE=                LGPL21+                                                         LICENSE=                LGPL21+
LICENSE_FILE=   ${WRKSRC}/doc/lgpl-2.1.txt                                              LICENSE_FILE=   ${WRKSRC}/doc/lgpl-2.1.txt
                                                                                        
# dependencies ##-----------------------------------------------------------------      # dependencies ##-----------------------------------------------------------------
LIB_DEPENDS=    libzstd.so:archivers/zstd \                                             LIB_DEPENDS=    libzstd.so:archivers/zstd \
                                libfreetype.so:print/freetype2                                                          libfreetype.so:print/freetype2
                                                                                        
### uses block ##-----------------------------------------------------------------      ### uses block ##-----------------------------------------------------------------
USES=                   cmake iconv:wchar_t sqlite ninja:make pkgconfig:build           USES=                   cmake iconv:wchar_t sqlite ninja:make pkgconfig:build
USE_GITHUB=             nodefault                                                       USE_GITHUB=             nodefault
GH_ACCOUNT=             luanti-org                                                      GH_ACCOUNT=             luanti-org
GH_PROJECT=             luanti                                                          GH_PROJECT=             luanti
GH_TAGNAME=             a684b532897d3b95fec81089658f928ca51b0e97                        GH_TAGNAME=             a684b532897d3b95fec81089658f928ca51b0e97
                                                                                        
# USES=cmake related variables ##-------------------------------------------------      # USES=cmake related variables ##-------------------------------------------------
CMAKE_ARGS=             -DCMAKE_BUILD_TYPE="MinSizeRel" \                               CMAKE_ARGS=             -DCMAKE_BUILD_TYPE="MinSizeRel" \
                                -DCUSTOM_EXAMPLE_CONF_DIR="${PREFIX}/etc"                                               -DCUSTOM_EXAMPLE_CONF_DIR="${PREFIX}/etc"
#                               -DCMAKE_CXX_FLAGS="-stdlib=libc++"                      #                               -DCMAKE_CXX_FLAGS="-stdlib=libc++"
#                               -DCMAKE_FETCHCONTENT_FULLY_DISCONNECTED="FALSE"         #                               -DCMAKE_FETCHCONTENT_FULLY_DISCONNECTED="FALSE"
                                                                                        
### Make block ##-----------------------------------------------------------------      ### Make block ##-----------------------------------------------------------------
TEST_ENV=               ${MAKE_ENV} LC_ALL=C.UTF-8                                      TEST_ENV=               ${MAKE_ENV} LC_ALL=C.UTF-8
### conflicts ##------------------------------------------------------------------      ### conflicts ##------------------------------------------------------------------
CONFLICTS=              luanti minetest irrlichtMt minetest-dev irrlicht-minetest       CONFLICTS=              luanti minetest irrlichtMt minetest-dev irrlicht-minetest
### wrksrc block ##---------------------------------------------------------------      ### wrksrc block ##---------------------------------------------------------------
WRKSRC=                 ${WRKDIR}/${PORTNAME}-${GH_TAGNAME}                             WRKSRC=                 ${WRKDIR}/${PORTNAME}-${GH_TAGNAME}
### packaging list block ##-------------------------------------------------------      ### packaging list block ##-------------------------------------------------------
#DOCS=          *                                                                       #DOCS=          *
#PORTDATA=              *                                                               #PORTDATA=              *
### options definitions ##--------------------------------------------------------      ### options definitions ##--------------------------------------------------------
OPTIONS_DEFAULT=                        CURL DOCS LTO OPENSSLCRYPTO SOUND SPATIAL       OPTIONS_DEFAULT=                        CURL DOCS LTO OPENSSLCRYPTO SOUND SPATIAL 
OPTIONS_GROUP=                          BUILD DATABASE MISC NEEDS SYSTEM                OPTIONS_GROUP=                          BUILD DATABASE MISC NEEDS SYSTEM
OPTIONS_GROUP_BUILD=            BENCHMARKS DEVTEST DOCS NCURSES PROFILING PROMETHE      OPTIONS_GROUP_BUILD=            BENCHMARKS DEVTEST DOCS NCURSES PROFILING PROMETHE
OPTIONS_GROUP_DATABASE=         LEVELDB PGSQL REDIS                                     OPTIONS_GROUP_DATABASE=         LEVELDB PGSQL REDIS
OPTIONS_GROUP_MISC=                     LTO OPENSSLCRYPTO                               OPTIONS_GROUP_MISC=                     LTO OPENSSLCRYPTO
OPTIONS_GROUP_NEEDS=            CURL NLS SOUND SPATIAL                              |   OPTIONS_GROUP_NEEDS=            CURL NLS SDL3 SOUND SPATIAL
OPTIONS_GROUP_SYSTEM=           SYSTEM_FONTS SYSTEM_GMP SYSTEM_JSONCPP SYSTEM_LUAJ      OPTIONS_GROUP_SYSTEM=           SYSTEM_FONTS SYSTEM_GMP SYSTEM_JSONCPP SYSTEM_LUAJ
OPTIONS_MULTI=                          SOFTWARE                                        OPTIONS_MULTI=                          SOFTWARE
OPTIONS_MULTI_SOFTWARE=         CLIENT SERVER                                           OPTIONS_MULTI_SOFTWARE=         CLIENT SERVER
OPTIONS_SINGLE=                         GRAPHICS                                        OPTIONS_SINGLE=                         GRAPHICS
OPTIONS_SINGLE_GRAPHICS=        GLES2 OPENGL OPENGL3                                    OPTIONS_SINGLE_GRAPHICS=        GLES2 OPENGL OPENGL3
OPTIONS_SUB=                            yes                                             OPTIONS_SUB=                            yes
### options descriptions ##-------------------------------------------------------      ### options descriptions ##-------------------------------------------------------
BENCHMARKS_DESC=                        Build benchmarks (Adds some benchmark chat      BENCHMARKS_DESC=                        Build benchmarks (Adds some benchmark chat
BUILD_DESC=                                     Admin/Dev needs                         BUILD_DESC=                                     Admin/Dev needs
CLIENT_DESC=                            Build client, add graphics and sdl2 suppor      CLIENT_DESC=                            Build client, add graphics and sdl2 suppor
CURL_DESC=                                      Enable cURL support for fetching m      CURL_DESC=                                      Enable cURL support for fetching m
DATABASE_DESC=                          Database support                                DATABASE_DESC=                          Database support
DEVTEST_DESC=                           Install Development Test game also (INSTAL      DEVTEST_DESC=                           Install Development Test game also (INSTAL
DOCS_DESC=                                      Build and install documentation (v      DOCS_DESC=                                      Build and install documentation (v
#GITTRACY_DESC=                         Fetch Tracy git tag --build fails-- --purp      #GITTRACY_DESC=                         Fetch Tracy git tag --build fails-- --purp
GLES2_DESC=                                     Enable OpenGL ES 2+ driver              GLES2_DESC=                                     Enable OpenGL ES 2+ driver
GRAPHICS_DESC=                          Graphics support                                GRAPHICS_DESC=                          Graphics support
LEVELDB_DESC=                           Enable LevelDB backend --broken: leveldb p      LEVELDB_DESC=                           Enable LevelDB backend --broken: leveldb p
LTO_DESC=                                       Build with IPO/LTO optimizations (      LTO_DESC=                                       Build with IPO/LTO optimizations (
MISC_DESC=                                      Other options                           MISC_DESC=                                      Other options
NCURSES_DESC=                           Enables server side terminal (cli option:       NCURSES_DESC=                           Enables server side terminal (cli option: 
NEEDS_DESC=                                     Client essentials                       NEEDS_DESC=                                     Client essentials
NLS_DESC=                                       Native Language Support (ENABLE_GE      NLS_DESC=                                       Native Language Support (ENABLE_GE
OPENGL3_DESC=                           Enable OpenGL 3+ driver (likely needs sdl2      OPENGL3_DESC=                           Enable OpenGL 3+ driver (likely needs sdl2
OPENGL_DESC=                            Enable OpenGL driver                            OPENGL_DESC=                            Enable OpenGL driver
OPENSSLCRYPTO_DESC=                     Enable openssl libcrypto (faster SHA1 and       OPENSSLCRYPTO_DESC=                     Enable openssl libcrypto (faster SHA1 and 
PGSQL_DESC=                                     Enable PostgreSQL map backend           PGSQL_DESC=                                     Enable PostgreSQL map backend
PROFILING_DESC=                         Use gprof for profiling (USE_GPROF)             PROFILING_DESC=                         Use gprof for profiling (USE_GPROF)
PROMETHEUS_DESC=                        Build with Prometheus metrics exporter          PROMETHEUS_DESC=                        Build with Prometheus metrics exporter
REDIS_DESC=                                     Enable Redis backend                    REDIS_DESC=                                     Enable Redis backend
                                                                                    >   SDL3_DESC=                                      Use SDL3 instead of default SDL2
SERVER_DESC=                            Build server                                    SERVER_DESC=                            Build server
SOFTWARE_DESC=                          Software components                             SOFTWARE_DESC=                          Software components
SOUND_DESC=                                     Enable sound via openal-soft            SOUND_DESC=                                     Enable sound via openal-soft
SPATIAL_DESC=                           Enable SpatialIndex (Speeds up AreaStores)      SPATIAL_DESC=                           Enable SpatialIndex (Speeds up AreaStores)
SYSTEM_DESC=                            System subsitutes                               SYSTEM_DESC=                            System subsitutes
SYSTEM_FONTS_DESC=                      Use or install default fonts from ports         SYSTEM_FONTS_DESC=                      Use or install default fonts from ports
SYSTEM_GMP_DESC=                        Use gmp from ports (ENABLE_SYSTEM_GMP)          SYSTEM_GMP_DESC=                        Use gmp from ports (ENABLE_SYSTEM_GMP)
SYSTEM_JSONCPP_DESC=            Use jsoncpp from ports (ENABLE_SYSTEM_JSONCPP)          SYSTEM_JSONCPP_DESC=            Use jsoncpp from ports (ENABLE_SYSTEM_JSONCPP)
SYSTEM_LUAJIT_DESC=                     Use or install luajit from ports (instead       SYSTEM_LUAJIT_DESC=                     Use or install luajit from ports (instead 
#TRACY_DESC=                                    Build with Tracy frame and samplin      #TRACY_DESC=                                    Build with Tracy frame and samplin
UNITTESTS_DESC=                         Build unit test sources (BUILD_UNITTESTS)       UNITTESTS_DESC=                         Build unit test sources (BUILD_UNITTESTS)
                                                                                        
### options helpers ##------------------------------------------------------------      ### options helpers ##------------------------------------------------------------
BENCHMARKS_CMAKE_BOOL=          BUILD_BENCHMARKS                                        BENCHMARKS_CMAKE_BOOL=          BUILD_BENCHMARKS
#TRACY_BUILD_DEPENDS=           tracy>0:devel/tracy                                     #TRACY_BUILD_DEPENDS=           tracy>0:devel/tracy
#TRACY_CMAKE_BOOL=                      BUILD_WITH_TRACY                                #TRACY_CMAKE_BOOL=                      BUILD_WITH_TRACY
CLIENT_LIB_DEPENDS=                     libpng16.so:graphics/png                        CLIENT_LIB_DEPENDS=                     libpng16.so:graphics/png
CLIENT_USES=                            gl xorg jpeg sdl                            |   CLIENT_USES=                            gl xorg jpeg
CLIENT_USE=     \                                                                       CLIENT_USE=     \
                                                        GL=glu \                                                                                GL=glu \
                                                        SDL=sdl2,ttf2 \                                                                         SDL=sdl2,ttf2 \
                                                        XORG=ice,sm,x11,xext,xcb,x                                                              XORG=ice,sm,x11,xext,xcb,x
                                                        xfixes,xft,xinerama,xkbfil                                                              xfixes,xft,xinerama,xkbfil
                                                                                        
CLIENT_CMAKE_BOOL=                      BUILD_CLIENT                                    CLIENT_CMAKE_BOOL=                      BUILD_CLIENT
CURL_LIB_DEPENDS=                       libcurl.so:ftp/curl                             CURL_LIB_DEPENDS=                       libcurl.so:ftp/curl
CURL_CMAKE_BOOL=                        ENABLE_CURL                                     CURL_CMAKE_BOOL=                        ENABLE_CURL
DEVTEST_CMAKE_BOOL=                     INSTALL_DEVTEST                                 DEVTEST_CMAKE_BOOL=                     INSTALL_DEVTEST
DOCS_CMAKE_BOOL=                        BUILD_DOCUMENTATION                             DOCS_CMAKE_BOOL=                        BUILD_DOCUMENTATION
GLES2_USE=                                      GL+=glesv2                              GLES2_USE=                                      GL+=glesv2
GLES2_CMAKE_BOOL=                       ENABLE_GLES2                                    GLES2_CMAKE_BOOL=                       ENABLE_GLES2
LEVELDB_LIB_DEPENDS=            libleveldb.so:databases/leveldb                         LEVELDB_LIB_DEPENDS=            libleveldb.so:databases/leveldb
LEVELDB_CMAKE_BOOL=                     ENABLE_LEVELDB                                  LEVELDB_CMAKE_BOOL=                     ENABLE_LEVELDB
LTO_CMAKE_BOOL=                         ENABLE_LTO                                      LTO_CMAKE_BOOL=                         ENABLE_LTO
NCURSES_USES=                           ncurses                                         NCURSES_USES=                           ncurses
NCURSES_CMAKE_BOOL=                     ENABLE_CURSES                                   NCURSES_CMAKE_BOOL=                     ENABLE_CURSES
NLS_USES=                                       gettext                                 NLS_USES=                                       gettext
NLS_CMAKE_BOOL=                         ENABLE_GETTEXT                                  NLS_CMAKE_BOOL=                         ENABLE_GETTEXT
NLS_LDFLAGS=                            -L${LOCALBASE}/lib                              NLS_LDFLAGS=                            -L${LOCALBASE}/lib
OPENGL3_USE=                            GL+=gl                                          OPENGL3_USE=                            GL+=gl
OPENGL3_CMAKE_BOOL=                     ENABLE_OPENGL3                                  OPENGL3_CMAKE_BOOL=                     ENABLE_OPENGL3
OPENGL_USE=                                     GL+=gl                                  OPENGL_USE=                                     GL+=gl
OPENGL_CMAKE_BOOL=                      ENABLE_OPENGL                                   OPENGL_CMAKE_BOOL=                      ENABLE_OPENGL
OPENSSLCRYPTO_USES=                     ssl                                             OPENSSLCRYPTO_USES=                     ssl
OPENSSLCRYPTO_CMAKE_BOOL=       ENABLE_OPENSSL                                          OPENSSLCRYPTO_CMAKE_BOOL=       ENABLE_OPENSSL
PGSQL_USES=                                     pgsql                                   PGSQL_USES=                                     pgsql
PGSQL_CMAKE_BOOL=                       ENABLE_POSTGRESQL                               PGSQL_CMAKE_BOOL=                       ENABLE_POSTGRESQL
PROFILING_CMAKE_BOOL=           USE_GPROF                                               PROFILING_CMAKE_BOOL=           USE_GPROF
PROMETHEUS_CMAKE_BOOL=          ENABLE_PROMETHEUS                                       PROMETHEUS_CMAKE_BOOL=          ENABLE_PROMETHEUS
REDIS_LIB_DEPENDS=                      libhiredis.so:databases/hiredis                 REDIS_LIB_DEPENDS=                      libhiredis.so:databases/hiredis
REDIS_CMAKE_BOOL=                       ENABLE_REDIS                                    REDIS_CMAKE_BOOL=                       ENABLE_REDIS
                                                                                    >   SDL3_CMAKE_BOOL=                        USE_SDL3
SERVER_CMAKE_BOOL=                      BUILD_SERVER                                    SERVER_CMAKE_BOOL=                      BUILD_SERVER
SOUND_CMAKE_BOOL=                       ENABLE_SOUND                                    SOUND_CMAKE_BOOL=                       ENABLE_SOUND
SPATIAL_LIB_DEPENDS=            libspatialindex.so:devel/spatialindex                   SPATIAL_LIB_DEPENDS=            libspatialindex.so:devel/spatialindex
SPATIAL_CMAKE_BOOL=                     ENABLE_SPATIAL                                  SPATIAL_CMAKE_BOOL=                     ENABLE_SPATIAL
SYSTEM_FONTS_RUN_DEPENDS=       ${LOCALBASE}/share/fonts/ChromeOS/Arimo-Bold.ttf:x      SYSTEM_FONTS_RUN_DEPENDS=       ${LOCALBASE}/share/fonts/ChromeOS/Arimo-Bold.ttf:x
                                                        ${LOCALBASE}/share/fonts/D                                                              ${LOCALBASE}/share/fonts/D
SYSTEM_GMP_LIB_DEPENDS=         libgmp.so:math/gmp                                      SYSTEM_GMP_LIB_DEPENDS=         libgmp.so:math/gmp
SYSTEM_GMP_CMAKE_BOOL=          ENABLE_SYSTEM_GMP                                       SYSTEM_GMP_CMAKE_BOOL=          ENABLE_SYSTEM_GMP
SYSTEM_GMP_CMAKE_ON=            -DGMP_INCLUDE_DIR="${PREFIX}/include"                   SYSTEM_GMP_CMAKE_ON=            -DGMP_INCLUDE_DIR="${PREFIX}/include"
SYSTEM_JSONCPP_LIB_DEPENDS=     libjsoncpp.so:devel/jsoncpp                             SYSTEM_JSONCPP_LIB_DEPENDS=     libjsoncpp.so:devel/jsoncpp
SYSTEM_JSONCPP_CMAKE_BOOL=      ENABLE_SYSTEM_JSONCPP                                   SYSTEM_JSONCPP_CMAKE_BOOL=      ENABLE_SYSTEM_JSONCPP
SYSTEM_JSONCPP_CMAKE_ON=        -DJSON_INCLUDE_DIR="${PREFIX}/include/jsoncpp"          SYSTEM_JSONCPP_CMAKE_ON=        -DJSON_INCLUDE_DIR="${PREFIX}/include/jsoncpp"
SYSTEM_LUAJIT_USES=                     luajit                                          SYSTEM_LUAJIT_USES=                     luajit
SYSTEM_LUAJIT_USE=                      luajit                                          SYSTEM_LUAJIT_USE=                      luajit
#SYSTEM_LUAJIT_CMAKE_BOOL=      ENABLE_LUAJIT # Redundant as one of the above incl      #SYSTEM_LUAJIT_CMAKE_BOOL=      ENABLE_LUAJIT # Redundant as one of the above incl
UNITTESTS_CMAKE_BOOL=           BUILD_UNITTESTS                                         UNITTESTS_CMAKE_BOOL=           BUILD_UNITTESTS
                                                                                        
.include                                                           .include 
                                                                                        
.if ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MSYSTEM_LUAJIT}                           .if ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MSYSTEM_LUAJIT}
CMAKE_ARGS+=    -DENABLE_LUAJIT="ON" \                                                  CMAKE_ARGS+=    -DENABLE_LUAJIT="ON" \
                                -DREQUIRE_LUAJIT="ON"                                                                   -DREQUIRE_LUAJIT="ON"
.endif                                                                                  .endif
                                                                                        
# It used to be such that <OPTION>_USE= GL+=gl,opengl would satisfy, but `make tes      # It used to be such that <OPTION>_USE= GL+=gl,opengl would satisfy, but `make tes
.if ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MOPENGL}                                  .if ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MOPENGL}
USE_GL+=                glu opengl                                                      USE_GL+=                glu opengl
USE_XORG+=              xi                                                              USE_XORG+=              xi
.endif                                                                                  .endif
                                                                                        
.if ${PORT_OPTIONS:MCLIENT}                                                             .if ${PORT_OPTIONS:MCLIENT}
USE_GL+=                gl                                                              USE_GL+=                gl
.endif                                                                                  .endif
                                                                                        
.if ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MSOUND}                                   .if ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MSOUND}
USES+=                  openal                                                          USES+=                  openal
LIB_DEPENDS+=   libogg.so:audio/libogg libvorbisfile.so:audio/libvorbis                 LIB_DEPENDS+=   libogg.so:audio/libogg libvorbisfile.so:audio/libvorbis
                                                                                    >   .endif
                                                                                    >   
                                                                                    >   .if ${PORT_OPTIONS:MCLIENT} && !${PORT_OPTIONS:MSDL3}
                                                                                    >   SDL=sdl2,ttf2
                                                                                    >   .endif
                                                                                    >   
                                                                                    >   .if ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MSDL3}
                                                                                    >   SDL=sdl3,ttf
.endif                                                                                  .endif
                                                                                        
# In addition to below, `make check-plist` wants the %%SERVER%% omitted from the e      # In addition to below, `make check-plist` wants the %%SERVER%% omitted from the e
# but if I do not set the config to build the server then it fails to find etc/rc.       # but if I do not set the config to build the server then it fails to find etc/rc.
# so it is best to include the %%SERVER%% and ignore what check-plist wants.             # so it is best to include the %%SERVER%% and ignore what check-plist wants.
.if ${PORT_OPTIONS:MSERVER}                                                             .if ${PORT_OPTIONS:MSERVER}
USE_RC_SUBR=    ${PORTNAME}                                                             USE_RC_SUBR=    ${PORTNAME}
# When the official /usr/ports/GIDs file is changed, this may be luanti instead of      # When the official /usr/ports/GIDs file is changed, this may be luanti instead of
# At that time the files/luanti.in will need to be modified for the user and group      # At that time the files/luanti.in will need to be modified for the user and group
USERS=                  minetest #USERS=                        ${PORTNAME}             USERS=                  minetest #USERS=                        ${PORTNAME}
GROUPS=                 minetest #GROUPS=               ${PORTNAME}                     GROUPS=                 minetest #GROUPS=               ${PORTNAME}
.endif                                                                                  .endif
                                                                                        
do-test-UNITTESTS-on:                                                                   do-test-UNITTESTS-on:
.if ${PORT_OPTIONS:MCLIENT}                                                             .if ${PORT_OPTIONS:MCLIENT}
        cd ${WRKDIR} && ${SETENV} ${TEST_ENV} ${STAGEDIR}${PREFIX}/bin/luanti --ru              cd ${WRKDIR} && ${SETENV} ${TEST_ENV} ${STAGEDIR}${PREFIX}/bin/luanti --ru
.endif                                                                                  .endif
.if ${PORT_OPTIONS:MSERVER}                                                             .if ${PORT_OPTIONS:MSERVER}
        cd ${WRKDIR} && ${SETENV} ${TEST_ENV} ${STAGEDIR}${PREFIX}/bin/luantiserve              cd ${WRKDIR} && ${SETENV} ${TEST_ENV} ${STAGEDIR}${PREFIX}/bin/luantiserve
.endif                                                                                  .endif
                                                                                        
# Exactly why this must be done this way eludes me but this works and satisfies th      # Exactly why this must be done this way eludes me but this works and satisfies th
.if ${PORT_OPTIONS:MSYSTEM_FONTS}                                                       .if ${PORT_OPTIONS:MSYSTEM_FONTS}
pre-install:                                                                            pre-install:
        ${RM} ${LOCALBASE}/share/luanti/fonts/Arimo-Bold.ttf                                    ${RM} ${LOCALBASE}/share/luanti/fonts/Arimo-Bold.ttf
        ${RM} ${LOCALBASE}/share/luanti/fonts/Arimo-BoldItalic.ttf                              ${RM} ${LOCALBASE}/share/luanti/fonts/Arimo-BoldItalic.ttf
        ${RM} ${LOCALBASE}/share/luanti/fonts/Arimo-Italic.ttf                                  ${RM} ${LOCALBASE}/share/luanti/fonts/Arimo-Italic.ttf
        ${RM} ${LOCALBASE}/share/luanti/fonts/Cousine-Bold.ttf                                  ${RM} ${LOCALBASE}/share/luanti/fonts/Cousine-Bold.ttf
        ${RM} ${LOCALBASE}/share/luanti/fonts/Cousine-BoldItalic.ttf                            ${RM} ${LOCALBASE}/share/luanti/fonts/Cousine-BoldItalic.ttf
        ${RM} ${LOCALBASE}/share/luanti/fonts/Cousine-Italic.ttf                                ${RM} ${LOCALBASE}/share/luanti/fonts/Cousine-Italic.ttf
        ${RM} ${LOCALBASE}/share/luanti/fonts/Cousine-Regular.ttf                               ${RM} ${LOCALBASE}/share/luanti/fonts/Cousine-Regular.ttf
        ${RM} ${LOCALBASE}/share/luanti/fonts/DroidSansFallbackFull.ttf                         ${RM} ${LOCALBASE}/share/luanti/fonts/DroidSansFallbackFull.ttf
        ${MKDIR} ${LOCALBASE}/share/luanti/fonts                                                ${MKDIR} ${LOCALBASE}/share/luanti/fonts
        ${LN} -s ${LOCALBASE}/share/fonts/ChromeOS/Arimo-Bold.ttf ${LOCALBASE}/sha              ${LN} -s ${LOCALBASE}/share/fonts/ChromeOS/Arimo-Bold.ttf ${LOCALBASE}/sha
        ${LN} -s ${LOCALBASE}/share/fonts/ChromeOS/Arimo-BoldItalic.ttf ${LOCALBAS              ${LN} -s ${LOCALBASE}/share/fonts/ChromeOS/Arimo-BoldItalic.ttf ${LOCALBAS
        ${LN} -s ${LOCALBASE}/share/fonts/ChromeOS/Arimo-Italic.ttf ${LOCALBASE}/s              ${LN} -s ${LOCALBASE}/share/fonts/ChromeOS/Arimo-Italic.ttf ${LOCALBASE}/s
        ${LN} -s ${LOCALBASE}/share/fonts/ChromeOS/Cousine-Bold.ttf ${LOCALBASE}/s              ${LN} -s ${LOCALBASE}/share/fonts/ChromeOS/Cousine-Bold.ttf ${LOCALBASE}/s
        ${LN} -s ${LOCALBASE}/share/fonts/ChromeOS/Cousine-BoldItalic.ttf ${LOCALB              ${LN} -s ${LOCALBASE}/share/fonts/ChromeOS/Cousine-BoldItalic.ttf ${LOCALB
        ${LN} -s ${LOCALBASE}/share/fonts/ChromeOS/Cousine-Italic.ttf ${LOCALBASE}              ${LN} -s ${LOCALBASE}/share/fonts/ChromeOS/Cousine-Italic.ttf ${LOCALBASE}
        ${LN} -s ${LOCALBASE}/share/fonts/ChromeOS/Cousine-Regular.ttf ${LOCALBASE              ${LN} -s ${LOCALBASE}/share/fonts/ChromeOS/Cousine-Regular.ttf ${LOCALBASE
        ${LN} -s ${LOCALBASE}/share/fonts/Droid/DroidSansFallbackFull.ttf ${LOCALB              ${LN} -s ${LOCALBASE}/share/fonts/Droid/DroidSansFallbackFull.ttf ${LOCALB
.endif                                                                                  .endif
                                                                                        
# These are temporary links which might only be useful for transition and a blind       # These are temporary links which might only be useful for transition and a blind 
post-stage:                                                                             post-stage:
        ${RM} ${STAGEDIR}${LOCALBASE}/bin/minetest                                              ${RM} ${STAGEDIR}${LOCALBASE}/bin/minetest
        ${RM} ${STAGEDIR}${LOCALBASE}/bin/minetestserver                                        ${RM} ${STAGEDIR}${LOCALBASE}/bin/minetestserver
                                                                                        
post-install:                                                                           post-install:
        @${ECHO_MSG} " "                                                                        @${ECHO_MSG} " "
        @${ECHO_MSG} "-->  "${PREFIX}/etc/"minetest.conf.example explains options               @${ECHO_MSG} "-->  "${PREFIX}/etc/"minetest.conf.example explains options 
        @${ECHO_MSG} " "                                                                        @${ECHO_MSG} " "
        @${ECHO_MSG} "-->  Local network issues could cause singleplayer to fail.                @${ECHO_MSG} "-->  Local network issues could cause singleplayer to fail.  
        @${ECHO_MSG} " "                                                                        @${ECHO_MSG} " "
        @${ECHO_MSG} "-->  Alternate graphics driver may be set in client config,               @${ECHO_MSG} "-->  Alternate graphics driver may be set in client config, 
        @${ECHO_MSG} "     -- One in luanti config, opengles likely needs sdl opti              @${ECHO_MSG} "     -- One in luanti config, opengles likely needs sdl opti
        @${ECHO_MSG} " "                                                                        @${ECHO_MSG} " "
        @${ECHO_MSG} " "                                                                        @${ECHO_MSG} " "
                                                                                        
#----------------------------------------------------------------------                 #----------------------------------------------------------------------
#CMake Warning:                                                                         #CMake Warning:
#  Manually-specified variables were not used by the project:                           #  Manually-specified variables were not used by the project:
#                                                                                       #
#    CMAKE_MODULE_LINKER_FLAGS                                                          #    CMAKE_MODULE_LINKER_FLAGS
#    CMAKE_SHARED_LINKER_FLAGS                                                          #    CMAKE_SHARED_LINKER_FLAGS
#    CMAKE_VERBOSE_MAKEFILE                                                             #    CMAKE_VERBOSE_MAKEFILE
#    FETCHCONTENT_FULLY_DISCONNECTED                                                    #    FETCHCONTENT_FULLY_DISCONNECTED
#    ICONV_INCLUDE_DIR                                                                  #    ICONV_INCLUDE_DIR
#    ICONV_LIBRARIES                                                                    #    ICONV_LIBRARIES
#    LIBICONV_INCLUDE_DIR                                                               #    LIBICONV_INCLUDE_DIR
#    LIBICONV_LIBRARIES                                                                 #    LIBICONV_LIBRARIES
#    LIBICONV_LIBRARY                                                                   #    LIBICONV_LIBRARY
#----------------------------------------------------------------------                 #----------------------------------------------------------------------
                                                                                        
.include                                                                   .include 

So now that this update has been accomplished, if you wish you can use luanti with sdl3 and future updates to luanti are sure to include other sdl3 features.

If you maintain a port whether unofficial and primarily for yourself or one that is in the ports tree for everyone, it is always a good idea to periodically check the build to see if new options or capabilities have been added.  Simply updating to the new release or the latest commit is no guarantee that other changes did not also occur.  Each build system has its own way of configuring build options, cmake feels like one of the more easy and straight-forward but I have also dealt with it the most compared to the many others that exist.  Do an online search to discover how to find the option method the build uses, though new features may be mentioned in the upstream documentation, the precise way to set them for the build may not be.

No comments:

Frequently viewed this week