|
| 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 | +} |
0 commit comments