summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <sven.eden@gmx.de>2018-03-23 20:29:30 +0100
committerSven Eden <sven.eden@gmx.de>2018-03-23 20:29:30 +0100
commit54f4140218823dc51408a553433ab74154783ada (patch)
treeeb388a4843ce4c242ff197ba9890d3023a1f949f
parentdev-games/ogre-1.10.11 : Ebuild for current stable release (diff)
downloadseden-54f4140218823dc51408a553433ab74154783ada.tar.gz
seden-54f4140218823dc51408a553433ab74154783ada.tar.bz2
seden-54f4140218823dc51408a553433ab74154783ada.zip
dev-games/ogre-2.1-r20180323 : Experimental dev ebuild
-rw-r--r--dev-games/ogre/Manifest1
-rw-r--r--dev-games/ogre/TODO4
-rw-r--r--dev-games/ogre/files/ogre-2.1-media_path.patch28
-rw-r--r--dev-games/ogre/files/ogre-2.1-resource_path.patch18
-rw-r--r--dev-games/ogre/files/ogre-2.1-samples.patch13
-rw-r--r--dev-games/ogre/ogre-2.1-r20180323.ebuild137
6 files changed, 200 insertions, 1 deletions
diff --git a/dev-games/ogre/Manifest b/dev-games/ogre/Manifest
index 6278b35..87384fb 100644
--- a/dev-games/ogre/Manifest
+++ b/dev-games/ogre/Manifest
@@ -1,2 +1 @@
DIST ogre-1.10.11.zip 133064317 SHA256 2d14a685857865c4acfb54b8eddce31e423b0dd0a556cf563de47b31d1d40624 SHA512 db207aec8330ec9da2a9781c8753411e69e08008995b8b3e127d454dc05aa899c75157718398ca24998644c586e2dd30cc7e9b7d98e045e4575537f5c81a5a54 WHIRLPOOL e914d2aa9bdee60d6421c6462e054a56700e3ceb2f76d24b491304a6c5b4ef0a00de5c5743739d0e7bac279f7364feba6df74a38beeeb8cfde54ecc5b47adb34
-DIST ogre-1.10.4.tar.bz2 134698188 SHA256 2fd3781ed533898602ced9ee528e9b42f0694ff8561e21341f44752e6d33d86b SHA512 6756648f7e90d8f6e6f49f85257f81be27b63c7b572028b97f9ded57d5a9256af39c0afba649190190565bd4a5b1b25354fb0d237e3b93453709bc4d49c777ad WHIRLPOOL 05ad8fd28787ed1cd847f02fcd5b2936615502c81ae455d4c6306184bccda3d8ae43cbb51348f3c104a27c64d9e9c567787869eb6ec15389c00f932b258c8c2f
diff --git a/dev-games/ogre/TODO b/dev-games/ogre/TODO
index e0a0abb..d8f3ee2 100644
--- a/dev-games/ogre/TODO
+++ b/dev-games/ogre/TODO
@@ -11,3 +11,7 @@ Things to do to bring Ogre3D forward on Gentoo Linux
- This needs MojoShader (http://icculus.org/mojoshader/) [optional?]
- This needs a live ebuild.
- After that a USE flag can be added
+
+- Add Remotery support (https://github.com/Celtoys/Remotery)
+ - Realtime CPU/D3D/OpenGL/CUDA/Metal Profiler in a single C file with web
+ browser viewer
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 0000000..5e7ad27
--- /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 0000000..32cfef0
--- /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 0000000..71cbea6
--- /dev/null
+++ b/dev-games/ogre/files/ogre-2.1-samples.patch
@@ -0,0 +1,13 @@
+--- 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)
diff --git a/dev-games/ogre/ogre-2.1-r20180323.ebuild b/dev-games/ogre/ogre-2.1-r20180323.ebuild
new file mode 100644
index 0000000..07d71b3
--- /dev/null
+++ b/dev-games/ogre/ogre-2.1-r20180323.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils git-r3 cmake-utils vcs-snapshot
+
+DESCRIPTION="Object-oriented Graphics Rendering Engine"
+HOMEPAGE="http://www.ogre3d.org/"
+
+EGIT_MIN_CLONE_TYPE="shallow"
+EGIT_REPO_URI="https://github.com/OGRECave/ogre"
+EGIT_BRANCH="v2-1"
+EGIT_COMMIT="55327534fbc65808328ac0216ecad535052616c3"
+SRC_URI=""
+
+LICENSE="MIT public-domain"
+SLOT="0/2.1"
+KEYWORDS=""
+
+IUSE="doc examples +freeimage gl3plus gles2 gles3 json ois +opengl profile tools"
+
+# USE flags for features that do not work, yet
+# cg double-precision
+
+REQUIRED_USE="examples? ( ois )
+ gles3? ( gles2 )
+ gl3plus? ( opengl )"
+
+RESTRICT="test" #139905
+
+RDEPEND="
+ dev-libs/zziplib
+ freeimage? ( media-libs/freeimage )
+ gl3plus? ( >=media-libs/mesa-9.2.5 )
+ gles2? ( >=media-libs/mesa-9.0.0[gles2] )
+ gles3? ( >=media-libs/mesa-10.0.0[gles2] )
+ json? ( dev-libs/rapidjson )
+ media-libs/freetype:2
+ ois? ( dev-games/ois )
+ tools? ( dev-libs/tinyxml[stl] )
+ virtual/glu
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXrandr
+ x11-libs/libXt"
+# Dependencies for USE flags that do not work, yet.
+# cg? ( media-gfx/nvidia-cg-toolkit )
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ virtual/pkgconfig
+ x11-proto/xf86vidmodeproto"
+PATCHES=(
+ "${FILESDIR}/${P}-samples.patch"
+ "${FILESDIR}/${P}-resource_path.patch"
+ "${FILESDIR}/${P}-media_path.patch"
+)
+
+src_fetch() {
+ git-r3_src_fetch
+}
+
+src_unpack() {
+ git-r3_src_unpack
+}
+
+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_MOBILE=NO
+ -DOGRE_BUILD_COMPONENT_HLMS_UNLIT_MOBILE=NO
+ -DOGRE_BUILD_SAMPLES2=$(usex examples)
+ -DOGRE_BUILD_TESTS=NO
+ -DOGRE_BUILD_TOOLS=$(usex tools)
+ -DOGRE_CONFIG_ENABLE_FREEIMAGE=$(usex freeimage)
+ -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_PROFILING_PROVIDER=$(usex profile none internal)
+ -DOGRE_USE_BOOST=NO
+ )
+ # USE flags for features that do not work, 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_PLANAR_REFLECTIONS=YES
+ -DOGRE_BUILD_COMPONENT_PROPERTY=NO
+ -DOGRE_BUILD_COMPONENT_RTSHADERSYSTEM=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 sample browser
+ insinto "${SHAREDIR}"
+# doins "${CMAKE_BUILD_DIR}"/bin/quakemap.cfg
+ doins "${CMAKE_BUILD_DIR}"/bin/samples.cfg
+}