Not long ago the upstream minetest developers made a commit which would fold irrlichtMt back into minetest.The minetest devs split the two apart quite a long time ago so they could focus on what they needed to strip out of irrlicht and what needed to be customized for their own needs. With this recent commit it seems as though much of that effort has been accomplished and further improvements would be made with it more integral to minetest once more. I was not ready to make this overhaul of my own Makefile but I knew I would soon enough.
The first thing I did was to revise the minetest Makefile for the recent commit date and hash, then I changed directory into /usr/home/tigersharke/Ported_Software/games/minetest-dev/work/minetest-6a7a613741fe32fa14897a4f780d7382105a103c/ so that I could check the cmake options via
cmake -L | awk '{if(f)print} /-- Cache values/{f=1}' > ../../cmake_options_new
with a diff. Since I had the previous cmake_options gathered in the same fashion, I could take a diff to see how things changed. This would also prove to me that nearly all of the Makefile options from irrlicht-minetest would be shifted into minetest-dev.
diff -y -W 120 cmake_opts cmake_opts_new | more
APPLY_LOCALE_BLACKLIST:BOOL=ON APPLY_LOCALE_BLACKLIST:BOOL=ON
BUILD_BENCHMARKS:BOOL=FALSE BUILD_BENCHMARKS:BOOL=FALSE
BUILD_CLIENT:BOOL=TRUE BUILD_CLIENT:BOOL=TRUE
BUILD_DOCUMENTATION:BOOL=TRUE BUILD_DOCUMENTATION:BOOL=TRUE
> BUILD_EXAMPLES:BOOL=OFF
BUILD_SERVER:BOOL=FALSE BUILD_SERVER:BOOL=FALSE
BUILD_UNITTESTS:BOOL=TRUE BUILD_UNITTESTS:BOOL=TRUE
CMAKE_BUILD_TYPE:STRING=Release CMAKE_BUILD_TYPE:STRING=Release
CMAKE_INSTALL_PREFIX:PATH=/usr/local CMAKE_INSTALL_PREFIX:PATH=/usr/local
CUSTOM_BINDIR:STRING= CUSTOM_BINDIR:STRING=
CUSTOM_DOCDIR:STRING= CUSTOM_DOCDIR:STRING=
CUSTOM_EXAMPLE_CONF_DIR:STRING= CUSTOM_EXAMPLE_CONF_DIR:STRING=
CUSTOM_ICONDIR:STRING= CUSTOM_ICONDIR:STRING=
CUSTOM_LOCALEDIR:STRING= CUSTOM_LOCALEDIR:STRING=
CUSTOM_MANDIR:STRING= CUSTOM_MANDIR:STRING=
CUSTOM_SHAREDIR:STRING= CUSTOM_SHAREDIR:STRING=
CUSTOM_XDG_APPS_DIR:STRING= CUSTOM_XDG_APPS_DIR:STRING=
ENABLE_CURL:BOOL=ON ENABLE_CURL:BOOL=ON
ENABLE_CURSES:BOOL=ON ENABLE_CURSES:BOOL=ON
ENABLE_GETTEXT:BOOL=ON ENABLE_GETTEXT:BOOL=ON
> ENABLE_GLES1:BOOL=OFF
> ENABLE_GLES2:BOOL=OFF
ENABLE_LEVELDB:BOOL=ON ENABLE_LEVELDB:BOOL=ON
ENABLE_LTO:BOOL=TRUE ENABLE_LTO:BOOL=TRUE
ENABLE_LUAJIT:BOOL=ON ENABLE_LUAJIT:BOOL=ON
> ENABLE_OPENGL:BOOL=ON
> ENABLE_OPENGL3:BOOL=ON
ENABLE_POSTGRESQL:BOOL=ON ENABLE_POSTGRESQL:BOOL=ON
ENABLE_PROMETHEUS:BOOL=OFF ENABLE_PROMETHEUS:BOOL=OFF
ENABLE_REDIS:BOOL=ON ENABLE_REDIS:BOOL=ON
ENABLE_SOUND:BOOL=ON ENABLE_SOUND:BOOL=ON
ENABLE_SPATIAL:BOOL=ON ENABLE_SPATIAL:BOOL=ON
ENABLE_SYSTEM_GMP:BOOL=ON ENABLE_SYSTEM_GMP:BOOL=ON
ENABLE_SYSTEM_JSONCPP:BOOL=ON ENABLE_SYSTEM_JSONCPP:BOOL=ON
ENABLE_TOUCH:BOOL=OFF ENABLE_TOUCH:BOOL=OFF
ENABLE_UPDATE_CHECKER:BOOL=(;NOT;TRUE;) ENABLE_UPDATE_CHECKER:BOOL=(;NOT;TRUE;)
GETTEXT_MSGFMT:FILEPATH=/usr/local/bin/msgfmt GETTEXT_MSGFMT:FILEPATH=/usr/local/bin/msgfmt
INSTALL_DEVTEST:BOOL=FALSE INSTALL_DEVTEST:BOOL=FALSE
IRRLICHTMT_BUILD_DIR:PATH= <
IrrlichtMt_DIR:PATH=/usr/local/lib/cmake/IrrlichtMt <
LEVELDB_INCLUDE_DIR:PATH=/usr/include LEVELDB_INCLUDE_DIR:PATH=/usr/include
LEVELDB_LIBRARY:FILEPATH=LEVELDB_LIBRARY-NOTFOUND LEVELDB_LIBRARY:FILEPATH=LEVELDB_LIBRARY-NOTFOUND
REDIS_INCLUDE_DIR:PATH=REDIS_INCLUDE_DIR-NOTFOUND REDIS_INCLUDE_DIR:PATH=REDIS_INCLUDE_DIR-NOTFOUND
REDIS_LIBRARY:FILEPATH=REDIS_LIBRARY-NOTFOUND REDIS_LIBRARY:FILEPATH=REDIS_LIBRARY-NOTFOUND
REQUIRE_LUAJIT:BOOL=OFF REQUIRE_LUAJIT:BOOL=OFF
RUN_IN_PLACE:BOOL=FALSE RUN_IN_PLACE:BOOL=FALSE
> SDL2_DIR:PATH=/usr/local/lib/cmake/SDL2
SPATIAL_INCLUDE_DIR:PATH=/usr/local/include SPATIAL_INCLUDE_DIR:PATH=/usr/local/include
SPATIAL_LIBRARY:FILEPATH=/usr/local/lib/libspatialindex. SPATIAL_LIBRARY:FILEPATH=/usr/local/lib/libspatialindex.
USE_GPROF:BOOL=FALSE USE_GPROF:BOOL=FALSE
> USE_SDL2:BOOL=ON
VERSION_EXTRA:STRING= VERSION_EXTRA:STRING=
WARN_ALL:BOOL=TRUE WARN_ALL:BOOL=TRUE
Before I began the attempted reinstall, I removed irrlichtMt that was installed which also caused minetest to be removed. This way I can know whether the newly incorporated irrlichtMt will satisfy the minetest build. Output of the build seems to indicate that I might have a few things to adjust, although most do not seem to be critical issues I suppose I will need to add the jpeg to USES.
====> Compressing man pages (compress-man)
===> Staging rc.d startup script(s)
====> Running Q/A tests (stage-qa)
Error: /usr/local/bin/minetest is linked to /usr/local/lib/libjpeg.so.8 from graphics/jpeg-turbo but it is not declared as a dependency
Warning: you need USES+=jpeg
Warning: you might not need LIB_DEPENDS on libpng.so
Warning: you might not need LIB_DEPENDS on liblua-5.4.so
Warning: you might not need LIB_DEPENDS on libSDL2.so
Warning: you might not need LIB_DEPENDS on libSDL2_ttf.so
Warning: you might not need LIB_DEPENDS on libGL.so
Warning: you might not need LIB_DEPENDS on libopenal.so.1
===> Installing for minetest-dev-g20240326
===> Checking if minetest-dev is already installed
===> Registering installation for minetest-dev-g20240326
pkg-static: duplicate file listing: /usr/local/etc/rc.d/minetest, ignoring
Installing minetest-dev-g20240326...
===> Creating groups.
Using existing group 'minetest'.
===> Creating users
Using existing user 'minetest'.
==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types
==> Running trigger: gtk-update-icon-cache.ucl
Generating GTK icon cache for /usr/local/share/icons/hicolor
===> SECURITY REPORT:
This port has installed the following files which may act as network
servers and may therefore pose a remote security risk to the system.
/usr/local/bin/minetestserver
/usr/local/bin/minetest
This port has installed the following startup scripts which may cause
these network services to be started at boot time.
/usr/local/etc/rc.d/minetest
If there are vulnerabilities in these programs there may be a security
risk to the system. FreeBSD makes no guarantee about the security of
ports included in the Ports Collection. Please type 'make deinstall'
to deinstall the port if this is a concern.
For more information, and contact details about the security
status of this software, see the following webpage:
https://www.minetest.net/
root@ichigo:/usr/home/tigersharke/Ported_Software/games/minetest-dev #
A quick test proved that everything runs well enough to show the main menu and access a server, so at least with most of the usual options selected for test builds-- I don't use touch option for my client nor most or any in the Admin/Dev section, it built fine.
┌───────────────────────────────────────┤minetest-dev-g20240326├────────────────────────────────────────┐
│ 'F1' for Ports Collection help. │
│ ┌───────────────────────────────────────────────────────────────────────────────────────────────────┐ │
│ │──────────────────────────────────────── Database support ─────────────────────────────────────────│ │
│ │[ ] LEVELDB Enable LevelDB backend │ │
│ │[ ] PGSQL Enable PostgreSQL map backend │ │
│ │[ ] REDIS Enable Redis backend │ │
│ │──────────────────────────────────────── Admin/Dev needs ──────────────────────────────────────────│ │
│ │[X] BENCHMARKS Build benchmarks (Adds some benchmark chat commands) │ │
│ │[X] DEVTEST Install Development Test game also (INSTALL_DEVTEST) │ │
│ │[X] DOCS Build and install documentation (via doxygen) │ │
│ │[X] EXAMPLES BUILD_EXAMPLES │ │
│ │[X] NCURSES Enables server side terminal (cli option: --terminal) │ │
│ │[X] PROFILING Use gprof for profiling │ │
│ │[X] PROMETHEUS Build with Prometheus metrics exporter │ │
│ │[X] TOUCH Build with touch interface support (to test on amd64) │ │
│ │[X] UNITTESTS Build unit test sources (BUILD_UNITTESTS) │ │
│ │─────────────────────────────────────── Client essentials ─────────────────────────────────────────│ │
│ │[X] CURL Enable cURL support for fetching media: contentdb │ │
│ │[X] FREETYPE Support for TrueType fonts with unicode │ │
│ │[X] NLS Native Language Support (ENABLE_GETTEXT) │ │
│ │[X] SOUND Enable sound via openal-soft │ │
│ │[X] SPATIAL Enable SpatialIndex (Speeds up AreaStores) │ │
│ │───────────────────────────────────────── Other options ───────────────────────────────────────────│ │
│ │[X] LTO Build with IPO/LTO optimizations (smaller and more efficient than regular build)│ │
│ │─────────────────────────────────────── System subsitutes ─────────────────────────────────────────│ │
│ │[X] SYSTEM_FONTS Use or install default fonts from ports │ │
│ │[X] SYSTEM_GMP Use gmp from ports (ENABLE_SYSTEM_GMP) │ │
│ │[X] SYSTEM_JSONCPP Use jsoncpp from ports (ENABLE_SYSTEM_JSONCPP) │ │
│ │[X] SYSTEM_LUAJIT Use or install luajit-openresty from ports │ │
│ │──────────────────────────── Software components [select at least one] ────────────────────────────│ │
│ │[X] CLIENT Build client and add graphics support, dependency │ │
│ │[X] SERVER Build server │ │
│ │───────────────────────────── Graphics support [select at least one] ──────────────────────────────│ │
│ │( ) GLES1 Enable GLES1 (testing) │ │
│ │( ) GLES2 Enable GLES2 (testing) │ │
│ │(*) OPENGL Support OPENGL (<3.x) │ │
│ │( ) OPENGL3 Support OPENGL3 --Builds but seems incomplete-- │ │
│ └───────────────────────────────────────────────────────────────────────────────────────────────────┘ │
├───────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ [ OK ] [Cancel] │
└───────────────────────────────────────────────────────────────────────────────────────────────────────┘
I can add the jpeg item to the Makefile and now future minetest-dev builds will be one process. Testing the gles1 option tells me that I cannot include SDL and so will need to adjust the options a bit more. The jpeg item was actually a typo, having added it the wrong way in the wrong place. There were a few other adjustments and one I cannot solve right now. The git diff is how it looks now:
# git diff
diff --git a/Makefile b/Makefile
index e20fedc..176fcbb 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
# Portname block
PORTNAME= minetest
-DISTVERSION= g20240324
+DISTVERSION= g20240326
CATEGORIES= games
PKGNAMESUFFIX= -dev
DISTNAME= ${PORTNAME}-${GH_TAGNAME}
@@ -15,15 +15,14 @@ WWW= https://www.minetest.net/
LICENSE= LGPL21+
# dependencies
-LIB_DEPENDS= libIrrlichtMt.so:x11-toolkits/irrlicht-minetest libzstd.so:archivers/zstd
+LIB_DEPENDS= libzstd.so:archivers/zstd
# uses block
-USES= cmake iconv:wchar_t sqlite lua luajit ninja:make llvm:min=16 pkgconfig:build sdl
+USES= cmake iconv:wchar_t sqlite lua luajit ninja:make llvm:min=16 pkgconfig:build
USE_GITHUB= nodefault
GH_ACCOUNT= minetest
GH_PROJECT= minetest
-GH_TAGNAME= a7908da968bba82129f60c9601c9cefabd36a389
-USE_SDL= sdl2 ttf2
+GH_TAGNAME= 6a7a613741fe32fa14897a4f780d7382105a103c
# uses=cmake related variables
CMAKE_ARGS= -DCMAKE_BUILD_TYPE="MinSizeRel" \
@@ -31,7 +30,7 @@ CMAKE_ARGS= -DCMAKE_BUILD_TYPE="MinSizeRel" \
-DCMAKE_CXX_FLAGS="-stdlib=libc++"
# conflicts
-CONFLICTS= minetest
+CONFLICTS= minetest irrlichtMt irrlicht-minetest
# wrksrc block
WRKSRC= ${WRKDIR}/${PORTNAME}-${GH_TAGNAME}
@@ -43,7 +42,7 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${GH_TAGNAME}
# FATAL: Makefile: PORTDOCS appears in plist but DOCS is not listed in OPTIONS_DEFINE.
# options definitions
-OPTIONS_DEFAULT= CURL DOCS FREETYPE LTO LUAJIT SOUND SPATIAL SYSTEM_FONTS SYSTEM_GMP SYSTEM_JSONCPP CLIENT GLVND
+OPTIONS_DEFAULT= CURL DOCS FREETYPE LTO LUAJIT SOUND SPATIAL SYSTEM_FONTS SYSTEM_GMP SYSTEM_JSONCPP CLIENT OPENGL
OPTIONS_GROUP= DATABASE BUILD NEEDS MISC SYSTEM
OPTIONS_GROUP_BUILD= BENCHMARKS DEVTEST DOCS EXAMPLES NCURSES PROFILING PROMETHEUS TOUCH UNITTESTS
OPTIONS_GROUP_DATABASE= LEVELDB PGSQL REDIS
@@ -52,13 +51,13 @@ OPTIONS_GROUP_NEEDS= CURL FREETYPE NLS SOUND SPATIAL
OPTIONS_GROUP_SYSTEM= SYSTEM_FONTS SYSTEM_GMP SYSTEM_JSONCPP SYSTEM_LUAJIT
OPTIONS_MULTI= SOFTWARE
OPTIONS_MULTI_SOFTWARE= CLIENT SERVER
-#OPTIONS_SINGLE= GRAPHICS # Graphics buried option GLVND/LEGACY stuff obsoleted log ago, likely did nothing.
-#OPTIONS_SINGLE_GRAPHICS= GLVND LEGACY
+OPTIONS_SINGLE= GRAPHICS
+OPTIONS_SINGLE_GRAPHICS= GLES1 GLES2 OPENGL OPENGL3
OPTIONS_SUB= yes
# options descriptions
-BUILD_DESC= Admin/Dev needs
BENCHMARKS_DESC= Build benchmarks (Adds some benchmark chat commands)
+BUILD_DESC= Admin/Dev needs
CLIENT_DESC= Build client and add graphics support, dependency
CURL_DESC= Enable cURL support for fetching media: contentdb
DATABASE_DESC= Database support
@@ -66,19 +65,22 @@ DEVTEST_DESC= Install Development Test game also (INSTALL_DEVTEST)
DOCS_DESC= Build and install documentation (via doxygen)
EXAMPLES_DESC= BUILD_EXAMPLES
FREETYPE_DESC= Support for TrueType fonts with unicode
-#GLVND_DESC= Use libOpenGL or libGLX
-#GRAPHICS_DESC= Graphics support
-#LEGACY_DESC= Use libGL - where GLVND may be broken on nvidia
+GLES1_DESC= Enable GLES1 --broken due to SDL--
+GLES2_DESC= Enable GLES2
+GRAPHICS_DESC= Graphics support
LEVELDB_DESC= Enable LevelDB backend
LTO_DESC= Build with IPO/LTO optimizations (smaller and more efficient than regular build)
MISC_DESC= Other options
NCURSES_DESC= Enables server side terminal (cli option: --terminal)
NEEDS_DESC= Client essentials
NLS_DESC= Native Language Support (ENABLE_GETTEXT)
+OPENGL3_DESC= Support OPENGL3 --Builds but seems incomplete--
+OPENGL_DESC= Support OPENGL (<3.x)
PGSQL_DESC= Enable PostgreSQL map backend
PROFILING_DESC= Use gprof for profiling
PROMETHEUS_DESC= Build with Prometheus metrics exporter
REDIS_DESC= Enable Redis backend
+#SDL_DESC= Use SDL
SERVER_DESC= Build server
SOFTWARE_DESC= Software components
SOUND_DESC= Enable sound via openal-soft
@@ -93,9 +95,9 @@ UNITTESTS_DESC= Build unit test sources (BUILD_UNITTESTS)
# options helpers
BENCHMARKS_CMAKE_BOOL= BUILD_BENCHMARKS
-CLIENT_LIB_DEPENDS= libIrrlichtMt.so:x11-toolkits/irrlicht-minetest libpng.so:graphics/png
-CLIENT_USES= gl xorg
-CLIENT_USE= jpeg GL=gl,glu \
+CLIENT_LIB_DEPENDS= libpng.so:graphics/png
+CLIENT_USES= gl xorg jpeg
+CLIENT_USE= GL=gl,glu \
XORG=ice,sm,x11,xext,xcb,xres,xshmfence,xau,xaw,xcomposite,xcursor,xdamage,xdmcp,\
xfixes,xft,xi,xinerama,xkbfile,xmu,xpm,xrandr,xrender,xscreensaver,xt,xtst,xv,xxf86vm
CLIENT_CMAKE_ON= BUILD_CLIENT REQUIRE_LUAJIT ENABLE_LUAJIT
@@ -107,13 +109,10 @@ DOCS_CMAKE_BOOL= BUILD_DOCUMENTATION
EXAMPLES_CMAKE_BOOL= BUILD_EXAMPLES
FREETYPE_LIB_DEPENDS= libfreetype.so:print/freetype2
FREETYPE_CMAKE_BOOL= ENABLE_FREETYPE
-#GLVND_LIB_DEPENDS= libOpenGL.so:graphics/libglvnd
-#GLVND_USE= GL+=opengl
-#GLVND_CMAKE_BOOL= ENABLE_GLVND
-#GLVND_CMAKE_ON= -DOPENGL_GL_PREFERENCE="GLVND" -DOPENGL_xmesa_INCLUDE_DIR="${PREFIX}/lib"
-#LEGACY_USE= GL+=opengl
-#LEGACY_CMAKE_BOOL= ENABLE_LEGACY
-#LEGACY_CMAKE_ON= -DOPENGL_GL_PREFERENCE="LEGACY" -DOPENGL_xmesa_INCLUDE_DIR="${PREFIX}/lib"
+GLES1_USE= GL+=glesv1
+GLES1_CMAKE_BOOL= ENABLE_GLES1
+GLES2_USE=GL+= glesv2
+GLES2_CMAKE_BOOL= ENABLE_GLES2
LEVELDB_LIB_DEPENDS= libleveldb.so:databases/leveldb
LEVELDB_CMAKE_BOOL= ENABLE_LEVELDB
LTO_CMAKE_BOOL= ENABLE_LTO
@@ -122,12 +121,18 @@ NCURSES_CMAKE_BOOL= ENABLE_CURSES
NLS_USES= gettext
NLS_CMAKE_BOOL= ENABLE_GETTEXT
NLS_LDFLAGS= -L${LOCALBASE}/lib
+OPENGL3_USE= GL+=gl
+OPENGL3_CMAKE_BOOL= ENABLE_OPENGL3
+OPENGL3_CMAKE_ON= USE_SDL
+OPENGL_USE= GL+=gl
+OPENGL_CMAKE_BOOL= ENABLE_OPENGL
PGSQL_USES= pgsql
PGSQL_CMAKE_BOOL= ENABLE_POSTGRESQL
PROFILING_CMAKE_ON= USE_GPROF
PROMETHEUS_CMAKE_BOOL= ENABLE_PROMETHEUS
REDIS_LIB_DEPENDS= libhiredis.so:databases/hiredis
REDIS_CMAKE_BOOL= ENABLE_REDIS
+#SDL_CMAKE_ON= USE_SDL2
SERVER_CMAKE_BOOL= BUILD_SERVER
SOUND_CMAKE_BOOL= ENABLE_SOUND
SPATIAL_LIB_DEPENDS= libspatialindex.so:devel/spatialindex
@@ -144,13 +149,19 @@ SYSTEM_LUAJIT_USES= luajit:luajit-openresty
TOUCH_CMAKE_BOOL= ENABLE_TOUCH
UNITTESTS_CMAKE_BOOL= BUILD_UNITTESTS
+# SDL cannot be used with GLES1 but having it installed causes a fail without enabled in Makefile?
+
.include
+.if ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MOPENGL}
+USES+= sdl
+USE_SDL= sdl2 ttf2
+SDL_CMAKE_ON= USE_SDL2=ON
+.endif
+
.if ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MSOUND}
USES+= openal
-LIB_DEPENDS+= libogg.so:audio/libogg \
- libvorbis.so:audio/libvorbis \
- libvorbisfile.so:audio/libvorbis
+LIB_DEPENDS+= libogg.so:audio/libogg libvorbisfile.so:audio/libvorbis
.endif
.if ${PORT_OPTIONS:MSERVER}
diff --git a/distinfo b/distinfo
index f485f6f..d444723 100644
--- a/distinfo
+++ b/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1711406948
-SHA256 (minetest-dev/minetest-a7908da968bba82129f60c9601c9cefabd36a389.tar.gz) = f2431461c2307c5111cabf6c0c360e7d2e516942b7cc407ca9aaeae25843bb92
-SIZE (minetest-dev/minetest-a7908da968bba82129f60c9601c9cefabd36a389.tar.gz) = 10477004
+TIMESTAMP = 1711653177
+SHA256 (minetest-dev/minetest-6a7a613741fe32fa14897a4f780d7382105a103c.tar.gz) = 74a3c9b5038541ce4375d583d1b60ef4bb5e6e2345b8f7a5610b1ed1222020e5
+SIZE (minetest-dev/minetest-6a7a613741fe32fa14897a4f780d7382105a103c.tar.gz) = 11276813
The pkg-plist did not change, which means irrlichtMt is very integrated into the minetest build so that it is not a distinct install any longer. It might possibly be a bit more time to compile since irrlichtMt is built also, but it will only be one thing to maintain instead of two. It will be easier for consumers to keep updated since they will only need to look in one place, install one thing not including external dependencies.