diff options
author | Marek Szuba <marecki@gentoo.org> | 2022-02-01 12:51:22 +0000 |
---|---|---|
committer | Marek Szuba <marecki@gentoo.org> | 2022-02-01 14:33:23 +0000 |
commit | a3f9a4a42a060a1da740c83c10439cb5d5f72a8f (patch) | |
tree | 46dc47952d3409abd64ef5ba1a642f63b9426796 /games-action | |
parent | dev-games/irrlicht-mt: keyword 1.9.0.4 for ~riscv (diff) | |
download | gentoo-a3f9a4a42a060a1da740c83c10439cb5d5f72a8f.tar.gz gentoo-a3f9a4a42a060a1da740c83c10439cb5d5f72a8f.tar.bz2 gentoo-a3f9a4a42a060a1da740c83c10439cb5d5f72a8f.zip |
games-action/minetest: add 5.5.0
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'games-action')
-rw-r--r-- | games-action/minetest/Manifest | 1 | ||||
-rw-r--r-- | games-action/minetest/files/minetest-5.5.0-bundled_luabitop.patch | 17 | ||||
-rw-r--r-- | games-action/minetest/minetest-5.5.0.ebuild | 142 |
3 files changed, 160 insertions, 0 deletions
diff --git a/games-action/minetest/Manifest b/games-action/minetest/Manifest index 19c3d0e7364d..4e97ad882efc 100644 --- a/games-action/minetest/Manifest +++ b/games-action/minetest/Manifest @@ -1 +1,2 @@ DIST minetest-5.4.1.tar.gz 11209289 BLAKE2B a8517309ee98c3991e7ce2d67bb8d14a5697a299b480835c79b1e3c7161ebc94f6245f36c09d88903c052fca1de52fe0253f055059c3d72745c724d117d9753a SHA512 8f9985c6a658c868ed8971f112eae3c71c2b1535fd433689920be6d42ac2c7eb8453d58ec2825573764ee2f56b651c5e27895b7fd58fada61fbaf4758fc69471 +DIST minetest-5.5.0.tar.gz 9558895 BLAKE2B 13db90556a4faaac31cca7427fb85439cab144d73f25b79ae9f8367883b0fafa39c39fe0e40f3734d7e3f48cef4942a37a302cf58993707a14024905d8ed9b61 SHA512 9c744eac2704457d6896485997666d614dd156214dae26c2cb413771fd3eab54d80731a5220bcc4a18ddc737db64971893a3c89a56a46020adf8d00aad299817 diff --git a/games-action/minetest/files/minetest-5.5.0-bundled_luabitop.patch b/games-action/minetest/files/minetest-5.5.0-bundled_luabitop.patch new file mode 100644 index 000000000000..5006ddd499b6 --- /dev/null +++ b/games-action/minetest/files/minetest-5.5.0-bundled_luabitop.patch @@ -0,0 +1,17 @@ +When built against PUC Lua, minetest binaries get linked against +a customised version of LuaBitOp which then gets installed +as /usr/$(get_libdir)/libbitop.so. This violates the policies of both +Gentoo (unversioned shared library) and Lua itself (compiled extensions +should be installed into implementation-specific directories rather than +top-level libdir, and I'm pretty sure linking against such extensions +is a no-no). Switching to system dev-lua/LuaBitOp will require work +so just make the customised version static for now. + +--- a/lib/bitop/CMakeLists.txt ++++ b/lib/bitop/CMakeLists.txt +@@ -1,4 +1,4 @@ +-add_library(bitop bit.c) ++add_library(bitop STATIC bit.c) + target_link_libraries(bitop) + + include_directories(${LUA_INCLUDE_DIR}) diff --git a/games-action/minetest/minetest-5.5.0.ebuild b/games-action/minetest/minetest-5.5.0.ebuild new file mode 100644 index 000000000000..0b2a456abd27 --- /dev/null +++ b/games-action/minetest/minetest-5.5.0.ebuild @@ -0,0 +1,142 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-1 luajit ) + +inherit cmake flag-o-matic lua-single systemd xdg + +DESCRIPTION="A free open-source voxel game engine with easy modding and game creation" +HOMEPAGE="https://www.minetest.net" +SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-2.1+ CC-BY-SA-3.0 OFL-1.1 Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~riscv" +IUSE="+client +curl doc leveldb ncurses nls postgres prometheus redis +server +sound spatial test" + +REQUIRED_USE="${LUA_REQUIRED_USE} + || ( client server )" + +RESTRICT="!test? ( test )" + +RDEPEND="${LUA_DEPS} + $(lua_gen_impl_dep 'deprecated' lua5-1) + app-arch/zstd + dev-db/sqlite:3 + >=dev-games/irrlicht-mt-1.9.0.4 + dev-libs/gmp:0= + dev-libs/jsoncpp:= + sys-libs/zlib + client? ( + media-libs/freetype:2 + media-libs/libpng:0= + virtual/jpeg:0 + virtual/opengl + x11-libs/libX11 + x11-libs/libXxf86vm + sound? ( + media-libs/libvorbis + media-libs/openal + ) + ) + curl? ( net-misc/curl ) + leveldb? ( dev-libs/leveldb:= ) + ncurses? ( sys-libs/ncurses:0= ) + nls? ( virtual/libintl ) + postgres? ( >=dev-db/postgresql-9.5:= ) + prometheus? ( dev-cpp/prometheus-cpp ) + redis? ( dev-libs/hiredis:= ) + server? ( + acct-group/minetest + acct-user/minetest + ) + spatial? ( sci-libs/libspatialindex:= )" +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( + app-doc/doxygen + media-gfx/graphviz + ) + nls? ( sys-devel/gettext )" + +PATCHES=( + "${FILESDIR}"/${PN}-5.4.1-system_puc_lua.patch + "${FILESDIR}"/${PN}-5.5.0-bundled_luabitop.patch +) + +src_prepare() { + cmake_src_prepare + + # remove bundled libraries other than bitop + rm -rf lib/{gmp,jsoncpp,lua} || die + + # To avoid TEXTRELs on riscv + append-flags -fPIC +} + +src_configure() { + local mycmakeargs=( + -DBUILD_CLIENT=$(usex client) + -DBUILD_SERVER=$(usex server) + -DBUILD_UNITTESTS=$(usex test) + -DCUSTOM_BINDIR="${EPREFIX}/usr/bin" + -DCUSTOM_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" + -DCUSTOM_EXAMPLE_CONF_DIR="${EPREFIX}/usr/share/doc/${PF}" + -DCUSTOM_LOCALEDIR="${EPREFIX}/usr/share/${PN}/locale" + -DCUSTOM_MANDIR="${EPREFIX}/usr/share/man" + -DCUSTOM_SHAREDIR="${EPREFIX}/usr/share/${PN}" + -DENABLE_CURL=$(usex curl) + -DENABLE_CURSES=$(usex ncurses) + -DENABLE_GETTEXT=$(usex nls) + -DENABLE_GLES=no + -DENABLE_LEVELDB=$(usex leveldb) + -DENABLE_LUAJIT=$(usex lua_single_target_luajit) + -DENABLE_POSTGRESQL=$(usex postgres) + -DENABLE_PROMETHEUS=$(usex prometheus) + -DENABLE_REDIS=$(usex redis) + -DENABLE_SPATIAL=$(usex spatial) + -DENABLE_SOUND=$(usex sound) + -DENABLE_SYSTEM_GMP=1 + -DENABLE_SYSTEM_JSONCPP=1 + -DRUN_IN_PLACE=0 + ) + + cmake_src_configure +} + +src_compile() { + cmake_src_compile + + if use doc; then + cmake_src_compile doc + HTML_DOCS=( "${BUILD_DIR}"/doc/html/. ) + fi +} + +src_install() { + cmake_src_install + + if use server; then + keepdir /etc/minetest + fowners root:minetest /etc/minetest + fperms 2750 /etc/minetest + + keepdir /var/log/minetest + fowners minetest:minetest /var/log/minetest + + newconfd "${FILESDIR}"/minetestserver.confd minetest-server + newinitd "${FILESDIR}"/minetestserver.initd minetest-server + + systemd_newunit "${FILESDIR}"/minetestserver_default.service minetest-server.service + systemd_newunit "${FILESDIR}"/minetestserver_template.service minetest-server@.service + + insinto /etc/logrotate.d + newins "${FILESDIR}"/minetestserver.logrotate minetest-server + fi +} + +pkg_postinst() { + xdg_pkg_postinst +} |