Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-games/ogre/files/, dev-games/ogre/
Date: Sun, 29 Jan 2023 13:34:15
Message-Id: 1674999247.7f9cae11a9f1f4ede5fba3603e2f4f48b4f01b1d.juippis@gentoo
1 commit: 7f9cae11a9f1f4ede5fba3603e2f4f48b4f01b1d
2 Author: Sven Eden <sven.eden <AT> prydeworx <DOT> com>
3 AuthorDate: Fri Jan 27 07:13:40 2023 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 29 13:34:07 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f9cae11
7
8 dev-games/ogre: Bump to 13.6.1
9
10 Bump Stable OGRE to the current stable release v13.6.1
11
12 Closes: https://bugs.gentoo.org/885733
13 Closes: https://github.com/gentoo/gentoo/pull/28652
14 Signed-off-by: Sven Eden <sven.eden <AT> prydeworx.com>
15 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
16
17 dev-games/ogre/Manifest | 5 +-
18 .../ogre-13.5.3-gentoolize_imgui_inclusion.patch | 27 +++
19 dev-games/ogre/files/ogre-13.5.3-media_path.patch | 12 ++
20 .../ogre/files/ogre-13.5.3-resource_path.patch | 13 ++
21 dev-games/ogre/metadata.xml | 28 +--
22 dev-games/ogre/ogre-13.6.1.ebuild | 198 +++++++++++++++++++++
23 6 files changed, 259 insertions(+), 24 deletions(-)
24
25 diff --git a/dev-games/ogre/Manifest b/dev-games/ogre/Manifest
26 index abe2b0d79948..362251d8f596 100644
27 --- a/dev-games/ogre/Manifest
28 +++ b/dev-games/ogre/Manifest
29 @@ -1,4 +1,3 @@
30 -DIST imgui-1.77.tar.gz 1269147 BLAKE2B be0db9b77903664db0fadf1672ec23983dc89292fd261a1e89c1eab88b82e95de7c2af37eb7ef43cc994b889fdf7d7fb2dd1282b93c1f3b1166c7fe0d2dccaf5 SHA512 d5ebf4bb5e1ce83b226f2e68b3afe0f0abaeb55245fedf754e5453afd8d1df4dac8b5c47fc284c2588b40d05a55fc191b5e55c7be279c5e5e23f7c5b70150546
31 -DIST ogre-1.12.9.tar.gz 125955067 BLAKE2B 5676690d2d9db8c4c903b7bf3e7660ddf5c0675eb11e1b34f08a5a50739d6212e986c7b500173ad5edab4835d96c705f86cc0fd37e1ff1e64a161ab1ce8968df SHA512 a80525a4924a430ccac3f01f93a5f36b4b9d2f7671ef0629d7dd21d3651ea7a698d5cc520eb814c6ee4c0ee7efcd3f6a8f16688773300a25537636bb61eba286
32 +DIST imgui-1.87.tar.gz 1460834 BLAKE2B f73b71400311e7c5f82248e242a932add5090670c78077ca2239f349730bab88a00bfe4deca4e854772ef7f6a2cff1fc0f38f7174a026995f93c9e7b55eb2a1d SHA512 3255b06698ab9c8951953e1e0b6d160d64adfa4c011b21a4288547292a7f8fff586875faf9dae0677818bde65bd7e98da92f16f6beb1e6a66aa835edf32e8ce2
33 DIST ogre-1.9.0.tar.bz2 128098305 BLAKE2B 6e67a5b60a6606a910e099f1c7ba736eb525f079f3aba5cfb362329b9130059d303fc9df6f7b8611c0ba75e1e207fa018e543e93c9f5ce39a6621e4c72ed4a83 SHA512 b1ea93d80ac0978a7c228460a6714f8d17797450efd5af6765c9fa4402e9060a8ef3a700d2757593a3016fdc32276722c8f4a5d9889a3e2eb424f16162a52bde
34 -DIST ogre-2.1.tar.gz 157457252 BLAKE2B 97e83cb93a07de5bd5f4fd778604e6146105e70045a6019f0fcdd7f96fe20f6ad495e19988dcd5e4c4073a0bcdeb5ce2afb06fae6945363c397a882672c80520 SHA512 9802e3bf20ddb09453524d1ddafa7a2083dfd0e609563f478fe31b087dd06d463f69800b9c6485cb3db92d98f282ef67ace3e272c1ef531e982ea9f719617fb5
35 +DIST ogre-13.6.1.tar.gz 91951783 BLAKE2B a345de5b6cb4e7be3c565f77bf7f541684733b21d862a234687ccffcc2b6c0ecf5b0fdd9fd42ddbee11c0e81388aee21d550a7e33550cd46fb17dbccfb6bb7f6 SHA512 c868a171c75adacf5eee54ee6be70faf8d5f8734dc5f1f01cd475faa78d4f9796860cfb20d486f53f20aaca5ea5306795bb5a2e1c5ded2dcb38612d5ca2550b4
36
37 diff --git a/dev-games/ogre/files/ogre-13.5.3-gentoolize_imgui_inclusion.patch b/dev-games/ogre/files/ogre-13.5.3-gentoolize_imgui_inclusion.patch
38 new file mode 100644
39 index 000000000000..13e65963193a
40 --- /dev/null
41 +++ b/dev-games/ogre/files/ogre-13.5.3-gentoolize_imgui_inclusion.patch
42 @@ -0,0 +1,27 @@
43 +--- a/Components/Overlay/CMakeLists.txt 2022-12-13 08:16:21.006454596 +0100
44 ++++ b/Components/Overlay/CMakeLists.txt 2022-12-13 08:16:41.416455669 +0100
45 +@@ -19,14 +19,14 @@
46 + file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
47 +
48 + if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI)
49 +- set(IMGUI_DIR "${PROJECT_BINARY_DIR}/imgui-1.87" CACHE PATH "")
50 ++ set(IMGUI_DIR "${PROJECT_SOURCE_DIR}/imgui-1.87" CACHE PATH "")
51 + if(NOT EXISTS ${IMGUI_DIR})
52 + message(STATUS "Downloading imgui")
53 + file(DOWNLOAD
54 + https://github.com/ocornut/imgui/archive/v1.87.tar.gz
55 +- ${PROJECT_BINARY_DIR}/imgui.tar.gz)
56 ++ ${PROJECT_SOURCE_DIR}/imgui.tar.gz)
57 + execute_process(COMMAND ${CMAKE_COMMAND}
58 +- -E tar xf imgui.tar.gz WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
59 ++ -E tar xf imgui.tar.gz WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
60 + endif()
61 + list(APPEND SOURCE_FILES
62 + ${IMGUI_DIR}/imgui.cpp
63 +@@ -103,4 +103,4 @@
64 + )
65 + install(FILES "${PROJECT_SOURCE_DIR}/Media/packs/profiler.zip"
66 + DESTINATION "${OGRE_MEDIA_PATH}/packs/"
67 +-)
68 +\ No newline at end of file
69 ++)
70
71 diff --git a/dev-games/ogre/files/ogre-13.5.3-media_path.patch b/dev-games/ogre/files/ogre-13.5.3-media_path.patch
72 new file mode 100644
73 index 000000000000..84fd2d871cb8
74 --- /dev/null
75 +++ b/dev-games/ogre/files/ogre-13.5.3-media_path.patch
76 @@ -0,0 +1,12 @@
77 +--- a/CMake/InstallResources.cmake 2022-12-13 07:54:58.845387208 +0100
78 ++++ b/CMake/InstallResources.cmake 2022-12-13 07:56:02.083390532 +0100
79 +@@ -174,9 +174,6 @@
80 +
81 + # CREATE CONFIG FILES - BUILD DIR VERSIONS
82 + if (NOT (APPLE_IOS OR WINDOWS_STORE OR WINDOWS_PHONE))
83 +- set(OGRE_MEDIA_DIR_REL "${PROJECT_SOURCE_DIR}/Samples/Media")
84 +- set(OGRE_CORE_MEDIA_DIR "${PROJECT_SOURCE_DIR}/Media")
85 +- set(OGRE_TEST_MEDIA_DIR_REL "${PROJECT_SOURCE_DIR}/Tests/Media")
86 + else ()
87 + # iOS needs to use relative paths in the config files
88 + set(OGRE_MEDIA_DIR_REL "${OGRE_MEDIA_PATH}")
89
90 diff --git a/dev-games/ogre/files/ogre-13.5.3-resource_path.patch b/dev-games/ogre/files/ogre-13.5.3-resource_path.patch
91 new file mode 100644
92 index 000000000000..3d8bef1f7c64
93 --- /dev/null
94 +++ b/dev-games/ogre/files/ogre-13.5.3-resource_path.patch
95 @@ -0,0 +1,13 @@
96 +These was already configured above, the BINARY paths are wrong!
97 +
98 +--- a/CMake/InstallResources.cmake 2019-11-06 08:12:01.271816772 +0100
99 ++++ b/CMake/InstallResources.cmake 2019-11-06 08:13:15.623814658 +0100
100 +@@ -188,8 +188,6 @@
101 + set(OGRE_PLUGIN_DIR_REL "Contents/Frameworks/")
102 + set(OGRE_SAMPLES_DIR_REL "Contents/Plugins/")
103 + elseif (UNIX)
104 +- set(OGRE_PLUGIN_DIR_REL "${PROJECT_BINARY_DIR}/lib")
105 +- set(OGRE_SAMPLES_DIR_REL "${PROJECT_BINARY_DIR}/lib")
106 + endif ()
107 +
108 + if(OGRE_BUILD_SAMPLES)
109
110 diff --git a/dev-games/ogre/metadata.xml b/dev-games/ogre/metadata.xml
111 index bc396b074590..9ffeae644f30 100644
112 --- a/dev-games/ogre/metadata.xml
113 +++ b/dev-games/ogre/metadata.xml
114 @@ -77,36 +77,23 @@ Exporters
115 * Maya (meshes)
116 </longdescription>
117 <use>
118 - <flag name="assimp" restrict="~dev-games/ogre-1.12.9">Use <pkg>media-libs/assimp</pkg> to import assets from 3D files</flag>
119 + <flag name="assimp" restrict="&gt;dev-games/ogre-13">Use <pkg>media-libs/assimp</pkg> to import assets from 3D files</flag>
120 <flag name="boost">Enable boost support</flag>
121 + <flag name="bullet" restrict="&gt;dev-games/ogre-13">Use <pkg>sci-physics/bullet</pkg> for physics plugin</flag>
122 <flag name="cache">Enable GL state cache support</flag>
123 <flag name="cg">NVIDIA toolkit plugin</flag>
124 <flag name="double-precision">More precise calculations at the expense of speed</flag>
125 <flag name="egl">Use egl instead of glx</flag>
126 - <flag name="deprecated" restrict="~dev-games/ogre-1.12.9">
127 - Build deprecated component 'HLMS' and nodeless positioning of Lights and Cameras.
128 - </flag>
129 - <flag name="fine-granularity" restrict="~dev-games/ogre-2.1">
130 - Enable fine light mask granularity. This impacts on performance and should
131 - not be enabled unless an application really needs it.
132 + <flag name="deprecated" restrict="&gt;dev-games/ogre-13">
133 + Build deprecated nodeless positioning of Lights and Cameras.
134 </flag>
135 <flag name="freeimage">Support images via <pkg>media-libs/freeimage</pkg></flag>
136 - <flag name="gl3plus">Build OpenGL 3+ RenderSystem (EXPERIMENTAL)</flag>
137 - <flag name="gles2" restrict="~dev-games/ogre-1.9.0">Build OpenGL ES 2.x RenderSystem</flag>
138 - <flag name="gles3" restrict="~dev-games/ogre-1.9.0">Enable OpenGL ES 3.x Features</flag>
139 + <flag name="gl3plus">Build OpenGL 3+ RenderSystem</flag>
140 + <flag name="gles2" restrict="&lt;dev-games/ogre-13">Build OpenGL ES 2.x RenderSystem</flag>
141 + <flag name="gles3" restrict="&lt;dev-games/ogre-13">Enable OpenGL ES 3.x Features</flag>
142 <flag name="json">Use <pkg>dev-libs/rapidjson</pkg> (needed by Hlms JSON materials)</flag>
143 - <flag name="legacy-animations">
144 - Use the skeletal animation from 1.x. It's much slower, but the new system
145 - is still experimental.
146 - </flag>
147 <flag name="ois">Pull in Object-oriented Input System library <pkg>dev-games/ois</pkg> for samples</flag>
148 <flag name="poco">When USE=threads, use poco for threading</flag>
149 - <!-- Not yet available? Needs testing! (Note: Shouldn't this be EGL instead of GLES2?)
150 - <flag name="mobile">
151 - Build for OpenGL ES 2.0 only and use the mobile variants of the PBS and
152 - unlit material systems.
153 - </flag>
154 - -->
155 <flag name="resman-pedantic">
156 Resource Manager PEDANTIC : require an explicit resource group. Case
157 sensitive lookup. Some demos might not work with this setting.
158 @@ -120,6 +107,5 @@ Exporters
159 <upstream>
160 <remote-id type="bitbucket">sinbad/ogre</remote-id>
161 <remote-id type="github">OGRECave/ogre</remote-id>
162 - <remote-id type="github">OGRECave/ogre-next</remote-id>
163 </upstream>
164 </pkgmetadata>
165
166 diff --git a/dev-games/ogre/ogre-13.6.1.ebuild b/dev-games/ogre/ogre-13.6.1.ebuild
167 new file mode 100644
168 index 000000000000..0cfe093f3488
169 --- /dev/null
170 +++ b/dev-games/ogre/ogre-13.6.1.ebuild
171 @@ -0,0 +1,198 @@
172 +# Copyright 1999-2023 Gentoo Authors
173 +# Distributed under the terms of the GNU General Public License v2
174 +
175 +EAPI=8
176 +
177 +CMAKE_REMOVE_MODULES_LIST=( FindFreetype FindDoxygen FindZLIB )
178 +inherit cmake
179 +
180 +IMGUI_PN="imgui"
181 +IMGUI_PV="1.87"
182 +IMGUI_P="${IMGUI_PN}-${IMGUI_PV}"
183 +
184 +DESCRIPTION="Object-oriented Graphics Rendering Engine"
185 +HOMEPAGE="https://www.ogre3d.org/"
186 +SRC_URI="https://github.com/OGRECave/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
187 + https://github.com/ocornut/${IMGUI_PN}/archive/v${IMGUI_PV}.tar.gz -> ${IMGUI_P}.tar.gz"
188 +
189 +LICENSE="MIT public-domain"
190 +SLOT="0/13.6"
191 +KEYWORDS="~amd64 ~arm ~x86"
192 +
193 +IUSE="assimp bullet +cache cg debug deprecated doc double-precision egl examples +freeimage
194 + json +opengl pch profile resman-pedantic tools"
195 +
196 +# Note: gles2 USE flag taken out for now, as even the configuration seems to be broken
197 +# ~~sed 2022-12-13 (sven@×××××××××.com)
198 +#
199 +# Note: The following dependencies might be considered for new ebuilds
200 +# + Vulkan SDK: Vulkan RenderSystem, glslang Plugin. Alternatively use system packages <https://vulkan.lunarg.com/>
201 +#
202 +# Note: Without gles2 USE flag, the opengl USE flag is next to useless. But
203 +# there are packages which enforce it, so it has to stay.
204 +#
205 +REQUIRED_USE="
206 + examples? ( opengl )
207 +"
208 +
209 +RESTRICT="test" #139905
210 +
211 +RDEPEND="
212 + dev-games/ois
213 + dev-libs/pugixml
214 + dev-libs/zziplib
215 + media-libs/freetype:2
216 + x11-libs/libX11
217 + x11-libs/libXaw
218 + x11-libs/libXrandr
219 + x11-libs/libXt
220 + assimp? ( media-libs/assimp:= )
221 + bullet? ( sci-physics/bullet:= )
222 + cg? ( media-gfx/nvidia-cg-toolkit )
223 + egl? ( media-libs/mesa[egl(+)] )
224 + freeimage? ( media-libs/freeimage )
225 + json? ( dev-libs/rapidjson )
226 + opengl? (
227 + virtual/glu
228 + virtual/opengl
229 + )
230 + tools? ( dev-libs/tinyxml[stl] )
231 +"
232 +DEPEND="
233 + ${RDEPEND}
234 + x11-base/xorg-proto
235 +"
236 +BDEPEND="
237 + virtual/pkgconfig
238 + doc? ( app-doc/doxygen )
239 +"
240 +
241 +PATCHES=(
242 + "${FILESDIR}"/${PN}-13.5.3-media_path.patch
243 + "${FILESDIR}"/${PN}-13.5.3-resource_path.patch
244 + "${FILESDIR}"/${PN}-13.5.3-gentoolize_imgui_inclusion.patch
245 + "${FILESDIR}"/${PN}-1.10.12-use_system_tinyxml.patch
246 +)
247 +
248 +src_unpack() {
249 + unpack ${P}.tar.gz || die "Unpacking ${P}.zip failed"
250 +
251 + # Ogre includes imgui, but as a manual download done by Components/Overlay/CMakeLists.txt
252 + # That may fail and so we are doing it ourselves.
253 + cd "${S}" || die "Unpack incomplete"
254 + unpack ${IMGUI_P}.tar.gz || die "Unpacking ${IMGUI_P}.zip failed"
255 +}
256 +
257 +src_prepare() {
258 + local broken_png=(
259 + Icon@×××××.png
260 + Default-Portrait~ipad.png
261 + Default-Portrait@2x~ipad.png
262 + Default-Landscape@2x~ipad.png
263 + )
264 +
265 + sed -i \
266 + -e "s:share/doc/OGRE:share/doc/${PF}:" \
267 + Docs/CMakeLists.txt || die
268 + # In this series, the CMAKE_BUILD_TARGET is hard-wired to the
269 + # installation. And only Debug, MinSizeRel and RelWithDebInfo
270 + # are supported.
271 + sed -i \
272 + -e "s/$(usex debug Debug Release)/Gentoo/g" \
273 + CMake/InstallResources.cmake \
274 + CMake/Utils/OgreConfigTargets.cmake \
275 + || die
276 +
277 + # Fix broken png files
278 + einfo "Fixing broken png files."
279 + pushd "${S}"/Samples/Common/misc 1>/dev/null 2>&1
280 + for png in "${broken_png[@]}"; do
281 + pngfix -q --out=out.png ${png}
282 + mv -f out.png "${png}" || die
283 + done
284 + popd 1>/dev/null 2>&1
285 + einfo "done ..."
286 +
287 + # Fix some path issues
288 + cmake_src_prepare
289 +}
290 +
291 +src_configure() {
292 + local mycmakeargs=(
293 + -DCMAKE_SKIP_INSTALL_RPATH=yes
294 + -DOGRE_ASSERT_MODE=1
295 + -DOGRE_BUILD_COMPONENT_BITES=yes
296 + -DOGRE_BUILD_COMPONENT_BULLET=$(usex bullet)
297 + -DOGRE_BUILD_COMPONENT_CSHARP=no
298 + -DOGRE_BUILD_COMPONENT_JAVA=no
299 + -DOGRE_BUILD_COMPONENT_OVERLAY=yes
300 + -DOGRE_BUILD_COMPONENT_OVERLAY_IMGUI=yes
301 + -DOGRE_BUILD_COMPONENT_PAGING=yes
302 + -DOGRE_BUILD_COMPONENT_PROPERTY=yes
303 + -DOGRE_BUILD_COMPONENT_PYTHON=no
304 + -DOGRE_BUILD_COMPONENT_RTSHADERSYSTEM=yes
305 + -DOGRE_BUILD_COMPONENT_TERRAIN=yes
306 + -DOGRE_BUILD_COMPONENT_VOLUME=yes
307 + -DOGRE_BUILD_DEPENDENCIES=no
308 + -DOGRE_BUILD_PLUGIN_ASSIMP=$(usex assimp)
309 + -DOGRE_BUILD_PLUGIN_CG=$(usex cg)
310 + -DOGRE_BUILD_PLUGIN_FREEIMAGE=$(usex freeimage)
311 + -DOGRE_BUILD_PLUGIN_EXRCODEC=no
312 + -DOGRE_BUILD_RENDERSYSTEM_GL=$(usex opengl)
313 + -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=$(usex opengl)
314 + -DOGRE_BUILD_RENDERSYSTEM_GLES2=no
315 + -DOGRE_BUILD_SAMPLES=$(usex examples)
316 + -DOGRE_BUILD_TESTS=no
317 + -DOGRE_BUILD_TOOLS=$(usex tools)
318 + -DOGRE_CONFIG_DOUBLE=$(usex double-precision)
319 + -DOGRE_CONFIG_ENABLE_GL_STATE_CACHE_SUPPORT=$(usex cache)
320 + -DOGRE_CONFIG_ENABLE_GLES2_CG_SUPPORT=no
321 + -DOGRE_CONFIG_ENABLE_GLES3_SUPPORT=no
322 + -DOGRE_CONFIG_THREADS=3
323 + -DOGRE_CONFIG_THREAD_PROVIDER=std
324 + -DOGRE_ENABLE_PRECOMPILED_HEADERS=$(usex pch)
325 + -DOGRE_GLSUPPORT_USE_EGL=$(usex egl)
326 + -DOGRE_INSTALL_DOCS=$(usex doc)
327 + -DOGRE_INSTALL_SAMPLES=$(usex examples)
328 + -DOGRE_NODELESS_POSITIONING=$(usex deprecated)
329 + -DOGRE_PROFILING=$(usex profile)
330 + -DOGRE_RESOURCEMANAGER_STRICT=$(usex resman-pedantic 1 2)
331 + )
332 +
333 + cmake_src_configure
334 +}
335 +
336 +src_compile() {
337 + cmake_src_compile
338 +
339 + if use doc ; then
340 + eninja -C "${BUILD_DIR}" OgreDoc
341 + fi
342 +}
343 +
344 +src_install() {
345 + cmake_src_install
346 +
347 + CONFIGDIR=/etc/OGRE
348 + SHAREDIR=/usr/share/OGRE
349 +
350 + # plugins and resources are the main configuration
351 + insinto "${CONFIGDIR}"
352 + doins "${BUILD_DIR}"/bin/plugins.cfg
353 + doins "${BUILD_DIR}"/bin/resources.cfg
354 + dosym "${CONFIGDIR}"/plugins.cfg "${SHAREDIR}"/plugins.cfg
355 + dosym "${CONFIGDIR}"/resources.cfg "${SHAREDIR}"/resources.cfg
356 +
357 + # These are only for the sample browser
358 + if use examples ; then
359 + insinto "${SHAREDIR}"
360 + doins "${BUILD_DIR}"/bin/samples.cfg
361 + fi
362 +}
363 +
364 +pkg_postinst() {
365 + elog "If you experience crashes when starting /usr/bin/SampleBrowser,"
366 + elog "remove the cache directory at:"
367 + elog " '~/.cache/OGRE Sample Browser'"
368 + elog "first, before filing a bug report."
369 +}