commit:     7f9cae11a9f1f4ede5fba3603e2f4f48b4f01b1d
Author:     Sven Eden <sven.eden <AT> prydeworx <DOT> com>
AuthorDate: Fri Jan 27 07:13:40 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun Jan 29 13:34:07 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f9cae11

dev-games/ogre: Bump to 13.6.1

Bump Stable OGRE to the current stable release v13.6.1

Closes: https://bugs.gentoo.org/885733
Closes: https://github.com/gentoo/gentoo/pull/28652
Signed-off-by: Sven Eden <sven.eden <AT> prydeworx.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-games/ogre/Manifest                            |   5 +-
 .../ogre-13.5.3-gentoolize_imgui_inclusion.patch   |  27 +++
 dev-games/ogre/files/ogre-13.5.3-media_path.patch  |  12 ++
 .../ogre/files/ogre-13.5.3-resource_path.patch     |  13 ++
 dev-games/ogre/metadata.xml                        |  28 +--
 dev-games/ogre/ogre-13.6.1.ebuild                  | 198 +++++++++++++++++++++
 6 files changed, 259 insertions(+), 24 deletions(-)

diff --git a/dev-games/ogre/Manifest b/dev-games/ogre/Manifest
index abe2b0d79948..362251d8f596 100644
--- a/dev-games/ogre/Manifest
+++ b/dev-games/ogre/Manifest
@@ -1,4 +1,3 @@
-DIST imgui-1.77.tar.gz 1269147 BLAKE2B 
be0db9b77903664db0fadf1672ec23983dc89292fd261a1e89c1eab88b82e95de7c2af37eb7ef43cc994b889fdf7d7fb2dd1282b93c1f3b1166c7fe0d2dccaf5
 SHA512 
d5ebf4bb5e1ce83b226f2e68b3afe0f0abaeb55245fedf754e5453afd8d1df4dac8b5c47fc284c2588b40d05a55fc191b5e55c7be279c5e5e23f7c5b70150546
-DIST ogre-1.12.9.tar.gz 125955067 BLAKE2B 
5676690d2d9db8c4c903b7bf3e7660ddf5c0675eb11e1b34f08a5a50739d6212e986c7b500173ad5edab4835d96c705f86cc0fd37e1ff1e64a161ab1ce8968df
 SHA512 
a80525a4924a430ccac3f01f93a5f36b4b9d2f7671ef0629d7dd21d3651ea7a698d5cc520eb814c6ee4c0ee7efcd3f6a8f16688773300a25537636bb61eba286
+DIST imgui-1.87.tar.gz 1460834 BLAKE2B 
f73b71400311e7c5f82248e242a932add5090670c78077ca2239f349730bab88a00bfe4deca4e854772ef7f6a2cff1fc0f38f7174a026995f93c9e7b55eb2a1d
 SHA512 
3255b06698ab9c8951953e1e0b6d160d64adfa4c011b21a4288547292a7f8fff586875faf9dae0677818bde65bd7e98da92f16f6beb1e6a66aa835edf32e8ce2
 DIST ogre-1.9.0.tar.bz2 128098305 BLAKE2B 
6e67a5b60a6606a910e099f1c7ba736eb525f079f3aba5cfb362329b9130059d303fc9df6f7b8611c0ba75e1e207fa018e543e93c9f5ce39a6621e4c72ed4a83
 SHA512 
b1ea93d80ac0978a7c228460a6714f8d17797450efd5af6765c9fa4402e9060a8ef3a700d2757593a3016fdc32276722c8f4a5d9889a3e2eb424f16162a52bde
-DIST ogre-2.1.tar.gz 157457252 BLAKE2B 
97e83cb93a07de5bd5f4fd778604e6146105e70045a6019f0fcdd7f96fe20f6ad495e19988dcd5e4c4073a0bcdeb5ce2afb06fae6945363c397a882672c80520
 SHA512 
