Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-games/ogre/, dev-games/ogre/files/
Date: Tue, 07 Jan 2020 22:58:38
Message-Id: 1578437875.bd845a620c2c15a98e72e66bace7a1e3217cf868.chewi@gentoo
1 commit: bd845a620c2c15a98e72e66bace7a1e3217cf868
2 Author: Sven Eden <yamakuzure <AT> gmx <DOT> net>
3 AuthorDate: Mon Jan 6 14:17:08 2020 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 7 22:57:55 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd845a62
7
8 dev-games/ogre: Fix ebuild for 1.9.0 (EAPI 7)
9
10 Signed-off-by: Sven Eden <yamakuzure <AT> gmx.net>
11 Closes: https://github.com/gentoo/gentoo/pull/13655
12 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
13
14 dev-games/ogre/files/ogre-1.9.0-samples.patch | 4 +-
15 dev-games/ogre/ogre-1.9.0-r2.ebuild | 133 ++++++++++++++++++++++++++
16 2 files changed, 135 insertions(+), 2 deletions(-)
17
18 diff --git a/dev-games/ogre/files/ogre-1.9.0-samples.patch b/dev-games/ogre/files/ogre-1.9.0-samples.patch
19 index d7573d7662b..0bf886b27d7 100644
20 --- a/dev-games/ogre/files/ogre-1.9.0-samples.patch
21 +++ b/dev-games/ogre/files/ogre-1.9.0-samples.patch
22 @@ -1,5 +1,5 @@
23 ---- CMakeLists.txt.orig
24 -+++ CMakeLists.txt
25 +--- a/CMakeLists.txt
26 ++++ b/CMakeLists.txt
27 @@ -519,7 +519,9 @@
28 endif ()
29
30
31 diff --git a/dev-games/ogre/ogre-1.9.0-r2.ebuild b/dev-games/ogre/ogre-1.9.0-r2.ebuild
32 new file mode 100644
33 index 00000000000..1840540157e
34 --- /dev/null
35 +++ b/dev-games/ogre/ogre-1.9.0-r2.ebuild
36 @@ -0,0 +1,133 @@
37 +# Copyright 1999-2020 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=7
41 +
42 +CMAKE_REMOVE_MODULES_LIST="FindFreetype FindDoxygen FindZLIB"
43 +
44 +inherit cmake vcs-snapshot
45 +
46 +DESCRIPTION="Object-oriented Graphics Rendering Engine"
47 +HOMEPAGE="https://www.ogre3d.org/"
48 +SRC_URI="https://bitbucket.org/sinbad/ogre/get/v${PV//./-}.tar.bz2 -> ${P}.tar.bz2"
49 +
50 +LICENSE="MIT public-domain"
51 +SLOT="0/1.9.0"
52 +KEYWORDS="~amd64 ~arm ~x86"
53 +
54 +# gles1 currently broken wrt bug #418201
55 +# gles1 does not even build wrt bug #506058
56 +IUSE="+boost cg doc double-precision examples +freeimage gl3plus gles2 gles3 ois +opengl poco profile tbb threads tools +zip"
57 +
58 +REQUIRED_USE="threads? ( ^^ ( boost poco tbb ) )
59 + examples? ( ois )
60 + poco? ( threads )
61 + tbb? ( threads )
62 + gl3plus? ( !gles2 !gles3 )
63 + gles3? ( gles2 )
64 + gl3plus? ( opengl )"
65 +
66 +RESTRICT="test" #139905
67 +
68 +RDEPEND="
69 + media-libs/freetype:2
70 + virtual/opengl
71 + virtual/glu
72 + x11-libs/libX11
73 + x11-libs/libXaw
74 + x11-libs/libXrandr
75 + x11-libs/libXt
76 + boost? ( dev-libs/boost:= )
77 + cg? ( media-gfx/nvidia-cg-toolkit )
78 + freeimage? ( media-libs/freeimage )
79 + gles2? ( >=media-libs/mesa-9.0.0[gles2] )
80 + gles3? ( >=media-libs/mesa-10.0.0[gles2] )
81 + gl3plus? ( >=media-libs/mesa-9.2.5 )
82 + ois? ( dev-games/ois )
83 + threads? (
84 + poco? ( dev-libs/poco )
85 + tbb? ( dev-cpp/tbb )
86 + )
87 + tools? ( dev-libs/tinyxml[stl] )
88 + zip? ( sys-libs/zlib dev-libs/zziplib )"
89 +DEPEND="${RDEPEND}
90 + virtual/pkgconfig
91 + x11-base/xorg-proto
92 + doc? ( app-doc/doxygen )"
93 +
94 +PATCHES=(
95 + "${FILESDIR}/${P}-remove_resource_path_to_bindir.patch"
96 + "${FILESDIR}/${P}-remove_media_path_to_bindir.patch"
97 + "${FILESDIR}/${P}-gcc52.patch"
98 + "${FILESDIR}/${P}-samples.patch"
99 +)
100 +
101 +src_prepare() {
102 + sed -i \
103 + -e "s:share/OGRE/docs:share/doc/${PF}:" \
104 + Docs/CMakeLists.txt || die
105 + # Stupid build system hardcodes release names
106 + sed -i \
107 + -e '/CONFIGURATIONS/s:CONFIGURATIONS Release.*::' \
108 + CMake/Utils/OgreConfigTargets.cmake || die
109 +
110 + # make sure we're not using the included tinyxml
111 + rm -f Tools/XMLConverter/{include,src}/tiny*.*
112 +
113 + # Fix some path issues
114 + cmake_src_prepare
115 +}
116 +
117 +src_configure() {
118 + local mycmakeargs=(
119 + -DOGRE_FULL_RPATH=NO
120 + -DOGRE_USE_BOOST=$(usex boost)
121 + -DOGRE_BUILD_PLUGIN_CG=$(usex cg)
122 + -DOGRE_INSTALL_DOCS=$(usex doc)
123 + -DOGRE_CONFIG_DOUBLE=$(usex double-precision)
124 + -DOGRE_CONFIG_ENABLE_FREEIMAGE=$(usex freeimage)
125 + -DOGRE_BUILD_RENDERSYSTEM_GL=$(usex opengl)
126 + -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=$(usex gl3plus)
127 + -DOGRE_BUILD_RENDERSYSTEM_GLES=FALSE
128 + -DOGRE_BUILD_RENDERSYSTEM_GLES2=$(usex gles2)
129 + -DOGRE_CONFIG_ENABLE_GLES3_SUPPORT=$(usex gles3)
130 + -DOGRE_PROFILING=$(usex profile)
131 + -DOGRE_BUILD_SAMPLES=$(usex examples)
132 + -DOGRE_INSTALL_SAMPLES=$(usex examples)
133 + -DOGRE_INSTALL_SAMPLES_SOURCE=$(usex examples)
134 + -DOGRE_BUILD_TESTS=FALSE
135 + -DOGRE_CONFIG_THREADS=$(usex threads 2 0)
136 + -DOGRE_BUILD_TOOLS=$(usex tools)
137 + -DOGRE_CONFIG_ENABLE_ZIP=$(usex zip)
138 + )
139 +
140 + if use threads ; then
141 + local f
142 + for f in boost poco tbb ; do
143 + use ${f} || continue
144 + mycmakeargs+=( -DOGRE_CONFIG_THREAD_PROVIDER=${f} )
145 + break
146 + done
147 + fi
148 +
149 + cmake_src_configure
150 +}
151 +
152 +src_install() {
153 + cmake_src_install
154 +
155 + CONFIGDIR=/etc/OGRE
156 + SHAREDIR=/usr/share/OGRE
157 +
158 + # plugins and resources are the main configuration
159 + insinto "${CONFIGDIR}"
160 + doins "${BUILD_DIR}"/bin/plugins.cfg
161 + doins "${BUILD_DIR}"/bin/resources.cfg
162 + dosym "${CONFIGDIR}"/plugins.cfg "${SHAREDIR}"/plugins.cfg
163 + dosym "${CONFIGDIR}"/resources.cfg "${SHAREDIR}"/resources.cfg
164 +
165 + # These are only for the sample browser
166 + insinto "${SHAREDIR}"
167 + doins "${BUILD_DIR}"/bin/quakemap.cfg
168 + doins "${BUILD_DIR}"/bin/samples.cfg
169 +}