diff options
author | Sven Eden <yamakuzure@gmx.net> | 2018-09-07 08:32:24 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2018-10-07 20:22:28 +0200 |
commit | caa70850f4a747a5a5b9f8bd6d0e541e1f2b4310 (patch) | |
tree | 7a71f5477f0ba6c5d22e385398f272d9da8a2d97 | |
parent | dev-games/ogre: 1.11.2 version bump (diff) | |
download | gentoo-caa70850f4a747a5a5b9f8bd6d0e541e1f2b4310.tar.gz gentoo-caa70850f4a747a5a5b9f8bd6d0e541e1f2b4310.tar.bz2 gentoo-caa70850f4a747a5a5b9f8bd6d0e541e1f2b4310.zip |
dev-games/ogre: Pre 2.1 release snapshot 2018-09-01 added
As the future of Ogre changes a lot of the old API, it is important to have
access to the new system as early as possible. The current development state
is quite usable already, although not all components have been ported, yet.
Providing an ebuild for the new 2.1 series to interested users and developers,
everybody gets the chance to adapt their project to the future of Ogre.
This is done using snapshot ebuilds, because not all commits in the Ogre tree
provide buildable revisions. Further it is easier to test newly ported
components when snapshot ebuilds are used.
Bug: https://bugs.gentoo.org/647266
Closes: https://bugs.gentoo.org/647266
Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
Package-Manager: Portage-2.3.48, Repoman-2.3.10
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r-- | dev-games/ogre/Manifest | 1 | ||||
-rw-r--r-- | dev-games/ogre/files/ogre-2.1-enhance_config_loading.patch | 29 | ||||
-rw-r--r-- | dev-games/ogre/files/ogre-2.1-media_path.patch | 28 | ||||
-rw-r--r-- | dev-games/ogre/files/ogre-2.1-resource_path.patch | 18 | ||||
-rw-r--r-- | dev-games/ogre/files/ogre-2.1-samples.patch | 26 | ||||
-rw-r--r-- | dev-games/ogre/metadata.xml | 8 | ||||
-rw-r--r-- | dev-games/ogre/ogre-2.1_pre20180901.ebuild | 153 |
7 files changed, 263 insertions, 0 deletions
diff --git a/dev-games/ogre/Manifest b/dev-games/ogre/Manifest index 8b173e90d4fe..1b26aeec6818 100644 --- a/dev-games/ogre/Manifest +++ b/dev-games/ogre/Manifest @@ -1,3 +1,4 @@ DIST ogre-1.10.12.zip 133067192 BLAKE2B 188437153969504b169970d14c39d47c9e666308bf65412018f42ba8ad108876f164733fe2004ea31941ab5db534766c10b871b34ef525522d1120b175530b87 SHA512 63998ea4940d04adfc179a94aa91bb2598692307b429f4c7e5b86a1519c13817035de4c71afc9e4b33fde35e962504373d152de9b9cc8eebbbeb78b2c1942041 DIST ogre-1.11.2.zip 127409383 BLAKE2B 7493892f434847ea4afda580868b2a8572d65c9ea9de3709aacd789229531803450dbd78994ff0fae29a9435912a80029edba51db035c7a175c860ce07912968 SHA512 dc6a7e14ee515d5a5c218aa3f31cefc8ad95a175604fb5fb252185220c6fd537f7094d3a1086d5eb5e9515f8c528c7f6e2ccc95594ef9882204c666b87fae4e2 DIST ogre-1.9.0.tar.bz2 128098305 BLAKE2B 6e67a5b60a6606a910e099f1c7ba736eb525f079f3aba5cfb362329b9130059d303fc9df6f7b8611c0ba75e1e207fa018e543e93c9f5ce39a6621e4c72ed4a83 SHA512 b1ea93d80ac0978a7c228460a6714f8d17797450efd5af6765c9fa4402e9060a8ef3a700d2757593a3016fdc32276722c8f4a5d9889a3e2eb424f16162a52bde +DIST ogre-2.1_pre20180901.tar.bz2 152746767 BLAKE2B 758d31fca2e5e31080c688ba758948fb5998a8fe49b9052f79de6791786501d02d7079e8f55ed37dc1a93f360af1003d2a28a260ba687c60c75a1340b95232a7 SHA512 c3cb5630a35e0ddf8c688a972ab5f2821d62545b4febc013235157eaf5268b3ceac1b94c403d0298131991f3d80d1c9b3800212a49647c652ba02bd176f6cc04 diff --git a/dev-games/ogre/files/ogre-2.1-enhance_config_loading.patch b/dev-games/ogre/files/ogre-2.1-enhance_config_loading.patch new file mode 100644 index 000000000000..365aa7c69d61 --- /dev/null +++ b/dev-games/ogre/files/ogre-2.1-enhance_config_loading.patch @@ -0,0 +1,29 @@ +--- a/OgreMain/src/OgreConfigFile.cpp 2018-07-27 07:52:31.121337386 +0200 ++++ b/OgreMain/src/OgreConfigFile.cpp 2018-07-27 07:59:51.301317661 +0200 +@@ -62,8 +62,25 @@ + //----------------------------------------------------------------------- + void ConfigFile::load(const String& filename, const String& separators, bool trimWhitespace) + { +- loadDirect(filename, separators, trimWhitespace); ++ // Try automatic loading first ++ try { ++ loadDirect(filename, separators, trimWhitespace); ++ } catch (Exception &e) { ++ // Try /etc/OGRE/<file> next ++ try { ++ loadDirect("/etc/OGRE/" + filename, separators, trimWhitespace); ++ return; ++ } catch (...) { /* was just a test */ } ++ // Try /usr/share/OGRE/<file> last ++ try { ++ loadDirect("/usr/share/OGRE/" + filename, separators, trimWhitespace); ++ return; ++ } catch (...) { /* was just a test */ } ++ /* dammit... */ ++ throw e; ++ } + } ++ + //----------------------------------------------------------------------- + void ConfigFile::load(const String& filename, const String& resourceGroup, + const String& separators, bool trimWhitespace) diff --git a/dev-games/ogre/files/ogre-2.1-media_path.patch b/dev-games/ogre/files/ogre-2.1-media_path.patch new file mode 100644 index 000000000000..5e7ad276ac09 --- /dev/null +++ b/dev-games/ogre/files/ogre-2.1-media_path.patch @@ -0,0 +1,28 @@ +--- a/CMake/InstallResources.cmake 2018-03-23 10:49:24.620486243 +0100 ++++ b/CMake/InstallResources.cmake 2018-03-23 10:50:52.089485597 +0100 +@@ -186,15 +186,16 @@ + + # CREATE CONFIG FILES - BUILD DIR VERSIONS + if (NOT (OGRE_BUILD_PLATFORM_APPLE_IOS OR WINDOWS_STORE OR WINDOWS_PHONE)) +- if( NOT APPLE ) +- set(OGRE_MEDIA_DIR_REL "${OGRE_SOURCE_DIR}/Samples/Media") +- set(OGRE_MEDIA_DIR_DBG "${OGRE_SOURCE_DIR}/Samples/Media") +- else() +- set(OGRE_MEDIA_DIR_REL "Contents/Resources") +- set(OGRE_MEDIA_DIR_DBG "Contents/Resources") +- endif() +- set(OGRE_TEST_MEDIA_DIR_REL "${OGRE_SOURCE_DIR}/Tests/Media") +- set(OGRE_TEST_MEDIA_DIR_DBG "${OGRE_SOURCE_DIR}/Tests/Media") ++# No, they were fine already ++# if( NOT APPLE ) ++# set(OGRE_MEDIA_DIR_REL "${OGRE_SOURCE_DIR}/Samples/Media") ++# set(OGRE_MEDIA_DIR_DBG "${OGRE_SOURCE_DIR}/Samples/Media") ++# else() ++# set(OGRE_MEDIA_DIR_REL "Contents/Resources") ++# set(OGRE_MEDIA_DIR_DBG "Contents/Resources") ++# endif() ++# set(OGRE_TEST_MEDIA_DIR_REL "${OGRE_SOURCE_DIR}/Tests/Media") ++# set(OGRE_TEST_MEDIA_DIR_DBG "${OGRE_SOURCE_DIR}/Tests/Media") + else () + # iOS needs to use relative paths in the config files + set(OGRE_TEST_MEDIA_DIR_REL "${OGRE_MEDIA_PATH}") diff --git a/dev-games/ogre/files/ogre-2.1-resource_path.patch b/dev-games/ogre/files/ogre-2.1-resource_path.patch new file mode 100644 index 000000000000..32cfef0d8d14 --- /dev/null +++ b/dev-games/ogre/files/ogre-2.1-resource_path.patch @@ -0,0 +1,18 @@ +--- a/CMake/InstallResources.cmake 2018-03-23 10:48:44.371486540 +0100 ++++ b/CMake/InstallResources.cmake 2018-03-23 10:49:08.333486363 +0100 +@@ -226,10 +226,11 @@ + set(OGRE_SAMPLES_DIR_REL "") + set(OGRE_SAMPLES_DIR_DBG "") + elseif (UNIX) +- set(OGRE_PLUGIN_DIR_REL "${OGRE_BINARY_DIR}/lib") +- set(OGRE_PLUGIN_DIR_DBG "${OGRE_BINARY_DIR}/lib") +- set(OGRE_SAMPLES_DIR_REL "${OGRE_BINARY_DIR}/lib") +- set(OGRE_SAMPLES_DIR_DBG "${OGRE_BINARY_DIR}/lib") ++# No, this was already configured above, the BINARY paths are wrong! ++# set(OGRE_PLUGIN_DIR_REL "${OGRE_BINARY_DIR}/lib") ++# set(OGRE_PLUGIN_DIR_DBG "${OGRE_BINARY_DIR}/lib") ++# set(OGRE_SAMPLES_DIR_REL "${OGRE_BINARY_DIR}/lib") ++# set(OGRE_SAMPLES_DIR_DBG "${OGRE_BINARY_DIR}/lib") + endif () + + if (WINDOWS_STORE OR WINDOWS_PHONE) diff --git a/dev-games/ogre/files/ogre-2.1-samples.patch b/dev-games/ogre/files/ogre-2.1-samples.patch new file mode 100644 index 000000000000..6d12fb4fed11 --- /dev/null +++ b/dev-games/ogre/files/ogre-2.1-samples.patch @@ -0,0 +1,26 @@ +--- a/CMakeLists.txt 2018-03-23 10:48:02.309486850 +0100 ++++ b/CMakeLists.txt 2018-03-23 10:48:04.157486836 +0100 +@@ -614,7 +614,9 @@ + endif () + + # Setup samples +-add_subdirectory(Samples) ++if (OGRE_BUILD_SAMPLES2) ++ add_subdirectory(Samples) ++endif () + + # Add android JNI binding + if(ANDROID AND OGRE_BUILD_ANDROID_JNI_SAMPLE) +--- a/CMake/InstallResources.cmake 2018-04-06 19:18:45.095348540 +0200 ++++ b/CMake/InstallResources.cmake 2018-04-06 19:20:00.342345608 +0200 +@@ -62,8 +62,8 @@ + set(OGRE_TEST_MEDIA_DIR_DBG "${CMAKE_INSTALL_PREFIX}/Tests/Media") + set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE") + set(OGRE_PLUGIN_DIR_DBG "${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE") +- set(OGRE_SAMPLES_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE/Samples") +- set(OGRE_SAMPLES_DIR_DBG "${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE/Samples") ++ set(OGRE_SAMPLES_DIR_REL "${CMAKE_INSTALL_PREFIX}/share/OGRE/Samples") ++ set(OGRE_SAMPLES_DIR_DBG "${CMAKE_INSTALL_PREFIX}/share/OGRE/Samples") + set(OGRE_CFG_INSTALL_PATH "share/OGRE") + endif () + diff --git a/dev-games/ogre/metadata.xml b/dev-games/ogre/metadata.xml index f6f82039884f..5db91d3cf65f 100644 --- a/dev-games/ogre/metadata.xml +++ b/dev-games/ogre/metadata.xml @@ -94,8 +94,16 @@ Exporters <flag name="gles2">Build OpenGL ES 2.x RenderSystem</flag> <flag name="gles3">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 + is still experimental. + </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> + <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_pre20180901.ebuild b/dev-games/ogre/ogre-2.1_pre20180901.ebuild new file mode 100644 index 000000000000..9249788cc201 --- /dev/null +++ b/dev-games/ogre/ogre-2.1_pre20180901.ebuild @@ -0,0 +1,153 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +CMAKE_REMOVE_MODULES="yes" +CMAKE_REMOVE_MODULES_LIST="FindFreetype FindDoxygen FindZLIB" +inherit cmake-utils + +MY_COMMIT="35b083cba64a" +MY_P="sinbad-${PN}-${MY_COMMIT}" + +DESCRIPTION="Object-oriented Graphics Rendering Engine" +HOMEPAGE="https://www.ogre3d.org/" +SRC_URI="https://bitbucket.org/sinbad/ogre/get/${MY_COMMIT}.tar.bz2 -> ${P}.tar.bz2" + +LICENSE="MIT public-domain" +SLOT="0/2.1" +KEYWORDS="" + +IUSE="+cache debug doc egl examples +freeimage gles2 json +legacy-animations + mobile +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 )" + +RESTRICT="test" #139905 + +RDEPEND=" + dev-games/ois + dev-libs/zziplib + media-libs/freetype:2 + x11-libs/libX11 + x11-libs/libXaw + x11-libs/libXrandr + x11-libs/libXt + egl? ( media-libs/mesa[egl] ) + freeimage? ( media-libs/freeimage ) + gles2? ( media-libs/mesa[gles2] ) + json? ( dev-libs/rapidjson ) + opengl? ( + virtual/glu + virtual/opengl + ) + tools? ( dev-libs/tinyxml[stl] ) +" +# Dependencies for USE flags that do not work, yet. +# cg? ( media-gfx/nvidia-cg-toolkit ) +DEPEND="${RDEPEND} + virtual/pkgconfig + x11-base/xorg-proto + doc? ( app-doc/doxygen )" + +PATCHES=( + "${FILESDIR}/${PN}-2.1-samples.patch" + "${FILESDIR}/${PN}-2.1-resource_path.patch" + "${FILESDIR}/${PN}-2.1-media_path.patch" + "${FILESDIR}/${PN}-2.1-enhance_config_loading.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 + sed -i \ + -e '/CONFIGURATIONS/s:CONFIGURATIONS Release.*::' \ + CMake/Utils/OgreConfigTargets.cmake || die + + # Fix some path issues + cmake-utils_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_PLANAR_REFLECTIONS=yes + -DOGRE_BUILD_COMPONENT_SCENE_FORMAT=yes + -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=$(usex opengl) + -DOGRE_BUILD_RENDERSYSTEM_GLES=no + -DOGRE_BUILD_RENDERSYSTEM_GLES2=$(usex gles2) + -DOGRE_BUILD_SAMPLES2=$(usex examples) + -DOGRE_BUILD_TESTS=no + -DOGRE_BUILD_TOOLS=$(usex tools) + -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_THREADS=2 + -DOGRE_CONFIG_THREAD_PROVIDER=std + -DOGRE_FULL_RPATH=no + -DOGRE_INSTALL_DOCS=$(usex doc) + -DOGRE_INSTALL_SAMPLES=$(usex examples) + -DOGRE_INSTALL_SAMPLES_SOURCE=$(usex examples) + -DOGRE_LEGACY_ANIMATIONS=$(usex legacy-animations) + -DOGRE_PROFILING_PROVIDER=$(usex profile none internal) + -DOGRE_USE_BOOST=no + ) + # Options that aren't ported, yet: + # -DOGRE_BUILD_PLUGIN_CG=$(usex cg) + # -DOGRE_CONFIG_DOUBLE=$(usex double-precision) + + # These components are off by default, as they might not be ported, yet. + # When advancing to a newer commit, try whether any of the disabled + # components can be activated now. + mycmakeargs+=( + -DOGRE_BUILD_COMPONENT_PAGING=no + -DOGRE_BUILD_COMPONENT_PROPERTY=no + -DOGRE_BUILD_COMPONENT_RTSHADERSYSTEM=no + -DOGRE_BUILD_RTSHADERSYSTEM_CORE_SHADERS=no + -DOGRE_BUILD_RTSHADERSYSTEM_EXT_SHADERS=no + -DOGRE_BUILD_COMPONENT_TERRAIN=no + -DOGRE_BUILD_COMPONENT_VOLUME=no + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + CONFIGDIR=/etc/OGRE + SHAREDIR=/usr/share/OGRE + + # plugins and resources are the main configuration + insinto "${CONFIGDIR}" + doins "${CMAKE_BUILD_DIR}"/bin/plugins.cfg + doins "${CMAKE_BUILD_DIR}"/bin/plugins_tools.cfg + doins "${CMAKE_BUILD_DIR}"/bin/resources.cfg + doins "${CMAKE_BUILD_DIR}"/bin/resources2.cfg + dosym "${CONFIGDIR}"/plugins.cfg "${SHAREDIR}"/plugins.cfg + dosym "${CONFIGDIR}"/plugins_tools.cfg "${SHAREDIR}"/plugins_tools.cfg + dosym "${CONFIGDIR}"/resources.cfg "${SHAREDIR}"/resources.cfg + dosym "${CONFIGDIR}"/resources2.cfg "${SHAREDIR}"/resources2.cfg + + # These are only for the Samples + if use examples ; then + insinto "${SHAREDIR}" + doins "${CMAKE_BUILD_DIR}"/bin/samples.cfg + fi +} |