9802e3bf20ddb09453524d1ddafa7a2083dfd0e609563f478fe31b087dd06d463f69800b9c6485cb3db92d98f282ef67ace3e272c1ef531e982ea9f719617fb5
+DIST ogre-13.6.1.tar.gz 91951783 BLAKE2B 
a345de5b6cb4e7be3c565f77bf7f541684733b21d862a234687ccffcc2b6c0ecf5b0fdd9fd42ddbee11c0e81388aee21d550a7e33550cd46fb17dbccfb6bb7f6
 SHA512 
c868a171c75adacf5eee54ee6be70faf8d5f8734dc5f1f01cd475faa78d4f9796860cfb20d486f53f20aaca5ea5306795bb5a2e1c5ded2dcb38612d5ca2550b4

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
new file mode 100644
index 000000000000..13e65963193a
--- /dev/null
+++ b/dev-games/ogre/files/ogre-13.5.3-gentoolize_imgui_inclusion.patch
@@ -0,0 +1,27 @@
+--- a/Components/Overlay/CMakeLists.txt        2022-12-13 08:16:21.006454596 
+0100
++++ b/Components/Overlay/CMakeLists.txt        2022-12-13 08:16:41.416455669 
+0100
+@@ -19,14 +19,14 @@
+ file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
+ 
+ if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI)
+-  set(IMGUI_DIR "${PROJECT_BINARY_DIR}/imgui-1.87" CACHE PATH "")
++  set(IMGUI_DIR "${PROJECT_SOURCE_DIR}/imgui-1.87" CACHE PATH "")
+   if(NOT EXISTS ${IMGUI_DIR})
+     message(STATUS "Downloading imgui")
+     file(DOWNLOAD
+         https://github.com/ocornut/imgui/archive/v1.87.tar.gz
+-        ${PROJECT_BINARY_DIR}/imgui.tar.gz)
++        ${PROJECT_SOURCE_DIR}/imgui.tar.gz)
+     execute_process(COMMAND ${CMAKE_COMMAND}
+-        -E tar xf imgui.tar.gz WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
++        -E tar xf imgui.tar.gz WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
+   endif()
+   list(APPEND SOURCE_FILES
+     ${IMGUI_DIR}/imgui.cpp
+@@ -103,4 +103,4 @@
+ )
+ install(FILES "${PROJECT_SOURCE_DIR}/Media/packs/profiler.zip"
+   DESTINATION "${OGRE_MEDIA_PATH}/packs/"
+-)
+\ No newline at end of file
++)

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
new file mode 100644
index 000000000000..84fd2d871cb8
--- /dev/null
+++ b/dev-games/ogre/files/ogre-13.5.3-media_path.patch
@@ -0,0 +1,12 @@
+--- a/CMake/InstallResources.cmake     2022-12-13 07:54:58.845387208 +0100
++++ b/CMake/InstallResources.cmake     2022-12-13 07:56:02.083390532 +0100
+@@ -174,9 +174,6 @@
+ 
+ # CREATE CONFIG FILES - BUILD DIR VERSIONS
+ if (NOT (APPLE_IOS OR WINDOWS_STORE OR WINDOWS_PHONE))
+-  set(OGRE_MEDIA_DIR_REL "${PROJECT_SOURCE_DIR}/Samples/Media")
+-  set(OGRE_CORE_MEDIA_DIR "${PROJECT_SOURCE_DIR}/Media")
+-  set(OGRE_TEST_MEDIA_DIR_REL "${PROJECT_SOURCE_DIR}/Tests/Media")
+ else ()
+   # iOS needs to use relative paths in the config files
+   set(OGRE_MEDIA_DIR_REL "${OGRE_MEDIA_PATH}")

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
new file mode 100644
index 000000000000..3d8bef1f7c64
--- /dev/null
+++ b/dev-games/ogre/files/ogre-13.5.3-resource_path.patch
@@ -0,0 +1,13 @@
+These was already configured above, the BINARY paths are wrong!
+
+--- a/CMake/InstallResources.cmake     2019-11-06 08:12:01.271816772 +0100
++++ b/CMake/InstallResources.cmake     2019-11-06 08:13:15.623814658 +0100
+@@ -188,8 +188,6 @@
+   set(OGRE_PLUGIN_DIR_REL "Contents/Frameworks/")
+   set(OGRE_SAMPLES_DIR_REL "Contents/Plugins/")
+ elseif (UNIX)
+-  set(OGRE_PLUGIN_DIR_REL "${PROJECT_BINARY_DIR}/lib")
+-  set(OGRE_SAMPLES_DIR_REL "${PROJECT_BINARY_DIR}/lib")
+ endif ()
+ 
+ if(OGRE_BUILD_SAMPLES)

