summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kahle <tomka@gentoo.org>2015-01-12 13:05:17 +0000
committerThomas Kahle <tomka@gentoo.org>2015-01-12 13:05:17 +0000
commitf618375c14e748a22df67e861026f936db64a325 (patch)
tree19d69d6d0768b5b4d8b9eaf3717f7a828e99642a /games-strategy
parentVersion bump with new homepage, ebuild cleanup (diff)
downloadgentoo-2-f618375c14e748a22df67e861026f936db64a325.tar.gz
gentoo-2-f618375c14e748a22df67e861026f936db64a325.tar.bz2
gentoo-2-f618375c14e748a22df67e861026f936db64a325.zip
bump, compatibility with ogre-1.9, make 0.4.3 depend on old ogre (bug #528480)
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 565C32BC)
Diffstat (limited to 'games-strategy')
-rw-r--r--games-strategy/freeorion/ChangeLog10
-rw-r--r--games-strategy/freeorion/files/ogre-1.9-compat.patch415
-rw-r--r--games-strategy/freeorion/freeorion-0.4.3.ebuild6
-rw-r--r--games-strategy/freeorion/freeorion-0.4.4.ebuild117
4 files changed, 543 insertions, 5 deletions
diff --git a/games-strategy/freeorion/ChangeLog b/games-strategy/freeorion/ChangeLog
index a48d3599d16e..2f37a0cad155 100644
--- a/games-strategy/freeorion/ChangeLog
+++ b/games-strategy/freeorion/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for games-strategy/freeorion
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-strategy/freeorion/ChangeLog,v 1.10 2013/10/07 08:08:35 tomka Exp $
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/freeorion/ChangeLog,v 1.11 2015/01/12 13:05:17 tomka Exp $
+
+*freeorion-0.4.4 (12 Jan 2015)
+
+ 12 Jan 2015; Thomas Kahle <tomka@gentoo.org> +files/ogre-1.9-compat.patch,
+ +freeorion-0.4.4.ebuild, freeorion-0.4.3.ebuild:
+ bump, compatibility with ogre-1.9, make 0.4.3 depend on old ogre (bug #528480)
07 Oct 2013; Thomas Kahle <tomka@gentoo.org> freeorion-0.4.3.ebuild:
fix insecure runpaths (bug 485510, thanks hasufell)
diff --git a/games-strategy/freeorion/files/ogre-1.9-compat.patch b/games-strategy/freeorion/files/ogre-1.9-compat.patch
new file mode 100644
index 000000000000..b943d8614823
--- /dev/null
+++ b/games-strategy/freeorion/files/ogre-1.9-compat.patch
@@ -0,0 +1,415 @@
+diff -U 3 -dHrN freeorion-0.4.4-orig/PagedGeometry/include/BatchedGeometry.h freeorion-0.4.4/PagedGeometry/include/BatchedGeometry.h
+--- freeorion-0.4.4-orig/PagedGeometry/include/BatchedGeometry.h 2015-01-12 13:16:19.480177578 +0100
++++ freeorion-0.4.4/PagedGeometry/include/BatchedGeometry.h 2015-01-12 13:44:40.700200986 +0100
+@@ -88,7 +88,11 @@
+ void setMaterialName(const Ogre::String &mat, const Ogre::String &rg =
+ Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
+ {
+- m_ptrMaterial = Ogre::MaterialManager::getSingleton().getByName(mat, rg);
++#if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ m_ptrMaterial = Ogre::MaterialManager::getSingleton().getByName(mat, rg);
++#else
++ m_ptrMaterial = Ogre::MaterialManager::getSingleton().getByName(mat, rg).staticCast<Ogre::Material>();
++#endif
+ }
+
+ /// Get material name. Be careful, resource group name missing
+diff -U 3 -dHrN freeorion-0.4.4-orig/PagedGeometry/source/BatchedGeometry.cpp freeorion-0.4.4/PagedGeometry/source/BatchedGeometry.cpp
+--- freeorion-0.4.4-orig/PagedGeometry/source/BatchedGeometry.cpp 2015-01-12 13:16:19.470177578 +0100
++++ freeorion-0.4.4/PagedGeometry/source/BatchedGeometry.cpp 2015-01-12 13:29:10.890188192 +0100
+@@ -479,7 +479,11 @@
+ // that the user may be using somewhere else).
+ {
+ Ogre::String newName = parentMaterial->getName() + "_Batched";
+- m_ptrMaterial = MaterialManager::getSingleton().getByName(newName, parentMaterial->getGroup());
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ m_ptrMaterial = MaterialManager::getSingleton().getByName(newName, parentMaterial->getGroup());
++ #else
++ m_ptrMaterial = MaterialManager::getSingleton().getByName(newName, parentMaterial->getGroup()).staticCast<Material>();
++ #endif
+ if (m_ptrMaterial.isNull())
+ m_ptrMaterial = parentMaterial->clone(newName);
+ }
+diff -U 3 -dHrN freeorion-0.4.4-orig/PagedGeometry/source/BatchPage.cpp freeorion-0.4.4/PagedGeometry/source/BatchPage.cpp
+--- freeorion-0.4.4-orig/PagedGeometry/source/BatchPage.cpp 2015-01-12 13:16:19.470177578 +0100
++++ freeorion-0.4.4/PagedGeometry/source/BatchPage.cpp 2015-01-12 13:27:56.810187173 +0100
+@@ -472,7 +472,11 @@
+ }
+
+ //Search for the desired material
+- MaterialPtr generatedMaterial = MaterialManager::getSingleton().getByName(materialSignature.str());
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ MaterialPtr generatedMaterial = MaterialManager::getSingleton().getByName(materialSignature.str());
++ #else
++ MaterialPtr generatedMaterial = MaterialManager::getSingleton().getByName(materialSignature.str()).staticCast<Ogre::Material>();
++ #endif
+ if (generatedMaterial.isNull())
+ {
+ //Clone the material
+diff -U 3 -dHrN freeorion-0.4.4-orig/PagedGeometry/source/GrassLoader.cpp freeorion-0.4.4/PagedGeometry/source/GrassLoader.cpp
+--- freeorion-0.4.4-orig/PagedGeometry/source/GrassLoader.cpp 2015-01-12 13:16:19.470177578 +0100
++++ freeorion-0.4.4/PagedGeometry/source/GrassLoader.cpp 2015-01-12 13:31:39.330190235 +0100
+@@ -765,7 +765,11 @@
+ void GrassLayer::setMaterialName(const String &matName)
+ {
+ if (material.isNull() || matName != material->getName()){
+- material = MaterialManager::getSingleton().getByName(matName);
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ material = MaterialManager::getSingleton().getByName(matName);
++ #else
++ material = MaterialManager::getSingleton().getByName(matName).staticCast<Material>();
++ #endif
+ if (material.isNull())
+ OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "The specified grass material does not exist", "GrassLayer::setMaterialName()");
+ shaderNeedsUpdate = true;
+@@ -1128,7 +1132,11 @@
+ const String matName = material->getName() + "_" + vsName;
+
+ //Check if the desired material already exists (if not, create it)
+- MaterialPtr tmpMat = MaterialManager::getSingleton().getByName(matName);
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ MaterialPtr tmpMat = MaterialManager::getSingleton().getByName(matName);
++ #else
++ MaterialPtr tmpMat = MaterialManager::getSingleton().getByName(matName).staticCast<Material>();
++ #endif
+ if (tmpMat.isNull())
+ {
+ //Clone the original material
+@@ -1140,7 +1148,11 @@
+
+ //Check if the desired shader already exists (if not, compile it)
+ String shaderLanguage;
+- HighLevelGpuProgramPtr vertexShader = HighLevelGpuProgramManager::getSingleton().getByName(vsName);
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ HighLevelGpuProgramPtr vertexShader = HighLevelGpuProgramManager::getSingleton().getByName(vsName);
++ #else
++ HighLevelGpuProgramPtr vertexShader = HighLevelGpuProgramManager::getSingleton().getByName(vsName).staticCast<HighLevelGpuProgram>();
++ #endif
+ if (vertexShader.isNull())
+ {
+ if (Root::getSingleton().getRenderSystem()->getName() == "Direct3D9 Rendering Subsystem")
+diff -U 3 -dHrN freeorion-0.4.4-orig/PagedGeometry/source/ImpostorPage.cpp freeorion-0.4.4/PagedGeometry/source/ImpostorPage.cpp
+--- freeorion-0.4.4-orig/PagedGeometry/source/ImpostorPage.cpp 2015-01-12 13:16:19.470177578 +0100
++++ freeorion-0.4.4/PagedGeometry/source/ImpostorPage.cpp 2015-01-12 13:32:29.390190924 +0100
+@@ -402,7 +402,11 @@
+ //Set up materials
+ for (int o = 0; o < IMPOSTOR_YAW_ANGLES; ++o){
+ for (int i = 0; i < IMPOSTOR_PITCH_ANGLES; ++i){
+- material[i][o] = MaterialManager::getSingleton().create(getUniqueID("ImpostorMaterial"), "Impostors");
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ material[i][o] = MaterialManager::getSingleton().create(getUniqueID("ImpostorMaterial"), "Impostors");
++ #else
++ material[i][o] = MaterialManager::getSingleton().create(getUniqueID("ImpostorMaterial"), "Impostors").staticCast<Material>();
++ #endif
+
+ Material *m = material[i][o].getPointer();
+ Pass *p = m->getTechnique(0)->getPass(0);
+diff -U 3 -dHrN freeorion-0.4.4-orig/PagedGeometry/source/StaticBillboardSet.cpp freeorion-0.4.4/PagedGeometry/source/StaticBillboardSet.cpp
+--- freeorion-0.4.4-orig/PagedGeometry/source/StaticBillboardSet.cpp 2015-01-12 13:16:19.470177578 +0100
++++ freeorion-0.4.4/PagedGeometry/source/StaticBillboardSet.cpp 2015-01-12 13:34:51.270192876 +0100
+@@ -149,7 +149,11 @@
+ "}";
+ }
+
+- HighLevelGpuProgramPtr vertexShader = HighLevelGpuProgramManager::getSingleton().getByName("Sprite_vp");
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ HighLevelGpuProgramPtr vertexShader = HighLevelGpuProgramManager::getSingleton().getByName("Sprite_vp");
++ #else
++ HighLevelGpuProgramPtr vertexShader = HighLevelGpuProgramManager::getSingleton().getByName("Sprite_vp").staticCast<HighLevelGpuProgram>();
++ #endif
+ assert(vertexShader.isNull() && "Sprite_vp already exist");
+
+ vertexShader = HighLevelGpuProgramManager::getSingleton().createProgram(
+@@ -257,7 +261,11 @@
+ "}";
+ }
+
+- HighLevelGpuProgramPtr vertexShader2 = HighLevelGpuProgramManager::getSingleton().getByName("SpriteFade_vp");
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ HighLevelGpuProgramPtr vertexShader2 = HighLevelGpuProgramManager::getSingleton().getByName("Sprite_vp");
++ #else
++ HighLevelGpuProgramPtr vertexShader2 = HighLevelGpuProgramManager::getSingleton().getByName("Sprite_vp").staticCast<HighLevelGpuProgram>();
++ #endif
+ assert(vertexShader2.isNull() && "SpriteFade_vp already exist");
+ vertexShader2 = HighLevelGpuProgramManager::getSingleton().createProgram("SpriteFade_vp",
+ ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, shaderLanguage, GPT_VERTEX_PROGRAM);
+@@ -574,7 +582,11 @@
+ else if (!mPtrMaterial.isNull())
+ SBMaterialRef::removeMaterialRef(mPtrMaterial);
+
+- mPtrMaterial = MaterialManager::getSingleton().getByName(materialName, resourceGroup);
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ mPtrMaterial = MaterialManager::getSingleton().getByName(materialName, resourceGroup);
++ #else
++ mPtrMaterial = MaterialManager::getSingleton().getByName(materialName, resourceGroup).staticCast<Material>();
++ #endif
+
+ if (mFadeEnabled)
+ {
+@@ -590,7 +602,11 @@
+ }
+ else // old GPU compatibility
+ {
+- mPtrMaterial = MaterialManager::getSingleton().getByName(materialName, resourceGroup);
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ mPtrMaterial = MaterialManager::getSingleton().getByName(materialName, resourceGroup);
++ #else
++ mPtrMaterial = MaterialManager::getSingleton().getByName(materialName, resourceGroup).staticCast<Material>();
++ #endif
+ mpFallbackBillboardSet->setMaterialName(mPtrMaterial->getName(), mPtrMaterial->getGroup());
+ // SVA. Since Ogre 1.7.3 Ogre::BillboardSet have setMaterial(const MaterialPtr&) method
+ }
+diff -U 3 -dHrN freeorion-0.4.4-orig/PagedGeometry/source/WindBatchPage.cpp freeorion-0.4.4/PagedGeometry/source/WindBatchPage.cpp
+--- freeorion-0.4.4-orig/PagedGeometry/source/WindBatchPage.cpp 2015-01-12 13:16:19.470177578 +0100
++++ freeorion-0.4.4/PagedGeometry/source/WindBatchPage.cpp 2015-01-12 13:35:22.100193300 +0100
+@@ -467,7 +467,11 @@
+ }
+
+ //Search for the desired material
+- MaterialPtr generatedMaterial = MaterialManager::getSingleton().getByName(materialSignature.str());
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ MaterialPtr generatedMaterial = MaterialManager::getSingleton().getByName(materialSignature.str());
++ #else
++ MaterialPtr generatedMaterial = MaterialManager::getSingleton().getByName(materialSignature.str()).staticCast<Material>();
++ #endif
+ if (generatedMaterial.isNull())
+ {
+ //Clone the material
+diff -U 3 -dHrN freeorion-0.4.4-orig/UI/CombatSetupWnd.cpp freeorion-0.4.4/UI/CombatSetupWnd.cpp
+--- freeorion-0.4.4-orig/UI/CombatSetupWnd.cpp 2015-01-12 13:16:18.650177567 +0100
++++ freeorion-0.4.4/UI/CombatSetupWnd.cpp 2015-01-12 13:17:12.200178304 +0100
+@@ -126,7 +126,11 @@
+ // HACK! This currently assumes all rings are starlane exclusion
+ // zones, so we only create one mesh for all RING's and reuse it;
+ // this may need to be generalized later.
+- Ogre::MeshPtr ring_mesh = Ogre::MeshManager::getSingleton().getByName(RING_MESH_NAME);
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ Ogre::MeshPtr ring_mesh = Ogre::MeshManager::getSingleton().getByName(RING_MESH_NAME);
++ #else
++ Ogre::MeshPtr ring_mesh = Ogre::MeshManager::getSingleton().getByName(RING_MESH_NAME).staticCast<Ogre::Mesh>();
++ #endif
+ if (ring_mesh.isNull()) {
+ Ogre::ManualObject manual_object("");
+ manual_object.estimateVertexCount(unit_circle_vertices.size() * 2 + 2);
+@@ -152,7 +156,11 @@
+ }
+
+ case CombatSetupRegion::ELLIPSE: {
+- Ogre::MeshPtr unit_circle_mesh = Ogre::MeshManager::getSingleton().getByName(UNIT_CIRCLE_MESH_NAME);
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ Ogre::MeshPtr unit_circle_mesh = Ogre::MeshManager::getSingleton().getByName(UNIT_CIRCLE_MESH_NAME);
++ #else
++ Ogre::MeshPtr unit_circle_mesh = Ogre::MeshManager::getSingleton().getByName(UNIT_CIRCLE_MESH_NAME).staticCast<Ogre::Mesh>();
++ #endif
+ if (unit_circle_mesh.isNull()) {
+ Ogre::ManualObject manual_object("");
+ manual_object.estimateVertexCount(unit_circle_vertices.size() + 2);
+@@ -478,8 +486,13 @@
+ std::string base_material_name = ShipMaterialName(*ship->Design(), ship->Owner());
+ std::string material_name = UNPLACEABLE_MATERIAL_PREFIX + base_material_name;
+ if (!Ogre::MaterialManager::getSingleton().resourceExists(material_name)) {
+- Ogre::MaterialPtr unmodified_material =
+- Ogre::MaterialManager::getSingleton().getByName(base_material_name);
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ Ogre::MaterialPtr unmodified_material =
++ Ogre::MaterialManager::getSingleton().getByName(base_material_name);
++ #else
++ Ogre::MaterialPtr unmodified_material =
++ Ogre::MaterialManager::getSingleton().getByName(base_material_name).staticCast<Ogre::Material>();
++ #endif
+ Ogre::MaterialPtr material = unmodified_material->clone(material_name);
+ Ogre::Pass* pass = material->getTechnique(0)->getPass(1);
+ assert(pass->hasFragmentProgram());
+diff -U 3 -dHrN freeorion-0.4.4-orig/UI/CombatWnd.cpp freeorion-0.4.4/UI/CombatWnd.cpp
+--- freeorion-0.4.4-orig/UI/CombatWnd.cpp 2015-01-12 13:16:18.650177567 +0100
++++ freeorion-0.4.4/UI/CombatWnd.cpp 2015-01-12 13:43:29.950200012 +0100
+@@ -329,8 +329,13 @@
+ Ogre::Entity* entity =
+ scene_manager->createEntity("asteroid mesh " + base_name,
+ base_name + ".mesh");
+- Ogre::MaterialPtr material =
+- Ogre::MaterialManager::getSingleton().getByName("asteroid");
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ Ogre::MaterialPtr material =
++ Ogre::MaterialManager::getSingleton().getByName("asteroid");
++ #else
++ Ogre::MaterialPtr material =
++ Ogre::MaterialManager::getSingleton().getByName("asteroid").staticCast<Ogre::Material>();
++ #endif
+ std::string new_material_name = "asteroid material " + base_name;
+ material = material->clone(new_material_name);
+ material->getTechnique(0)->getPass(0)->getTextureUnitState(0)->
+@@ -905,16 +910,26 @@
+
+ // pick and assign star textures
+ {
+- Ogre::MaterialPtr back_material =
+- Ogre::MaterialManager::getSingleton().getByName("backgrounds/star_back");
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ Ogre::MaterialPtr back_material =
++ Ogre::MaterialManager::getSingleton().getByName("backgrounds/star_back");
++ #else
++ Ogre::MaterialPtr back_material =
++ Ogre::MaterialManager::getSingleton().getByName("backgrounds/star_back").staticCast<Ogre::Material>();
++ #endif
+ Ogre::Technique* technique = back_material->getTechnique(0);
+ technique->getPass(0)->getTextureUnitState(0)->setTextureName(base_name + "back.png");
+ technique->getPass(1)->getTextureUnitState(0)->setTextureName(base_name + "rainbow.png");
+ technique->getPass(2)->getTextureUnitState(0)->setTextureName(base_name + "rays.png");
+ technique->getPass(3)->getTextureUnitState(0)->setTextureName(base_name + "horizontal_flare.png");
+ technique->getPass(4)->getTextureUnitState(0)->setTextureName(base_name + "horizontal_flare.png");
+- Ogre::MaterialPtr core_material =
+- Ogre::MaterialManager::getSingleton().getByName("backgrounds/star_core");
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ Ogre::MaterialPtr core_material =
++ Ogre::MaterialManager::getSingleton().getByName("backgrounds/star_core");
++ #else
++ Ogre::MaterialPtr core_material =
++ Ogre::MaterialManager::getSingleton().getByName("backgrounds/star_core").staticCast<Ogre::Material>();
++ #endif
+ technique = core_material->getTechnique(0);
+ technique->getPass(0)->getTextureUnitState(0)->setTextureName(base_name + "core.png");
+
+@@ -1005,8 +1020,13 @@
+ entity->setQueryFlags(UNSELECTABLE_OBJECT_MASK);
+ std::string new_material_name =
+ material_name + "_" + boost::lexical_cast<std::string>(orbit);
+- Ogre::MaterialPtr material =
+- Ogre::MaterialManager::getSingleton().getByName(material_name);
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ Ogre::MaterialPtr material =
++ Ogre::MaterialManager::getSingleton().getByName(material_name);
++ #else
++ Ogre::MaterialPtr material =
++ Ogre::MaterialManager::getSingleton().getByName(material_name).staticCast<Ogre::Material>();
++ #endif
+ material = material->clone(new_material_name);
+ m_planet_assets[orbit].second.push_back(material);
+ material->getTechnique(0)->getPass(0)->getTextureUnitState(0)->
+@@ -1019,11 +1039,19 @@
+ entity->setVisibilityFlags(REGULAR_OBJECTS_MASK);
+ std::string new_material_name =
+ material_name + "_" + boost::lexical_cast<std::string>(orbit);
+- Ogre::MaterialPtr material =
+- Ogre::MaterialManager::getSingleton().getByName(
+- material_name == "planet" ?
+- PlanetMaterialName(base_name) :
+- material_name);
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ Ogre::MaterialPtr material =
++ Ogre::MaterialManager::getSingleton().getByName(
++ material_name == "planet" ?
++ PlanetMaterialName(base_name) :
++ material_name);
++ #else
++ Ogre::MaterialPtr material =
++ Ogre::MaterialManager::getSingleton().getByName(
++ material_name == "planet" ?
++ PlanetMaterialName(base_name) :
++ material_name).staticCast<Ogre::Material>();
++ #endif
+ material = material->clone(new_material_name);
+ m_planet_assets[orbit].second.push_back(material);
+ assert(entity->getNumSubEntities() == 1u);
+@@ -1046,9 +1074,15 @@
+ entity->setRenderQueueGroup(ALPHA_OBJECTS_QUEUE);
+ entity->setVisibilityFlags(REGULAR_OBJECTS_MASK);
+ entity->setQueryFlags(UNSELECTABLE_OBJECT_MASK);
+- Ogre::MaterialPtr material =
+- Ogre::MaterialManager::getSingleton().getByName(
+- AtmosphereMaterialName(base_name));
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ Ogre::MaterialPtr material =
++ Ogre::MaterialManager::getSingleton().getByName(
++ AtmosphereMaterialName(base_name));
++ #else
++ Ogre::MaterialPtr material =
++ Ogre::MaterialManager::getSingleton().getByName(
++ AtmosphereMaterialName(base_name)).staticCast<Ogre::Material>();
++ #endif
+ entity->setMaterialName(material->getName());
+ m_planet_assets[orbit].second.push_back(material);
+ node->attachObject(entity);
+@@ -1568,7 +1602,11 @@
+
+ const bool ENABLE_GLOW = GetOptionsDB().Get<bool>("combat.enable-glow");
+ Ogre::CompositorManager::getSingleton().setCompositorEnabled(m_viewport, "effects/glow", ENABLE_GLOW);
+- Ogre::MaterialPtr material = Ogre::MaterialManager::getSingleton().getByName("backgrounds/star_back");
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ Ogre::MaterialPtr material = Ogre::MaterialManager::getSingleton().getByName("backgrounds/star_back");
++ #else
++ Ogre::MaterialPtr material = Ogre::MaterialManager::getSingleton().getByName("backgrounds/star_back").staticCast<Ogre::Material>();
++ #endif
+ material->getTechnique(0)->getPass(3)->setDepthCheckEnabled(!ENABLE_GLOW);
+ material->getTechnique(0)->getPass(4)->setDepthCheckEnabled(!ENABLE_GLOW);
+
+@@ -1618,8 +1656,13 @@
+
+ const int SAMPLES_PER_SIDE = 2;
+ const int TOTAL_SAMPLES = 5;
+- Ogre::MaterialPtr core_material =
+- Ogre::MaterialManager::getSingleton().getByName("backgrounds/star_core");
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ Ogre::MaterialPtr core_material =
++ Ogre::MaterialManager::getSingleton().getByName("backgrounds/star_core");
++ #else
++ Ogre::MaterialPtr core_material =
++ Ogre::MaterialManager::getSingleton().getByName("backgrounds/star_core").staticCast<Ogre::Material>();
++ #endif
+ const Ogre::Real STAR_CORE_SCALE_FACTOR =
+ core_material->getTechnique(0)->getPass(0)->getTextureUnitState(0)->getTextureUScale();
+ const Ogre::Real SAMPLE_INCREMENT =
+@@ -1743,8 +1786,13 @@
+ m_star_back_billboard->setColour(
+ Ogre::ColourValue(1.0, 1.0, 1.0, m_star_brightness_factor));
+
+- Ogre::MaterialPtr back_material =
+- Ogre::MaterialManager::getSingleton().getByName("backgrounds/star_back");
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ Ogre::MaterialPtr back_material =
++ Ogre::MaterialManager::getSingleton().getByName("backgrounds/star_back");
++ #else
++ Ogre::MaterialPtr back_material =
++ Ogre::MaterialManager::getSingleton().getByName("backgrounds/star_back").staticCast<Ogre::Material>();
++ #endif
+ back_material->getTechnique(0)->getPass(3)->getTextureUnitState(0)->setTextureUScroll(
+ m_initial_left_horizontal_flare_scroll + m_left_horizontal_flare_scroll_offset);
+ back_material->getTechnique(0)->getPass(4)->getTextureUnitState(0)->setTextureUScroll(
+@@ -1834,8 +1882,13 @@
+ assert(ship->Design());
+ const ShipDesign& ship_design = *ship->Design();
+
+- Ogre::MaterialPtr ship_material =
+- Ogre::MaterialManager::getSingleton().getByName("ship");
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ Ogre::MaterialPtr ship_material =
++ Ogre::MaterialManager::getSingleton().getByName("ship");
++ #else
++ Ogre::MaterialPtr ship_material =
++ Ogre::MaterialManager::getSingleton().getByName("ship").staticCast<Ogre::Material>();
++ #endif
+ std::string modified_material_name = ShipMaterialName(ship_design, ship->Owner());
+ Ogre::MaterialPtr& modified_material = m_ship_materials[modified_material_name];
+ if (!modified_material.get()) {
+diff -U 3 -dHrN freeorion-0.4.4-orig/UI/EntityRenderer.cpp freeorion-0.4.4/UI/EntityRenderer.cpp
+--- freeorion-0.4.4-orig/UI/EntityRenderer.cpp 2015-01-12 13:16:18.670177567 +0100
++++ freeorion-0.4.4/UI/EntityRenderer.cpp 2015-01-12 13:17:12.200178304 +0100
+@@ -123,9 +123,15 @@
+ renderTextures();
+
+ //Set up material
+- material =
+- Ogre::MaterialManager::getSingleton().create(
+- getUniqueID("RenderedEntityMaterial"), "EntityRenderer");
++ #if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
++ material =
++ Ogre::MaterialManager::getSingleton().create(
++ getUniqueID("RenderedEntityMaterial"), "EntityRenderer");
++ #else
++ material =
++ Ogre::MaterialManager::getSingleton().create(
++ getUniqueID("RenderedEntityMaterial"), "EntityRenderer").staticCast<Ogre::Material>();
++ #endif
+
+ Ogre::Material* m = material.getPointer();
+ Ogre::Pass* p = m->getTechnique(0)->getPass(0);
diff --git a/games-strategy/freeorion/freeorion-0.4.3.ebuild b/games-strategy/freeorion/freeorion-0.4.3.ebuild
index b84851cee7ee..3b57d3527015 100644
--- a/games-strategy/freeorion/freeorion-0.4.3.ebuild
+++ b/games-strategy/freeorion/freeorion-0.4.3.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-strategy/freeorion/freeorion-0.4.3.ebuild,v 1.5 2013/10/07 08:08:35 tomka Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/freeorion/freeorion-0.4.3.ebuild,v 1.6 2015/01/12 13:05:17 tomka Exp $
EAPI=5
@@ -22,7 +22,7 @@ IUSE="cg"
# The split version dev-games/gigi is not used anymore as of 0.4.3
RDEPEND="
!dev-games/gigi
- dev-games/ogre[cg?,ois,opengl]
+ <dev-games/ogre-1.9[cg?,ois,opengl]
dev-games/ois
>=dev-libs/boost-1.47[python]
media-libs/freealut
diff --git a/games-strategy/freeorion/freeorion-0.4.4.ebuild b/games-strategy/freeorion/freeorion-0.4.4.ebuild
new file mode 100644
index 000000000000..a0cf34907d4f
--- /dev/null
+++ b/games-strategy/freeorion/freeorion-0.4.4.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/freeorion/freeorion-0.4.4.ebuild,v 1.1 2015/01/12 13:05:17 tomka Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_6 python2_7 )
+inherit cmake-utils python-any-r1 games
+
+DESCRIPTION="A free turn-based space empire and galactic conquest game"
+HOMEPAGE="http://www.freeorion.org"
+SRC_URI="http://dev.gentoo.org/~tomka/files/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1 CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="cg"
+
+# Needs it's own version of GG(dev-games/gigi) which it ships.
+# The split version dev-games/gigi is not used anymore as of 0.4.3
+RDEPEND="
+ !dev-games/gigi
+ dev-games/ogre[cg?,ois,opengl]
+ dev-games/ois
+ >=dev-libs/boost-1.47[python]
+ media-libs/freealut
+ media-libs/libogg
+ media-libs/libsdl[X,opengl,video]
+ media-libs/libvorbis
+ media-libs/openal
+ sci-physics/bullet
+ sys-libs/zlib
+ virtual/opengl"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ virtual/pkgconfig"
+
+# S="${WORKDIR}/${P}/${myPN}"
+CMAKE_USE_DIR="${S}"
+CMAKE_VERBOSE="1"
+
+pkg_setup() {
+ # build system is using FindPythonLibs.cmake which needs python:2
+ python-any-r1_pkg_setup
+ games_pkg_setup
+}
+
+src_prepare() {
+ # set OGRE plugin-dir
+ sed \
+ -e "s:PluginFolder=.*$:PluginFolder=$(pkg-config --variable=plugindir OGRE):" \
+ -i "${CMAKE_USE_DIR}"/ogre_plugins.cfg.in || die
+
+ if use cg ; then
+ # add cg ogre plugin to config
+ echo "Plugin=Plugin_CgProgramManager" \
+ >> "${CMAKE_USE_DIR}"/ogre_plugins.cfg || die
+ fi
+
+ epatch "${FILESDIR}/ogre-1.9-compat.patch"
+
+ # parse subdir sets -O3
+ sed -e "s:-O3::" -i parse/CMakeLists.txt
+
+ # set revision for display in game -- update on bump!
+ sed -i -e 's/???/7708/' CMakeLists.txt
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DRELEASE_COMPILE_FLAGS=""
+ -DCMAKE_SKIP_RPATH=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ # data files
+ rm "${CMAKE_USE_DIR}"/default/COPYING || die
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r "${CMAKE_USE_DIR}"/default || die
+
+ # bin
+ dogamesbin "${CMAKE_BUILD_DIR}"/${PN}{ca,d} || die
+ newgamesbin "${CMAKE_BUILD_DIR}"/${PN} ${PN}.bin || die
+ games_make_wrapper ${PN} \
+ "${GAMES_BINDIR}/${PN}.bin --resource-dir ./default" \
+ "${GAMES_DATADIR}/${PN}"
+
+ # lib
+ dogameslib "${CMAKE_BUILD_DIR}"/libfreeorion{common,parse}.so || die
+ dogameslib "${CMAKE_BUILD_DIR}"/libGiGi*.so || die
+
+ # config
+ insinto "${GAMES_SYSCONFDIR}"/${PN}
+ doins "${CMAKE_BUILD_DIR}"/ogre_plugins.cfg || die
+ doins "${CMAKE_USE_DIR}"/OISInput.cfg || die
+ # game uses relative paths
+ dosym "${GAMES_SYSCONFDIR}"/${PN}/ogre_plugins.cfg \
+ "${GAMES_DATADIR}"/${PN}/ogre_plugins.cfg || die
+ dosym "${GAMES_SYSCONFDIR}"/${PN}/OISInput.cfg \
+ "${GAMES_DATADIR}"/${PN}/OISInput.cfg || die
+
+ # other
+ dodoc "${CMAKE_USE_DIR}"/changelog.txt || die
+ newicon "${CMAKE_USE_DIR}"/default/data/art/icons/FO_Icon_32x32.png \
+ ${PN}.png || die
+ make_desktop_entry ${PN} ${PN} ${PN}
+
+ # permissions
+ prepgamesdirs
+}