# -*- 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 PortSystem 1.0 PortGroup github 1.0 PortGroup cmake 1.1 compiler.cxx_standard 2011 compiler.thread_local_storage yes github.setup minetest minetest 5.7.0 revision 1 # the game version could be different from the minetest version set game_version 5.7.0 # to add on more files to a github portgroup download # have to cache the preset distfiles from the github PG set main_distfile ${distfiles} # then add another distfile, with a direct URL as can't use the github PG again set game_distfile ${game_version}${extract.suffix} set game_mastersite https://github.com/minetest/minetest_game/archive/ distfiles ${main_distfile}:main \ ${game_distfile}:game master_sites ${github.master_sites}:main \ ${game_mastersite}:game checksums ${main_distfile} \ rmd160 550fd4c6767cce4bb5dd79f9d907b233e21b9b2c \ sha256 8a320b3355381ba7ed4b6a41bfb0f39cb2858eb7bae0f6fc5935b329a53bde56 \ size 10116355 \ ${game_distfile} \ rmd160 9d85379a3a565e66385e26046ecb6c53f0248323 \ sha256 0787b24cf7b340a8a2be873ca3744cec60c2683011f1d658350a031d1bd5976d \ size 2592158 # rename directory - from github portgroup post-extract { if {[file exists [glob -nocomplain ${workpath}/${github.author}-${github.project}-*]] && \ [file isdirectory [glob -nocomplain ${workpath}/${github.author}-${github.project}-*]]} { move [glob ${workpath}/${github.author}-${github.project}-*] ${workpath}/${distname} } } license LGPL-2.1+ categories games platforms darwin maintainers @Zweihorn openmaintainer description open source infinite-world block sandbox game with survival and crafting long_description ${description} - \ Find more MT mods at and have fun. homepage https://www.minetest.net depends_build-append path:bin/doxygen:doxygen \ port:mesa depends_lib-append port:irrlichtmt \ path:include/turbojpeg.h:libjpeg-turbo \ port:libogg \ port:libvorbis \ port:freetype \ port:gettext \ port:leveldb \ port:sqlite3 \ port:zstd \ path:lib/libluajit-5.1.2.dylib:luajit \ port:gmp \ port:curl \ port:jsoncpp \ port:spatialindex \ port:xorg-libX11 \ port:xorg-libXxf86vm # see https://trac.macports.org/ticket/58315 - possibly fixable? universal_variant no supported_archs x86_64 # 001. the original build calls fixup_bundle to move all the deps into the app bundle. # this doesn't work correctly with macports destrooting, and isn't necessary for a macports install so deleted it patchfiles-append 001-patch-src-CMakeLists-disable-bundlefixup.diff # 002. patch to get the luajit include headers ahead of the system includes, or the build finds the # wrong lua headers if you have a newer version of lua installed patchfiles-append 002-patch-cmake-Modules-FindLua-include-LUADIR-before-system.diff # 003. patch main.cpp to not barf on the unrecognized command-line option -psn from Apple launch patchfiles-append 003-patch-ignore-psn-option-mac-bundle.diff configure.args-append -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX:PATH=${applications_dir} \ -DBUILD_UNITTESTS=OFF \ -DENABLE_UPDATE_CHECKER=OFF \ -DBUILD_CLIENT=ON \ -DBUILD_SERVER=ON \ -DENABLE_SOUND=ON \ -DENABLE_REDIS=OFF \ -DENABLE_POSTGRESQL=OFF \ -DENABLE_LEVELDB=ON \ -DENABLE_FREETYPE=ON \ -DENABLE_CURL=ON \ -DENABLE_GETTEXT=ON \ -DENABLE_SPATIAL=ON \ -DENABLE_SYSTEM_GMP=ON \ -DENABLE_SYSTEM_JSONCPP=ON \ -DCURSES_INCLUDE_PATH:FILEPATH=${prefix}/include \ -DENABLE_LUAJIT=ON \ -DINSTALL_DEVTEST=ON \ -DLUA_INCLUDE_DIR:PATH=${prefix}/include/luajit-2.1 \ -DLUA_LIBRARY:FILEPATH=${prefix}/lib/libluajit-5.1.dylib \ -DVERSION_EXTRA=MacPorts-rev${revision} post-destroot { move ${workpath}/minetest_game-${game_version} ${destroot}${applications_dir}/minetest.app/Contents/Resources/games/minetest_game }