diff options
author | 2015-07-20 19:24:57 +0000 | |
---|---|---|
committer | 2015-07-20 19:24:57 +0000 | |
commit | d6975edaad025029ea2a86f4b222732b34fa916f (patch) | |
tree | 6c127063b373c91cebc754aada0161521d3b3f8c /dev-games | |
parent | EAPI 5 bump. (diff) | |
download | gentoo-2-d6975edaad025029ea2a86f4b222732b34fa916f.tar.gz gentoo-2-d6975edaad025029ea2a86f4b222732b34fa916f.tar.bz2 gentoo-2-d6975edaad025029ea2a86f4b222732b34fa916f.zip |
Addd patch for gdal-2.0 compilation, fixes bug 554310.
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key B1E955DB)
Diffstat (limited to 'dev-games')
-rw-r--r-- | dev-games/openscenegraph/ChangeLog | 6 | ||||
-rw-r--r-- | dev-games/openscenegraph/files/openscenegraph-3.2.1-gdal-2.0.patch | 49 | ||||
-rw-r--r-- | dev-games/openscenegraph/openscenegraph-3.2.1-r1.ebuild | 3 |
3 files changed, 56 insertions, 2 deletions
diff --git a/dev-games/openscenegraph/ChangeLog b/dev-games/openscenegraph/ChangeLog index f32eb9dd51b2..a5cb559fd305 100644 --- a/dev-games/openscenegraph/ChangeLog +++ b/dev-games/openscenegraph/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-games/openscenegraph # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-games/openscenegraph/ChangeLog,v 1.63 2015/07/14 17:30:59 reavertm Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-games/openscenegraph/ChangeLog,v 1.64 2015/07/20 19:24:57 reavertm Exp $ + + 20 Jul 2015; Maciej Mrozowski <reavertm@gentoo.org> + +files/openscenegraph-3.2.1-gdal-2.0.patch, openscenegraph-3.2.1-r1.ebuild: + Addd patch for gdal-2.0 compilation, fixes bug 554310. *openscenegraph-3.2.1-r1 (14 Jul 2015) diff --git a/dev-games/openscenegraph/files/openscenegraph-3.2.1-gdal-2.0.patch b/dev-games/openscenegraph/files/openscenegraph-3.2.1-gdal-2.0.patch new file mode 100644 index 000000000000..639cbc958258 --- /dev/null +++ b/dev-games/openscenegraph/files/openscenegraph-3.2.1-gdal-2.0.patch @@ -0,0 +1,49 @@ +--- OpenSceneGraph-3.2.1/src/osgPlugins/ogr/ReaderWriterOGR.cpp ++++ OpenSceneGraph-3.2.1/src/osgPlugins/ogr/ReaderWriterOGR.cpp +@@ -134,11 +134,21 @@ + + virtual ReadResult readFile(const std::string& fileName, const osgDB::ReaderWriter::Options* options) const + { ++#if GDAL_VERSION_MAJOR < 2 + if (OGRSFDriverRegistrar::GetRegistrar()->GetDriverCount() == 0) + OGRRegisterAll(); ++#else ++ if (GDALGetDriverCount() == 0) ++ GDALAllRegister(); ++#endif + + // Try to open data source ++#if GDAL_VERSION_MAJOR < 2 + OGRDataSource* file = OGRSFDriverRegistrar::Open(fileName.c_str()); ++#else ++ GDALDataset *file; ++ file = (GDALDataset*) GDALOpenEx( fileName.c_str(), GDAL_OF_VECTOR, NULL, NULL, NULL ); ++#endif + if (!file) + return 0; + +@@ -156,6 +166,7 @@ + + osg::Group* group = new osg::Group; + ++#if GDAL_VERSION_MAJOR < 2 + for (int i = 0; i < file->GetLayerCount(); i++) + { + osg::Group* node = readLayer(file->GetLayer(i), file->GetName(), useRandomColorByFeature, addGroupPerFeature); +@@ -163,6 +174,16 @@ + group->addChild( node ); + } + OGRDataSource::DestroyDataSource( file ); ++#else ++ for (int i = 0; i < file->GetLayerCount(); i++) ++ { ++ OGRLayer* layer = (OGRLayer *)GDALDatasetGetLayer(file, i); ++ osg::Group* node = readLayer(layer, layer->GetName(), useRandomColorByFeature, addGroupPerFeature); ++ if (node) ++ group->addChild( node ); ++ } ++ GDALClose( file ); ++#endif + return group; + } + diff --git a/dev-games/openscenegraph/openscenegraph-3.2.1-r1.ebuild b/dev-games/openscenegraph/openscenegraph-3.2.1-r1.ebuild index 9ffe903f0357..b4b94637c373 100644 --- a/dev-games/openscenegraph/openscenegraph-3.2.1-r1.ebuild +++ b/dev-games/openscenegraph/openscenegraph-3.2.1-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-games/openscenegraph/openscenegraph-3.2.1-r1.ebuild,v 1.1 2015/07/14 17:30:59 reavertm Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-games/openscenegraph/openscenegraph-3.2.1-r1.ebuild,v 1.2 2015/07/20 19:24:57 reavertm Exp $ EAPI=5 @@ -89,6 +89,7 @@ DOCS=(AUTHORS.txt ChangeLog NEWS.txt) PATCHES=( "${FILESDIR}"/${PN}-3.2.1-cmake.patch + "${FILESDIR}"/${PN}-3.2.1-gdal-2.0.patch ) src_configure() { |