Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-games/ogre/, dev-games/ogre/files/
Date: Tue, 25 Aug 2020 22:00:21
Message-Id: 1598392797.2e8d95ccd9fba724a65aea0dee63ee3752afddcb.chewi@gentoo
1 commit: 2e8d95ccd9fba724a65aea0dee63ee3752afddcb
2 Author: Sven Eden <yamakuzue <AT> gmx <DOT> net>
3 AuthorDate: Wed Apr 29 07:30:45 2020 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 25 21:59:57 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e8d95cc
7
8 dev-games/ogre: Bump to 2.1 - First major 2.1 release
9
10 Changes from the pre-release:
11 * gles2 USE flag is gone, the GLES2 render system is not ported, yet
12 * Added "fine-granularity" USE flag to enable XXXX
13 which has a noticable performance impact.
14 * double-precision USE flag is back in. But if activated, both
15 OGRE_SIMD_NEON and OGRE_SIMD_SSE2 must be disabled, so the
16 performance impact is quite big.
17 * mobile USE flag is gone, this needs further testing. Also I think
18 that building for mobile devices is not really interesting on
19 Gentoo, is it?
20 * Fixed a few warnings and issues, and spoke with upstream about
21 them. ( See: https://github.com/OGRECave/ogre-next/issues/90 )
22 * Fixed a missing include compilation issue and reported it to
23 upstream. ( See: OGRECave/ogre-next#132 )
24
25 Package-Manager: Portage-2.3.101, Repoman-2.3.22
26 Signed-off-by: Sven Eden <yamakuzure <AT> gmx.net>
27 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
28
29 dev-games/ogre/Manifest | 1 +
30 dev-games/ogre/files/ogre-2.1-d1c1116.patch | 62 +++++++++++++++++
31 .../files/ogre-2.1-fix_compilation_issues.patch | 67 ++++++++++++++++++
32 .../ogre/files/ogre-2.1-fix_opengl_search.patch | 12 ++++
33 dev-games/ogre/files/ogre-2.1-fix_warnings.patch | 15 ++++
34 dev-games/ogre/metadata.xml | 13 ++--
35 ...ogre-2.1_pre20191212.ebuild => ogre-2.1.ebuild} | 80 +++++++++++++---------
36 7 files changed, 214 insertions(+), 36 deletions(-)
37
38 diff --git a/dev-games/ogre/Manifest b/dev-games/ogre/Manifest
39 index 32e62fd3783..851d395c412 100644
40 --- a/dev-games/ogre/Manifest
41 +++ b/dev-games/ogre/Manifest
42 @@ -1,3 +1,4 @@
43 DIST imgui-1.76.tar.gz 1256126 BLAKE2B 801e94e1007e41c5b7281bb30fc7da76ddf0e755bf3ec2c4eb90d730dd9c68685f3e4819f32acc2154fbcd4e32da9d1de6dac36b0cd8885a93457475576b4336 SHA512 7f7d7220c6c2805902665747f32ed094e0558d42cafb25a25bd16fed88da3bf8822c55ed92a552f0599f5563909d471aa5763e53c8dd5bf39367c61e39d015aa
44 DIST ogre-1.12.8.tar.gz 125932831 BLAKE2B ffd4a443e374ad3f209b4f8a5e18a41b3dbfbb528d20581f48a4d31447e1e20a3b1cdde588b6345bd07d864c9b72ce1e51374de52523e7c4477408c01778af69 SHA512 c446c58b57874d3e2522f7e0315771b7a9f5ac8888449493a1dad6fc4d30454c57f4f145c2554de110607f3e5d586d6ec91859b8024e7d8bdb821fa6c6c3f2e2
45 DIST ogre-1.9.0.tar.bz2 128098305 BLAKE2B 6e67a5b60a6606a910e099f1c7ba736eb525f079f3aba5cfb362329b9130059d303fc9df6f7b8611c0ba75e1e207fa018e543e93c9f5ce39a6621e4c72ed4a83 SHA512 b1ea93d80ac0978a7c228460a6714f8d17797450efd5af6765c9fa4402e9060a8ef3a700d2757593a3016fdc32276722c8f4a5d9889a3e2eb424f16162a52bde
46 +DIST ogre-2.1.tar.gz 157457252 BLAKE2B 97e83cb93a07de5bd5f4fd778604e6146105e70045a6019f0fcdd7f96fe20f6ad495e19988dcd5e4c4073a0bcdeb5ce2afb06fae6945363c397a882672c80520 SHA512 9802e3bf20ddb09453524d1ddafa7a2083dfd0e609563f478fe31b087dd06d463f69800b9c6485cb3db92d98f282ef67ace3e272c1ef531e982ea9f719617fb5
47
48 diff --git a/dev-games/ogre/files/ogre-2.1-d1c1116.patch b/dev-games/ogre/files/ogre-2.1-d1c1116.patch
49 new file mode 100644
50 index 00000000000..6fbf5ecda4d
51 --- /dev/null
52 +++ b/dev-games/ogre/files/ogre-2.1-d1c1116.patch
53 @@ -0,0 +1,62 @@
54 +From d1c1116924ca537c1f061ed5422dd9a5207d989a Mon Sep 17 00:00:00 2001
55 +From: "Matias N. Goldberg" <dark_sylinc@×××××××××.ar>
56 +Date: Mon, 24 Feb 2020 17:23:25 -0300
57 +Subject: [PATCH] Bugfix: Bone::_getDerivedTransform using uninitialized values
58 + causing asserts to trigger Also prefer using Mathlib::LAST_AFFINE_COLUMN in
59 + ArrayMatrixAf4x3::store
60 +
61 +---
62 + .../include/Math/Array/NEON/Single/OgreArrayMatrixAf4x3.h | 6 +-----
63 + .../include/Math/Array/SSE2/Single/OgreArrayMatrixAf4x3.h | 6 +-----
64 + OgreMain/src/Animation/OgreBone.cpp | 4 ++--
65 + 3 files changed, 4 insertions(+), 12 deletions(-)
66 +
67 +diff --git a/OgreMain/include/Math/Array/NEON/Single/OgreArrayMatrixAf4x3.h b/OgreMain/include/Math/Array/NEON/Single/OgreArrayMatrixAf4x3.h
68 +index 137b7cb5b2..2e2468149d 100644
69 +--- a/OgreMain/include/Math/Array/NEON/Single/OgreArrayMatrixAf4x3.h
70 ++++ b/OgreMain/include/Math/Array/NEON/Single/OgreArrayMatrixAf4x3.h
71 +@@ -217,11 +217,7 @@ namespace Ogre
72 + vst1q_f32( dstPtr, mChunkBase[0] );
73 + vst1q_f32( dstPtr + 4, mChunkBase[1] );
74 + vst1q_f32( dstPtr + 8, mChunkBase[2] );
75 +- dstPtr += 12;
76 +- *dstPtr++ = 0;
77 +- *dstPtr++ = 0;
78 +- *dstPtr++ = 0;
79 +- *dstPtr++ = 1;
80 ++ vst1q_f32( dstPtr + 12, MathlibNEON::LAST_AFFINE_COLUMN );
81 + }
82 +
83 + /// Assumes dst is aligned
84 +diff --git a/OgreMain/include/Math/Array/SSE2/Single/OgreArrayMatrixAf4x3.h b/OgreMain/include/Math/Array/SSE2/Single/OgreArrayMatrixAf4x3.h
85 +index 01b75b2730..a96d9a11e0 100644
86 +--- a/OgreMain/include/Math/Array/SSE2/Single/OgreArrayMatrixAf4x3.h
87 ++++ b/OgreMain/include/Math/Array/SSE2/Single/OgreArrayMatrixAf4x3.h
88 +@@ -217,11 +217,7 @@ namespace Ogre
89 + _mm_store_ps( dstPtr, mChunkBase[0] );
90 + _mm_store_ps( dstPtr + 4, mChunkBase[1] );
91 + _mm_store_ps( dstPtr + 8, mChunkBase[2] );
92 +- dstPtr += 12;
93 +- *dstPtr++ = 0;
94 +- *dstPtr++ = 0;
95 +- *dstPtr++ = 0;
96 +- *dstPtr++ = 1;
97 ++ _mm_store_ps( dstPtr + 12, MathlibSSE2::LAST_AFFINE_COLUMN );
98 + }
99 +
100 + /// Assumes dst is aligned
101 +diff --git a/OgreMain/src/Animation/OgreBone.cpp b/OgreMain/src/Animation/OgreBone.cpp
102 +index 588c6cb442..8735ed2a2f 100644
103 +--- a/OgreMain/src/Animation/OgreBone.cpp
104 ++++ b/OgreMain/src/Animation/OgreBone.cpp
105 +@@ -257,8 +257,8 @@ namespace Ogre {
106 + OGRE_ALIGNED_DECL( Matrix4, localSpaceBone, OGRE_SIMD_ALIGNMENT );
107 + OGRE_ALIGNED_DECL( Matrix4, parentNodeTransform, OGRE_SIMD_ALIGNMENT );
108 +
109 +- mTransform.mDerivedTransform[mTransform.mIndex].store4x3( &localSpaceBone );
110 +- mTransform.mParentNodeTransform[mTransform.mIndex]->store4x3( &parentNodeTransform );
111 ++ mTransform.mDerivedTransform[mTransform.mIndex].store( &localSpaceBone );
112 ++ mTransform.mParentNodeTransform[mTransform.mIndex]->store( &parentNodeTransform );
113 +
114 + parentNodeTransform.concatenateAffine( localSpaceBone );
115 +
116
117 diff --git a/dev-games/ogre/files/ogre-2.1-fix_compilation_issues.patch b/dev-games/ogre/files/ogre-2.1-fix_compilation_issues.patch
118 new file mode 100644
119 index 00000000000..4f2248dd1a3
120 --- /dev/null
121 +++ b/dev-games/ogre/files/ogre-2.1-fix_compilation_issues.patch
122 @@ -0,0 +1,67 @@
123 +--- a/Components/Paging/src/OgreGrid3DPageStrategy.cpp 2020-04-28 09:31:06.301940556 +0200
124 ++++ b/Components/Paging/src/OgreGrid3DPageStrategy.cpp 2020-04-28 09:40:51.777904025 +0200
125 +@@ -367,9 +367,9 @@
126 + {
127 + mat = MaterialManager::getSingleton().create(matName, ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
128 + Pass* pass = mat->getTechnique(0)->getPass(0);
129 +- pass->setLightingEnabled(false);
130 ++ //pass->setLightingEnabled(false);
131 + pass->setVertexColourTracking(TVC_AMBIENT);
132 +- pass->setDepthWriteEnabled(false);
133 ++ //pass->setDepthWriteEnabled(false);
134 + mat->load();
135 + }
136 +
137 +@@ -383,7 +383,7 @@
138 + else
139 + {
140 + mo = p->getParentSection()->getSceneManager()->createManualObject();
141 +- mo->begin(matName, RenderOperation::OT_LINE_STRIP);
142 ++ mo->begin(matName, OperationType::OT_LINE_STRIP);
143 + }
144 +
145 + ColourValue vcol = ColourValue::Green;
146 +--- a/Components/Paging/src/OgreGrid2DPageStrategy.cpp 2020-04-28 09:43:23.119894582 +0200
147 ++++ b/Components/Paging/src/OgreGrid2DPageStrategy.cpp 2020-04-28 09:44:00.844892228 +0200
148 +@@ -405,9 +405,9 @@
149 + {
150 + mat = MaterialManager::getSingleton().create(matName, ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
151 + Pass* pass = mat->getTechnique(0)->getPass(0);
152 +- pass->setLightingEnabled(false);
153 ++ //pass->setLightingEnabled(false);
154 + pass->setVertexColourTracking(TVC_AMBIENT);
155 +- pass->setDepthWriteEnabled(false);
156 ++ //pass->setDepthWriteEnabled(false);
157 + mat->load();
158 + }
159 +
160 +@@ -416,7 +416,7 @@
161 + if (sn->numAttachedObjects() == 0)
162 + {
163 + mo = p->getParentSection()->getSceneManager()->createManualObject();
164 +- mo->begin(matName, RenderOperation::OT_LINE_STRIP);
165 ++ mo->begin(matName, OperationType::OT_LINE_STRIP);
166 + }
167 + else
168 + {
169 +--- a/OgreMain/src/OgrePVRTCCodec.cpp 2020-04-27 20:00:44.816974345 +0200
170 ++++ b/OgreMain/src/OgrePVRTCCodec.cpp 2020-04-27 20:03:49.186962841 +0200
171 +@@ -33,6 +33,7 @@
172 + #include "OgreException.h"
173 + #include "OgreLogManager.h"
174 + #include "OgreBitwise.h"
175 ++#include "OgreDataStream.h"
176 +
177 + #define FOURCC(c0, c1, c2, c3) (c0 | (c1 << 8) | (c2 << 16) | (c3 << 24))
178 + #define PVR_TEXTURE_FLAG_TYPE_MASK 0xff
179 +--- a/OgreMain/src/OgrePlatformInformation.cpp 2020-08-23 17:39:09.971041355 +0200
180 ++++ b/OgreMain/src/OgrePlatformInformation.cpp 2020-08-23 17:40:11.594044907 +0200
181 +@@ -42,7 +42,7 @@
182 + #if OGRE_PLATFORM != OGRE_PLATFORM_WIN32
183 + #if OGRE_PLATFORM == OGRE_PLATFORM_ANDROID
184 + #include <linux/sysctl.h>
185 +- #else
186 ++ #elif OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS
187 + #include <sys/sysctl.h>
188 + #endif
189 + #endif
190
191 diff --git a/dev-games/ogre/files/ogre-2.1-fix_opengl_search.patch b/dev-games/ogre/files/ogre-2.1-fix_opengl_search.patch
192 new file mode 100644
193 index 00000000000..e5a09804407
194 --- /dev/null
195 +++ b/dev-games/ogre/files/ogre-2.1-fix_opengl_search.patch
196 @@ -0,0 +1,12 @@
197 +--- a/CMake/Dependencies.cmake 2020-04-27 15:59:25.005877828 +0200
198 ++++ b/CMake/Dependencies.cmake 2020-04-27 15:59:42.572876732 +0200
199 +@@ -111,6 +111,9 @@
200 + #######################################################################
201 +
202 + # Find OpenGL
203 ++if(POLICY CMP0072)
204 ++ cmake_policy(SET CMP0072 NEW)
205 ++endif()
206 + if(NOT ANDROID AND NOT EMSCRIPTEN)
207 + find_package(OpenGL)
208 + macro_log_feature(OPENGL_FOUND "OpenGL" "Support for the OpenGL render system" "http://www.opengl.org/" FALSE "" "")
209
210 diff --git a/dev-games/ogre/files/ogre-2.1-fix_warnings.patch b/dev-games/ogre/files/ogre-2.1-fix_warnings.patch
211 new file mode 100644
212 index 00000000000..a7668799888
213 --- /dev/null
214 +++ b/dev-games/ogre/files/ogre-2.1-fix_warnings.patch
215 @@ -0,0 +1,15 @@
216 +--- a/Samples/2.0/Tutorials/Tutorial_Terrain/src/Terra/TerrainCell.cpp 2020-04-28 18:10:40.416995414 +0200
217 ++++ b/Samples/2.0/Tutorials/Tutorial_Terrain/src/Terra/TerrainCell.cpp 2020-04-28 18:30:46.074920186 +0200
218 +@@ -133,7 +133,11 @@
219 + gpuPtr[0] = m_verticesPerLine;
220 + gpuPtr[1] = m_lodLevel;
221 + gpuPtr[2] = vao->getPrimitiveCount() / m_verticesPerLine - 2u;
222 +- gpuPtr[3] = *reinterpret_cast<uint32*>( &m_parentTerra->m_skirtSize );
223 ++ /* Triggers: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
224 ++ * gpuPtr[3] = *reinterpret_cast<uint32*>( &m_parentTerra->m_skirtSize );
225 ++ * See: http://zaynar.co.uk/docs/float-aliasing.html
226 ++ */
227 ++ memcpy(&gpuPtr[3], &m_parentTerra->m_skirtSize, sizeof(gpuPtr[3]));
228 +
229 + //ivec4 xzTexPosBounds
230 + ((int32*RESTRICT_ALIAS)gpuPtr)[4] = m_gridX;
231
232 diff --git a/dev-games/ogre/metadata.xml b/dev-games/ogre/metadata.xml
233 index 937478502a0..d793b5753b3 100644
234 --- a/dev-games/ogre/metadata.xml
235 +++ b/dev-games/ogre/metadata.xml
236 @@ -85,13 +85,14 @@ Exporters
237 <flag name="deprecated" restrict="~dev-games/ogre-1.12.6">
238 Build deprecated component 'HLMS' and nodeless positioning of Lights and Cameras.
239 </flag>
240 + <flag name="fine-granularity" restrict="~dev-games/ogre-2.1">
241 + Enable fine light mask granularity. This impacts on performance and should
242 + not be enabled unless an application really needs it.
243 + </flag>
244 <flag name="freeimage">Support images via media-libs/freeimage</flag>
245 <flag name="gl3plus">Build OpenGL 3+ RenderSystem (EXPERIMENTAL)</flag>
246 - <flag name="gles2" restrict="&gt;dev-games/ogre-1.10">
247 - Build OpenGL ES 2.x RenderSystem plus ES 3.x features if available.
248 - </flag>
249 - <flag name="gles2">Build OpenGL ES 2.x RenderSystem</flag>
250 - <flag name="gles3">Enable OpenGL ES 3.x Features</flag>
251 + <flag name="gles2" restrict="~dev-games/ogre-1.9.0">Build OpenGL ES 2.x RenderSystem</flag>
252 + <flag name="gles3" restrict="~dev-games/ogre-1.9.0">Enable OpenGL ES 3.x Features</flag>
253 <flag name="json">Use dev-libs/rapidjson (needed by Hlms JSON materials)</flag>
254 <flag name="legacy-animations">
255 Use the skeletal animation from 1.x. It's much slower, but the new system
256 @@ -99,10 +100,12 @@ Exporters
257 </flag>
258 <flag name="ois">Pull in Object-oriented Input System library dev-games/ois for samples</flag>
259 <flag name="poco">When USE=threads, use poco for threading</flag>
260 + <!-- Not yet available? Needs testing! (Note: Shouldn't this be EGL instead of GLES2?)
261 <flag name="mobile">
262 Build for OpenGL ES 2.0 only and use the mobile variants of the PBS and
263 unlit material systems.
264 </flag>
265 + -->
266 <flag name="resman-pedantic">
267 Resource Manager PEDANTIC : require an explicit resource group. Case
268 sensitive lookup. Some demos might not work with this setting.
269
270 diff --git a/dev-games/ogre/ogre-2.1_pre20191212.ebuild b/dev-games/ogre/ogre-2.1.ebuild
271 similarity index 68%
272 rename from dev-games/ogre/ogre-2.1_pre20191212.ebuild
273 rename to dev-games/ogre/ogre-2.1.ebuild
274 index d4823f71e9b..6b173719ca7 100644
275 --- a/dev-games/ogre/ogre-2.1_pre20191212.ebuild
276 +++ b/dev-games/ogre/ogre-2.1.ebuild
277 @@ -5,30 +5,26 @@ EAPI=7
278
279 CMAKE_REMOVE_MODULES_LIST="FindFreetype FindDoxygen FindZLIB"
280
281 -inherit cmake flag-o-matic git-r3
282 +inherit cmake flag-o-matic
283 +
284 +MY_PN="${PN}-next"
285 +MY_P="${MY_PN}-${PV}"
286
287 DESCRIPTION="Object-oriented Graphics Rendering Engine"
288 HOMEPAGE="https://www.ogre3d.org/"
289 -
290 -EGIT_BRANCH="v2-1"
291 -EGIT_COMMIT="5b682fb90c9e8e660e2fbf92bbf7797a9246700d"
292 -EGIT_REPO_URI="https://github.com/OGRECave/ogre-next.git"
293 -EGIT_SUBMODULES=()
294 +SRC_URI="https://github.com/OGRECave/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
295
296 LICENSE="MIT public-domain"
297 SLOT="0/2.1"
298 KEYWORDS="~amd64"
299
300 -IUSE="+cache debug doc egl examples +freeimage gles2 json
301 - legacy-animations mobile +opengl profile tools"
302 +IUSE="+cache debug doc double-precision egl examples fine-granularity +freeimage json
303 + legacy-animations +opengl profile tools"
304
305 # USE flags that do not work, as their options aren't ported, yet.
306 # cg
307 -# double-precision
308 -
309 -REQUIRED_USE="
310 - || ( gles2 opengl )
311 - mobile? ( egl gles2 !opengl )"
312 +# gles2
313 +# mobile
314
315 RESTRICT="test" #139905
316
317 @@ -42,7 +38,6 @@ RDEPEND="
318 x11-libs/libXt
319 egl? ( media-libs/mesa[egl] )
320 freeimage? ( media-libs/freeimage )
321 - gles2? ( media-libs/mesa[gles2] )
322 json? ( dev-libs/rapidjson )
323 opengl? (
324 virtual/glu
325 @@ -52,6 +47,7 @@ RDEPEND="
326 "
327 # Dependencies for USE flags that do not work, yet.
328 # cg? ( media-gfx/nvidia-cg-toolkit )
329 +# gles2? ( media-libs/mesa[gles2] )
330
331 DEPEND="
332 ${RDEPEND}
333 @@ -67,16 +63,27 @@ PATCHES=(
334 "${FILESDIR}/${PN}-2.1-resource_path.patch"
335 "${FILESDIR}/${PN}-2.1-media_path.patch"
336 "${FILESDIR}/${PN}-2.1-enhance_config_loading.patch"
337 + "${FILESDIR}/${PN}-2.1-fix_opengl_search.patch"
338 + "${FILESDIR}/${PN}-2.1-fix_compilation_issues.patch"
339 + "${FILESDIR}/${PN}-2.1-fix_warnings.patch"
340 + "${FILESDIR}/${PN}-2.1-d1c1116.patch"
341 )
342
343 +S=${WORKDIR}/${MY_P}
344 +
345 src_prepare() {
346 sed -i \
347 -e "s:share/OGRE/docs:share/doc/${PF}:" \
348 Docs/CMakeLists.txt || die
349 - # Stupid build system hardcodes release names
350 +
351 + # In this series, the CMAKE_BUILD_TARGET is hard-wired to the
352 + # installation. And only Release, Debug, MinSizeRel and RelWithDebInfo
353 + # are supported.
354 sed -i \
355 - -e '/CONFIGURATIONS/s:CONFIGURATIONS Release.*::' \
356 - CMake/Utils/OgreConfigTargets.cmake || die
357 + -e "s/$(usex debug Debug Release)/Gentoo/g" \
358 + CMake/InstallResources.cmake \
359 + CMake/Utils/OgreConfigTargets.cmake \
360 + || die
361
362 # Fix some path issues
363 cmake_src_prepare
364 @@ -84,29 +91,26 @@ src_prepare() {
365
366 src_configure() {
367 local mycmakeargs=(
368 - -DOGRE_BUILD_COMPONENT_HLMS_PBS=$( usex mobile no yes)
369 - -DOGRE_BUILD_COMPONENT_HLMS_PBS_MOBILE=$( usex mobile)
370 - -DOGRE_BUILD_COMPONENT_HLMS_UNLIT=$( usex mobile no yes)
371 - -DOGRE_BUILD_COMPONENT_HLMS_UNLIT_MOBILE=$(usex mobile)
372 + -DOGRE_BUILD_COMPONENT_HLMS_PBS=yes
373 + -DOGRE_BUILD_COMPONENT_HLMS_PBS_MOBILE=no
374 + -DOGRE_BUILD_COMPONENT_HLMS_UNLIT=yes
375 + -DOGRE_BUILD_COMPONENT_HLMS_UNLIT_MOBILE=no
376 -DOGRE_BUILD_COMPONENT_PLANAR_REFLECTIONS=yes
377 -DOGRE_BUILD_COMPONENT_SCENE_FORMAT=yes
378 -DOGRE_BUILD_PLATFORM_NACL=no
379 -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=$(usex opengl)
380 - -DOGRE_BUILD_RENDERSYSTEM_GLES=no
381 - -DOGRE_BUILD_RENDERSYSTEM_GLES2=$(usex gles2)
382 + -DOGRE_BUILD_RENDERSYSTEM_GLES2=no
383 -DOGRE_BUILD_SAMPLES2=$(usex examples)
384 - -DOGRE_BUILD_TESTS=no
385 + -DOGRE_BUILD_TESTS=$(usex debug)
386 -DOGRE_BUILD_TOOLS=$(usex tools)
387 -DOGRE_CONFIG_ALLOCATOR=$(usex debug 5 1)
388 - -DOGRE_CONFIG_ENABLE_FINE_LIGHT_MASK_GRANULARITY=yes
389 + -DOGRE_CONFIG_ENABLE_FINE_LIGHT_MASK_GRANULARITY=$(usex fine-granularity)
390 -DOGRE_CONFIG_ENABLE_FREEIMAGE=$(usex freeimage)
391 -DOGRE_CONFIG_ENABLE_GL_STATE_CACHE_SUPPORT=$(usex cache)
392 - -DOGRE_CONFIG_ENABLE_GLES3_SUPPORT=$(\
393 - usex gles2 $(\
394 - usex mobile no yes) no)
395 -DOGRE_CONFIG_ENABLE_JSON=$(usex json)
396 -DOGRE_CONFIG_MEMTRACK_DEBUG=$(usex debug)
397 - -DOGRE_CONFIG_THREADS=2
398 + -DOGRE_CONFIG_MEMTRACK_RELEASE=no
399 + -DOGRE_CONFIG_THREADS=0
400 -DOGRE_CONFIG_THREAD_PROVIDER=std
401 -DOGRE_FULL_RPATH=no
402 -DOGRE_INSTALL_DOCS=$(usex doc)
403 @@ -115,10 +119,17 @@ src_configure() {
404 -DOGRE_LEGACY_ANIMATIONS=$(usex legacy-animations)
405 -DOGRE_PROFILING_PROVIDER=$(usex profile none internal)
406 -DOGRE_USE_BOOST=no
407 + -DOGRE_CONFIG_DOUBLE=$(usex double-precision)
408 + -DOGRE_SIMD_NEON=$(usex double-precision no yes)
409 + -DOGRE_SIMD_SSE2=$(usex double-precision no yes)
410 )
411
412 - # The double-precision mode can not be enabled, yet.
413 - # -DOGRE_CONFIG_DOUBLE=$(usex double-precision)
414 + # GLES2 is not supported, yet
415 + # -DOGRE_BUILD_COMPONENT_HLMS_PBS=$( usex mobile no yes)
416 + # -DOGRE_BUILD_COMPONENT_HLMS_PBS_MOBILE=$( usex mobile)
417 + # -DOGRE_BUILD_COMPONENT_HLMS_UNLIT=$( usex mobile no yes)
418 + # -DOGRE_BUILD_COMPONENT_HLMS_UNLIT_MOBILE=$(usex mobile)
419 + # -DOGRE_BUILD_RENDERSYSTEM_GLES2=$(usex gles2)
420
421 # The CgFxScriptLoader doesn't seem to be completely ported, yet.
422 # USE flag disabled.
423 @@ -139,6 +150,13 @@ src_configure() {
424 -DOGRE_BUILD_COMPONENT_VOLUME=no
425 )
426
427 + # In Release builds the system moans about unknown flags. Lets help!
428 + if use debug; then
429 + append-flags -DOGRE_DEBUG_MODE=1 -DDEBUG=1 -D_DEBUG=1
430 + else
431 + append-flags -DOGRE_DEBUG_MODE=0
432 + fi
433 +
434 # Take out the warning about deprecated copy, as Ogre emits thousands of
435 # those. But using a deprecated way of doing things isn't an error and
436 # mainly of interest for developers.