Skip to content

Commit e06bb4a

Browse files
committed
minetest: rename to luanti
Make Linux only, we moved the mac build to a cask Homebrew/homebrew-cask#200275
1 parent c4ca558 commit e06bb4a

File tree

4 files changed

+81
-99
lines changed

4 files changed

+81
-99
lines changed

.github/autobump.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2028,6 +2028,7 @@ lttng-ust
20282028
lua
20292029
luacheck
20302030
luajit-openresty
2031+
luanti
20312032
luarocks
20322033
luau
20332034
lucky-commit
@@ -2153,7 +2154,6 @@ millet
21532154
mimalloc
21542155
mimirtool
21552156
minder
2156-
minetest
21572157
minica
21582158
minigraph
21592159
minijinja-cli

Formula/l/luanti.rb

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
class Luanti < Formula
2+
desc "Free, open source voxel game engine and game"
3+
homepage "https://www.luanti.org"
4+
license "LGPL-2.1-or-later"
5+
6+
stable do
7+
url "https://github.com/luanti-org/luanti/archive/refs/tags/5.11.0.tar.gz"
8+
sha256 "70e531d0776988ce6e579ea5490fdf6be3e349a4ade5281f5111aa4fdd8ee510"
9+
10+
resource "minetest_game" do
11+
url "https://github.com/luanti-org/minetest_game/archive/refs/tags/5.8.0.tar.gz"
12+
sha256 "33a3bb43b08497a0bdb2f49f140a2829e582d5c16c0ad52be1595c803f706912"
13+
end
14+
end
15+
16+
livecheck do
17+
url :stable
18+
regex(/^v?(\d+(?:\.\d+)+)$/i)
19+
end
20+
21+
head do
22+
url "https://github.com/luanti-org/luanti.git", branch: "master"
23+
24+
resource "minetest_game" do
25+
url "https://github.com/luanti-org/minetest_game.git", branch: "master"
26+
end
27+
end
28+
29+
depends_on "cmake" => :build
30+
depends_on "curl"
31+
depends_on "freetype"
32+
depends_on "gettext"
33+
depends_on "gmp"
34+
depends_on "jpeg-turbo"
35+
depends_on "jsoncpp"
36+
depends_on "libogg"
37+
depends_on "libpng"
38+
depends_on "libvorbis"
39+
depends_on "libx11"
40+
depends_on "libxi"
41+
depends_on "libxxf86vm"
42+
depends_on :linux
43+
depends_on "luajit"
44+
depends_on "mesa"
45+
depends_on "ncurses"
46+
depends_on "openal-soft"
47+
depends_on "sqlite"
48+
depends_on "xinput"
49+
depends_on "zlib"
50+
depends_on "zstd"
51+
52+
def install
53+
# Remove bundled libraries to prevent fallback
54+
%w[lua gmp jsoncpp].each { |lib| rm_r(buildpath/"lib"/lib) }
55+
56+
(buildpath/"games/minetest_game").install resource("minetest_game")
57+
58+
args = %W[
59+
-DBUILD_CLIENT=1
60+
-DBUILD_SERVER=0
61+
-DENABLE_FREETYPE=1
62+
-DCMAKE_EXE_LINKER_FLAGS='-L#{Formula["freetype"].opt_lib}'
63+
-DENABLE_GETTEXT=1
64+
-DCUSTOM_GETTEXT_PATH=#{Formula["gettext"].opt_prefix}
65+
]
66+
67+
system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args
68+
system "cmake", "--build", "build"
69+
system "cmake", "--install", "build"
70+
end
71+
72+
test do
73+
# engine got changed from minetest to luanti with 5.10.0 release
74+
output = shell_output("#{bin}/luanti --version")
75+
assert_match "USE_CURL=1", output
76+
assert_match "USE_GETTEXT=1", output
77+
assert_match "USE_SOUND=1", output
78+
end
79+
end

Formula/m/minetest.rb

Lines changed: 0 additions & 98 deletions
This file was deleted.

formula_renames.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
"mkl-dnn": "onednn",
104104
"mobile-shell": "mosh",
105105
"mongo-c": "mongo-c-driver",
106+
"minetest": "luanti",
106107
"mpich2": "mpich",
107108
"mps-youtube": "yewtube",
108109
"mr2": "zoro",

0 commit comments

Comments
 (0)