|
Lines 5-11
Link Here
|
| 5 |
EAPI=5 |
5 |
EAPI=5 |
| 6 |
CMAKE_REMOVE_MODULES="yes" |
6 |
CMAKE_REMOVE_MODULES="yes" |
| 7 |
CMAKE_REMOVE_MODULES_LIST="FindFreetype" |
7 |
CMAKE_REMOVE_MODULES_LIST="FindFreetype" |
| 8 |
inherit eutils cmake-utils vcs-snapshot |
8 |
|
|
|
9 |
inherit eutils cmake-utils vcs-snapshot versionator |
| 10 |
|
| 11 |
MY_PV=$(get_version_component_range 1-3) |
| 12 |
MY_P=${PN}-${MY_PV} |
| 13 |
|
| 14 |
LIBDIR=/usr/$(get_libdir)/OGRE |
| 15 |
SHAREDIR=/usr/share/OGRE |
| 16 |
SAMPLEDIR=${LIBDIR}/Samples |
| 17 |
TESTDIR=/usr/local/share/OGRE |
| 9 |
|
18 |
|
| 10 |
DESCRIPTION="Object-oriented Graphics Rendering Engine" |
19 |
DESCRIPTION="Object-oriented Graphics Rendering Engine" |
| 11 |
HOMEPAGE="http://www.ogre3d.org/" |
20 |
HOMEPAGE="http://www.ogre3d.org/" |
|
Lines 14-23
Link Here
|
| 14 |
LICENSE="MIT public-domain" |
23 |
LICENSE="MIT public-domain" |
| 15 |
SLOT="0/1.9.0" |
24 |
SLOT="0/1.9.0" |
| 16 |
KEYWORDS="~amd64 ~x86" |
25 |
KEYWORDS="~amd64 ~x86" |
| 17 |
IUSE="+boost cg doc double-precision examples +freeimage gles2 ois +opengl poco profile tbb threads tools +zip" |
26 |
IUSE="\ |
|
|
27 |
+boost cg doc double-precision examples +freeimage gl3plus gles1 gles2 \ |
| 28 |
gles3 ois +opengl poco profile tbb threads tools +zip" |
| 18 |
REQUIRED_USE="threads? ( ^^ ( boost poco tbb ) ) |
29 |
REQUIRED_USE="threads? ( ^^ ( boost poco tbb ) ) |
| 19 |
poco? ( threads ) |
30 |
poco? ( threads ) |
| 20 |
tbb? ( threads )" |
31 |
tbb? ( threads ) |
|
|
32 |
gles1? ( !gl3plus ) |
| 33 |
gles2? ( !gl3plus ) |
| 34 |
gles3? ( ( !gl3plus ) ( gles2 ) ) |
| 35 |
gl3plus? ( ( opengl ) ( !gles1 ) ( !gles2 ) ( !gles3 ) )" |
| 21 |
RESTRICT="test" #139905 |
36 |
RESTRICT="test" #139905 |
| 22 |
|
37 |
|
| 23 |
RDEPEND=" |
38 |
RDEPEND=" |
|
Lines 32-38
Link Here
|
| 32 |
boost? ( dev-libs/boost ) |
47 |
boost? ( dev-libs/boost ) |
| 33 |
cg? ( media-gfx/nvidia-cg-toolkit ) |
48 |
cg? ( media-gfx/nvidia-cg-toolkit ) |
| 34 |
freeimage? ( media-libs/freeimage ) |
49 |
freeimage? ( media-libs/freeimage ) |
| 35 |
gles2? ( >=media-libs/mesa-8.0.0[gles2] ) |
50 |
gles1? ( >=media-libs/mesa-8.0.0[gles1] ) |
|
|
51 |
gles2? ( >=media-libs/mesa-9.0.0[gles2] ) |
| 52 |
gles3? ( >=media-libs/mesa-10.0.0[gles2] ) |
| 53 |
gl3plus? ( >=media-libs/mesa-9.2.5 ) |
| 36 |
ois? ( dev-games/ois ) |
54 |
ois? ( dev-games/ois ) |
| 37 |
threads? ( |
55 |
threads? ( |
| 38 |
poco? ( dev-libs/poco ) |
56 |
poco? ( dev-libs/poco ) |
|
Lines 65-72
Link Here
|
| 65 |
$(cmake-utils_use examples OGRE_INSTALL_SAMPLES) |
83 |
$(cmake-utils_use examples OGRE_INSTALL_SAMPLES) |
| 66 |
$(cmake-utils_use freeimage OGRE_CONFIG_ENABLE_FREEIMAGE) |
84 |
$(cmake-utils_use freeimage OGRE_CONFIG_ENABLE_FREEIMAGE) |
| 67 |
$(cmake-utils_use opengl OGRE_BUILD_RENDERSYSTEM_GL) |
85 |
$(cmake-utils_use opengl OGRE_BUILD_RENDERSYSTEM_GL) |
| 68 |
-DOGRE_BUILD_RENDERSYSTEM_GLES=OFF |
86 |
$(cmake-utils_use gl3plus OGRE_BUILD_RENDERSYSTEM_GL3PLUS) |
|
|
87 |
$(cmake-utils_use gles1 OGRE_BUILD_RENDERSYSTEM_GLES) |
| 69 |
$(cmake-utils_use gles2 OGRE_BUILD_RENDERSYSTEM_GLES2) |
88 |
$(cmake-utils_use gles2 OGRE_BUILD_RENDERSYSTEM_GLES2) |
|
|
89 |
$(cmake-utils_use gles3 OGRE_CONFIG_ENABLE_GLES3_SUPPORT) |
| 70 |
$(cmake-utils_use profile OGRE_PROFILING) |
90 |
$(cmake-utils_use profile OGRE_PROFILING) |
| 71 |
$(cmake-utils_use examples OGRE_BUILD_SAMPLES) |
91 |
$(cmake-utils_use examples OGRE_BUILD_SAMPLES) |
| 72 |
-DOGRE_BUILD_TESTS=FALSE |
92 |
-DOGRE_BUILD_TESTS=FALSE |
|
Lines 85-94
Link Here
|
| 85 |
fi |
105 |
fi |
| 86 |
|
106 |
|
| 87 |
cmake-utils_src_configure |
107 |
cmake-utils_src_configure |
|
|
108 |
|
| 109 |
# Unfortunately cmake has put its detected paths into the config files. |
| 110 |
# plugins.cfg: |
| 111 |
# /home/portage/dev-games/ogre-1.9.0/work/ogre-1.9.0_build/lib |
| 112 |
sed -i \ |
| 113 |
-e "s,${CMAKE_BUILD_DIR}/lib,${LIBDIR},g" \ |
| 114 |
"${CMAKE_BUILD_DIR}"/bin/plugins.cfg || \ |
| 115 |
die "Fixing plugins.cfg failed" |
| 116 |
# quakemap: |
| 117 |
# /home/portage/dev-games/ogre-1.9.0/work/ogre-1.9.0/Samples/Media/packs/chiropteraDM.pk3 |
| 118 |
sed -i \ |
| 119 |
-e "s,${WORKDIR}/${MY_P}/Samples,${SHAREDIR}," \ |
| 120 |
"${CMAKE_BUILD_DIR}"/bin/quakemap.cfg || \ |
| 121 |
die "Fixing quakemap.cfg failed" |
| 122 |
# resources.cfg: |
| 123 |
# /home/portage/dev-games/ogre-1.9.0/work/ogre-1.9.0/Samples |
| 124 |
# /home/portage/dev-games/ogre-1.9.0/work/ogre-1.9.0/Tests |
| 125 |
sed -i \ |
| 126 |
-e "s,${WORKDIR}/${MY_P}/Samples,${SHAREDIR},g" \ |
| 127 |
-e "s,${WORKDIR}/${MY_P}/Tests,${TESTDIR}," \ |
| 128 |
"${CMAKE_BUILD_DIR}"/bin/resources.cfg || \ |
| 129 |
die "Fixing resources.cfg failed" |
| 130 |
# samples.cfg: |
| 131 |
# /home/portage/dev-games/ogre-1.9.0/work/ogre-1.9.0_build/lib |
| 132 |
sed -i \ |
| 133 |
-e "s,${CMAKE_BUILD_DIR}/lib,${LIBDIR}/Samples,g" \ |
| 134 |
"${CMAKE_BUILD_DIR}"/bin/samples.cfg || \ |
| 135 |
die "Fixing samples.cfg failed" |
| 136 |
|
| 137 |
# tests.cfg is not needed |
| 88 |
} |
138 |
} |
| 89 |
|
139 |
|
| 90 |
src_install() { |
140 |
src_install() { |
| 91 |
cmake-utils_src_install |
141 |
cmake-utils_src_install |
| 92 |
docinto examples |
142 |
|
| 93 |
dodoc "${CMAKE_BUILD_DIR}"/bin/*.cfg |
143 |
## Those are no longer just examples but the real configuration of the |
|
|
144 |
# current system. They belong in /etc/OGRE, as those were always |
| 145 |
# there, and there they are config protected. |
| 146 |
# However, ogre looks in /usr/share/OGRE for them, so they must be |
| 147 |
# symlinked there as well. |
| 148 |
# - Sven |
| 149 |
# docinto examples |
| 150 |
# dodoc "${CMAKE_BUILD_DIR}"/bin/*.cfg |
| 151 |
|
| 152 |
# plugins and resources are the main configuration |
| 153 |
insinto /etc/OGRE |
| 154 |
doins "${CMAKE_BUILD_DIR}"/bin/plugins.cfg |
| 155 |
doins "${CMAKE_BUILD_DIR}"/bin/resources.cfg |
| 156 |
dosym /etc/OGRE/plugins.cfg ${SHAREDIR}/plugins.cfg |
| 157 |
dosym /etc/OGRE/resources.cfg ${SHAREDIR}/resources.cfg |
| 158 |
|
| 159 |
# The testdir needs to be created |
| 160 |
mkdir -p "${D}/${TESTDIR}" |
| 161 |
|
| 162 |
# Use video group, as OGRE is a rendering engine you need to be in the |
| 163 |
# video group to use anyway. (Ogre3D is not a game engine, actually I |
| 164 |
# think dev-games is the wrong category anyway.) |
| 165 |
chown :video "${D}/${TESTDIR}" |
| 166 |
chmod g+rwX "${D}/${TESTDIR}" |
| 167 |
|
| 168 |
# These are only for the sample browser |
| 169 |
insinto ${SHAREDIR} |
| 170 |
doins "${CMAKE_BUILD_DIR}"/bin/quakemap.cfg |
| 171 |
doins "${CMAKE_BUILD_DIR}"/bin/samples.cfg |
| 172 |
|
| 173 |
# tests.cfg is not needed |
| 94 |
} |
174 |
} |