Skip to content

Commit 8b2f0b5

Browse files
committed
luanti: new submission 5.11.0
- Replacing minetest 5.7.0 (upstream renamed: minetest => luanti)
1 parent 22bc07f commit 8b2f0b5

4 files changed

+154
-0
lines changed

games/luanti/Portfile

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2+
3+
PortSystem 1.0
4+
PortGroup github 1.0
5+
PortGroup cmake 1.1
6+
7+
github.setup luanti-org luanti 5.11.0
8+
github.tarball_from archive
9+
10+
revision 0
11+
12+
set game_version 5.8.0
13+
14+
# to add on more files to a github portgroup download
15+
# have to cache the preset distfiles from the github PG
16+
set main_distfile ${distfiles}
17+
18+
# then add another distfile, with a direct URL as can't use the github PG again
19+
set game_distfile ${game_version}${extract.suffix}
20+
set game_mastersite https://github.com/luanti-org/minetest_game/archive/tag
21+
22+
distfiles ${main_distfile}:main \
23+
${game_distfile}:game
24+
25+
master_sites ${github.master_sites}:main \
26+
${game_mastersite}:game
27+
28+
checksums ${name}-${version}${extract.suffix} \
29+
rmd160 70e23bcc5170e2824478138671f83f70640f6639 \
30+
sha256 70e531d0776988ce6e579ea5490fdf6be3e349a4ade5281f5111aa4fdd8ee510 \
31+
size 12350797 \
32+
${game_version}${extract.suffix} \
33+
rmd160 9300fde834d5f7e37286225ba0e851e891db2ef1 \
34+
sha256 33a3bb43b08497a0bdb2f49f140a2829e582d5c16c0ad52be1595c803f706912 \
35+
size 2608281
36+
37+
compiler.cxx_standard 2017
38+
compiler.thread_local_storage yes
39+
40+
# rename directory - from github portgroup
41+
extract.rename yes
42+
43+
license LGPL-2.1+
44+
categories games
45+
46+
maintainers @fvhovell openmaintainer
47+
description open source infinite-world block sandbox game with survival and crafting
48+
long_description ${description} - \
49+
Find more Luanti mods at <https://content.luanti.org/> and have fun.
50+
51+
homepage https://www.luanti.org
52+
53+
depends_build-append path:bin/doxygen:doxygen
54+
55+
depends_lib-append path:include/turbojpeg.h:libjpeg-turbo \
56+
port:libogg \
57+
port:libpng \
58+
port:libvorbis \
59+
port:freetype \
60+
port:gettext \
61+
port:leveldb \
62+
port:sqlite3 \
63+
port:zlib \
64+
port:zstd \
65+
path:lib/libluajit-5.1.dylib:luajit \
66+
port:gmp \
67+
port:curl \
68+
port:jsoncpp \
69+
port:spatialindex \
70+
port:xorg-libX11 \
71+
port:xorg-libXxf86vm
72+
73+
conflicts irrlichtmt \
74+
minetest
75+
76+
universal_variant no
77+
supported_archs x86_64 arm64
78+
79+
# 001. the original build calls fixup_bundle to move all the deps into the app bundle.
80+
# this doesn't work correctly with macports destrooting, and isn't necessary for a macports install so deleted it
81+
patchfiles-append 001-patch-src-CMakeLists-disable-bundlefixup.diff
82+
83+
# 002. patch to get the luajit include headers ahead of the system includes, or the build finds the
84+
# wrong lua headers if you have a newer version of lua installed
85+
patchfiles-append 002-patch-cmake-Modules-FindLua-include-LUADIR-before-system.diff
86+
87+
# 003. patch main.cpp to not barf on the unrecognized command-line option -psn from Apple launch
88+
patchfiles-append 003-patch-ignore-psn-option-mac-bundle.diff
89+
90+
configure.args-append -DCMAKE_BUILD_TYPE=Release \
91+
-DCMAKE_INSTALL_PREFIX:PATH=${applications_dir} \
92+
-DCMAKE_FIND_FRAMEWORK=FIRST \
93+
-DBUILD_UNITTESTS=OFF \
94+
-DENABLE_UPDATE_CHECKER=OFF \
95+
-DBUILD_CLIENT=ON \
96+
-DBUILD_SERVER=ON \
97+
-DENABLE_SOUND=ON \
98+
-DUSE_SDL2=OFF \
99+
-DENABLE_GLES2=OFF \
100+
-DENABLE_OPENGL=ON \
101+
-DENABLE_OPENGL3=OFF \
102+
-DENABLE_REDIS=OFF \
103+
-DENABLE_POSTGRESQL=OFF \
104+
-DENABLE_LEVELDB=ON \
105+
-DENABLE_CURL=ON \
106+
-DENABLE_GETTEXT=ON \
107+
-DENABLE_SPATIAL=ON \
108+
-DENABLE_SYSTEM_GMP=ON \
109+
-DENABLE_SYSTEM_JSONCPP=ON \
110+
-DENABLE_LUAJIT=ON \
111+
-DINSTALL_DEVTEST=ON \
112+
-DVERSION_EXTRA=MacPorts-rev${revision} \
113+
-USE_GPROF=FALSE
114+
115+
post-destroot {
116+
move ${workpath}/minetest_game-${game_version} ${destroot}${applications_dir}/${name}.app/Contents/Resources/games/minetest_game
117+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--- ./src/CMakeLists.txt.orig 2016-12-18 11:32:01.000000000 -0800
2+
+++ ./src/CMakeLists.txt 2016-12-18 11:32:13.000000000 -0800
3+
@@ -818,13 +818,6 @@
4+
BUNDLE DESTINATION .
5+
)
6+
7+
- if(APPLE)
8+
- install(CODE "
9+
- set(BU_CHMOD_BUNDLE_ITEMS ON)
10+
- include(BundleUtilities)
11+
- fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/${BUNDLE_PATH}\" \"\" \"\${CMAKE_INSTALL_PREFIX}/${BINDIR}\")
12+
- " COMPONENT Runtime)
13+
- endif()
14+
15+
if(USE_GETTEXT)
16+
foreach(LOCALE ${GETTEXT_AVAILABLE_LOCALES})
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- cmake/Modules/FindLua.cmake.orig 2025-02-14 19:38:27
2+
+++ cmake/Modules/FindLua.cmake 2025-05-04 16:15:24
3+
@@ -11,6 +11,7 @@
4+
find_package(LuaJIT)
5+
if(LUAJIT_FOUND)
6+
set(USE_LUAJIT TRUE)
7+
+ include_directories(BEFORE ${LUA_INCLUDE_DIR})
8+
message (STATUS "Using LuaJIT")
9+
elseif(REQUIRE_LUAJIT)
10+
message(FATAL_ERROR "LuaJIT not found whereas REQUIRE_LUAJIT=\"TRUE\" is used.\n"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- ./src/main.cpp.orig 2016-12-18 15:49:42.000000000 -0800
2+
+++ ./src/main.cpp 2016-12-18 15:50:13.000000000 -0800
3+
@@ -126,7 +126,7 @@
4+
|| cmd_args.getFlag("help")
5+
|| cmd_args.exists("nonopt1")) {
6+
print_help(allowed_options);
7+
- return cmd_args_ok ? 0 : 1;
8+
+// return cmd_args_ok ? 0 : 1;
9+
}
10+
11+
if (cmd_args.getFlag("version")) {

0 commit comments

Comments
 (0)