1 |
commit: a3f9a4a42a060a1da740c83c10439cb5d5f72a8f |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 1 12:51:22 2022 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 1 14:33:23 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3f9a4a4 |
7 |
|
8 |
games-action/minetest: add 5.5.0 |
9 |
|
10 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
11 |
|
12 |
games-action/minetest/Manifest | 1 + |
13 |
.../files/minetest-5.5.0-bundled_luabitop.patch | 17 +++ |
14 |
games-action/minetest/minetest-5.5.0.ebuild | 142 +++++++++++++++++++++ |
15 |
3 files changed, 160 insertions(+) |
16 |
|
17 |
diff --git a/games-action/minetest/Manifest b/games-action/minetest/Manifest |
18 |
index 19c3d0e7364d..4e97ad882efc 100644 |
19 |
--- a/games-action/minetest/Manifest |
20 |
+++ b/games-action/minetest/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST minetest-5.4.1.tar.gz 11209289 BLAKE2B a8517309ee98c3991e7ce2d67bb8d14a5697a299b480835c79b1e3c7161ebc94f6245f36c09d88903c052fca1de52fe0253f055059c3d72745c724d117d9753a SHA512 8f9985c6a658c868ed8971f112eae3c71c2b1535fd433689920be6d42ac2c7eb8453d58ec2825573764ee2f56b651c5e27895b7fd58fada61fbaf4758fc69471 |
23 |
+DIST minetest-5.5.0.tar.gz 9558895 BLAKE2B 13db90556a4faaac31cca7427fb85439cab144d73f25b79ae9f8367883b0fafa39c39fe0e40f3734d7e3f48cef4942a37a302cf58993707a14024905d8ed9b61 SHA512 9c744eac2704457d6896485997666d614dd156214dae26c2cb413771fd3eab54d80731a5220bcc4a18ddc737db64971893a3c89a56a46020adf8d00aad299817 |
24 |
|
25 |
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 |
26 |
new file mode 100644 |
27 |
index 000000000000..5006ddd499b6 |
28 |
--- /dev/null |
29 |
+++ b/games-action/minetest/files/minetest-5.5.0-bundled_luabitop.patch |
30 |
@@ -0,0 +1,17 @@ |
31 |
+When built against PUC Lua, minetest binaries get linked against |
32 |
+a customised version of LuaBitOp which then gets installed |
33 |
+as /usr/$(get_libdir)/libbitop.so. This violates the policies of both |
34 |
+Gentoo (unversioned shared library) and Lua itself (compiled extensions |
35 |
+should be installed into implementation-specific directories rather than |
36 |
+top-level libdir, and I'm pretty sure linking against such extensions |
37 |
+is a no-no). Switching to system dev-lua/LuaBitOp will require work |
38 |
+so just make the customised version static for now. |
39 |
+ |
40 |
+--- a/lib/bitop/CMakeLists.txt |
41 |
++++ b/lib/bitop/CMakeLists.txt |
42 |
+@@ -1,4 +1,4 @@ |
43 |
+-add_library(bitop bit.c) |
44 |
++add_library(bitop STATIC bit.c) |
45 |
+ target_link_libraries(bitop) |
46 |
+ |
47 |
+ include_directories(${LUA_INCLUDE_DIR}) |
48 |
|
49 |
diff --git a/games-action/minetest/minetest-5.5.0.ebuild b/games-action/minetest/minetest-5.5.0.ebuild |
50 |
new file mode 100644 |
51 |
index 000000000000..0b2a456abd27 |
52 |
--- /dev/null |
53 |
+++ b/games-action/minetest/minetest-5.5.0.ebuild |
54 |
@@ -0,0 +1,142 @@ |
55 |
+# Copyright 1999-2022 Gentoo Authors |
56 |
+# Distributed under the terms of the GNU General Public License v2 |
57 |
+ |
58 |
+EAPI=8 |
59 |
+ |
60 |
+LUA_COMPAT=( lua5-1 luajit ) |
61 |
+ |
62 |
+inherit cmake flag-o-matic lua-single systemd xdg |
63 |
+ |
64 |
+DESCRIPTION="A free open-source voxel game engine with easy modding and game creation" |
65 |
+HOMEPAGE="https://www.minetest.net" |
66 |
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
67 |
+ |
68 |
+LICENSE="LGPL-2.1+ CC-BY-SA-3.0 OFL-1.1 Apache-2.0" |
69 |
+SLOT="0" |
70 |
+KEYWORDS="~amd64 ~riscv" |
71 |
+IUSE="+client +curl doc leveldb ncurses nls postgres prometheus redis +server +sound spatial test" |
72 |
+ |
73 |
+REQUIRED_USE="${LUA_REQUIRED_USE} |
74 |
+ || ( client server )" |
75 |
+ |
76 |
+RESTRICT="!test? ( test )" |
77 |
+ |
78 |
+RDEPEND="${LUA_DEPS} |
79 |
+ $(lua_gen_impl_dep 'deprecated' lua5-1) |
80 |
+ app-arch/zstd |
81 |
+ dev-db/sqlite:3 |
82 |
+ >=dev-games/irrlicht-mt-1.9.0.4 |
83 |
+ dev-libs/gmp:0= |
84 |
+ dev-libs/jsoncpp:= |
85 |
+ sys-libs/zlib |
86 |
+ client? ( |
87 |
+ media-libs/freetype:2 |
88 |
+ media-libs/libpng:0= |
89 |
+ virtual/jpeg:0 |
90 |
+ virtual/opengl |
91 |
+ x11-libs/libX11 |
92 |
+ x11-libs/libXxf86vm |
93 |
+ sound? ( |
94 |
+ media-libs/libvorbis |
95 |
+ media-libs/openal |
96 |
+ ) |
97 |
+ ) |
98 |
+ curl? ( net-misc/curl ) |
99 |
+ leveldb? ( dev-libs/leveldb:= ) |
100 |
+ ncurses? ( sys-libs/ncurses:0= ) |
101 |
+ nls? ( virtual/libintl ) |
102 |
+ postgres? ( >=dev-db/postgresql-9.5:= ) |
103 |
+ prometheus? ( dev-cpp/prometheus-cpp ) |
104 |
+ redis? ( dev-libs/hiredis:= ) |
105 |
+ server? ( |
106 |
+ acct-group/minetest |
107 |
+ acct-user/minetest |
108 |
+ ) |
109 |
+ spatial? ( sci-libs/libspatialindex:= )" |
110 |
+DEPEND="${RDEPEND}" |
111 |
+BDEPEND=" |
112 |
+ doc? ( |
113 |
+ app-doc/doxygen |
114 |
+ media-gfx/graphviz |
115 |
+ ) |
116 |
+ nls? ( sys-devel/gettext )" |
117 |
+ |
118 |
+PATCHES=( |
119 |
+ "${FILESDIR}"/${PN}-5.4.1-system_puc_lua.patch |
120 |
+ "${FILESDIR}"/${PN}-5.5.0-bundled_luabitop.patch |
121 |
+) |
122 |
+ |
123 |
+src_prepare() { |
124 |
+ cmake_src_prepare |
125 |
+ |
126 |
+ # remove bundled libraries other than bitop |
127 |
+ rm -rf lib/{gmp,jsoncpp,lua} || die |
128 |
+ |
129 |
+ # To avoid TEXTRELs on riscv |
130 |
+ append-flags -fPIC |
131 |
+} |
132 |
+ |
133 |
+src_configure() { |
134 |
+ local mycmakeargs=( |
135 |
+ -DBUILD_CLIENT=$(usex client) |
136 |
+ -DBUILD_SERVER=$(usex server) |
137 |
+ -DBUILD_UNITTESTS=$(usex test) |
138 |
+ -DCUSTOM_BINDIR="${EPREFIX}/usr/bin" |
139 |
+ -DCUSTOM_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
140 |
+ -DCUSTOM_EXAMPLE_CONF_DIR="${EPREFIX}/usr/share/doc/${PF}" |
141 |
+ -DCUSTOM_LOCALEDIR="${EPREFIX}/usr/share/${PN}/locale" |
142 |
+ -DCUSTOM_MANDIR="${EPREFIX}/usr/share/man" |
143 |
+ -DCUSTOM_SHAREDIR="${EPREFIX}/usr/share/${PN}" |
144 |
+ -DENABLE_CURL=$(usex curl) |
145 |
+ -DENABLE_CURSES=$(usex ncurses) |
146 |
+ -DENABLE_GETTEXT=$(usex nls) |
147 |
+ -DENABLE_GLES=no |
148 |
+ -DENABLE_LEVELDB=$(usex leveldb) |
149 |
+ -DENABLE_LUAJIT=$(usex lua_single_target_luajit) |
150 |
+ -DENABLE_POSTGRESQL=$(usex postgres) |
151 |
+ -DENABLE_PROMETHEUS=$(usex prometheus) |
152 |
+ -DENABLE_REDIS=$(usex redis) |
153 |
+ -DENABLE_SPATIAL=$(usex spatial) |
154 |
+ -DENABLE_SOUND=$(usex sound) |
155 |
+ -DENABLE_SYSTEM_GMP=1 |
156 |
+ -DENABLE_SYSTEM_JSONCPP=1 |
157 |
+ -DRUN_IN_PLACE=0 |
158 |
+ ) |
159 |
+ |
160 |
+ cmake_src_configure |
161 |
+} |
162 |
+ |
163 |
+src_compile() { |
164 |
+ cmake_src_compile |
165 |
+ |
166 |
+ if use doc; then |
167 |
+ cmake_src_compile doc |
168 |
+ HTML_DOCS=( "${BUILD_DIR}"/doc/html/. ) |
169 |
+ fi |
170 |
+} |
171 |
+ |
172 |
+src_install() { |
173 |
+ cmake_src_install |
174 |
+ |
175 |
+ if use server; then |
176 |
+ keepdir /etc/minetest |
177 |
+ fowners root:minetest /etc/minetest |
178 |
+ fperms 2750 /etc/minetest |
179 |
+ |
180 |
+ keepdir /var/log/minetest |
181 |
+ fowners minetest:minetest /var/log/minetest |
182 |
+ |
183 |
+ newconfd "${FILESDIR}"/minetestserver.confd minetest-server |
184 |
+ newinitd "${FILESDIR}"/minetestserver.initd minetest-server |
185 |
+ |
186 |
+ systemd_newunit "${FILESDIR}"/minetestserver_default.service minetest-server.service |
187 |
+ systemd_newunit "${FILESDIR}"/minetestserver_template.service minetest-server@.service |
188 |
+ |
189 |
+ insinto /etc/logrotate.d |
190 |
+ newins "${FILESDIR}"/minetestserver.logrotate minetest-server |
191 |
+ fi |
192 |
+} |
193 |
+ |
194 |
+pkg_postinst() { |
195 |
+ xdg_pkg_postinst |
196 |
+} |