Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-action/minetest/
Date: Wed, 21 Sep 2022 18:33:28
Message-Id: 1663785196.43a00ec528c7fbc94eb96d16df16429d0f3e4a32.marecki@gentoo
1 commit: 43a00ec528c7fbc94eb96d16df16429d0f3e4a32
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 21 17:59:32 2022 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 21 18:33:16 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43a00ec5
7
8 games-action/minetest: add 5.6.1
9
10 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
11
12 games-action/minetest/Manifest | 1 +
13 games-action/minetest/minetest-5.6.1.ebuild | 144 ++++++++++++++++++++++++++++
14 2 files changed, 145 insertions(+)
15
16 diff --git a/games-action/minetest/Manifest b/games-action/minetest/Manifest
17 index c35862e90e11..d0e808804a78 100644
18 --- a/games-action/minetest/Manifest
19 +++ b/games-action/minetest/Manifest
20 @@ -1 +1,2 @@
21 DIST minetest-5.6.0.tar.gz 9922682 BLAKE2B 10787b9bbc397d3d214b22640a830fc429bd8292541e0b71b50d05d483f87469cedf03fcf7a898bd83486c55911439a9804eab2bca58cd464a69adaa76b4f820 SHA512 e87c4036f17a61d3e623b2f48e3611ba1bc0177b5d58330fe6e64a74075c78ab7cd5eb7b855097ce98819112a54857324237f7d3b81ec504a1f608444e74a630
22 +DIST minetest-5.6.1.tar.gz 9924663 BLAKE2B 509b8073a4e82ecff008f692ebdd7a8f35ff5222ba1095937d24870404cca848b80891887837e03d86c117568f9bbee1f92fb958640e06107230673e79d7f813 SHA512 15d2ce3b1150f077ff933a04f0ba8e02c71ee60a0edb636d1511d4e90244a34a14d7e5c4b47bee4de96cd179249a5a6963d7a092084f46c0fa54c9ff431a5265
23
24 diff --git a/games-action/minetest/minetest-5.6.1.ebuild b/games-action/minetest/minetest-5.6.1.ebuild
25 new file mode 100644
26 index 000000000000..12b9726f46c3
27 --- /dev/null
28 +++ b/games-action/minetest/minetest-5.6.1.ebuild
29 @@ -0,0 +1,144 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +CMAKE_BUILD_TYPE="Release"
36 +LUA_COMPAT=( lua5-1 luajit )
37 +
38 +inherit cmake flag-o-matic lua-single systemd xdg
39 +
40 +DESCRIPTION="A free open-source voxel game engine with easy modding and game creation"
41 +HOMEPAGE="https://www.minetest.net"
42 +SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
43 +
44 +LICENSE="LGPL-2.1+ CC-BY-SA-3.0 OFL-1.1 Apache-2.0"
45 +SLOT="0"
46 +KEYWORDS="~amd64 ~riscv"
47 +IUSE="+client +curl doc leveldb ncurses nls postgres prometheus redis +server +sound spatial test"
48 +
49 +REQUIRED_USE="${LUA_REQUIRED_USE}
50 + || ( client server )"
51 +
52 +RESTRICT="!test? ( test )"
53 +
54 +RDEPEND="${LUA_DEPS}
55 + $(lua_gen_impl_dep 'deprecated' lua5-1)
56 + app-arch/zstd
57 + dev-db/sqlite:3
58 + dev-libs/gmp:0=
59 + dev-libs/jsoncpp:=
60 + sys-libs/zlib
61 + client? (
62 + >=dev-games/irrlicht-mt-1.9.0.8
63 + media-libs/freetype:2
64 + media-libs/libpng:0=
65 + media-libs/libjpeg-turbo
66 + virtual/opengl
67 + x11-libs/libX11
68 + x11-libs/libXxf86vm
69 + sound? (
70 + media-libs/libvorbis
71 + media-libs/openal
72 + )
73 + )
74 + curl? ( net-misc/curl )
75 + leveldb? ( dev-libs/leveldb:= )
76 + ncurses? ( sys-libs/ncurses:0= )
77 + nls? ( virtual/libintl )
78 + postgres? ( >=dev-db/postgresql-9.5:= )
79 + prometheus? ( dev-cpp/prometheus-cpp )
80 + redis? ( dev-libs/hiredis:= )
81 + server? (
82 + acct-group/minetest
83 + acct-user/minetest
84 + >=dev-games/irrlicht-mt-headers-1.9.0.8
85 + )
86 + spatial? ( sci-libs/libspatialindex:= )"
87 +DEPEND="${RDEPEND}"
88 +BDEPEND="
89 + doc? (
90 + app-doc/doxygen
91 + media-gfx/graphviz
92 + )
93 + nls? ( sys-devel/gettext )"
94 +
95 +PATCHES=(
96 + "${FILESDIR}"/${PN}-5.4.1-system_puc_lua.patch
97 + "${FILESDIR}"/${PN}-5.6.0-no_upstream_optflags.patch
98 +)
99 +
100 +src_prepare() {
101 + cmake_src_prepare
102 +
103 + # remove bundled libraries other than bitop
104 + rm -rf lib/{gmp,jsoncpp,lua} || die
105 +
106 + # To avoid TEXTRELs on riscv
107 + append-flags -fPIC
108 +}
109 +
110 +src_configure() {
111 + local mycmakeargs=(
112 + -DBUILD_CLIENT=$(usex client)
113 + -DBUILD_SERVER=$(usex server)
114 + -DBUILD_UNITTESTS=$(usex test)
115 + -DCUSTOM_BINDIR="${EPREFIX}/usr/bin"
116 + -DCUSTOM_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
117 + -DCUSTOM_EXAMPLE_CONF_DIR="${EPREFIX}/usr/share/doc/${PF}"
118 + -DCUSTOM_LOCALEDIR="${EPREFIX}/usr/share/${PN}/locale"
119 + -DCUSTOM_MANDIR="${EPREFIX}/usr/share/man"
120 + -DCUSTOM_SHAREDIR="${EPREFIX}/usr/share/${PN}"
121 + -DENABLE_CURL=$(usex curl)
122 + -DENABLE_CURSES=$(usex ncurses)
123 + -DENABLE_GETTEXT=$(usex nls)
124 + -DENABLE_GLES=no
125 + -DENABLE_LEVELDB=$(usex leveldb)
126 + -DENABLE_LUAJIT=$(usex lua_single_target_luajit)
127 + -DENABLE_POSTGRESQL=$(usex postgres)
128 + -DENABLE_PROMETHEUS=$(usex prometheus)
129 + -DENABLE_REDIS=$(usex redis)
130 + -DENABLE_SPATIAL=$(usex spatial)
131 + -DENABLE_SOUND=$(usex sound)
132 + -DENABLE_SYSTEM_GMP=1
133 + -DENABLE_SYSTEM_JSONCPP=1
134 + -DRUN_IN_PLACE=0
135 + )
136 +
137 + cmake_src_configure
138 +}
139 +
140 +src_compile() {
141 + cmake_src_compile
142 +
143 + if use doc; then
144 + cmake_src_compile doc
145 + HTML_DOCS=( "${BUILD_DIR}"/doc/html/. )
146 + fi
147 +}
148 +
149 +src_install() {
150 + cmake_src_install
151 +
152 + if use server; then
153 + keepdir /etc/minetest
154 + fowners root:minetest /etc/minetest
155 + fperms 2750 /etc/minetest
156 +
157 + keepdir /var/log/minetest
158 + fowners minetest:minetest /var/log/minetest
159 +
160 + newconfd "${FILESDIR}"/minetestserver.confd minetest-server
161 + newinitd "${FILESDIR}"/minetestserver.initd minetest-server
162 +
163 + systemd_newunit "${FILESDIR}"/minetestserver_default.service minetest-server.service
164 + systemd_newunit "${FILESDIR}"/minetestserver_template.service minetest-server@.service
165 +
166 + insinto /etc/logrotate.d
167 + newins "${FILESDIR}"/minetestserver.logrotate minetest-server
168 + fi
169 +}
170 +
171 +pkg_postinst() {
172 + xdg_pkg_postinst
173 +}