summaryrefslogtreecommitdiff
path: root/dev-games/ogre
diff options
context:
space:
mode:
Diffstat (limited to 'dev-games/ogre')
-rw-r--r--dev-games/ogre/Manifest8
-rw-r--r--dev-games/ogre/files/ogre-13.5.3-gentoolize_imgui_inclusion.patch27
-rw-r--r--dev-games/ogre/files/ogre-13.5.3-media_path.patch12
-rw-r--r--dev-games/ogre/files/ogre-13.5.3-resource_path.patch13
-rw-r--r--dev-games/ogre/metadata.xml22
-rw-r--r--dev-games/ogre/ogre-13.6.1.ebuild198
6 files changed, 265 insertions, 15 deletions
diff --git a/dev-games/ogre/Manifest b/dev-games/ogre/Manifest
index a0dd4e2c0641..7084c2fdbd1f 100644
--- a/dev-games/ogre/Manifest
+++ b/dev-games/ogre/Manifest
@@ -8,6 +8,9 @@ AUX ogre-1.9.0-gcc52.patch 2392 BLAKE2B 3d41e4a6726dabd2f4861774c962a0b5e38cdc54
AUX ogre-1.9.0-remove_media_path_to_bindir.patch 545 BLAKE2B 162ca81d22dfa100f624f3c62095bb3cd8bfff884e0754991904fbbe37ab60177d920872ea4955d4c8e3fd95a81f6488ed6ba6894dd1b0c7fe0b376ac62d9105 SHA512 7248e6dba4837765ebf0bc1cd06c07891ea785a415ecbd279f1d6adc88b4a8aae0a12993635d9139697771e8b94739e709e2410754e0e004571d1a48a1bf614d
AUX ogre-1.9.0-remove_resource_path_to_bindir.patch 452 BLAKE2B ef6aedfe4ee2bc1e17106164fec1d82a7fe927d5240e90c1db8a579dbf4fedc11e6b3cacb5138172fa198bf5681df09309412b6a48079353bd14568b667d5db4 SHA512 57cef0efbbbe791234b117556c6f56051ebeee90a1b1802a9fc8e106edabbfa53f96a2e43d4c332a8631b04954e87676444cdca417bcc8957f860d041f80d2b9
AUX ogre-1.9.0-samples.patch 225 BLAKE2B 4fc9cead31892e565b04ac35a00739cdbfcd638f65df185d6ebe47e329409c0efa0a25c4685724856b5f914953e9cd46746c13f2117a9a6b9ec31f1d271e71c2 SHA512 089060f157488628c136a7f4f0ac764fcdcd30fbaf6e62a1dcb2b952df2c6753cfe107f3bb5b1fc2424964f1cb423176fd69e098a835ade3f18dc3303b24be96
+AUX ogre-13.5.3-gentoolize_imgui_inclusion.patch 1080 BLAKE2B 4834cae9cd405b080d27104e677026fa0e729e09f87f31f55b0536e79134a42cc83d724b70a764b7580e877c73c98a828706c7539b10438790cc19a0932c15f4 SHA512 a3f291047b33e903f03ab9497d721ffb1c922047a6f15fb26c8fdd8089968261d09b757518ef9cfa1af29168181ad80d2f019531e6a728e005ac714c7a5e7958
+AUX ogre-13.5.3-media_path.patch 569 BLAKE2B d26da891e8c9bd285b6c006a99a9e54493dc0242f5cab6c73b1c72852c0836373040ebeb0150aec9abfc05439bf116372ca01e619a6a3ee445406fdce473f5bf SHA512 a95f9e959a6c7dc35462224c832f550489ac01b754a4f5015a65b8c33ebfb3834f126353a30454a04491ac24fcf423fe1cf6506f0b2e1c6726cb91027dcdafdb
+AUX ogre-13.5.3-resource_path.patch 491 BLAKE2B 6b29f24411aba4ea5b54258e8fab9d6969e7296bd4b99636585c4e70e8da55065bece205f30363f561d7cde8af18bee15d96af1b590c4f0c7c5d83a2465abb0e SHA512 6ae9ef879a4547cc1bb313bc84775315068ccce1a708d7b3cbbbbd61d5a286f16bb53d1cd5af2d4d1da4f31d8abad791fbc2cb2f078e1ea409acc8c644cebfe8
AUX ogre-2.1-d1c1116.patch 2988 BLAKE2B 8016912a20f0e3250e379495c4e1364f9fd7ed39838952ea54a666b6a325b0ccb159b496600a2ce91d65443efd12cd952b1035e2585f36f9e2c615cd9175f611 SHA512 0e20b345f043ce693bb60f28d9a7f7f99c3bfbb66101f22ab8eb69039872e1004a0537ee54cba91be0fb8379f118a5be6f558e7ed3b47e92d0d90743b56b805b
AUX ogre-2.1-enhance_config_loading.patch 1303 BLAKE2B f03e3b00ee9f13bbcc4cfa9a8db318aa7e675ed3974751460060f8789f5a1ba38d47e9612eebbc164e81fd7b341c64ba3d2df79b499a05248207a8fbb8df9564 SHA512 c1db8c919d33e7e96b44ad44f0e5a51abc7920178a3b3119fbad5ff42e79f9f986ee3cffb55e6065a6b01dbc5d9b5060b757acd597d77aa9068df476c51eca14
AUX ogre-2.1-fix_compilation_issues.patch 2999 BLAKE2B 153306ff20705ccdf673691465c215ecd6f84b282d4112465f5c02167a480c73b25aec9fa5247f08862ce3b3972b963d9031fbcfb3e3e0573a1928ec5dcc5c93 SHA512 d32ae3d6cb90eca5b06c23f2005399df0f1a2e6af705b33ad16eeb7470f7ae6642c8ccc47c4bc035dc0cf915b8b6f704a6c462704f85a92c68b8acc8bd940262
@@ -17,10 +20,13 @@ AUX ogre-2.1-media_path.patch 857 BLAKE2B 76b02d1aebd737dff20ac7616d324d28129e12
AUX ogre-2.1-resource_path.patch 570 BLAKE2B f37d65d0a9b0abccd487b150b48950f2d7cd885ee2aea2f7015a51af316dc28ba357f3e163af9bd1ddd3d982eb40e54ae065419cd8cc50599b12b6dffd233080 SHA512 b5f476e2fc8b48dc1e98794d443ffb4f9c485593f1d3357a0892a8d3bfa46a7a42cd6c7470383cae051d7c54f154f2f6e2e4db70094963085c5eceaa4d813494
AUX ogre-2.1-samples.patch 1108 BLAKE2B 0b3b5bdb93f58952993a9a92c52b6057ef37e308fa93cbf1833a564f1188448c7eccb725eb37a591c18a7d4bc6f752454e52d08308be231e8602669720019730 SHA512 586b18f301906a82acad1d8211c8f63a2fd0e587dfe160dbddf0821893f17b7b1f772f1d5116e1adedc62017eb27eedc5fc30e0e861ae1c2ba12bd3bcc662372
DIST imgui-1.77.tar.gz 1269147 BLAKE2B be0db9b77903664db0fadf1672ec23983dc89292fd261a1e89c1eab88b82e95de7c2af37eb7ef43cc994b889fdf7d7fb2dd1282b93c1f3b1166c7fe0d2dccaf5 SHA512 d5ebf4bb5e1ce83b226f2e68b3afe0f0abaeb55245fedf754e5453afd8d1df4dac8b5c47fc284c2588b40d05a55fc191b5e55c7be279c5e5e23f7c5b70150546
+DIST imgui-1.87.tar.gz 1460834 BLAKE2B f73b71400311e7c5f82248e242a932add5090670c78077ca2239f349730bab88a00bfe4deca4e854772ef7f6a2cff1fc0f38f7174a026995f93c9e7b55eb2a1d SHA512 3255b06698ab9c8951953e1e0b6d160d64adfa4c011b21a4288547292a7f8fff586875faf9dae0677818bde65bd7e98da92f16f6beb1e6a66aa835edf32e8ce2
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-2.1.tar.gz 157457252 BLAKE2B 97e83cb93a07de5bd5f4fd778604e6146105e70045a6019f0fcdd7f96fe20f6ad495e19988dcd5e4c4073a0bcdeb5ce2afb06fae6945363c397a882672c80520 SHA512 9802e3bf20ddb09453524d1ddafa7a2083dfd0e609563f478fe31b087dd06d463f69800b9c6485cb3db92d98f282ef67ace3e272c1ef531e982ea9f719617fb5
EBUILD ogre-1.12.9-r3.ebuild 5828 BLAKE2B 46de7d3df168622773eab8e8743bbb21e696fe61afe93a9e3025def9f1cac6e30ce6054564b09eea2c1ec62f3e0db2e06d483a4cb6f510513536311f3a78b095 SHA512 ba0bf4402e48d8a19edbf10ba9c6084def725bf57641f57f02d1a0dc5d8c017f39ffad7ca4af673abbbe8cdd12eccab8ac59900ae126c1f6c1ea7a2096b10bee
EBUILD ogre-1.9.0-r3.ebuild 3676 BLAKE2B 89fb29fe7d180b619f4b77593899ec0af648d94e1e0b36a99d7388ba3f336e6818ba0bf25d4f0891d55cb35bf55e9f36f38a16c529a27ea8e1d4ac4ad071d4f7 SHA512 e1c7d37d97b5621a1360b48cfa5f165710433558c45f69a2acd44e52cca740fcc8de55e63753e3367ef8e02082cdf1ec82a8693429002b25faaa51854b0cb005
+EBUILD ogre-13.6.1.ebuild 5545 BLAKE2B 9229fd123e31330f599928155a3e3fe8ed61dcd6e663b62430c679019975e096b06e243f17901cc52eb1073c97ca241ff27e95ab5ea56f06d1649aaf5cda461c SHA512 336baa12494f1b3d704fc686c047af2c90e12cbefe965a1cfd08c33bbe12b9d5cec0e5ab4dd9955af081546b93f7dfe0ea07a11c3cc9131a9191fd2baa50da36
EBUILD ogre-2.1-r1.ebuild 5957 BLAKE2B 25a60819172e9040e97ca28b43160066960031f870edf5c9515dd0158130ef1ec7a3f2aef717aa6691194146c7594b61d4b17b441b05b2648e8cf8bd22f653a8 SHA512 fe4c7a80cda3b880104b4670b51cfeb3e60b6840bcd7cffeab36cc9589522514a2bf97d76fcb70b30ff4ad7ca773c24bc70bc65ab5264c390d657cdc314bf027
-MISC metadata.xml 6894 BLAKE2B 8cfae555847eb4ace7ea9aff3c5ec0210222caa47f5ce8d22eb2925c9e133bcdfdced3cb7b014cd819f93f790076c03b3a686852e459fba3fec0e76073424576 SHA512 7bb2abee382ff23056197e5d82810312561ddeb9b5bc243756f613acfae040f3658c6fcb423acb125d247ac46c8f45b5b58cbc2116852a6f986cb5ec4bc6ac88
+MISC metadata.xml 6665 BLAKE2B fd39736f5da7c60387713db08715b11c8dbc9c7a683784e57279595d2c0dd694a2dc068e2cde94247199b765c7d1f2374db8036a05f4fd5c57ca5e4089bdf894 SHA512 bc3a2808f0631f9f98b17738cf6ecb5a4abd6b0bfc2fc66ee335faf05a7a7ef2a8e600dde9f8d801e8605570d14efc899fa6fa75333dee345b47a0b4f1d33600
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..10134612ebf8 100644
--- a/dev-games/ogre/metadata.xml
+++ b/dev-games/ogre/metadata.xml
@@ -77,23 +77,24 @@ 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 name="deprecated" restrict="&gt;dev-games/ogre-13">
+ Build deprecated nodeless positioning of Lights and Cameras.
</flag>
+ <flag name="egl">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.
</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
@@ -101,12 +102,6 @@ Exporters
</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 +115,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 (sven@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=(
+ Icon@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."
+}