commit: f5f1fc7d9b27b0327797d53349221051c5eb92e3 Author: Alfred Wingate <parona <AT> protonmail <DOT> com> AuthorDate: Thu May 22 15:35:17 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu May 29 16:48:15 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5f1fc7d
dev-games/ogre: add 14.3.4 * Rename example use flag to samples as its more accurate. * Enable tests. * Drop config options, just use upstream defaults as they have deprecated the non default options. They don't affect dependencies. If the user feels stronly about it they can use MYCMAKEARGS. * Simplify ebuild. * egl -> egl-only as its more accurate. Bug: https://bugs.gentoo.org/920199 Signed-off-by: Alfred Wingate <parona <AT> protonmail.com> Part-of: https://github.com/gentoo/gentoo/pull/42219 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-games/ogre/Manifest | 2 + dev-games/ogre/metadata.xml | 5 ++ dev-games/ogre/ogre-14.3.4.ebuild | 182 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 189 insertions(+) diff --git a/dev-games/ogre/Manifest b/dev-games/ogre/Manifest index 333bba06d603..81007b2e779c 100644 --- a/dev-games/ogre/Manifest +++ b/dev-games/ogre/Manifest @@ -1,6 +1,8 @@ DIST imgui-1.77.tar.gz 1269147 BLAKE2B be0db9b77903664db0fadf1672ec23983dc89292fd261a1e89c1eab88b82e95de7c2af37eb7ef43cc994b889fdf7d7fb2dd1282b93c1f3b1166c7fe0d2dccaf5 SHA512 d5ebf4bb5e1ce83b226f2e68b3afe0f0abaeb55245fedf754e5453afd8d1df4dac8b5c47fc284c2588b40d05a55fc191b5e55c7be279c5e5e23f7c5b70150546 DIST imgui-1.87.tar.gz 1460834 BLAKE2B f73b71400311e7c5f82248e242a932add5090670c78077ca2239f349730bab88a00bfe4deca4e854772ef7f6a2cff1fc0f38f7174a026995f93c9e7b55eb2a1d SHA512 3255b06698ab9c8951953e1e0b6d160d64adfa4c011b21a4288547292a7f8fff586875faf9dae0677818bde65bd7e98da92f16f6beb1e6a66aa835edf32e8ce2 +DIST imgui-1.91.2.tar.gz 1751558 BLAKE2B f5c9b7641424b87564963c878f7ee745a33b4ae9d2f15a170ab75b500fe67f9800955353cf23d782d1ee377a958807f2c1ca36f2985ce977dbbd1139d942d2ef SHA512 c8daeb2738fb0c710bee0ab7e794d9d2c60b8763b16e7b2219d064f7da8e57d410a1055c4efb80f4425ac55df173cf17f5fc06d42a52c74815175473a086c7db DIST ogre-1.12.9.tar.gz 125955067 BLAKE2B 5676690d2d9db8c4c903b7bf3e7660ddf5c0675eb11e1b34f08a5a50739d6212e986c7b500173ad5edab4835d96c705f86cc0fd37e1ff1e64a161ab1ce8968df SHA512 a80525a4924a430ccac3f01f93a5f36b4b9d2f7671ef0629d7dd21d3651ea7a698d5cc520eb814c6ee4c0ee7efcd3f6a8f16688773300a25537636bb61eba286 DIST ogre-1.9.0.tar.bz2 128098305 BLAKE2B 6e67a5b60a6606a910e099f1c7ba736eb525f079f3aba5cfb362329b9130059d303fc9df6f7b8611c0ba75e1e207fa018e543e93c9f5ce39a6621e4c72ed4a83 SHA512 b1ea93d80ac0978a7c228460a6714f8d17797450efd5af6765c9fa4402e9060a8ef3a700d2757593a3016fdc32276722c8f4a5d9889a3e2eb424f16162a52bde DIST ogre-13.6.1.tar.gz 91951783 BLAKE2B a345de5b6cb4e7be3c565f77bf7f541684733b21d862a234687ccffcc2b6c0ecf5b0fdd9fd42ddbee11c0e81388aee21d550a7e33550cd46fb17dbccfb6bb7f6 SHA512 c868a171c75adacf5eee54ee6be70faf8d5f8734dc5f1f01cd475faa78d4f9796860cfb20d486f53f20aaca5ea5306795bb5a2e1c5ded2dcb38612d5ca2550b4 +DIST ogre-14.3.4.tar.gz 94000790 BLAKE2B dd87af3a18cd4da459104ccdf06f0f035f3dbb68524845e9d778c2186be66272ac4fa5d70188f1960fbe001519c5706d5a9fff1f7e8800ec19424ac5b25abf56 SHA512 92d384daa5221850d89e3367a26a04db093736699664cfdfc3e0539f2bc64ebdfacaa5f24c5229f3a44d1e0e7e9b796d8686c42e7e7133b38fc61947642cbf55 DIST ogre-2.1.tar.gz 157457252 BLAKE2B 97e83cb93a07de5bd5f4fd778604e6146105e70045a6019f0fcdd7f96fe20f6ad495e19988dcd5e4c4073a0bcdeb5ce2afb06fae6945363c397a882672c80520 SHA512 9802e3bf20ddb09453524d1ddafa7a2083dfd0e609563f478fe31b087dd06d463f69800b9c6485cb3db92d98f282ef67ace3e272c1ef531e982ea9f719617fb5 diff --git a/dev-games/ogre/metadata.xml b/dev-games/ogre/metadata.xml index 744b1a91ff68..6fbb566de0b1 100644 --- a/dev-games/ogre/metadata.xml +++ b/dev-games/ogre/metadata.xml @@ -82,11 +82,13 @@ Exporters <flag name="bullet" restrict=">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="dotscene">DotScene (.scene) file format support through <pkg>dev-libs/pugixml</pkg></flag> <flag name="double-precision">More precise calculations at the expense of speed</flag> <flag name="deprecated" restrict=">dev-games/ogre-13"> Build deprecated nodeless positioning of Lights and Cameras. </flag> <flag name="egl">Use egl instead of glx</flag> + <flag name="egl-only">Use EGL instead of GLX</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. @@ -94,6 +96,7 @@ Exporters <flag name="freeimage">Support images via <pkg>media-libs/freeimage</pkg></flag> <flag name="gl3plus">Build OpenGL 3+ RenderSystem</flag> <flag name="gles3" restrict="<dev-games/ogre-13">Enable OpenGL ES 3.x Features</flag> + <flag name="glslang">Build Glslang plugin</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 @@ -106,7 +109,9 @@ Exporters sensitive lookup. Some demos might not work with this setting. (default: case-insensitive + sensitive lookup in all groups) </flag> + <flag name="samples">Build and install Ogre demos</flag> <flag name="tbb">When USE=threads, use tbb for threading</flag> + <flag name="tiny">Build Tiny RenderSystem (software-rendering)</flag> <flag name="tools"> Build and install AssimpConverter (assimp USE flag is enabled), MeshUpgrader, VRMLConverter and XMLConverter </flag> diff --git a/dev-games/ogre/ogre-14.3.4.ebuild b/dev-games/ogre/ogre-14.3.4.ebuild new file mode 100644 index 000000000000..dcf5212cf6f9 --- /dev/null +++ b/dev-games/ogre/ogre-14.3.4.ebuild @@ -0,0 +1,182 @@ +# Copyright 2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake flag-o-matic virtualx + +# Components/Overlay/CMakeLists.txt +IMGUI_PV="1.91.2" + +DESCRIPTION="Object-oriented Graphics Rendering Engine" +HOMEPAGE="https://www.ogre3d.org/" +SRC_URI=" + https://github.com/OGRECave/ogre/archive/refs/tags/v${PV}.tar.gz + -> ${P}.tar.gz + https://github.com/ocornut/imgui/archive/v${IMGUI_PV}.tar.gz + -> imgui-${IMGUI_PV}.tar.gz +" + +LICENSE="MIT public-domain" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64 ~arm ~x86" + +IUSE="assimp bullet cg doc +dotscene egl-only freeimage +gl3plus gles2 glslang opengl qt6 samples test tiny tools sdl vulkan wayland" +REQUIRED_USE=" + || ( gl3plus gles2 opengl tiny vulkan ) + egl-only? ( || ( gl3plus gles2 opengl ) ) + test? ( samples ) + vulkan? ( glslang ) + wayland? ( egl-only ) +" +# vulkan broken, proper handling required for wayland +RESTRICT=" + !test? ( test ) + vulkan? ( test ) + wayland? ( test ) +" + +# freetype and zlib are automagic +# vulkan-loader is dlopen'd +RDEPEND=" + media-libs/freetype:2 + sys-libs/zlib + assimp? ( media-libs/assimp:= ) + bullet? ( sci-physics/bullet:= ) + cg? ( media-gfx/nvidia-cg-toolkit ) + dotscene? ( dev-libs/pugixml ) + freeimage? ( media-libs/freeimage ) + gl3plus? ( virtual/opengl ) + glslang? ( dev-util/glslang:= ) + gles2? ( virtual/opengl ) + opengl? ( virtual/opengl ) + qt6? ( dev-qt/qtbase:6[gui] ) + sdl? ( media-libs/libsdl2 ) + tools? ( dev-libs/pugixml ) + vulkan? ( media-libs/vulkan-loader ) + wayland? ( dev-libs/wayland ) + !wayland? ( + x11-libs/libX11 + x11-libs/libXaw + x11-libs/libXt + gl3plus? ( x11-libs/libXrandr ) + gles2? ( x11-libs/libXrandr ) + opengl? ( x11-libs/libXrandr ) + ) +" +DEPEND="${RDEPEND} + test? ( dev-cpp/gtest ) + vulkan? ( dev-util/vulkan-headers ) +" +BDEPEND=" + virtual/pkgconfig + doc? ( app-text/doxygen[dot] ) +" + +src_prepare() { + cmake_src_prepare + + # Users should set this via their CFLAGS (like -march) + sed -e '/check_cxx_compiler_flag(-msse OGRE_GCC_HAS_SSE)/d' \ + -i CMakeLists.txt || die + + # Force Qt6 + sed -e '/find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui QUIET CONFIG)/ { s/Qt5// }' \ + -i CMake/Dependencies.cmake || die + + # Lets not install test binaries + sed -e '/ogre_install_target(Test_Ogre "" FALSE)/d' \ + -i Tests/CMakeLists.txt || die +} + +src_configure() { + # odr violations + filter-lto + + local mycmakeargs=( + # https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb809aeadee57ffa24591e60cfb41aecd4823090 + -DOGRE_ENABLE_PRECOMPILED_HEADERS=OFF + + -DOGRE_BUILD_COMPONENT_BITES=ON + -DOGRE_BUILD_COMPONENT_BULLET=$(usex bullet) + -DOGRE_BUILD_COMPONENT_CSHARP=OFF + -DOGRE_BUILD_COMPONENT_JAVA=OFF + -DOGRE_BUILD_COMPONENT_MESHLODGENERATOR=ON + -DOGRE_BUILD_COMPONENT_OVERLAY=ON + -DOGRE_BUILD_COMPONENT_OVERLAY_IMGUI=ON + -DOGRE_BUILD_COMPONENT_PAGING=ON + -DOGRE_BUILD_COMPONENT_PROPERTY=ON + -DOGRE_BUILD_COMPONENT_PYTHON=OFF + -DOGRE_BUILD_COMPONENT_RTSHADERSYSTEM=ON + -DOGRE_BUILD_COMPONENT_TERRAIN=ON + -DOGRE_BUILD_COMPONENT_VOLUME=ON + + -DOGRE_BUILD_PLUGIN_ASSIMP=$(usex assimp) + -DOGRE_BUILD_PLUGIN_BSP=ON + -DOGRE_BUILD_PLUGIN_CG=$(usex cg) # "deprecated" + -DOGRE_BUILD_PLUGIN_DOT_SCENE=$(usex dotscene) + -DOGRE_BUILD_PLUGIN_EXRCODEC=OFF # "deprecated" and doesn't work + -DOGRE_BUILD_PLUGIN_FREEIMAGE=$(usex freeimage) # "deprecated" + -DOGRE_BUILD_PLUGIN_GLSLANG=$(usex glslang) + -DOGRE_BUILD_PLUGIN_OCTREE=ON + -DOGRE_BUILD_PLUGIN_PCZ=ON + -DOGRE_BUILD_PLUGIN_PFX=ON + -DOGRE_BUILD_PLUGIN_RSIMAGE=OFF # rust + -DOGRE_BUILD_PLUGIN_STBI=ON # vendored stb headers + + -DOGRE_BUILD_RENDERSYSTEM_GL=$(usex opengl) + -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=$(usex gl3plus) + -DOGRE_BUILD_RENDERSYSTEM_GLES2=$(usex gles2) + # "BETA". Tests will not pass with this + -DOGRE_BUILD_RENDERSYSTEM_VULKAN=$(usex vulkan) + -DOGRE_BUILD_RENDERSYSTEM_TINY=$(usex tiny) + + -DOGRE_BUILD_SAMPLES=$(usex samples) + -DOGRE_INSTALL_SAMPLES=$(usex samples) + -DOGRE_BUILD_TOOLS=$(usex tools) + -DOGRE_INSTALL_TOOLS=$(usex tools) + -DOGRE_BUILD_XSIEXPORTER=OFF # softimage + -DOGRE_BUILD_TESTS=$(usex test) + + -DOGRE_BUILD_DEPENDENCIES=OFF + -DIMGUI_DIR="${WORKDIR}/imgui-${IMGUI_PV}" + + -DOGRE_CFG_INSTALL_PATH="/etc/OGRE" + -DOGRE_MEDIA_PATH="share/OGRE/Media" + + -DOGRE_DOCS_PATH="share/docs/${PF}" + -DOGRE_INSTALL_DOCS=$(usex doc) + + $(cmake_use_find_package qt6 QT) + $(cmake_use_find_package sdl SDL2) + ) + + if use gl3plus || use gles2 || use opengl ; then + mycmakeargs+=( + # TODO: wayland support needs more work. + # tests don't run with tinywl and it doesnt work at runtime + -DOGRE_USE_WAYLAND=$(usex wayland) + -DOGRE_GLSUPPORT_USE_EGL=$(usex egl-only) + ) + fi + + cmake_src_configure +} + +src_compile() { + cmake_src_compile + use doc && cmake_build OgreDoc +} + +src_test() { + virtx cmake_src_test +} + +pkg_postinst() { + if use samples; then + 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." + fi +}