diff --git a/dev-games/ogre/metadata.xml b/dev-games/ogre/metadata.xml
index bc396b074590..9ffeae644f30 100644
--- a/dev-games/ogre/metadata.xml
+++ b/dev-games/ogre/metadata.xml
@@ -77,36 +77,23 @@ Exporters
     * Maya (meshes)
   </longdescription>
   <use>
-    <flag name="assimp" restrict="~dev-games/ogre-1.12.9">Use 
<pkg>media-libs/assimp</pkg> to import assets from 3D files</flag>
+    <flag name="assimp" restrict="&gt;dev-games/ogre-13">Use 
<pkg>media-libs/assimp</pkg> to import assets from 3D files</flag>
     <flag name="boost">Enable boost support</flag>
+    <flag name="bullet" restrict="&gt;dev-games/ogre-13">Use 
<pkg>sci-physics/bullet</pkg> for physics plugin</flag>
     <flag name="cache">Enable GL state cache support</flag>
     <flag name="cg">NVIDIA toolkit plugin</flag>
     <flag name="double-precision">More precise calculations at the expense of 
speed</flag>
     <flag name="egl">Use egl instead of glx</flag>
-    <flag name="deprecated" restrict="~dev-games/ogre-1.12.9">
-        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 name="deprecated" restrict="&gt;dev-games/ogre-13">
+        Build deprecated nodeless positioning of Lights and Cameras.
     </flag>
     <flag name="freeimage">Support images via 
