commit:     2e8d95ccd9fba724a65aea0dee63ee3752afddcb
Author:     Sven Eden <yamakuzue <AT> gmx <DOT> net>
AuthorDate: Wed Apr 29 07:30:45 2020 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue Aug 25 21:59:57 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e8d95cc

dev-games/ogre: Bump to 2.1 - First major 2.1 release

Changes from the pre-release:
 * gles2 USE flag is gone, the GLES2 render system is not ported, yet
 * Added "fine-granularity" USE flag to enable XXXX
   which has a noticable performance impact.
 * double-precision USE flag is back in. But if activated, both
   OGRE_SIMD_NEON and OGRE_SIMD_SSE2 must be disabled, so the
   performance impact is quite big.
 * mobile USE flag is gone, this needs further testing. Also I think
   that building for mobile devices is not really interesting on
   Gentoo, is it?
 * Fixed a few warnings and issues, and spoke with upstream about
   them. ( See: https://github.com/OGRECave/ogre-next/issues/90 )
 * Fixed a missing include compilation issue and reported it to
   upstream. ( See: OGRECave/ogre-next#132 )

Package-Manager: Portage-2.3.101, Repoman-2.3.22
Signed-off-by: Sven Eden <yamakuzure <AT> gmx.net>
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 dev-games/ogre/Manifest                            |  1 +
 dev-games/ogre/files/ogre-2.1-d1c1116.patch        | 62 +++++++++++++++++
 .../files/ogre-2.1-fix_compilation_issues.patch    | 67 ++++++++++++++++++
 .../ogre/files/ogre-2.1-fix_opengl_search.patch    | 12 ++++
 dev-games/ogre/files/ogre-2.1-fix_warnings.patch   | 15 ++++
 dev-games/ogre/metadata.xml                        | 13 ++--
 ...ogre-2.1_pre20191212.ebuild => ogre-2.1.ebuild} | 80 +++++++++++++---------
 7 files changed, 214 insertions(+), 36 deletions(-)

diff --git a/dev-games/ogre/Manifest b/dev-games/ogre/Manifest
index 32e62fd3783..851d395c412 100644
--- a/dev-games/ogre/Manifest
+++ b/dev-games/ogre/Manifest
@@ -1,3 +1,4 @@
 DIST imgui-1.76.tar.gz 1256126 BLAKE2B 
801e94e1007e41c5b7281bb30fc7da76ddf0e755bf3ec2c4eb90d730dd9c68685f3e4819f32acc2154fbcd4e32da9d1de6dac36b0cd8885a93457475576b4336
 SHA512 
7f7d7220c6c2805902665747f32ed094e0558d42cafb25a25bd16fed88da3bf8822c55ed92a552f0599f5563909d471aa5763e53c8dd5bf39367c61e39d015aa
 DIST ogre-1.12.8.tar.gz 125932831 BLAKE2B 
ffd4a443e374ad3f209b4f8a5e18a41b3dbfbb528d20581f48a4d31447e1e20a3b1cdde588b6345bd07d864c9b72ce1e51374de52523e7c4477408c01778af69
 SHA512 
c446c58b57874d3e2522f7e0315771b7a9f5ac8888449493a1dad6fc4d30454c57f4f145c2554de110607f3e5d586d6ec91859b8024e7d8bdb821fa6c6c3f2e2
 DIST ogre-1.9.0.tar.bz2 128098305 BLAKE2B 
6e67a5b60a6606a910e099f1c7ba736eb525f079f3aba5cfb362329b9130059d303fc9df6f7b8611c0ba75e1e207fa018e543e93c9f5ce39a6621e4c72ed4a83
 SHA512 
b1ea93d80ac0978a7c228460a6714f8d17797450efd5af6765c9fa4402e9060a8ef3a700d2757593a3016fdc32276722c8f4a5d9889a3e2eb424f16162a52bde
+DIST ogre-2.1.tar.gz 157457252 BLAKE2B 
97e83cb93a07de5bd5f4fd778604e6146105e70045a6019f0fcdd7f96fe20f6ad495e19988dcd5e4c4073a0bcdeb5ce2afb06fae6945363c397a882672c80520
 SHA512 
9802e3bf20ddb09453524d1ddafa7a2083dfd0e609563f478fe31b087dd06d463f69800b9c6485cb3db92d98f282ef67ace3e272c1ef531e982ea9f719617fb5

diff --git a/dev-games/ogre/files/ogre-2.1-d1c1116.patch 
b/dev-games/ogre/files/ogre-2.1-d1c1116.patch
new file mode 100644
index 00000000000..6fbf5ecda4d
--- /dev/null
+++ b/dev-games/ogre/files/ogre-2.1-d1c1116.patch
@@ -0,0 +1,62 @@
+From d1c1116924ca537c1f061ed5422dd9a5207d989a Mon Sep 17 00:00:00 2001
+From: "Matias N. Goldberg" <[email protected]>
+Date: Mon, 24 Feb 2020 17:23:25 -0300
+Subject: [PATCH] Bugfix: Bone::_getDerivedTransform using uninitialized values
+ causing asserts to trigger Also prefer using Mathlib::LAST_AFFINE_COLUMN in
+ ArrayMatrixAf4x3::store
+
+---
+ .../include/Math/Array/NEON/Single/OgreArrayMatrixAf4x3.h   | 6 +-----
+ .../include/Math/Array/SSE2/Single/OgreArrayMatrixAf4x3.h   | 6 +-----
+ OgreMain/src/Animation/OgreBone.cpp                         | 4 ++--
+ 3 files changed, 4 insertions(+), 12 deletions(-)
+
+diff --git a/OgreMain/include/Math/Array/NEON/Single/OgreArrayMatrixAf4x3.h 
b/OgreMain/include/Math/Array/NEON/Single/OgreArrayMatrixAf4x3.h
+index 137b7cb5b2..2e2468149d 100644
+--- a/OgreMain/include/Math/Array/NEON/Single/OgreArrayMatrixAf4x3.h
++++ b/OgreMain/include/Math/Array/NEON/Single/OgreArrayMatrixAf4x3.h
+@@ -217,11 +217,7 @@ namespace Ogre
+             vst1q_f32( dstPtr, mChunkBase[0] );
+             vst1q_f32( dstPtr + 4, mChunkBase[1] );
+             vst1q_f32( dstPtr + 8, mChunkBase[2] );
+-            dstPtr += 12;
+-            *dstPtr++ = 0;
+-            *dstPtr++ = 0;
+-            *dstPtr++ = 0;
+-            *dstPtr++ = 1;
++            vst1q_f32( dstPtr + 12, MathlibNEON::LAST_AFFINE_COLUMN );
+         }
+ 
+         /// Assumes dst is aligned
+diff --git a/OgreMain/include/Math/Array/SSE2/Single/OgreArrayMatrixAf4x3.h 
b/OgreMain/include/Math/Array/SSE2/Single/OgreArrayMatrixAf4x3.h
+index 01b75b2730..a96d9a11e0 100644
+--- a/OgreMain/include/Math/Array/SSE2/Single/OgreArrayMatrixAf4x3.h
++++ b/OgreMain/include/Math/Array/SSE2/Single/OgreArrayMatrixAf4x3.h
+@@ -217,11 +217,7 @@ namespace Ogre
+             _mm_store_ps( dstPtr, mChunkBase[0] );
+             _mm_store_ps( dstPtr + 4, mChunkBase[1] );
+             _mm_store_ps( dstPtr + 8, mChunkBase[2] );
+-            dstPtr += 12;
+-            *dstPtr++ = 0;
+-            *dstPtr++ = 0;
+-            *dstPtr++ = 0;
+-            *dstPtr++ = 1;
++            _mm_store_ps( dstPtr + 12, MathlibSSE2::LAST_AFFINE_COLUMN );
+         }
+ 
+         /// Assumes dst is aligned
+diff --git a/OgreMain/src/Animation/OgreBone.cpp 
b/OgreMain/src/Animation/OgreBone.cpp
+index 588c6cb442..8735ed2a2f 100644
+--- a/OgreMain/src/Animation/OgreBone.cpp
++++ b/OgreMain/src/Animation/OgreBone.cpp
+@@ -257,8 +257,8 @@ namespace Ogre {
+         OGRE_ALIGNED_DECL( Matrix4, localSpaceBone, OGRE_SIMD_ALIGNMENT );
+         OGRE_ALIGNED_DECL( Matrix4, parentNodeTransform, OGRE_SIMD_ALIGNMENT 
);
+ 
+-        mTransform.mDerivedTransform[mTransform.mIndex].store4x3( 
&localSpaceBone );
+-        mTransform.mParentNodeTransform[mTransform.mIndex]->store4x3( 
&parentNodeTransform );
++        mTransform.mDerivedTransform[mTransform.mIndex].store( 
&localSpaceBone );
++        mTransform.mParentNodeTransform[mTransform.mIndex]->store( 
&parentNodeTransform );
+ 
+         parentNodeTransform.concatenateAffine( localSpaceBone );
+ 

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
new file mode 100644
index 00000000000..4f2248dd1a3
--- /dev/null
+++ b/dev-games/ogre/files/ogre-2.1-fix_compilation_issues.patch
@@ -0,0 +1,67 @@
+--- a/Components/Paging/src/OgreGrid3DPageStrategy.cpp 2020-04-28 
09:31:06.301940556 +0200
++++ b/Components/Paging/src/OgreGrid3DPageStrategy.cpp 2020-04-28 
09:40:51.777904025 +0200
+@@ -367,9 +367,9 @@
+             {
+                 mat = MaterialManager::getSingleton().create(matName, 
ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
+                 Pass* pass = mat->getTechnique(0)->getPass(0);
+-                pass->setLightingEnabled(false);
++                //pass->setLightingEnabled(false);
+                 pass->setVertexColourTracking(TVC_AMBIENT);
+-                pass->setDepthWriteEnabled(false);
++                //pass->setDepthWriteEnabled(false);
+                 mat->load();
+             }
+ 
+@@ -383,7 +383,7 @@
+             else
+             {
+                 mo = 
p->getParentSection()->getSceneManager()->createManualObject();
+-                mo->begin(matName, RenderOperation::OT_LINE_STRIP);
++                mo->begin(matName, OperationType::OT_LINE_STRIP);
+             }
+ 
+             ColourValue vcol = ColourValue::Green;
+--- a/Components/Paging/src/OgreGrid2DPageStrategy.cpp 2020-04-28 
09:43:23.119894582 +0200
++++ b/Components/Paging/src/OgreGrid2DPageStrategy.cpp 2020-04-28 
09:44:00.844892228 +0200
+@@ -405,9 +405,9 @@
+             {
+                 mat = MaterialManager::getSingleton().create(matName, 
ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
+                 Pass* pass = mat->getTechnique(0)->getPass(0);
+-                pass->setLightingEnabled(false);
++                //pass->setLightingEnabled(false);
+                 pass->setVertexColourTracking(TVC_AMBIENT);
+-                pass->setDepthWriteEnabled(false);
++                //pass->setDepthWriteEnabled(false);
+                 mat->load();
+             }
+ 
+@@ -416,7 +416,7 @@
+             if (sn->numAttachedObjects() == 0)
+             {
+                 mo = 
p->getParentSection()->getSceneManager()->createManualObject();
+-                mo->begin(matName, RenderOperation::OT_LINE_STRIP);
++                mo->begin(matName, OperationType::OT_LINE_STRIP);
+             }
+             else
+             {
+--- a/OgreMain/src/OgrePVRTCCodec.cpp  2020-04-27 20:00:44.816974345 +0200
++++ b/OgreMain/src/OgrePVRTCCodec.cpp  2020-04-27 20:03:49.186962841 +0200
+@@ -33,6 +33,7 @@
+ #include "OgreException.h"
+ #include "OgreLogManager.h"
+ #include "OgreBitwise.h"
++#include "OgreDataStream.h"
+ 
+ #define FOURCC(c0, c1, c2, c3) (c0 | (c1 << 8) | (c2 << 16) | (c3 << 24))
+ #define PVR_TEXTURE_FLAG_TYPE_MASK  0xff
+--- a/OgreMain/src/OgrePlatformInformation.cpp 2020-08-23 17:39:09.971041355 
+0200
++++ b/OgreMain/src/OgrePlatformInformation.cpp 2020-08-23 17:40:11.594044907 
+0200
+@@ -42,7 +42,7 @@
+ #if OGRE_PLATFORM != OGRE_PLATFORM_WIN32
+     #if OGRE_PLATFORM == OGRE_PLATFORM_ANDROID
+         #include <linux/sysctl.h>
+-    #else
++    #elif OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == 
OGRE_PLATFORM_APPLE_IOS
+         #include <sys/sysctl.h>
+     #endif
+ #endif

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
new file mode 100644
index 00000000000..e5a09804407
--- /dev/null
+++ b/dev-games/ogre/files/ogre-2.1-fix_opengl_search.patch
@@ -0,0 +1,12 @@
+--- a/CMake/Dependencies.cmake 2020-04-27 15:59:25.005877828 +0200
++++ b/CMake/Dependencies.cmake 2020-04-27 15:59:42.572876732 +0200
+@@ -111,6 +111,9 @@
+ #######################################################################
+ 
+ # Find OpenGL
++if(POLICY CMP0072)
++  cmake_policy(SET CMP0072 NEW)
++endif()
+ if(NOT ANDROID AND NOT EMSCRIPTEN)
+   find_package(OpenGL)
+   macro_log_feature(OPENGL_FOUND "OpenGL" "Support for the OpenGL render 
system" "http://www.opengl.org/"; FALSE "" "")

diff --git a/dev-games/ogre/files/ogre-2.1-fix_warnings.patch 
b/dev-games/ogre/files/ogre-2.1-fix_warnings.patch
new file mode 100644
index 00000000000..a7668799888
--- /dev/null
+++ b/dev-games/ogre/files/ogre-2.1-fix_warnings.patch
@@ -0,0 +1,15 @@
+--- a/Samples/2.0/Tutorials/Tutorial_Terrain/src/Terra/TerrainCell.cpp 
2020-04-28 18:10:40.416995414 +0200
++++ b/Samples/2.0/Tutorials/Tutorial_Terrain/src/Terra/TerrainCell.cpp 
2020-04-28 18:30:46.074920186 +0200
+@@ -133,7 +133,11 @@
+         gpuPtr[0] = m_verticesPerLine;
+         gpuPtr[1] = m_lodLevel;
+         gpuPtr[2] = vao->getPrimitiveCount() / m_verticesPerLine - 2u;
+-        gpuPtr[3] = *reinterpret_cast<uint32*>( &m_parentTerra->m_skirtSize );
++      /* Triggers: warning: dereferencing type-punned pointer will break 
strict-aliasing rules [-Wstrict-aliasing]
++         * gpuPtr[3] = *reinterpret_cast<uint32*>( 
&m_parentTerra->m_skirtSize );
++       * See: http://zaynar.co.uk/docs/float-aliasing.html
++       */
++      memcpy(&gpuPtr[3], &m_parentTerra->m_skirtSize, sizeof(gpuPtr[3]));
+ 
+         //ivec4 xzTexPosBounds
+         ((int32*RESTRICT_ALIAS)gpuPtr)[4] = m_gridX;

diff --git a/dev-games/ogre/metadata.xml b/dev-games/ogre/metadata.xml
index 937478502a0..d793b5753b3 100644
--- a/dev-games/ogre/metadata.xml
+++ b/dev-games/ogre/metadata.xml
@@ -85,13 +85,14 @@ Exporters
     <flag name="deprecated" restrict="~dev-games/ogre-1.12.6">
         Build deprecated component 'HLMS' and nodeless positioning of Lights 
and Cameras.
     </flag>
+    <flag name="fine-granularity" restrict="~dev-games/ogre-2.1">
+        Enable fine light mask granularity. This impacts on performance and 
should
+        not be enabled unless an application really needs it.
+    </flag>
     <flag name="freeimage">Support images via media-libs/freeimage</flag>
     <flag name="gl3plus">Build OpenGL 3+ RenderSystem (EXPERIMENTAL)</flag>
-    <flag name="gles2" restrict="&gt;dev-games/ogre-1.10">
-        Build OpenGL ES 2.x RenderSystem plus ES 3.x features if available.
-    </flag>
-    <flag name="gles2">Build OpenGL ES 2.x RenderSystem</flag>
-    <flag name="gles3">Enable OpenGL ES 3.x Features</flag>
+    <flag name="gles2" restrict="~dev-games/ogre-1.9.0">Build OpenGL ES 2.x 
RenderSystem</flag>
+    <flag name="gles3" restrict="~dev-games/ogre-1.9.0">Enable OpenGL ES 3.x 
Features</flag>
     <flag name="json">Use dev-libs/rapidjson (needed by Hlms JSON 
materials)</flag>
     <flag name="legacy-animations">
         Use the skeletal animation from 1.x. It's much slower, but the new 
system
@@ -99,10 +100,12 @@ Exporters
     </flag>
     <flag name="ois">Pull in Object-oriented Input System library 
dev-games/ois for samples</flag>
     <flag name="poco">When USE=threads, use poco for threading</flag>
+    <!-- Not yet available? Needs testing! (Note: Shouldn't this be EGL 
instead of GLES2?)
     <flag name="mobile">
         Build for OpenGL ES 2.0 only and use the mobile variants of the PBS and
         unlit material systems.
     </flag>
+    -->
     <flag name="resman-pedantic">
         Resource Manager PEDANTIC : require an explicit resource group. Case
         sensitive lookup. Some demos might not work with this setting.

diff --git a/dev-games/ogre/ogre-2.1_pre20191212.ebuild 
b/dev-games/ogre/ogre-2.1.ebuild
similarity index 68%
rename from dev-games/ogre/ogre-2.1_pre20191212.ebuild
rename to dev-games/ogre/ogre-2.1.ebuild
index d4823f71e9b..6b173719ca7 100644
--- a/dev-games/ogre/ogre-2.1_pre20191212.ebuild
+++ b/dev-games/ogre/ogre-2.1.ebuild
@@ -5,30 +5,26 @@ EAPI=7
 
 CMAKE_REMOVE_MODULES_LIST="FindFreetype FindDoxygen FindZLIB"
 
-inherit cmake flag-o-matic git-r3
+inherit cmake flag-o-matic
+
+MY_PN="${PN}-next"
+MY_P="${MY_PN}-${PV}"
 
 DESCRIPTION="Object-oriented Graphics Rendering Engine"
 HOMEPAGE="https://www.ogre3d.org/";
-
-EGIT_BRANCH="v2-1"
-EGIT_COMMIT="5b682fb90c9e8e660e2fbf92bbf7797a9246700d"
-EGIT_REPO_URI="https://github.com/OGRECave/ogre-next.git";
-EGIT_SUBMODULES=()
+SRC_URI="https://github.com/OGRECave/${MY_PN}/archive/${PV}.tar.gz -> 
${P}.tar.gz"
 
 LICENSE="MIT public-domain"
 SLOT="0/2.1"
 KEYWORDS="~amd64"
 
-IUSE="+cache debug doc egl examples +freeimage gles2 json
-       legacy-animations mobile +opengl profile tools"
+IUSE="+cache debug doc double-precision egl examples fine-granularity 
+freeimage json
+       legacy-animations +opengl profile tools"
 
 # USE flags that do not work, as their options aren't ported, yet.
 #      cg
-#      double-precision
-
-REQUIRED_USE="
-       || ( gles2 opengl )
-       mobile? ( egl gles2 !opengl )"
+#      gles2
+#      mobile
 
 RESTRICT="test" #139905
 
@@ -42,7 +38,6 @@ RDEPEND="
        x11-libs/libXt
        egl? ( media-libs/mesa[egl] )
        freeimage? ( media-libs/freeimage )
-       gles2? ( media-libs/mesa[gles2] )
        json? ( dev-libs/rapidjson )
        opengl? (
                virtual/glu
@@ -52,6 +47,7 @@ RDEPEND="
 "
 # Dependencies for USE flags that do not work, yet.
 #      cg? ( media-gfx/nvidia-cg-toolkit )
+#      gles2? ( media-libs/mesa[gles2] )
 
 DEPEND="
        ${RDEPEND}
@@ -67,16 +63,27 @@ PATCHES=(
        "${FILESDIR}/${PN}-2.1-resource_path.patch"
        "${FILESDIR}/${PN}-2.1-media_path.patch"
        "${FILESDIR}/${PN}-2.1-enhance_config_loading.patch"
+       "${FILESDIR}/${PN}-2.1-fix_opengl_search.patch"
+       "${FILESDIR}/${PN}-2.1-fix_compilation_issues.patch"
+       "${FILESDIR}/${PN}-2.1-fix_warnings.patch"
+       "${FILESDIR}/${PN}-2.1-d1c1116.patch"
 )
 
+S=${WORKDIR}/${MY_P}
+
 src_prepare() {
        sed -i \
                -e "s:share/OGRE/docs:share/doc/${PF}:" \
                Docs/CMakeLists.txt || die
-       # Stupid build system hardcodes release names
+
+       # In this series, the CMAKE_BUILD_TARGET is hard-wired to the
+       # installation. And only Release, Debug, MinSizeRel and RelWithDebInfo
+       # are supported.
        sed -i \
-               -e '/CONFIGURATIONS/s:CONFIGURATIONS Release.*::' \
-               CMake/Utils/OgreConfigTargets.cmake || die
+               -e "s/$(usex debug Debug Release)/Gentoo/g" \
+               CMake/InstallResources.cmake \
+               CMake/Utils/OgreConfigTargets.cmake \
+               || die
 
        # Fix some path issues
        cmake_src_prepare
@@ -84,29 +91,26 @@ src_prepare() {
 
 src_configure() {
        local mycmakeargs=(
-               -DOGRE_BUILD_COMPONENT_HLMS_PBS=$(         usex mobile no yes)
-               -DOGRE_BUILD_COMPONENT_HLMS_PBS_MOBILE=$(  usex mobile)
-               -DOGRE_BUILD_COMPONENT_HLMS_UNLIT=$(       usex mobile no yes)
-               -DOGRE_BUILD_COMPONENT_HLMS_UNLIT_MOBILE=$(usex mobile)
+               -DOGRE_BUILD_COMPONENT_HLMS_PBS=yes
+               -DOGRE_BUILD_COMPONENT_HLMS_PBS_MOBILE=no
+               -DOGRE_BUILD_COMPONENT_HLMS_UNLIT=yes
+               -DOGRE_BUILD_COMPONENT_HLMS_UNLIT_MOBILE=no
                -DOGRE_BUILD_COMPONENT_PLANAR_REFLECTIONS=yes
                -DOGRE_BUILD_COMPONENT_SCENE_FORMAT=yes
                -DOGRE_BUILD_PLATFORM_NACL=no
                -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=$(usex opengl)
-               -DOGRE_BUILD_RENDERSYSTEM_GLES=no
-               -DOGRE_BUILD_RENDERSYSTEM_GLES2=$(usex gles2)
+               -DOGRE_BUILD_RENDERSYSTEM_GLES2=no
                -DOGRE_BUILD_SAMPLES2=$(usex examples)
-               -DOGRE_BUILD_TESTS=no
+               -DOGRE_BUILD_TESTS=$(usex debug)
                -DOGRE_BUILD_TOOLS=$(usex tools)
                -DOGRE_CONFIG_ALLOCATOR=$(usex debug 5 1)
-               -DOGRE_CONFIG_ENABLE_FINE_LIGHT_MASK_GRANULARITY=yes
+               -DOGRE_CONFIG_ENABLE_FINE_LIGHT_MASK_GRANULARITY=$(usex 
fine-granularity)
                -DOGRE_CONFIG_ENABLE_FREEIMAGE=$(usex freeimage)
                -DOGRE_CONFIG_ENABLE_GL_STATE_CACHE_SUPPORT=$(usex cache)
-               -DOGRE_CONFIG_ENABLE_GLES3_SUPPORT=$(\
-                       usex gles2 $(\
-                       usex mobile no yes) no)
                -DOGRE_CONFIG_ENABLE_JSON=$(usex json)
                -DOGRE_CONFIG_MEMTRACK_DEBUG=$(usex debug)
-               -DOGRE_CONFIG_THREADS=2
+               -DOGRE_CONFIG_MEMTRACK_RELEASE=no
+               -DOGRE_CONFIG_THREADS=0
                -DOGRE_CONFIG_THREAD_PROVIDER=std
                -DOGRE_FULL_RPATH=no
                -DOGRE_INSTALL_DOCS=$(usex doc)
@@ -115,10 +119,17 @@ src_configure() {
                -DOGRE_LEGACY_ANIMATIONS=$(usex legacy-animations)
                -DOGRE_PROFILING_PROVIDER=$(usex profile none internal)
                -DOGRE_USE_BOOST=no
+               -DOGRE_CONFIG_DOUBLE=$(usex double-precision)
+               -DOGRE_SIMD_NEON=$(usex double-precision no yes)
+               -DOGRE_SIMD_SSE2=$(usex double-precision no yes)
        )
 
-       # The double-precision mode can not be enabled, yet.
-       #       -DOGRE_CONFIG_DOUBLE=$(usex double-precision)
+       # GLES2 is not supported, yet
+       #       -DOGRE_BUILD_COMPONENT_HLMS_PBS=$(         usex mobile no yes)
+       #       -DOGRE_BUILD_COMPONENT_HLMS_PBS_MOBILE=$(  usex mobile)
+       #       -DOGRE_BUILD_COMPONENT_HLMS_UNLIT=$(       usex mobile no yes)
+       #       -DOGRE_BUILD_COMPONENT_HLMS_UNLIT_MOBILE=$(usex mobile)
+       #       -DOGRE_BUILD_RENDERSYSTEM_GLES2=$(usex gles2)
 
        # The CgFxScriptLoader doesn't seem to be completely ported, yet.
        # USE flag disabled.
@@ -139,6 +150,13 @@ src_configure() {
                -DOGRE_BUILD_COMPONENT_VOLUME=no
        )
 
+       # In Release builds the system moans about unknown flags. Lets help!
+       if use debug; then
+               append-flags -DOGRE_DEBUG_MODE=1 -DDEBUG=1 -D_DEBUG=1
+       else
+               append-flags -DOGRE_DEBUG_MODE=0
+       fi
+
        # Take out the warning about deprecated copy, as Ogre emits thousands of
        # those. But using a deprecated way of doing things isn't an error and
        # mainly of interest for developers.

Reply via email to