+Media paths are fine already, the removed lines would screw them up.
+
--- 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 @@
+@@ -186,15 +186,6 @@
# CREATE CONFIG FILES - BUILD DIR VERSIONS
if (NOT (OGRE_BUILD_PLATFORM_APPLE_IOS OR WINDOWS_STORE OR WINDOWS_PHONE))
- 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}")
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-CMAKE_REMOVE_MODULES="yes"
CMAKE_REMOVE_MODULES_LIST="FindFreetype FindDoxygen FindZLIB"
-inherit cmake-utils
-MY_COMMIT="35b083cba64a"
-MY_P="sinbad-${PN}-${MY_COMMIT}"
+inherit cmake flag-o-matic git-r3
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"
+
+EGIT_BRANCH="v2-1"
+EGIT_COMMIT="5b682fb90c9e8e660e2fbf92bbf7797a9246700d"
+EGIT_REPO_URI="https://github.com/OGRECave/ogre-next.git"
+EGIT_SUBMODULES=()
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 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
+# cg
+# double-precision
REQUIRED_USE="
|| ( gles2 opengl )
"
# Dependencies for USE flags that do not work, yet.
# cg? ( media-gfx/nvidia-cg-toolkit )
+
DEPEND="${RDEPEND}
virtual/pkgconfig
x11-base/xorg-proto
"${FILESDIR}/${PN}-2.1-enhance_config_loading.patch"
)
-S=${WORKDIR}/${MY_P}
-
src_prepare() {
sed -i \
-e "s:share/OGRE/docs:share/doc/${PF}:" \
CMake/Utils/OgreConfigTargets.cmake || die
# Fix some path issues
- cmake-utils_src_prepare
+ cmake_src_prepare
}
src_configure() {
-DOGRE_BUILD_COMPONENT_HLMS_UNLIT_MOBILE=$(usex mobile)
-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_SAMPLES2=$(usex examples)
-DOGRE_BUILD_TESTS=no
-DOGRE_BUILD_TOOLS=$(usex tools)
+ -DOGRE_CONFIG_ALLOCATOR=$(usex debug 5 1)
+ -DOGRE_CONFIG_ENABLE_FINE_LIGHT_MASK_GRANULARITY=yes
-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_THREAD_PROVIDER=std
-DOGRE_FULL_RPATH=no
-DOGRE_PROFILING_PROVIDER=$(usex profile none internal)
-DOGRE_USE_BOOST=no
)
- # Options that aren't ported, yet:
- # -DOGRE_BUILD_PLUGIN_CG=$(usex cg)
+
+ # The double-precision mode can not be enabled, yet.
# -DOGRE_CONFIG_DOUBLE=$(usex double-precision)
+ # The CgFxScriptLoader doesn't seem to be completely ported, yet.
+ # USE flag disabled.
+ mycmakeargs+=(
+ -DOGRE_BUILD_PLUGIN_CG=no
+ )
+
# 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.
-DOGRE_BUILD_COMPONENT_VOLUME=no
)
- cmake-utils_src_configure
+ # 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.
+ # (The warning is part of -Wextra and only effects C++ compilation.)
+ append-cxxflags $(test-flags-CXX -Wno-deprecated-copy)
+
+ # The same with the old ways of using memset(0...) on objects. It is
+ # no longer assumed to be a good idea, but a warning about it isn't
+ # of any value to the user. (And it happens many times in Ogre.)
+ append-cxxflags $(test-flags-CXX -Wno-class-memaccess)
+
+ cmake_src_configure
}
src_install() {
- cmake-utils_src_install
+ cmake_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
+ doins "${BUILD_DIR}"/bin/plugins.cfg
+ doins "${BUILD_DIR}"/bin/plugins_tools.cfg
+ doins "${BUILD_DIR}"/bin/resources.cfg
+ doins "${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
# These are only for the Samples
if use examples ; then
insinto "${SHAREDIR}"
- doins "${CMAKE_BUILD_DIR}"/bin/samples.cfg
+ doins "${BUILD_DIR}"/bin/samples.cfg
fi
}