<pkg>media-libs/freeimage</pkg></flag>
-    <flag name="gl3plus">Build OpenGL 3+ RenderSystem (EXPERIMENTAL)</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="gl3plus">Build OpenGL 3+ RenderSystem</flag>
+    <flag name="gles2" restrict="&lt;dev-games/ogre-13">Build OpenGL ES 2.x 
RenderSystem</flag>
+    <flag name="gles3" restrict="&lt;dev-games/ogre-13">Enable OpenGL ES 3.x 
Features</flag>
     <flag name="json">Use <pkg>dev-libs/rapidjson</pkg> (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
-        is still experimental.
-    </flag>
     <flag name="ois">Pull in Object-oriented Input System library 
<pkg>dev-games/ois</pkg> 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.
@@ -120,6 +107,5 @@ Exporters
   <upstream>
     <remote-id type="bitbucket">sinbad/ogre</remote-id>
     <remote-id type="github">OGRECave/ogre</remote-id>
-    <remote-id type="github">OGRECave/ogre-next</remote-id>
   </upstream>
 </pkgmetadata>

diff --git a/dev-games/ogre/ogre-13.6.1.ebuild 
b/dev-games/ogre/ogre-13.6.1.ebuild
new file mode 100644
index 000000000000..0cfe093f3488
--- /dev/null
+++ b/dev-games/ogre/ogre-13.6.1.ebuild
@@ -0,0 +1,198 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CMAKE_REMOVE_MODULES_LIST=( FindFreetype FindDoxygen FindZLIB )
+inherit cmake
+
+IMGUI_PN="imgui"
+IMGUI_PV="1.87"
+IMGUI_P="${IMGUI_PN}-${IMGUI_PV}"
+
+DESCRIPTION="Object-oriented Graphics Rendering Engine"
+HOMEPAGE="https://www.ogre3d.org/";
+SRC_URI="https://github.com/OGRECave/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+       https://github.com/ocornut/${IMGUI_PN}/archive/v${IMGUI_PV}.tar.gz -> 
${IMGUI_P}.tar.gz"
+
+LICENSE="MIT public-domain"
+SLOT="0/13.6"
+KEYWORDS="~amd64 ~arm ~x86"
+
+IUSE="assimp bullet +cache cg debug deprecated doc double-precision egl 
examples +freeimage
+       json +opengl pch profile resman-pedantic tools"
+
+# Note: gles2 USE flag taken out for now, as even the configuration seems to 
be broken
+#       ~~sed 2022-12-13 (s...@eden-worx.com)
+#
+# Note: The following dependencies might be considered for new ebuilds
+#  + Vulkan SDK: Vulkan RenderSystem, glslang Plugin. Alternatively use system 
packages <https://vulkan.lunarg.com/>
+#
+# Note: Without gles2 USE flag, the opengl USE flag is next to useless. But
+#       there are packages which enforce it, so it has to stay.
+#
+REQUIRED_USE="
+       examples? ( opengl )
+"
+
+RESTRICT="test" #139905
+
+RDEPEND="
+       dev-games/ois
+       dev-libs/pugixml
+       dev-libs/zziplib
+       media-libs/freetype:2
+       x11-libs/libX11
+       x11-libs/libXaw
+       x11-libs/libXrandr
+       x11-libs/libXt
+       assimp? ( media-libs/assimp:= )
+       bullet? ( sci-physics/bullet:= )
+       cg? ( media-gfx/nvidia-cg-toolkit )
+       egl? ( media-libs/mesa[egl(+)] )
+       freeimage? ( media-libs/freeimage )
+       json? ( dev-libs/rapidjson )
+       opengl? (
+               virtual/glu
+               virtual/opengl
+       )
+       tools? ( dev-libs/tinyxml[stl] )
+"
+DEPEND="
+       ${RDEPEND}
+       x11-base/xorg-proto
+"
+BDEPEND="
+       virtual/pkgconfig
+       doc? ( app-doc/doxygen )
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-13.5.3-media_path.patch
+       "${FILESDIR}"/${PN}-13.5.3-resource_path.patch
+       "${FILESDIR}"/${PN}-13.5.3-gentoolize_imgui_inclusion.patch
+       "${FILESDIR}"/${PN}-1.10.12-use_system_tinyxml.patch
+)
+
+src_unpack() {
+       unpack ${P}.tar.gz || die "Unpacking ${P}.zip failed"
+
+       # Ogre includes imgui, but as a manual download done by 
Components/Overlay/CMakeLists.txt
+       # That may fail and so we are doing it ourselves.
+       cd "${S}" || die "Unpack incomplete"
+       unpack ${IMGUI_P}.tar.gz || die "Unpacking ${IMGUI_P}.zip failed"
+}
+
+src_prepare() {
+       local broken_png=(
+               i...@2x-72.png
+               Default-Portrait~ipad.png
+               Default-Portrait@2x~ipad.png
+               Default-Landscape@2x~ipad.png
+       )
+
+       sed -i \
+               -e "s:share/doc/OGRE:share/doc/${PF}:" \
+               Docs/CMakeLists.txt || die
+       # In this series, the CMAKE_BUILD_TARGET is hard-wired to the
+       # installation. And only Debug, MinSizeRel and RelWithDebInfo
+       # are supported.
+       sed -i \
+               -e "s/$(usex debug Debug Release)/Gentoo/g" \
+               CMake/InstallResources.cmake \
+               CMake/Utils/OgreConfigTargets.cmake \
+               || die
+
+       # Fix broken png files
+       einfo "Fixing broken png files."
+       pushd "${S}"/Samples/Common/misc 1>/dev/null 2>&1
+       for png in "${broken_png[@]}"; do
+               pngfix -q --out=out.png ${png}
+               mv -f out.png "${png}" || die
+       done
+       popd 1>/dev/null 2>&1
+       einfo "done ..."
+
+       # Fix some path issues
+       cmake_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DCMAKE_SKIP_INSTALL_RPATH=yes
+               -DOGRE_ASSERT_MODE=1
+               -DOGRE_BUILD_COMPONENT_BITES=yes
+               -DOGRE_BUILD_COMPONENT_BULLET=$(usex bullet)
+               -DOGRE_BUILD_COMPONENT_CSHARP=no
+               -DOGRE_BUILD_COMPONENT_JAVA=no
+               -DOGRE_BUILD_COMPONENT_OVERLAY=yes
+               -DOGRE_BUILD_COMPONENT_OVERLAY_IMGUI=yes
+               -DOGRE_BUILD_COMPONENT_PAGING=yes
+               -DOGRE_BUILD_COMPONENT_PROPERTY=yes
+               -DOGRE_BUILD_COMPONENT_PYTHON=no
+               -DOGRE_BUILD_COMPONENT_RTSHADERSYSTEM=yes
+               -DOGRE_BUILD_COMPONENT_TERRAIN=yes
+               -DOGRE_BUILD_COMPONENT_VOLUME=yes
+               -DOGRE_BUILD_DEPENDENCIES=no
+               -DOGRE_BUILD_PLUGIN_ASSIMP=$(usex assimp)
+               -DOGRE_BUILD_PLUGIN_CG=$(usex cg)
+               -DOGRE_BUILD_PLUGIN_FREEIMAGE=$(usex freeimage)
+               -DOGRE_BUILD_PLUGIN_EXRCODEC=no
+               -DOGRE_BUILD_RENDERSYSTEM_GL=$(usex opengl)
+               -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=$(usex opengl)
+               -DOGRE_BUILD_RENDERSYSTEM_GLES2=no
+               -DOGRE_BUILD_SAMPLES=$(usex examples)
+               -DOGRE_BUILD_TESTS=no
+               -DOGRE_BUILD_TOOLS=$(usex tools)
+               -DOGRE_CONFIG_DOUBLE=$(usex double-precision)
+               -DOGRE_CONFIG_ENABLE_GL_STATE_CACHE_SUPPORT=$(usex cache)
+               -DOGRE_CONFIG_ENABLE_GLES2_CG_SUPPORT=no
+               -DOGRE_CONFIG_ENABLE_GLES3_SUPPORT=no
+               -DOGRE_CONFIG_THREADS=3
+               -DOGRE_CONFIG_THREAD_PROVIDER=std
+               -DOGRE_ENABLE_PRECOMPILED_HEADERS=$(usex pch)
+               -DOGRE_GLSUPPORT_USE_EGL=$(usex egl)
+               -DOGRE_INSTALL_DOCS=$(usex doc)
+               -DOGRE_INSTALL_SAMPLES=$(usex examples)
+               -DOGRE_NODELESS_POSITIONING=$(usex deprecated)
+               -DOGRE_PROFILING=$(usex profile)
+               -DOGRE_RESOURCEMANAGER_STRICT=$(usex resman-pedantic 1 2)
+       )
+
+       cmake_src_configure
+}
+
+src_compile() {
+       cmake_src_compile
+
+       if use doc ; then
+               eninja -C "${BUILD_DIR}" OgreDoc
+       fi
+}
+
+src_install() {
+       cmake_src_install
+
+       CONFIGDIR=/etc/OGRE
+       SHAREDIR=/usr/share/OGRE
+
+       # plugins and resources are the main configuration
+       insinto "${CONFIGDIR}"
+       doins "${BUILD_DIR}"/bin/plugins.cfg
+       doins "${BUILD_DIR}"/bin/resources.cfg
+       dosym "${CONFIGDIR}"/plugins.cfg "${SHAREDIR}"/plugins.cfg
+       dosym "${CONFIGDIR}"/resources.cfg "${SHAREDIR}"/resources.cfg
+
+       # These are only for the sample browser
+       if use examples ; then
+               insinto "${SHAREDIR}"
+               doins "${BUILD_DIR}"/bin/samples.cfg
+       fi
+}
+
+pkg_postinst() {
+       elog "If you experience crashes when starting /usr/bin/SampleBrowser,"
+       elog "remove the cache directory at:"
+       elog "  '~/.cache/OGRE Sample Browser'"
+       elog "first, before filing a bug report."
+}

Reply via email to