I managed to get Minetest 5.0.0 working on an Apple Mac through HomeBrew.
First, I noticed nothing compiled no matter what compiler I used, so I copied user folders and the library off the computer, formatted the hard drive and installed Mojave 10.14.3 from the App Store. Reinstalled everything program wise, went into the HomeBrew folder and edited with TextEdit 'minetest.rb' commenting out '#depends_on :x11' and did a 'brew install --build-from-source minetest'. Five minute compile time, got version 0.4.17 working perfectly.
Next I did a substitution of the top for lines for url and sha256. Compiled and in five minutes got a working version of 5.0.0, but HomeBrew deleted 0.4.17 from the machine in the process. Still it's a hack and not a true solution. I don't really understand the documentation for these file yet, but here's a copy of the minetest.rb file I used.
- Code: Select all
class Minetest < Formula
desc "Free, open source voxel game engine and game"
homepage "https://www.minetest.net/"
stable do
url "https://github.com/minetest/minetest/archive/5.0.0.tar.gz"
sha256 "1ba816f77dc9dbd5a4995f0c1d482f8f22b9aa75b6d6999dbfd1f3d698363d0a"
resource "minetest_game" do
url "https://github.com/minetest/minetest_game/archive/5.0.0.tar.gz"
sha256 "83688d802f9d8308acf6f95e6845cdbe1ee1bc088a963a30f94cf72ec7265cf8"
end
end
bottle do
sha256 "4da5f8bebc6588cdf99b23cd2646e91425e15e2c625b8516728bd6970ed2e25b" => :mojave
sha256 "7aa7a7e5a509efeb89b1ab0a897c250950ba117cc658c70c0892a3a4d4b882d5" => :high_sierra
sha256 "7c76e9b683a0205f116403f6571c7e7c7cbd40f7bc16951ef0c350512cfc017e" => :sierra
sha256 "ed87de74a782d339eee51f30e2d183eefd25a37e595df5f42157883afbeec133" => :el_capitan
end
head do
url "https://github.com/minetest/minetest.git"
resource "minetest_game" do
url "https://github.com/minetest/minetest_game.git", :branch => "master"
end
end
depends_on "cmake" => :build
depends_on "freetype"
depends_on "gettext"
depends_on "irrlicht"
depends_on "jpeg"
depends_on "libogg"
depends_on "libvorbis"
depends_on "luajit"
# depends_on :x11
def install
(buildpath/"games/minetest_game").install resource("minetest_game")
args = std_cmake_args - %w[-DCMAKE_BUILD_TYPE=None]
args << "-DCMAKE_BUILD_TYPE=Release" << "-DBUILD_CLIENT=1" << "-DBUILD_SERVER=0"
args << "-DENABLE_FREETYPE=1" << "-DCMAKE_EXE_LINKER_FLAGS='-L#{Formula["freetype"].opt_lib}'"
args << "-DENABLE_GETTEXT=1" << "-DCUSTOM_GETTEXT_PATH=#{Formula["gettext"].opt_prefix}"
# -ffast-math compiler flag is an issue on Mac
# https://github.com/minetest/minetest/issues/4274
inreplace "src/CMakeLists.txt", "-ffast-math", ""
system "cmake", ".", *args
system "make", "package"
system "unzip", "minetest-*-osx.zip"
prefix.install "minetest.app"
end
def caveats
<<~EOS
Put additional subgames and mods into "games" and "mods" folders under
"~/Library/Application Support/minetest/", respectively (you may have
to create those folders first).
If you would like to start the Minetest server from a terminal, run
"/Applications/minetest.app/Contents/MacOS/minetest --server".
EOS
end
end
File Locations:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/minetest.rb
/usr/local/Cellar/minetest/0.4.17.1
/usr/local/Cellar/minetest/5.0.0