Gentoo Archives: gentoo-commits

From: Ross Charles Campbell <rossbridger.cc@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-games/godot/, dev-games/godot/files/
Date: Sat, 02 Jan 2021 16:04:57
Message-Id: 1609603158.a4c500da08a55ab3ff4b8f78e28dcfdc4372af65.rossbridger@gentoo
1 commit: a4c500da08a55ab3ff4b8f78e28dcfdc4372af65
2 Author: Ross Charles Campbell <rossbridger.cc <AT> gmail <DOT> com>
3 AuthorDate: Sat Jan 2 15:57:46 2021 +0000
4 Commit: Ross Charles Campbell <rossbridger.cc <AT> gmail <DOT> com>
5 CommitDate: Sat Jan 2 15:59:18 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a4c500da
7
8 dev-games/godot: New Package
9
10 Closes: https://bugs.gentoo.org/532730
11 Closes: https://github.com/gentoo/gentoo/pull/17874
12 Package-Manager: Portage-3.0.12, Repoman-3.0.2
13 Signed-off-by: Ross Charles Campbell <rossbridger.cc <AT> gmail.com>
14
15 dev-games/godot/Manifest | 1 +
16 .../godot/files/godot-3.2.3-fix-llvm-build.patch | 36 ++++++
17 dev-games/godot/godot-3.2.3.ebuild | 139 +++++++++++++++++++++
18 dev-games/godot/metadata.xml | 28 +++++
19 4 files changed, 204 insertions(+)
20
21 diff --git a/dev-games/godot/Manifest b/dev-games/godot/Manifest
22 new file mode 100644
23 index 00000000..36fd2278
24 --- /dev/null
25 +++ b/dev-games/godot/Manifest
26 @@ -0,0 +1 @@
27 +DIST godot-3.2.3.tar.gz 22459811 BLAKE2B fdebfc4fc4a259d52496feb2904ff1e311a8df3fd57568091b181380e28b789efd16d598df7a2331f22f182acebacb7af1f5aa88583f8b7e992be52f2f494198 SHA512 229a32f082e412f20533b781ee95a1e7a9039a6329fe3429f9a3388ba3aada311bcc49c2abecdeec7496ef039a81358009126b21daaeeb127c170b77c3def99f
28
29 diff --git a/dev-games/godot/files/godot-3.2.3-fix-llvm-build.patch b/dev-games/godot/files/godot-3.2.3-fix-llvm-build.patch
30 new file mode 100644
31 index 00000000..40c45f34
32 --- /dev/null
33 +++ b/dev-games/godot/files/godot-3.2.3-fix-llvm-build.patch
34 @@ -0,0 +1,36 @@
35 +diff --git a/SConstruct b/SConstruct
36 +index 26019e6..f460aef 100644
37 +--- a/SConstruct
38 ++++ b/SConstruct
39 +@@ -170,6 +170,8 @@ opts.Add(BoolVariable("builtin_zstd", "Use the built-in Zstd library", True))
40 + # Compilation environment setup
41 + opts.Add("CXX", "C++ compiler")
42 + opts.Add("CC", "C compiler")
43 ++opts.Add("AR", "Archiver")
44 ++opts.Add("RANLIB", "Random Access Library Indexer")
45 + opts.Add("LINK", "Linker")
46 + opts.Add("CCFLAGS", "Custom flags for both the C and C++ compilers")
47 + opts.Add("CFLAGS", "Custom flags for the C compiler")
48 +diff --git a/platform/x11/detect.py b/platform/x11/detect.py
49 +index 716930d..28b1df4 100644
50 +--- a/platform/x11/detect.py
51 ++++ b/platform/x11/detect.py
52 +@@ -130,7 +130,6 @@ def configure(env):
53 + env["CXX"] = "clang++"
54 + env["LINK"] = "clang++"
55 + env.Append(CPPDEFINES=["TYPED_METHOD_BIND"])
56 +- env.extra_suffix = ".llvm" + env.extra_suffix
57 +
58 + if env["use_lld"]:
59 + if env["use_llvm"]:
60 +@@ -173,10 +172,6 @@ def configure(env):
61 + env.Append(CCFLAGS=["-flto"])
62 + env.Append(LINKFLAGS=["-flto"])
63 +
64 +- if not env["use_llvm"]:
65 +- env["RANLIB"] = "gcc-ranlib"
66 +- env["AR"] = "gcc-ar"
67 +-
68 + env.Append(CCFLAGS=["-pipe"])
69 + env.Append(LINKFLAGS=["-pipe"])
70 +
71
72 diff --git a/dev-games/godot/godot-3.2.3.ebuild b/dev-games/godot/godot-3.2.3.ebuild
73 new file mode 100644
74 index 00000000..b0115ed9
75 --- /dev/null
76 +++ b/dev-games/godot/godot-3.2.3.ebuild
77 @@ -0,0 +1,139 @@
78 +# Copyright 1999-2021 Gentoo Authors
79 +# Distributed under the terms of the GNU General Public License v2
80 +
81 +EAPI=7
82 +PYTHON_COMPAT=( python3_{7..9} )
83 +
84 +inherit desktop python-any-r1 scons-utils xdg
85 +
86 +DESCRIPTION="Multi-platform 2D and 3D game engine"
87 +HOMEPAGE="http://godotengine.org"
88 +
89 +SRC_URI="https://github.com/godotengine/${PN}/archive/${PV}-stable.tar.gz -> ${P}.tar.gz"
90 +S="${WORKDIR}/${P}-stable"
91 +KEYWORDS="~amd64 ~x86"
92 +
93 +LICENSE="Apache-2.0 BSD BSL-1.1 CC-BY-3.0 MIT MPL-2.0 OFL-1.1 public-domain ZLIB"
94 +SLOT="0"
95 +IUSE="+bullet debug +enet +freetype lto +mbedtls +ogg +opus pulseaudio +theora +udev +upnp +vorbis +webp"
96 +
97 +RDEPEND="
98 + app-arch/lz4
99 + app-arch/zstd
100 + dev-libs/libpcre2[pcre32]
101 + media-libs/alsa-lib
102 + media-libs/libpng:0=
103 + media-libs/libvpx
104 + media-libs/mesa[gles2]
105 + sys-libs/zlib
106 + x11-libs/libX11
107 + x11-libs/libXcursor
108 + x11-libs/libXi
109 + x11-libs/libXinerama
110 + virtual/glu
111 + virtual/opengl
112 + bullet? ( >=sci-physics/bullet-2.89 )
113 + enet? ( net-libs/enet:= )
114 + freetype? ( media-libs/freetype:2 )
115 + mbedtls? ( net-libs/mbedtls )
116 + ogg? ( media-libs/libogg )
117 + opus? (
118 + media-libs/opus
119 + media-libs/opusfile
120 + )
121 + pulseaudio? ( media-sound/pulseaudio )
122 + theora? ( media-libs/libtheora )
123 + udev? ( virtual/udev )
124 + upnp? ( net-libs/miniupnpc )
125 + vorbis? ( media-libs/libvorbis )
126 + webp? ( media-libs/libwebp )
127 +"
128 +DEPEND="
129 + ${RDEPEND}
130 + dev-lang/yasm
131 +"
132 +BDEPEND="virtual/pkgconfig"
133 +
134 +PATCHES=( "${FILESDIR}"/${P}-fix-llvm-build.patch )
135 +
136 +src_prepare() {
137 + default
138 + rm -r thirdparty/{bullet,enet,freetype,libogg,libpng,libtheora,libvorbis,libvpx,libwebp,mbedtls,miniupnpc,opus,pcre2,zlib,zstd} || die
139 +}
140 +
141 +src_configure() {
142 + myesconsargs=(
143 + CC="$(tc-getCC)"
144 + CXX="$(tc-getCXX)"
145 + AR="$(tc-getAR)"
146 + RANLIB="$(tc-getRANLIB)"
147 + )
148 + # Remove builtin third-party packages, link with system ones instead
149 + myesconsargs+=(
150 + builtin_bullet=no
151 + builtin_enet=no
152 + builtin_freetype=no
153 + builtin_libogg=no
154 + builtin_libpng=no
155 + builtin_libtheora=no
156 + builtin_libvorbis=no
157 + builtin_libvpx=no
158 + builtin_libwebp=no
159 + builtin_mbedtls=no
160 + builtin_miniupnpc=no
161 + builtin_opus=no
162 + builtin_pcre2=no
163 + builtin_pcre2_with_jit=no
164 + builtin_zlib=no
165 + builtin_zstd=no
166 + )
167 + myesconsargs+=(
168 + # Mono bindings requires MSBuild which is only available on Windows
169 + module_mono_enabled=no
170 + module_bullet_enabled=$(usex bullet)
171 + module_enet_enabled=$(usex enet)
172 + module_freetype_enabled=$(usex freetype)
173 + module_mbedtls_enabled=$(usex mbedtls)
174 + module_ogg_enabled=$(usex ogg)
175 + module_opus_enabled=$(usex opus)
176 + module_theora_enabled=$(usex theora)
177 + module_upnp_enabled=$(usex upnp)
178 + module_vorbis_enabled=$(usex vorbis)
179 + module_webp_enabled=$(usex webp)
180 + )
181 + # Misc options
182 + myesconsargs+=(
183 + platform=x11
184 + progress=yes
185 + tools=yes
186 + verbose=yes
187 + pulseaudio=$(usex pulseaudio)
188 + target=$(usex debug debug release_debug)
189 + udev=$(usex udev)
190 + use_lto=$(usex lto)
191 + )
192 +}
193 +
194 +src_compile() {
195 + escons "${myesconsargs[@]}"
196 +}
197 +
198 +src_install() {
199 + local godot_binary="${PN}.x11.opt.tools"
200 +
201 + if [[ "${ARCH}" == "amd64" ]]; then
202 + godot_binary="${godot_binary}.64"
203 + elif [[ "${ARCH}" == "x86" ]]; then
204 + godot_binary="${godot_binary}.32"
205 + fi
206 +
207 + newbin bin/${godot_binary} ${PN}
208 + newicon icon.svg ${PN}.svg
209 + doman misc/dist/linux/${PN}.6
210 + domenu misc/dist/linux/org.godotengine.Godot.desktop
211 + insinto /usr/share/metainfo
212 + doins misc/dist/linux/org.godotengine.Godot.appdata.xml
213 + insinto /usr/share/mime/application
214 + doins misc/dist/linux/x-godot-project.xml
215 + dodoc AUTHORS.md CHANGELOG.md DONORS.md README.md
216 +}
217
218 diff --git a/dev-games/godot/metadata.xml b/dev-games/godot/metadata.xml
219 new file mode 100644
220 index 00000000..5f4bcc66
221 --- /dev/null
222 +++ b/dev-games/godot/metadata.xml
223 @@ -0,0 +1,28 @@
224 +<?xml version="1.0" encoding="UTF-8"?>
225 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
226 +<pkgmetadata>
227 + <maintainer type="person">
228 + <email>rossbridger.cc@×××××.com</email>
229 + <name>Ross Charles Campbell</name>
230 + </maintainer>
231 + <longdescription>
232 +Godot Engine is a feature-packed, cross-platform game engine to create 2D and
233 +3D games from a unified interface. It provides a comprehensive set of common
234 +tools, so users can focus on making games without having to reinvent the wheel.
235 +Games can be exported in one click to a number of platforms, including the major
236 +desktop platforms (Linux, macOS, Windows) as well as mobile (Android, iOS) and
237 +web-based (HTML5) platforms.
238 + </longdescription>
239 + <use>
240 + <flag name="bullet">Enable support for <pkg>sci-physics/bullet</pkg></flag>
241 + <flag name="enet">Enable support for <pkg>net-libs/enet</pkg></flag>
242 + <flag name="lto">Enable support for link time optimization</flag>
243 + <flag name="freetype">Enable support for <pkg>media-libs/freetype</pkg></flag>
244 + <flag name="mbedtls">Enable support for <pkg>net-libs/mbedtls</pkg></flag>
245 + </use>
246 + <upstream>
247 + <remote-id type="github">godotengine/godot</remote-id>
248 + <bugs-to>https://github.com/godotengine/godot/issues</bugs-to>
249 + <doc lang="en">https://docs.godotengine.org/en/stable/index.html</doc>
250 + </upstream>
251 +</pkgmetadata>