|
Lines 1-6
Link Here
|
| 1 |
# Copyright 1999-2014 Gentoo Foundation |
1 |
# Copyright 1999-2014 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/dev-games/ogre/ogre-1.9.0.ebuild,v 1.3 2014/03/08 23:22:37 hasufell Exp $ |
3 |
# $Header: $ |
| 4 |
|
4 |
|
| 5 |
EAPI=5 |
5 |
EAPI=5 |
| 6 |
CMAKE_REMOVE_MODULES="yes" |
6 |
CMAKE_REMOVE_MODULES="yes" |
|
Lines 9-20
Link Here
|
| 9 |
inherit eutils cmake-utils vcs-snapshot versionator |
9 |
inherit eutils cmake-utils vcs-snapshot versionator |
| 10 |
|
10 |
|
| 11 |
MY_PV=$(get_version_component_range 1-3) |
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 |
| 18 |
|
12 |
|
| 19 |
DESCRIPTION="Object-oriented Graphics Rendering Engine" |
13 |
DESCRIPTION="Object-oriented Graphics Rendering Engine" |
| 20 |
HOMEPAGE="http://www.ogre3d.org/" |
14 |
HOMEPAGE="http://www.ogre3d.org/" |
|
Lines 23-38
Link Here
|
| 23 |
LICENSE="MIT public-domain" |
17 |
LICENSE="MIT public-domain" |
| 24 |
SLOT="0/1.9.0" |
18 |
SLOT="0/1.9.0" |
| 25 |
KEYWORDS="~amd64 ~x86" |
19 |
KEYWORDS="~amd64 ~x86" |
|
|
20 |
|
| 21 |
# gles1 currently broken wrt bug #418201 |
| 22 |
# gles1 does not even build wrt bug #506058 |
| 26 |
IUSE="\ |
23 |
IUSE="\ |
| 27 |
+boost cg doc double-precision examples +freeimage gl3plus gles1 gles2 \ |
24 |
+boost cg doc double-precision examples +freeimage gl3plus gles2 \ |
| 28 |
gles3 ois +opengl poco profile tbb threads tools +zip" |
25 |
gles3 ois +opengl poco profile source tbb threads tools +zip" |
|
|
26 |
|
| 29 |
REQUIRED_USE="threads? ( ^^ ( boost poco tbb ) ) |
27 |
REQUIRED_USE="threads? ( ^^ ( boost poco tbb ) ) |
| 30 |
poco? ( threads ) |
28 |
poco? ( threads ) |
| 31 |
tbb? ( threads ) |
29 |
tbb? ( threads ) |
| 32 |
gles1? ( !gl3plus ) |
|
|
| 33 |
gles2? ( !gl3plus ) |
30 |
gles2? ( !gl3plus ) |
| 34 |
gles3? ( ( !gl3plus ) ( gles2 ) ) |
31 |
gles3? ( ( !gl3plus ) ( gles2 ) ) |
| 35 |
gl3plus? ( ( opengl ) ( !gles1 ) ( !gles2 ) ( !gles3 ) )" |
32 |
gl3plus? ( ( opengl ) ( !gles2 ) ( !gles3 ) )" |
|
|
33 |
|
| 36 |
RESTRICT="test" #139905 |
34 |
RESTRICT="test" #139905 |
| 37 |
|
35 |
|
| 38 |
RDEPEND=" |
36 |
RDEPEND=" |
|
Lines 47-53
Link Here
|
| 47 |
boost? ( dev-libs/boost ) |
45 |
boost? ( dev-libs/boost ) |
| 48 |
cg? ( media-gfx/nvidia-cg-toolkit ) |
46 |
cg? ( media-gfx/nvidia-cg-toolkit ) |
| 49 |
freeimage? ( media-libs/freeimage ) |
47 |
freeimage? ( media-libs/freeimage ) |
| 50 |
gles1? ( >=media-libs/mesa-8.0.0[gles1] ) |
|
|
| 51 |
gles2? ( >=media-libs/mesa-9.0.0[gles2] ) |
48 |
gles2? ( >=media-libs/mesa-9.0.0[gles2] ) |
| 52 |
gles3? ( >=media-libs/mesa-10.0.0[gles2] ) |
49 |
gles3? ( >=media-libs/mesa-10.0.0[gles2] ) |
| 53 |
gl3plus? ( >=media-libs/mesa-9.2.5 ) |
50 |
gl3plus? ( >=media-libs/mesa-9.2.5 ) |
|
Lines 57-63
Link Here
|
| 57 |
tbb? ( dev-cpp/tbb ) |
54 |
tbb? ( dev-cpp/tbb ) |
| 58 |
) |
55 |
) |
| 59 |
zip? ( sys-libs/zlib dev-libs/zziplib )" |
56 |
zip? ( sys-libs/zlib dev-libs/zziplib )" |
| 60 |
# gles1 currently broken wrt bug #418201 |
57 |
|
| 61 |
DEPEND="${RDEPEND} |
58 |
DEPEND="${RDEPEND} |
| 62 |
x11-proto/xf86vidmodeproto |
59 |
x11-proto/xf86vidmodeproto |
| 63 |
virtual/pkgconfig |
60 |
virtual/pkgconfig |
|
Lines 71-76
Link Here
|
| 71 |
sed -i \ |
68 |
sed -i \ |
| 72 |
-e '/CONFIGURATIONS/s:CONFIGURATIONS Release.*::' \ |
69 |
-e '/CONFIGURATIONS/s:CONFIGURATIONS Release.*::' \ |
| 73 |
CMake/Utils/OgreConfigTargets.cmake || die |
70 |
CMake/Utils/OgreConfigTargets.cmake || die |
|
|
71 |
|
| 72 |
# Fix some path issues |
| 73 |
epatch "${FILESDIR}/${MY_PV}-01_remove_resource_path_to_bindir.patch" |
| 74 |
epatch "${FILESDIR}/${MY_PV}-02_remove_media_path_to_bindir.patch" |
| 74 |
} |
75 |
} |
| 75 |
|
76 |
|
| 76 |
src_configure() { |
77 |
src_configure() { |
|
Lines 84-94
Link Here
|
| 84 |
$(cmake-utils_use freeimage OGRE_CONFIG_ENABLE_FREEIMAGE) |
85 |
$(cmake-utils_use freeimage OGRE_CONFIG_ENABLE_FREEIMAGE) |
| 85 |
$(cmake-utils_use opengl OGRE_BUILD_RENDERSYSTEM_GL) |
86 |
$(cmake-utils_use opengl OGRE_BUILD_RENDERSYSTEM_GL) |
| 86 |
$(cmake-utils_use gl3plus OGRE_BUILD_RENDERSYSTEM_GL3PLUS) |
87 |
$(cmake-utils_use gl3plus OGRE_BUILD_RENDERSYSTEM_GL3PLUS) |
| 87 |
$(cmake-utils_use gles1 OGRE_BUILD_RENDERSYSTEM_GLES) |
88 |
-DOGRE_BUILD_RENDERSYSTEM_GLES=FALSE |
| 88 |
$(cmake-utils_use gles2 OGRE_BUILD_RENDERSYSTEM_GLES2) |
89 |
$(cmake-utils_use gles2 OGRE_BUILD_RENDERSYSTEM_GLES2) |
| 89 |
$(cmake-utils_use gles3 OGRE_CONFIG_ENABLE_GLES3_SUPPORT) |
90 |
$(cmake-utils_use gles3 OGRE_CONFIG_ENABLE_GLES3_SUPPORT) |
| 90 |
$(cmake-utils_use profile OGRE_PROFILING) |
91 |
$(cmake-utils_use profile OGRE_PROFILING) |
| 91 |
$(cmake-utils_use examples OGRE_BUILD_SAMPLES) |
92 |
$(cmake-utils_use examples OGRE_BUILD_SAMPLES) |
|
|
93 |
$(cmake-utils_use source OGRE_INSTALL_SAMPLES_SOURCE) |
| 92 |
-DOGRE_BUILD_TESTS=FALSE |
94 |
-DOGRE_BUILD_TESTS=FALSE |
| 93 |
$(usex threads "-DOGRE_CONFIG_THREADS=2" "-DOGRE_CONFIG_THREADS=0") |
95 |
$(usex threads "-DOGRE_CONFIG_THREADS=2" "-DOGRE_CONFIG_THREADS=0") |
| 94 |
$(cmake-utils_use tools OGRE_BUILD_TOOLS) |
96 |
$(cmake-utils_use tools OGRE_BUILD_TOOLS) |
|
Lines 105-160
Link Here
|
| 105 |
fi |
107 |
fi |
| 106 |
|
108 |
|
| 107 |
cmake-utils_src_configure |
109 |
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 |
| 138 |
} |
110 |
} |
| 139 |
|
111 |
|
| 140 |
src_install() { |
112 |
src_install() { |
| 141 |
cmake-utils_src_install |
113 |
cmake-utils_src_install |
| 142 |
|
114 |
|
| 143 |
## Those are no longer just examples but the real configuration of the |
115 |
CONFIGDIR=/etc/OGRE |
| 144 |
# current system. They belong in /etc/OGRE, as those were always |
116 |
SHAREDIR=/usr/share/OGRE |
| 145 |
# there, and there they are config protected. |
117 |
TESTDIR=/usr/local/share/OGRE |
| 146 |
# However, ogre looks in /usr/share/OGRE for them, so they must be |
118 |
|
| 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 |
119 |
# plugins and resources are the main configuration |
| 153 |
insinto /etc/OGRE |
120 |
insinto ${CONFIGDIR} |
| 154 |
doins "${CMAKE_BUILD_DIR}"/bin/plugins.cfg |
121 |
doins "${CMAKE_BUILD_DIR}"/bin/plugins.cfg |
| 155 |
doins "${CMAKE_BUILD_DIR}"/bin/resources.cfg |
122 |
doins "${CMAKE_BUILD_DIR}"/bin/resources.cfg |
| 156 |
dosym /etc/OGRE/plugins.cfg ${SHAREDIR}/plugins.cfg |
123 |
dosym ${CONFIGDIR}/plugins.cfg ${SHAREDIR}/plugins.cfg |
| 157 |
dosym /etc/OGRE/resources.cfg ${SHAREDIR}/resources.cfg |
124 |
dosym ${CONFIGDIR}/resources.cfg ${SHAREDIR}/resources.cfg |
| 158 |
|
125 |
|
| 159 |
# The testdir needs to be created |
126 |
# The testdir needs to be created |
| 160 |
mkdir -p "${D}/${TESTDIR}" |
127 |
mkdir -p "${D}/${TESTDIR}" |